mirror of
https://github.com/floci-io/floci.git
synced 2026-11-26 07:11:11 -05:00
A session tag never reached the session assumed from it, so the opt-in AWS publishes for role chaining was missing: "if you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain". All three operations that mint a tagged session now read the keys where AWS publishes them, the request's TransitiveTagKeys member, the assertion's multivalued TransitiveTagKeys attribute and the token's transitive_tag_keys claim in either published format, and GetFederationToken declares none because its credentials cannot assume a role at all. A session assumed from one carrying transitive tags takes those tags as its own, under the ones its own request passes, and keeps their keys transitive so the next link inherits them too. A role's own tags never pass down. A session tag whose key the calling session passes down is refused, which AWS publishes as the operation failing without saying what it answers, so the code is the one this operation already gives the other rule that turns on the caller being a session and the sentence is this package's own. The inherited tags count against the session token size like any other state the session carries, while the keys cost nothing. sts:TransitiveTagKeys now reaches the role's trust policy with the keys the request names, beside sts:RoleSessionName and sts:ExternalId there. It stays out of the caller's identity-policy context, which is filled from the generated request-condition-keys.json, and that file does not list the key for the action. One rule of the chain is left and the docs say why: a transitive tag replaces the assumed role's matching ResourceTag value, and Floci publishes no aws:ResourceTag for the role in either evaluation, so there is nothing yet for it to replace. An inherited tag needs the role's tagging permission as much as a passed one does, so the trust policy is read for sts:TagSession when the calling session passes any tag down, with the request carrying none: the guide lists "incoming transitive session tags" among the tags a principal carries, and where a base role's own tags are passed on by STS "the trust policy must also allow sts:TagSession". The caller's own policy is read for a request that carries Tags, which the generated tagging table keys on, so a chain of inherited tags alone is held to the role's permission and not to the calling session's, where AWS reads both; the docs say so.