fix(iam): read iam:AccountPropertyNamespaces from the keys PutAccountProperties sets (#9736)

The generated IAM condition key table had iam:AccountPropertyNamespaces in notRead on both actions the Service
Reference lists it on, so a policy keyed on it matched nothing: the IAM user guide's DenyRoleManagerEnablement
statement, ForAnyValue:StringEquals on RoleManager, let a caller enable role manager, and an Allow requiring the
namespace refused every call.

Neither botocore nor the Service Reference says where the value is; AWS's pages do. The IAM user guide's condition
key table: iam:AccountPropertyNamespaces "Specifies the account property namespaces being read or modified in the
request ... When you call PutAccountProperties or GetAccountProperties". The API reference on PutAccountProperties'
Properties: "Each key uses the format Namespace/PropertyName. The key must contain exactly one / separating the
namespace from the property name". tools/aws/fetch_iam_account_property_namespaces.py copies both sentences into
tools/aws/sources/iam-account-property-namespaces.json with what they name: the key, the operation, the parameter,
the format, its separator and the part that is the namespace. regen_iam_condition_keys.py takes that entry as it
stands, refusing it unless the Service Reference lists the pair and botocore models the parameter as a map of
strings, and writes it to a new fromMapKeys section, which the IAM context resolver reads from the request's map as
the operation's handler does. GetAccountProperties names no properties, so it stays in notRead.
This commit is contained in:
Priamo Germosen authored and GitHub committed 2026-11-29 08:40:07 -04:00
1 parent 35fc6732c9
commit 8440821793
12 files changed
+576 -12

No files matched your search

+3
View File
@@ -88,6 +88,9 @@ on:
- 'src/main/resources/aws/iam-condition-keys.json'
- 'tools/aws/regen_iam_condition_keys.py'
- 'tools/aws/test_regen_iam_condition_keys.py'
- 'tools/aws/fetch_iam_account_property_namespaces.py'
- 'tools/aws/sources/iam-account-property-namespaces.json'
- 'tools/aws/test_fetch_iam_account_property_namespaces.py'
- 'src/main/resources/aws/s3control-tag-condition-keys.json'
- 'tools/aws/regen_s3control_tag_condition_keys.py'
- 'tools/aws/test_regen_s3control_tag_condition_keys.py'