awskeyring 1.13.0 → 1.13.1

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: 77b3d983a4ed2fefb518f35a38a93070b200b7c6d6a22cb189bf3df954636c6b
4
- data.tar.gz: '085d5f2dd6622efd844dcbb952a92030ed9cafb4e52098f96b7fee904c3a5739'
3
+ metadata.gz: daacd162f1bb61f73cfb0a40d13fbf64bbf4c29ff2a5fd64b93a198d7b480aac
4
+ data.tar.gz: ed615d2f74f0e2962b320dd8ca0616dc72b8190e2bdefbc29789bb90ab5f7322
5
5
  SHA512:
6
- metadata.gz: cb99fad81b567e8db647ad41b7c3d56c2a42000006c5ef1f9adc9c72db3f524a043c6a0e55d17e82977b9308e242604f5fe4473ab49065698ec440d95fe09727
7
- data.tar.gz: f39f3e192b664eab640662e0e74c3d1db37939a4048ee6990c8e1bb411f9b053b24c2dc8614b8ea5f46bc2509a1419b1f32ef5b9799fa6b8284a0930ff4056d9
6
+ metadata.gz: 2ed0290739e4ca068b2233fe25d5e62312cde392d2d592ddad88f979de6a078910c6abda59a40f1d4ef56b8a4fee295775dd0c5cb705d918b5c6dffbaa0c1d1f
7
+ data.tar.gz: 901e34269af131cb4f85d2811953acc6cae3cb529fb04b49880f372ad4e7547cab342b07c514bf820f19a6b91c5afcc6f5eb3b9e41ca182aed56f991224a36c6
data/README.md CHANGED
@@ -84,6 +84,7 @@ The CLI is using [Thor](http://whatisthor.com) with help provided interactively.
84
84
  awskeyring remove-token ACCOUNT # Removes a token for ACCOUNT from the keyring
85
85
  awskeyring rotate ACCOUNT # Rotate access keys for an ACCOUNT
86
86
  awskeyring token ACCOUNT [ROLE] [CODE] # Create an STS Token from a ROLE or an mfa CODE
87
+ awskeyring tree # Print a tree of all available commands
87
88
  awskeyring update ACCOUNT # Updates an ACCOUNT in the keyring
88
89
 
89
90
  and autocomplete that can be installed with:
@@ -5,6 +5,8 @@ require 'cgi'
5
5
  require 'json'
6
6
  require 'securerandom'
7
7
 
8
+ require 'awskeyring/validate'
9
+
8
10
  # Awskeyring Module,
9
11
  # gives you an interface to access keychains and items.
10
12
  module Awskeyring
@@ -92,8 +94,8 @@ module Awskeyring
92
94
  end
93
95
 
94
96
  {
95
- key: response.credentials[:access_key_id],
96
- secret: response.credentials[:secret_access_key],
97
+ key: Awskeyring::Validate.session_key(response.credentials[:access_key_id]),
98
+ secret: Awskeyring::Validate.secret_access_key(response.credentials[:secret_access_key]),
97
99
  token: response.credentials[:session_token],
98
100
  expiry: response.credentials[:expiration]
99
101
  }
@@ -25,6 +25,15 @@ module Awskeyring
25
25
  aws_access_key
26
26
  end
27
27
 
28
+ # Validate an AWS Session Key ID
29
+ #
30
+ # @param [String] aws_session_key The aws_session_key_id
31
+ def self.session_key(aws_session_key)
32
+ raise 'Invalid Session Key' unless /\AASIA[A-Z234567]{16}\z/.match?(aws_session_key)
33
+
34
+ aws_session_key
35
+ end
36
+
28
37
  # Validate an AWS Secret Key ID
29
38
  #
30
39
  # @param [String] aws_secret_access_key The aws_secret_access_key
@@ -6,7 +6,7 @@ require 'json'
6
6
  # Version const and query of latest.
7
7
  module Awskeyring
8
8
  # The Gem's version number
9
- VERSION = '1.13.0'
9
+ VERSION = '1.13.1'
10
10
  # The Gem's homepage
11
11
  HOMEPAGE = 'https://github.com/tristanmorgan/awskeyring'
12
12
 
data/man/awskeyring.5 CHANGED
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "AWSKEYRING" "5" "February 2025" "" ""
4
+ .TH "AWSKEYRING" "5" "June 2026" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBAwskeyring\fR \- is a small tool to manage AWS account keys in the macOS Keychain
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awskeyring
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tristan Morgan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-02-04 00:00:00.000000000 Z
11
+ date: 2026-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-iam
@@ -92,9 +92,9 @@ licenses:
92
92
  metadata:
93
93
  bug_tracker_uri: https://github.com/tristanmorgan/awskeyring/issues
94
94
  changelog_uri: https://github.com/tristanmorgan/awskeyring/blob/main/CHANGELOG.md
95
- documentation_uri: https://rubydoc.info/gems/awskeyring/1.13.0
95
+ documentation_uri: https://rubydoc.info/gems/awskeyring/1.13.1
96
96
  rubygems_mfa_required: 'true'
97
- source_code_uri: https://github.com/tristanmorgan/awskeyring/tree/v1.13.0
97
+ source_code_uri: https://github.com/tristanmorgan/awskeyring/tree/v1.13.1
98
98
  wiki_uri: https://github.com/tristanmorgan/awskeyring/wiki
99
99
  post_install_message:
100
100
  rdoc_options: []