rails_kms_credentials 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ffcfd3a08a85870fd8b6766fe27ab31e56f3955e3ab896017ea9d2589da1ca01
4
- data.tar.gz: b50ad3a3cef7961756cac6b67c3dee6819755310bd4941897d6fdd8a3d5741d4
3
+ metadata.gz: a26eb0c9f7955c0194d458d7885c1111ef00b091479400e87117d50627cd8aa8
4
+ data.tar.gz: fbd4f98d7e786ec2e83ee5ae40cc078e655d34461195cab057584648d0c78019
5
5
  SHA512:
6
- metadata.gz: fdfe4826eed0375403edbfaa0a308c937fe7d611eb8017ce8db072b9d93400b6033bcf806c311777dd75f38c4e965d9c3c5e06384cb1dc609c6b64366b58259d
7
- data.tar.gz: b66eb3b4d6c86d2d218f427b31647844efc89d7dc0b13e8489296c6a63071f71b3cca15da2664de4c1189b9f6dc14b604e64f75b2689d0e0dcfc265e1c7cd242
6
+ metadata.gz: 4013a1ff4b2df35b2cdb7569b00654a70cc552f83adb43ea9b177264470f125c0bcd4c0456355b041e877dadf07399d042981353fbb7a04f3eafa321523ba271
7
+ data.tar.gz: bd2c6472a47b2746e7cca38dfab08b476a74d2b989a65b3ffced87aead5a5d77c565f860e8e797740f4c313d417be25ec312cb78044eec68b94943726084168f
@@ -21,6 +21,12 @@ module RailsKmsCredentials
21
21
  raise NotImplementedError
22
22
  end
23
23
 
24
+ private
25
+
26
+ def client_config
27
+ config['client']
28
+ end
29
+
24
30
  end
25
31
  end
26
32
  end
@@ -37,10 +37,6 @@ module RailsKmsCredentials
37
37
 
38
38
  private
39
39
 
40
- def client_config
41
- config['client']
42
- end
43
-
44
40
  def access_token
45
41
  return @access_token if instance_variable_defined?(:@access_token)
46
42
  @_access_token_response = HTTParty.post(
@@ -27,8 +27,10 @@ module RailsKmsCredentials
27
27
 
28
28
  def access_token
29
29
  return @access_token if instance_variable_defined?(:@access_token)
30
+ url = 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https%3A%2F%2Fvault.azure.net'
31
+ url += "&client_id=#{client_config['client_id']}" if client_config['client_id']
30
32
  @_access_token_response = HTTParty.get(
31
- 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https%3A%2F%2Fvault.azure.net',
33
+ url,
32
34
  {
33
35
  headers: { Metadata: 'true' },
34
36
  }
@@ -4,8 +4,8 @@ module RailsKmsCredentials
4
4
 
5
5
  module Version
6
6
  MAJOR = 0
7
- MINOR = 1
8
- PATCH = 1
7
+ MINOR = 2
8
+ PATCH = 0
9
9
 
10
10
  end
11
11
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_kms_credentials
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taylor Yelverton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-10 00:00:00.000000000 Z
11
+ date: 2022-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport