miasma-aws 0.3.18 → 0.3.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/miasma-aws/version.rb +1 -1
- data/lib/miasma/contrib/aws.rb +7 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04a578bff18113ac8611dca8ce988c964e54c7ad28e9c5da32742bb07e4a5afd
|
4
|
+
data.tar.gz: f495f1066d0f3a42aac9485330799a3588e7e3144b5ae3b2b65950067a769b94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04015f3c41bb33aaa3316411ae089b5dfa28f95f8798c78890c37c12d501760a84d3cdc04b9db5039eabde96a8861f9a433504d470647b8c126056007d2fc84e
|
7
|
+
data.tar.gz: f91b0f9d0c61803f21470b6a3e171ad682d91cbcd2b36da01e31cfc6e74c0b88a99b115bdd6d75b527f19c513e433ea135fdc322c206104c1e41e1a1e65b71a8
|
data/CHANGELOG.md
CHANGED
data/lib/miasma-aws/version.rb
CHANGED
data/lib/miasma/contrib/aws.rb
CHANGED
@@ -94,7 +94,11 @@ module Miasma
|
|
94
94
|
# @param key_override [Object]
|
95
95
|
# @return [Object] signature
|
96
96
|
def sign(data, key_override = nil)
|
97
|
-
|
97
|
+
s_key = key_override || key
|
98
|
+
if s_key.nil?
|
99
|
+
raise ArgumentError.new("No key provided for signing data")
|
100
|
+
end
|
101
|
+
result = OpenSSL::HMAC.digest(digest, key_override || key, data.to_s)
|
98
102
|
digest.reset
|
99
103
|
result
|
100
104
|
end
|
@@ -788,7 +792,7 @@ module Miasma
|
|
788
792
|
def sts_assume_role_update_required?(args = {})
|
789
793
|
if args.fetch(:aws_sts_role_arn, attributes[:aws_sts_role_arn])
|
790
794
|
expiry = args.fetch(:aws_sts_token_expires, attributes[:aws_sts_token_expires])
|
791
|
-
expiry.nil? || expiry <= Time.now
|
795
|
+
expiry.nil? || expiry - 15 <= Time.now
|
792
796
|
else
|
793
797
|
false
|
794
798
|
end
|
@@ -803,7 +807,7 @@ module Miasma
|
|
803
807
|
:aws_sts_session_token_expires,
|
804
808
|
attributes[:aws_sts_session_token_expires]
|
805
809
|
)
|
806
|
-
expiry.nil? || expiry <= Time.now
|
810
|
+
expiry.nil? || expiry - 15 <= Time.now
|
807
811
|
else
|
808
812
|
false
|
809
813
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miasma-aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Roberts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: miasma
|