Repository navigation
Description
What
Substrate's IAM entity shapes both over- and under-report members the IAM API reference
documents, independently of tags (#796, which covers Tags only).
Over-reported. ListUsers and ListRoles render PermissionsBoundary
(emulator/iam_xml.go:90-96, :168-174), which AWS's own note on those operations excludes
verbatim (https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListRoles.html):
IAM resource-listing operations return a subset of the available attributes for the resource. This
operation does not return the following attributes, even though they are an attribute of the
returned object: PermissionsBoundary, RoleLastUsed, Tags. To view all of the information for a
role, see GetRole.
A consumer reading a boundary off a list response gets one here and nothing on AWS — a divergence in
the direction where substrate is more generous than the service.
Under-reported.
IAMUser.PasswordLastUsedexists on the record (emulator/iam_types.go:26) and is never
rendered; AWS'sUsertype documents it.RoleLastUsedis neither stored nor rendered; AWS'sRoletype documents it, andGetRole
returns it.iamPolicyXMLFields(iam_xml.go:236-262) omitsDescription,IsAttachableand
PermissionsBoundaryUsageCount, all documented on AWS'sPolicytype — and substrate stores
DescriptionandIsAttachablealready (iam_types.go:60,:63).
Why now
#796's work splits iamUserXMLFields and iamRoleXMLFields by shape — single-entity versus listing
— precisely because the same AWS note that excludes Tags from the list shapes also excludes
PermissionsBoundary. Once that split exists, dropping the boundary from the list shapes is a
one-line change in a helper that will already be under test. Filed rather than folded so it gets its
own compatibility note: a consumer reading PermissionsBoundary off ListUsers today stops
getting it.
Found while surveying the IAM response shapes for #796 during v0.112.0 planning.
Acceptance criteria
-
ListUsersandListRolesno longer renderPermissionsBoundary, with AWS's note cited -
PasswordLastUsedis rendered where AWS documents it, from the field already stored -
Description,IsAttachableandPermissionsBoundaryUsageCountare decided for the policy
shape — rendered from what is stored, or stated as unmodelled with the reason -
RoleLastUsedis decided the same way: modelled (it needs a write on every role use, which is
a design question) or documented as out of scope -
docs/services.mdrecords which members each IAM shape reports and which AWS omits by design
Activity
feat(iam): report the members AWS documents per entity shape (#807)
feat(iam): report the members AWS documents per entity shape (#807) (#…
feat(iam): PermissionsBoundaryUsageCount on the policy shapes (#815) (#…
feat(iam): GetRole reports RoleLastUsed, written by AssumeRole (#816)
feat(iam): GetRole reports RoleLastUsed, written by AssumeRole (#816)
feat(iam): GetRole reports RoleLastUsed, written by AssumeRole (#816) (…
chore(release): v0.114.0 (#850)