miam 0.2.4.beta8 → 0.2.4.beta9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/README.md +2 -0
- data/lib/miam/client.rb +2 -1
- data/lib/miam/driver.rb +5 -2
- data/lib/miam/version.rb +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: 44bcfc369fae53c8765d934768e003a496078243
|
4
|
+
data.tar.gz: e7074dd752db3217df398dbe0bbd831853a3e2e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80661b72134d986f3d3c77f7e02dd42e6c187eac8801fd019c72c657e3e94d4149137bc865034aa363310e6531786a6dbade724cbc751fb8daf923dc251a70d7
|
7
|
+
data.tar.gz: 1d2814ba935448e1bbb49ec5d3ff9e4587824913ec03ae338b69684440bed06537ff1a997fb6f184b37479b6593bd00139d2310bb5e200c2dc39ae2477cad521
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -25,6 +25,8 @@ It defines the state of IAM using DSL, and updates IAM according to DSL.
|
|
25
25
|
* `>= 0.2.4`
|
26
26
|
* Fix for Password Policy ([RP#22](https://github.com/winebarrel/miam/pull/22))
|
27
27
|
* Fix `--target` option for Policies ([RP#21](https://github.com/winebarrel/miam/pull/21))
|
28
|
+
* Fix for `Rate exceeded` ([PR#23](https://github.com/winebarrel/miam/pull/23))
|
29
|
+
* Fix for non-User credentials ([PR#17](https://github.com/winebarrel/miam/pull/17))
|
28
30
|
|
29
31
|
## Installation
|
30
32
|
|
data/lib/miam/client.rb
CHANGED
@@ -5,7 +5,8 @@ class Miam::Client
|
|
5
5
|
@options = {:format => :ruby}.merge(options)
|
6
6
|
aws_config = options.delete(:aws_config) || {}
|
7
7
|
@iam = Aws::IAM::Client.new(aws_config)
|
8
|
-
@
|
8
|
+
@sts = Aws::STS::Client.new(aws_config)
|
9
|
+
@driver = Miam::Driver.new(@iam, @sts, options)
|
9
10
|
@password_manager = options[:password_manager] || Miam::PasswordManager.new('-', options)
|
10
11
|
end
|
11
12
|
|
data/lib/miam/driver.rb
CHANGED
@@ -4,9 +4,11 @@ class Miam::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
|
11
|
+
@account_id = nil
|
10
12
|
end
|
11
13
|
|
12
14
|
def create_user(user_name, attrs)
|
@@ -473,7 +475,8 @@ class Miam::Driver
|
|
473
475
|
|
474
476
|
def account_id
|
475
477
|
# https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
|
476
|
-
|
478
|
+
# http://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity.html
|
479
|
+
@account_id ||= @sts.get_caller_identity.account
|
477
480
|
end
|
478
481
|
|
479
482
|
def policy_arn(policy_name, policy_path)
|
data/lib/miam/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miam
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.4.
|
4
|
+
version: 0.2.4.beta9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Genki Sugawara
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -243,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
243
243
|
version: 1.3.1
|
244
244
|
requirements: []
|
245
245
|
rubyforge_project:
|
246
|
-
rubygems_version: 2.5.
|
246
|
+
rubygems_version: 2.5.2
|
247
247
|
signing_key:
|
248
248
|
specification_version: 4
|
249
249
|
summary: Miam is a tool to manage IAM.
|