subiam 1.3.1 → 1.3.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 +4 -4
- data/lib/subiam/client.rb +2 -1
- data/lib/subiam/driver.rb +3 -2
- data/lib/subiam/version.rb +1 -1
- data/subiam.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f0b5670a50dcc6f6055c40d914a4d14d1572989f
|
|
4
|
+
data.tar.gz: 4e7905af3e231805bc5877ff929e6d49da7171d8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3b316c0bcb141985faa3462fd2fed020793ea0974f5b7fb2c784d30f6318225e75a67c8b0aeb3caffa4f562a73becb9193256a849cc98fadbbac1b35ad0b30c5
|
|
7
|
+
data.tar.gz: 0232dcc311173fb3b9d519f60b6a4c2e94f29638f0c6148cdb1381588604b2eab4a1732723bd0aaee388c2f2995641e7c041a7badcff49bb9d16294430222d0c
|
data/lib/subiam/client.rb
CHANGED
|
@@ -5,7 +5,8 @@ class Subiam::Client
|
|
|
5
5
|
@options = {:format => :ruby}.merge(options)
|
|
6
6
|
aws_config = options[:aws_config] || {}
|
|
7
7
|
@iam = Aws::IAM::Client.new(aws_config)
|
|
8
|
-
@
|
|
8
|
+
@sts = Aws::STS::Client.new(aws_config)
|
|
9
|
+
@driver = Subiam::Driver.new(@iam, @sts, options)
|
|
9
10
|
@password_manager = options[:password_manager] || Subiam::PasswordManager.new('-', options)
|
|
10
11
|
@target = nil
|
|
11
12
|
end
|
data/lib/subiam/driver.rb
CHANGED
|
@@ -4,8 +4,9 @@ class Subiam::Driver
|
|
|
4
4
|
MAX_POLICY_SIZE = 2048
|
|
5
5
|
MAX_POLICY_VERSIONS = 5
|
|
6
6
|
|
|
7
|
-
def initialize(iam, options = {})
|
|
7
|
+
def initialize(iam, sts, options = {})
|
|
8
8
|
@iam = iam
|
|
9
|
+
@sts = sts
|
|
9
10
|
@options = options
|
|
10
11
|
end
|
|
11
12
|
|
|
@@ -457,7 +458,7 @@ class Subiam::Driver
|
|
|
457
458
|
|
|
458
459
|
def account_id
|
|
459
460
|
# https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
|
|
460
|
-
@account_id ||= @
|
|
461
|
+
@account_id ||= @sts.get_caller_identity.account
|
|
461
462
|
end
|
|
462
463
|
|
|
463
464
|
def policy_arn(policy_name)
|
data/lib/subiam/version.rb
CHANGED
data/subiam.gemspec
CHANGED
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
spec.email = ['yuya.yaguchi@gree.net']
|
|
11
11
|
spec.summary = %q{Subiam is a tool to manage IAM. Forked from Miam.}
|
|
12
12
|
spec.description = %q{Subiam is a tool to manage IAM. It defines the state of IAM using DSL, and updates IAM according to DSL. Forked from Miam.}
|
|
13
|
-
spec.homepage = 'https://github.com/
|
|
13
|
+
spec.homepage = 'https://github.com/gree/subiam'
|
|
14
14
|
spec.license = 'MIT'
|
|
15
15
|
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: subiam
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Genki Sugawara
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2016-
|
|
12
|
+
date: 2016-08-30 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: aws-sdk-core
|
|
@@ -213,7 +213,7 @@ files:
|
|
|
213
213
|
- spec/subiam/target_spec.rb
|
|
214
214
|
- spec/subiam/update_spec.rb
|
|
215
215
|
- subiam.gemspec
|
|
216
|
-
homepage: https://github.com/
|
|
216
|
+
homepage: https://github.com/gree/subiam
|
|
217
217
|
licenses:
|
|
218
218
|
- MIT
|
|
219
219
|
metadata: {}
|