armrest 0.2.1 → 0.2.2

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: 8fa3acf6609a37ab249c81102bb915108499631571af0b5884c4d66b33f28376
4
- data.tar.gz: 3691659a2058ccd4944397cad38a9c22194fdc96afb89288e6f21957aa2b2131
3
+ metadata.gz: 8d1a435132d293f351949c1d9d2e77cb28e9fd78184249244c1ec6d8ae857c47
4
+ data.tar.gz: 7fd1d29acd2f837924d0fc0f4cb15bf8253a43c955a46fca30c5eb25b3e9eaa9
5
5
  SHA512:
6
- metadata.gz: bf768b1fb7c039488df49baa4e9d68cf6af33db34d238ec49d8063dd215b2b82d8abe8a39b8d04d3806f9c3874aa7d1623992f8e1bd689f8ccff49b2ffcfcbc0
7
- data.tar.gz: 17d2bd2bacc9ed0727cca2d9c5b870e0557c86a32aed60af2c10bc73ccb55e0832d08e7343fa6534bb4b33375f309b2ce286921d74362d0f766dec113ae71df8
6
+ metadata.gz: 9412dafc2f04867514458f21e9a14c8df14658ad622a212660bf74fb5ec5de84f486f3343048d2ab2421fb0ccf892c98a9dd0c0f954ee83554035b6aa189c203
7
+ data.tar.gz: b9aa3ab20fab1fa45a1f4507aad1e6400bacc04058eb6b1fc2ccb8473319a38add55bb1aec41d348ed0e014d031a8afcdf1d86591e4454ff0149ea0921643103
data/CHANGELOG.md CHANGED
@@ -3,6 +3,9 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [0.2.2] - 2023-12-31
7
+ - [#8](https://github.com/boltops-tools/armrest/pull/8) cli auth scope for vault secrets
8
+
6
9
  ## [0.2.1] - 2023-12-22
7
10
  - [#6](https://github.com/boltops-tools/armrest/pull/6) Adjust the AZ timeout
8
11
 
@@ -22,10 +22,12 @@ module Armrest::Api::Auth
22
22
  data.deep_transform_keys { |k| k.underscore } # to normalize the structure to the other classes
23
23
  end
24
24
 
25
- # Looks like az account get-access-token caches the toke in ~/.azure/accessTokens.json
26
- # and will update it only when it expires. So dont think we need to handle caching
25
+ # The az cli command itself has it's own caching. So dont think we need to handle caching
27
26
  def get_access_token
28
27
  command = "az account get-access-token -o json"
28
+ if resource.include?("vault.azure.net")
29
+ command += " --scope https://vault.azure.net/.default"
30
+ end
29
31
  logger.debug "command: #{command}"
30
32
  out = `#{command}`
31
33
  if $?.success?
@@ -1,3 +1,3 @@
1
1
  module Armrest
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: armrest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-22 00:00:00.000000000 Z
11
+ date: 2023-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport