moto 4.2.3.dev33__py2.py3-none-any.whl → 4.2.3.dev37__py2.py3-none-any.whl
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.
- moto/__init__.py +1 -1
- moto/core/models.py +2 -2
- moto/core/responses_custom_registry.py +7 -0
- moto/iam/models.py +10 -1
- moto/sts/models.py +1 -0
- {moto-4.2.3.dev33.dist-info → moto-4.2.3.dev37.dist-info}/METADATA +1 -1
- {moto-4.2.3.dev33.dist-info → moto-4.2.3.dev37.dist-info}/RECORD +12 -12
- {moto-4.2.3.dev33.dist-info → moto-4.2.3.dev37.dist-info}/AUTHORS.md +0 -0
- {moto-4.2.3.dev33.dist-info → moto-4.2.3.dev37.dist-info}/LICENSE +0 -0
- {moto-4.2.3.dev33.dist-info → moto-4.2.3.dev37.dist-info}/WHEEL +0 -0
- {moto-4.2.3.dev33.dist-info → moto-4.2.3.dev37.dist-info}/entry_points.txt +0 -0
- {moto-4.2.3.dev33.dist-info → moto-4.2.3.dev37.dist-info}/top_level.txt +0 -0
moto/__init__.py
CHANGED
moto/core/models.py
CHANGED
|
@@ -56,8 +56,8 @@ class BaseMockAWS(ContextManager["BaseMockAWS"]):
|
|
|
56
56
|
self.backends_for_urls.extend(default_backends)
|
|
57
57
|
|
|
58
58
|
self.FAKE_KEYS = {
|
|
59
|
-
"AWS_ACCESS_KEY_ID": "
|
|
60
|
-
"AWS_SECRET_ACCESS_KEY": "
|
|
59
|
+
"AWS_ACCESS_KEY_ID": "FOOBARKEY",
|
|
60
|
+
"AWS_SECRET_ACCESS_KEY": "FOOBARSECRET",
|
|
61
61
|
}
|
|
62
62
|
self.ORIG_KEYS: Dict[str, Optional[str]] = {}
|
|
63
63
|
self.default_session_mock = patch("boto3.DEFAULT_SESSION", None)
|
|
@@ -17,6 +17,13 @@ class CustomRegistry(responses.registries.FirstMatchRegistry):
|
|
|
17
17
|
def __init__(self) -> None:
|
|
18
18
|
self._registered: Dict[str, List[responses.BaseResponse]] = defaultdict(list)
|
|
19
19
|
|
|
20
|
+
@property
|
|
21
|
+
def registered(self) -> List[responses.BaseResponse]:
|
|
22
|
+
res = []
|
|
23
|
+
for resps in self._registered.values():
|
|
24
|
+
res += resps
|
|
25
|
+
return res
|
|
26
|
+
|
|
20
27
|
def add(self, response: responses.BaseResponse) -> responses.BaseResponse:
|
|
21
28
|
if response not in self._registered[response.method]:
|
|
22
29
|
self._registered[response.method].append(response)
|
moto/iam/models.py
CHANGED
|
@@ -84,9 +84,17 @@ def mark_account_as_visited(
|
|
|
84
84
|
) -> None:
|
|
85
85
|
account = iam_backends[account_id]
|
|
86
86
|
if access_key in account["global"].access_keys:
|
|
87
|
-
account["global"].access_keys[access_key]
|
|
87
|
+
key = account["global"].access_keys[access_key]
|
|
88
|
+
key.last_used = AccessKeyLastUsed(
|
|
88
89
|
timestamp=utcnow(), service=service, region=region
|
|
89
90
|
)
|
|
91
|
+
if key.role_arn:
|
|
92
|
+
try:
|
|
93
|
+
role = account["global"].get_role_by_arn(key.role_arn)
|
|
94
|
+
role.last_used = utcnow()
|
|
95
|
+
except IAMNotFoundException:
|
|
96
|
+
# User assumes a non-existing role
|
|
97
|
+
pass
|
|
90
98
|
else:
|
|
91
99
|
# User provided access credentials unknown to us
|
|
92
100
|
pass
|
|
@@ -1082,6 +1090,7 @@ class AccessKey(CloudFormationModel):
|
|
|
1082
1090
|
self.status = status
|
|
1083
1091
|
self.create_date = utcnow()
|
|
1084
1092
|
self.last_used: Optional[datetime] = None
|
|
1093
|
+
self.role_arn: Optional[str] = None
|
|
1085
1094
|
|
|
1086
1095
|
@property
|
|
1087
1096
|
def created_iso_8601(self) -> str:
|
moto/sts/models.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
moto/__init__.py,sha256=
|
|
1
|
+
moto/__init__.py,sha256=R9OghyMXciMZscRUbeoOtIVgMLzHDXTEXhYKzRocOak,9689
|
|
2
2
|
moto/backend_index.py,sha256=JDpbrcbt5e30v7D8c5IsxbqIDUXTvm4OuClX6V81cJU,10707
|
|
3
3
|
moto/backends.py,sha256=rC9WUMUUWmVmX7ZEfXpVKAQAw6oI8qYobCEPxP2Zv9U,1805
|
|
4
4
|
moto/server.py,sha256=cp8kIe5jVOm7Z2BlNN2AMbTfrRvLBEKSb4mt7O8nu34,2858
|
|
@@ -166,9 +166,9 @@ moto/core/common_types.py,sha256=SFKnDUPi8PFhXgUrQNqXEfDY745ENjzb-FLqSV4daD0,155
|
|
|
166
166
|
moto/core/custom_responses_mock.py,sha256=-e8kIDZOAOFkKlihgdu3rRxWDJaDgFoJ5J5O_vKp9Bw,6412
|
|
167
167
|
moto/core/exceptions.py,sha256=jaH9g49vuedHkqLk1P1ivTzV9TMUqfdoWJAyqRAGYYw,5861
|
|
168
168
|
moto/core/model_instances.py,sha256=q1WR4hsoHssBjOxhNOS3e0j3rc_ZaN_-74ihnwQuEGA,482
|
|
169
|
-
moto/core/models.py,sha256=
|
|
169
|
+
moto/core/models.py,sha256=tBaXhC5UX1BhhWD_JVigjr-BN4UvDzjxdNxdD1cMY00,16660
|
|
170
170
|
moto/core/responses.py,sha256=0ucNQyNJaWAPbaxTtYYbdj5RHJjOAd2WJG104g9gtC8,42241
|
|
171
|
-
moto/core/responses_custom_registry.py,sha256=
|
|
171
|
+
moto/core/responses_custom_registry.py,sha256=NNMwJAqNvQ8RLeIDQPweZd-ol2rE3kFAq1SRNEAC4-s,2491
|
|
172
172
|
moto/core/utils.py,sha256=Bz-jdoFetLJnUahqvnKtDOHTOGls-qZdJGO98354l38,15319
|
|
173
173
|
moto/core/versions.py,sha256=FY5eezCUiRDuAOm47IeQTZH8cDidh8h2SogOlw2XKGs,578
|
|
174
174
|
moto/databrew/__init__.py,sha256=xuv2eCEIDxveMoJ74FhhqbgH7btWbwxTlMP4vhVy3gM,130
|
|
@@ -574,7 +574,7 @@ moto/iam/access_control.py,sha256=FSZj8fDyejH56NAPjTPOVqHhi_kZuqs_e7T3M2Iarl4,17
|
|
|
574
574
|
moto/iam/aws_managed_policies.py,sha256=evLFbwLABM5R6EawPB53REb5rbQf0IZALECvFEV1UBY,1599363
|
|
575
575
|
moto/iam/config.py,sha256=1EzR6jyRGxiRgcT5eipreet42aNhfZ36fnjJpVcmVCI,14247
|
|
576
576
|
moto/iam/exceptions.py,sha256=NwspEsNOzAcqdRcJ8xbhz_HQB7GuLiLq4d2VnkJfW8s,3532
|
|
577
|
-
moto/iam/models.py,sha256=
|
|
577
|
+
moto/iam/models.py,sha256=TD4y3s_qkQAl6pEcZPyB6xMggebcXBeaz7Szls-DrhQ,119409
|
|
578
578
|
moto/iam/policy_validation.py,sha256=2f-ZBGNqHNa6G2OTY6l7L0vF1VFqhUa0ZgRGhMHJb2k,23273
|
|
579
579
|
moto/iam/responses.py,sha256=mzq5u1xa6C_JAeys3TNC_3KG0Yfl0MYhkwQUoHqG160,107330
|
|
580
580
|
moto/iam/urls.py,sha256=MrlUR650mLyoZ0i0T77OjMJvyF08in3IvK8305sZ0Z8,134
|
|
@@ -970,7 +970,7 @@ moto/stepfunctions/urls.py,sha256=P1xKTZHPm_YYGx6QwJ3IMQRxekQTScDaCq1HVCdYjcE,15
|
|
|
970
970
|
moto/stepfunctions/utils.py,sha256=EAxWSdbWCbVpOXkGQW5CdKew93wD7FBY02xXTBIaGZ8,755
|
|
971
971
|
moto/sts/__init__.py,sha256=UMtQ5v3E3AtGmG3Z5fmmByCXiry41daVgj889RKFyCc,115
|
|
972
972
|
moto/sts/exceptions.py,sha256=jpr2e4xHLsauuDb1dk9U42V3FqdeSFAc6bAwJhtkVOY,272
|
|
973
|
-
moto/sts/models.py,sha256=
|
|
973
|
+
moto/sts/models.py,sha256=7mHQTu4gd8xB3OsL2zrO27Eyd6Xcqv-NNutbjq__mVE,7191
|
|
974
974
|
moto/sts/responses.py,sha256=PM0s7RBfBxL63X6o1WmnffSmNS0JclyHXVwFx3BeGYE,8965
|
|
975
975
|
moto/sts/urls.py,sha256=7y7AQ02m_T3kay4wgLf3gOgHw2OnqGXgQwjbSQs0EAQ,138
|
|
976
976
|
moto/sts/utils.py,sha256=TMRc52EZKQHbdbPXiw-NUlUtX9orMErK5GBhoex3Duo,778
|
|
@@ -1034,10 +1034,10 @@ moto/xray/mock_client.py,sha256=nYl8JVJbl3OY-tnUafkVOG4K4-cFm5bsft3Hxo7fKwI,3809
|
|
|
1034
1034
|
moto/xray/models.py,sha256=0QL6nmhpVVwAiyi9aw4pBwVTRhqPW9oIy2uwPDhPKug,11179
|
|
1035
1035
|
moto/xray/responses.py,sha256=p2xsg2-P9h_1DCyuBC7GenmC5L64tXAX6a-XCb2j5-o,6316
|
|
1036
1036
|
moto/xray/urls.py,sha256=R6T3gMwobWipukWcC1DQ36CU1Rjt6oqBDoe-7HqaIZU,393
|
|
1037
|
-
moto-4.2.3.
|
|
1038
|
-
moto-4.2.3.
|
|
1039
|
-
moto-4.2.3.
|
|
1040
|
-
moto-4.2.3.
|
|
1041
|
-
moto-4.2.3.
|
|
1042
|
-
moto-4.2.3.
|
|
1043
|
-
moto-4.2.3.
|
|
1037
|
+
moto-4.2.3.dev37.dist-info/AUTHORS.md,sha256=dDUhasV8HGSkzb7zj7a0b3alnqY0P1LPOyOUNoo8Mpo,2976
|
|
1038
|
+
moto-4.2.3.dev37.dist-info/LICENSE,sha256=8S75_TlqE-kIeGMLG0-rRxxu2ct6SM8quyUWKBYyIY4,10834
|
|
1039
|
+
moto-4.2.3.dev37.dist-info/METADATA,sha256=R18Li1ewC9il8GFsgTB7vJNA80-RBEY80epc4kUyOrY,12102
|
|
1040
|
+
moto-4.2.3.dev37.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
|
|
1041
|
+
moto-4.2.3.dev37.dist-info/entry_points.txt,sha256=aPovbZuFXCwt8_m2vcolpH4Qr3rOF3yXeRElP9Zkauo,49
|
|
1042
|
+
moto-4.2.3.dev37.dist-info/top_level.txt,sha256=TETRKAPcAAvoZDkSkwQiZtTSr-1gzaEAXVm9FmZKj8s,5
|
|
1043
|
+
moto-4.2.3.dev37.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|