mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
* fix(iam): resolve attached AWS-managed policies for any account AWS-managed policies (arn:aws:iam::aws:policy/...) are global and live in the in-memory catalog, not the account-partitioned policy store; getPolicy already serves them from the catalog. Several IAM read paths, however, resolved attached policy ARNs straight from the account-scoped store (policies.get(arn) / the flatMap variants), so a managed policy attached to a principal owned by a non-default account was silently dropped. Add a catalog-aware resolvePolicy(arn) helper modeled on getPolicy and route the affected reads through it: listAttachedUser/Group/RolePolicies, the user/role permissions-boundary document resolvers, and collectUser/RolePolicies (the SimulatePrincipalPolicy / caller-context paths). Customer-policy-only logic and attachment-count bookkeeping on detach are left untouched. * test(iam): cover attached managed-policy resolution for a group in a non-default account Adds the group analog of the existing user/role tests, exercising listAttachedGroupPolicies (the resolvePolicy catalog fix) for a group owned by a non-default account, with a customer policy attached to the same group as an account-scoping control.