oneaws 0.2.2 → 0.3.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: 5ee925d0d61a6b799891a86f8a943898d9195d85d82057aef9fbd432d6a0cfb4
4
- data.tar.gz: 04a702610dc25934a7791047afb7b622f477ac479b3ce913ab65651a19dccc09
3
+ metadata.gz: dda27219e75a4a047c0ac7e6c10591eb46686a25007bc0ab55a08ea9ca6e6ab1
4
+ data.tar.gz: d093f8296dac9c675c540c213a9090e6d743c5577408e9af04645d9a7f7edc0f
5
5
  SHA512:
6
- metadata.gz: 413f0df2fa6f1b4f07c26e7f5d59e718e5275cd26b1a6c8dbe11c93e8b463dc58e0494cfdd5ff9f0ea79f37ee78d33b10b6ec176e818ab31b43f374b0dcc8d78
7
- data.tar.gz: 61a0a3c14c47759e1604bdacecfa04472b494f9d96b936236eb9dc35f5b2b7c87b596d08a5ee04a028450824eb1b3949595bfd8dd3b142599c2efef3183f6c1a
6
+ metadata.gz: 85b6edf146b66166dc48d725f03d0a9e80c761d126f87ee72b864ec9d31a2fb42dfe506205ee7fce370f37a647c681bcf5b718bb3752da9d7237cc2bb6eb0c88
7
+ data.tar.gz: 61fbf35cc9914673854e3b38b101d230872ef513a8fdba08bbf544dc7ab2b52e5effda941e268ca9e4bcd1f2f5afbf5785a1f6cb5183ff2def11a6b83dd01493
data/README.md CHANGED
@@ -16,6 +16,7 @@ export ONELOGIN_APP_ID=<your onelogin app_id>
16
16
  export ONELOGIN_SUBDOMAIN=<your onelogin subdomain>
17
17
  export AWS_ROLE_ARN=<your aws role arn>
18
18
  export AWS_PRINCIPAL_ARN=<your aws idp arn>
19
+ export DURATION_SECONDS=<token duration(sec)> # Option: default 3600
19
20
 
20
21
  # fish
21
22
  set -x ONELOGIN_CLIENT_ID <your onelogin client id>
@@ -26,6 +27,7 @@ set -x ONELOGIN_APP_ID <your onelogin app_id>
26
27
  set -x ONELOGIN_SUBDOMAIN <your onelogin subdomain>
27
28
  set -x AWS_ROLE_ARN <your aws role arn>
28
29
  set -x AWS_PRINCIPAL_ARN <your aws idp arn>
30
+ set -x DURATION_SECONDS <token duration(sec)> # Option: default 3600
29
31
  ```
30
32
 
31
33
  環境変数を設定したら実行します。
@@ -34,4 +36,4 @@ set -x AWS_PRINCIPAL_ARN <your aws idp arn>
34
36
  oneaws
35
37
  ```
36
38
 
37
- `-u` オプションをつけていると `~/.aws/credentials` に追記されます(default: true)。
39
+ `-u` オプションをつけていると `~/.aws/credentials` に追記されます(default: true)。
data/lib/oneaws/client.rb CHANGED
@@ -65,7 +65,7 @@ module Oneaws
65
65
  saml_assertion = response.saml_response
66
66
 
67
67
  params = {
68
- duration_seconds: 3600,
68
+ duration_seconds: (ENV['DURATION_SECONDS'] || 3600).to_i,
69
69
  principal_arn: ENV['AWS_PRINCIPAL_ARN'],
70
70
  role_arn: ENV['AWS_ROLE_ARN'],
71
71
  saml_assertion: saml_assertion,
@@ -1,3 +1,3 @@
1
1
  module Oneaws
2
- VERSION = "0.2.2"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oneaws
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuki Koya
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-21 00:00:00.000000000 Z
11
+ date: 2023-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core