Files
floci/docs/services
Priamo Germosen e4ee7816ad fix(iam): check each secret a Secrets Manager batch read returns as GetSecretValue (#9774)
The API reference's required permissions for BatchGetSecretValue say "you must have secretsmanager:GetSecretValue for
each secret", and the Service Reference lists that action among the operation's. Floci checked the batch action only,
so a caller allowed secretsmanager:BatchGetSecretValue read every secret, whatever its policies said about
GetSecretValue on each one.

The authorized-actions generator now reads that clause, already vendored by
fetch_secretsmanager_required_permissions.py, into a perEntry section: the action an operation needs on each entry it
reads, with the type of the action the clause's words name as the generators' names go (stem: secret is Secret),
where the Service Reference lists the action among the operation's. IamAuthorizedActions reads it, and the Secrets
Manager handler checks each secret a batch read returns against it, both by SecretIdList and by Filters. A secret the
caller may not read goes to Errors as AccessDeniedException, under the id it was requested as (its ARN for a filtered
read), and the others are returned, as AWS's own fidelity check records it
(check_batch_get_secret_value_returns_partial_results_with_a_per_secret_error_for_a_denied_secret).

Each secret is checked with the condition keys of its own stored tags (aws:ResourceTag/<key>,
secretsmanager:ResourceTag/<key>), through IamEnforcementFilter.authorizeEntryResource, so a grant or a deny scoped to
a tag holds for each secret of a batch as it does for a GetSecretValue of that secret alone.

The gates this change runs need today's AWS too, so the tables they cover are synced: the Service Reference lists 37
more Glue actions with no resource type and S3 Tables' ListStorageLensConfigurations (iam-authorized-actions.json),
S3 Tables' StorageLens type on its tagging actions with its ARN format and tag keys, and the elasticfilesystem-endpoint
and s3files-endpoint namespaces it does not read (iam-request-resources.json), three S3 actions taking
s3:ResourceAccount, GetBucketDefaultStorageClass, PutBucketDefaultStorageClass and GetIncompleteUpload
(s3control-tag-condition-keys.json), and the S3 user guide's permissions table gives the two default storage class
operations (tools/aws/sources/s3-required-actions.json).
2026-11-29 19:06:49 -04:00
..