fluent-plugin-azure-storage-append-blob-lts 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f0868aba2220e9c160b9e8bec8854921864b580c1b7cb1d05845ca9e73c4606
|
4
|
+
data.tar.gz: 4d73dcf3a57b45018de76a862407062049735da53e96aa664db6304bc65b8718
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d72f2ccdfb8c92f13694c05f4fc9a349144dd4016b0c1eebee613d8ef536a5072a8635028a097cf21a546220cd11f870eddd4675b1e3241194b39d2a0ddf2d46
|
7
|
+
data.tar.gz: a7dfd1c386ed529d9ead3978fe436c7f69a653bd4ce206b5755c8af78142464c4779ab3d781fc14c035f650e5e8940c97a8a4dca240a933ffb5d733b924d9ae3
|
data/README.md
CHANGED
@@ -31,6 +31,7 @@ And then execute:
|
|
31
31
|
azure_imds_api_version <Azure Instance Metadata Service API Version> # only used for MSI
|
32
32
|
azure_token_refresh_interval <refresh interval in min> # only used for MSI
|
33
33
|
azure_container <your azure storage container>
|
34
|
+
azure_msi_client_id <Azure Managed Identity Client ID> # only used for MSI
|
34
35
|
auto_create_container true
|
35
36
|
path logs/
|
36
37
|
azure_object_key_format %{path}%{time_slice}_%{index}.log
|
@@ -75,6 +76,10 @@ When using MSI, the initial access token needs to be refreshed periodically.
|
|
75
76
|
|
76
77
|
Azure Storage Container name
|
77
78
|
|
79
|
+
### `azure_msi_client_id` (Optional, only for MSI)
|
80
|
+
|
81
|
+
Azure Identity Client ID to use for accessing Azure Blob service.
|
82
|
+
|
78
83
|
### `auto_create_container`
|
79
84
|
|
80
85
|
This plugin creates the Azure container if it does not already exist exist when you set 'auto_create_container' to true.
|
@@ -24,6 +24,7 @@ module Fluent
|
|
24
24
|
config_param :azure_storage_access_key, :string, default: nil, secret: true
|
25
25
|
config_param :azure_storage_sas_token, :string, default: nil, secret: true
|
26
26
|
config_param :azure_storage_connection_string, :string, default: nil, secret: true
|
27
|
+
config_param :azure_msi_client_id, :string, default: nil
|
27
28
|
config_param :azure_container, :string, default: nil
|
28
29
|
config_param :azure_imds_api_version, :string, default: '2019-08-15'
|
29
30
|
config_param :azure_token_refresh_interval, :integer, default: 60
|
@@ -79,11 +80,15 @@ module Fluent
|
|
79
80
|
def get_access_token
|
80
81
|
access_key_request = Faraday.new('http://169.254.169.254/metadata/identity/oauth2/token?' \
|
81
82
|
"api-version=#{@azure_imds_api_version}" \
|
82
|
-
'&resource=https://storage.azure.com/'
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
83
|
+
'&resource=https://storage.azure.com/' \
|
84
|
+
"#{! azure_msi_client_id.nil? ? "&client_id=#{azure_msi_client_id}" : ''}",
|
85
|
+
headers: { 'Metadata' => 'true' }).get
|
86
|
+
|
87
|
+
if access_key_request.status == 200
|
88
|
+
JSON.parse(access_key_request.body)['access_token']
|
89
|
+
else
|
90
|
+
raise "Access token request was not sucssessful. Possibly due to missing azure_msi_client_id config parameter."
|
91
|
+
end
|
87
92
|
end
|
88
93
|
|
89
94
|
def start
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-azure-storage-append-blob-lts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas-Taha El Sesiy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|