KMS is read from iam-request-resources.json now, and ResourceArnBuilder's
KMS branch and the enforcement filter's call around the table are gone,
leaving dynamodb and iam in HAND_BUILT.
What botocore and the Service Reference do not say comes from the KMS
documentation, vendored by fetch_kms_api_permissions.py into
tools/aws/sources/kms-api-permissions.json and read under
PERMISSION_SOURCES: the developer guide's permissions table, the API
reference's sentence that Decrypt and ReEncrypt read their key from the
ciphertext's metadata, and the guide's key identifier formats.
- ReEncrypt is checked as kms:ReEncryptFrom on its source key, or the
ciphertext's key without one, and kms:ReEncryptTo on its destination
key, ReplicateKey as kms:ReplicateKey and kms:CreateKey. An operation
checked as several actions records them (actions, action), which
RequestResources.checkedAs reads and the filter checks.
- CreateAlias, UpdateAlias and DeleteAlias are checked on the alias and
the keys the table names, the alias's current key through the alias.
- Decrypt with no KeyId is checked on the ciphertext's key.
- KmsStoredResourceArns finds a key in any state, uses only an enabled
one for a forwarded request, reaches the key of an alias, a grant or
a ciphertext, and gives a key's tags.