Under enforcement a role whose trust policy conditions AssumeRoleWithSAML or AssumeRoleWithWebIdentity on aws:RequestTag/<key> or aws:TagKeys refused every tagged assume: neither trust policy saw the tags the assertion or the token passes, which the Service Reference gives both actions and the IAM user guide's SAML ABAC tutorial's trust policy reads. And all three assumes named sts:TagSession by hand, through AssumeRolePolicyEvaluator.TAG_SESSION_ACTION, with the assertion's PrincipalTag attributes and the token's tags claim named by hand too.
The IAM user guide's page on session tags says where an identity provider passes the tags, "include the Attribute element with the Name attribute set to https://aws.amazon.com/SAML/Attributes/PrincipalTag:{TagKey}" and "the nested claim format uses a structure within the https://aws.amazon.com/tags namespace in the JWT", and what passing them needs, "trust policies for all roles connected to the identity provider (IdP) passing tags must have the sts:TagSession permission". tools/aws/fetch_sts_session_tags.py vendors it into tools/aws/sources/sts-session-tags.json, and regen_iam_authorized_actions.py gives both operations a companion naming the attribute or the claim, sts:TagSession, and the reference's aws:RequestTag/${TagKey}, where the reference's action of the operation's name takes that key.
The SAML and web identity trust policies now read the tags as aws:RequestTag/<key> and aws:TagKeys, written as an AssumeRole's are, and check the companion's action for them; the assertion and token verifiers read the companion's attribute and claim. AssumeRole's trust check takes the tagging action the tag-on-create table gives it. TAG_SESSION_ACTION and the allowsTagging methods are gone.
Closes#6640.
API Gateway's request-model lookup, the OTLP metrics endpoint and its
access-denied response filter still parsed the Content-Type header
themselves, and an empty or whitespace one throws there. They now read
it through ResteasyRequests.mediaType, which a new HttpHeaders overload
extends to resource methods, so a blank header acts as an absent one:
API Gateway validates against the application/json model, the OTLP
endpoint answers its 415, and a denial keeps its 403 and protobuf body.
Reuse the shared default VPC subnets instead of borrowing peer-owned subnets. Track successful pagination group creations within cleanup scope so partial setup is cleaned up.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
ResourceArnBuilder handed ctx.getMediaType() to RequestBodyReader when
reading a JSON body, and the request context throws parsing a blank
Content-Type, so the read fell into its catch and a tag call's ARN in
the body went unread. It now reads the media type through
ResteasyRequests.mediaType, which takes a blank header as none, as the
request filters already do, and the body stays readable by the
handler.
Moves the pin from 1.44.9 to 1.44.13 and regenerates the data derived
from it.
Every request shape, route and service table the bump regenerates is
unchanged apart from its source label. partitions.json gains the
elb-proxy endpoint prefix signed as elasticloadbalancing, CloudFront
and EMR on EKS in aws-eusc, Route 53 Profiles in aws-iso and aws-iso-b,
and API Gateway in aws-iso-f; no region changes.
1.44.13 models the ELB proxy API (smithy-rpc-v2-cbor 2026-11-20), whose
operations the passed-role, tag-on-create and request-resources tables
parked as missing from the pinned botocore. They now read them:
CreateProxy passes roleArn and tags through tags{}, and each proxy
operation is checked on the proxy its proxyIdentifier or resourceArn
names. The Service Reference now also lists the tagging action for
Managed Service for Apache Flink's ImportSnapshot, so the tag-on-create
table checks its Tags.
ScalingPolicyAlarmActionHandler read the cooldowns' time from
Instant.now(), so its tests could only get past a cooldown by clearing
the last scaling time. It now reads an injected Clock, the system UTC
clock outside tests, and the tests move a controlled timeline across
the scale-in, scale-out and default cooldown boundaries, checking one
second before and at the end of each.
Under enforcement a role whose trust policy conditions AssumeRoleWithSAML or AssumeRoleWithWebIdentity on sts:SourceIdentity refused every assume, and one that withheld sts:SetSourceIdentity was never consulted: neither operation read the source identity its identity provider sets, so the session carried none, the response returned none and its requests carried no aws:SourceIdentity. The Service Reference gives both actions sts:SourceIdentity but lists no authorized actions for either operation, and botocore models the value only in the response.
The IAM user guide's page on source identity, which tools/aws/fetch_sts_source_identity.py already vendors, says where each carries it, "to set a SAML attribute for source identity, include the Attribute element with the Name attribute set to https://aws.amazon.com/SAML/Attributes/SourceIdentity" and "include source identity in the https://aws.amazon.com/source_identity namespace in the token", and what it needs, "trust policies for all roles connected to an identity provider (IdP) must have the sts:SetSourceIdentity permission". The fetcher now copies those sentences too, and regen_iam_authorized_actions.py gives each operation a companion naming the attribute or the claim and the key it is read as, where the reference's action of the operation's name takes sts:SourceIdentity.
STS reads the value the table names, holds it to botocore's sourceIdentityType (the shape botocore gives the response's SourceIdentity, as it does AssumeRole's member), and refuses several values or one outside it with InvalidIdentityToken. The trust policy reads it as sts:SourceIdentity, through the keys the federated trust evaluators already read in full, and is checked for sts:SetSourceIdentity before the assume, as for AssumeRole. The session records it under aws:SourceIdentity, which a session assumed from it carries on, and the response returns it.
Part of #6640.
An npm publish forwarded to an upstream registered a routing-context
end handler, which replaced the response end and close handlers the
data plane released its Verdaccio sidecar use from. The use never
ended, so the repository's container outlived DeleteRepository, a
reset and Floci's shutdown. The use is now released through
addEndHandler.
A reset or nuke still leaves a sidecar running while admitted uses are
active, and now logs it. Shutdown stops it anyway: ContainerTeardown
gains beginShutdown(), which EmulatorLifecycle.onStop calls before
preparing any teardown, and the Verdaccio, Kellnr, BaGetter and
pypiserver leases then stop containers with uses still active, start
no new container, and wait for a start still building one so that its
container is stopped too.
DeleteFunction with a Qualifier refused a version only when an alias
named it as its FunctionVersion, so the second version of a weighted
alias, listed in its RoutingConfig's AdditionalVersionWeights, could
be deleted from under it. A version an alias references either way now
answers ResourceConflictException (409), as the API reference says a
version an alias references can't be deleted, and deleting it succeeds
once the alias no longer routes to it.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
#9686 refused tag keys with the reserved aws: prefix, and more than 50
tags, on TagResource only. CreateEventBus, CreateSubscriber and
CreateEventSource, and a CloudFormation update of a bus or a
subscriber, now refuse them too, in the order measured on AWS: a
reserved key answers AccessDeniedException (403) right after the
request constraints, ahead of the name clash, the ClientToken replay
and the bus lookup, and more than 50 tags answers
LimitExceededException (400) after those checks, and before a
ClientToken mismatch when the token named another resource. A refused
create stores nothing and makes no secret or managed rule.
2.4.0 and 2.5.0 shipped no standalone binaries, and nothing could add
them afterwards: re-running a release uses the tag's own workflow and
pushes the images again. Run by hand from main with a tag, release.yml
now builds the binaries that release lacks, or the ones named, from the
tag's source, and attaches them signed and attested as a tag run does.
It first verifies the release's sha256sums.txt against its cosign
bundle and the attached binaries against that file, then rewrites it to
cover every binary. A backfill never pushes or signs images and never
creates a release; tag runs build and publish as before.
Refs #8715
An exclusive ParallelLocks.PORTS holder runs alone and blocks every
READ holder in the concurrent plain pass. Eighteen classes held it
exclusively though none releases a port it binds or dials one it
expects to refuse: fifteen open no socket and only name an address such
as localhost:4566, and ElastiCacheBackendAclTest,
RedshiftInterceptingBridgeTest and SnsHttpsSubscriptionTrustTest bind
every listener on port 0 and dial it while they hold it. They now take
the lock in READ mode. PostgresProtocolHandlerTest stays exclusive.
Use the same request media-type reader in role inspection and error responses so an empty Content-Type does not hide the original error.
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Only remove an in-service guest when Docker confirms its container has stopped or disappeared. Pass the probe result through EC2 so an unavailable Docker inspection leaves the membership and targets in place for the next check.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Under enforcement an AssumeRole passing a SourceIdentity was neither held to sts:SetSourceIdentity nor read as sts:SourceIdentity, so a trust policy requiring a source identity refused every assume and one granting the permission was never consulted. The session kept no source identity either: the response returned none, its requests carried no aws:SourceIdentity, and a session assumed from it could set another. botocore gives the member and the Service Reference the key and the action, listing sts:SetSourceIdentity among the actions AssumeRole is authorized by, without saying when it is needed or which member carries the key.
The IAM user guide's page on source identity says both: "to pass source identity while assuming a role, use the -–source-identity AWS CLI option or the SourceIdentity AWS API parameter", "to specify a source identity, principals (IAM users and roles) must have permissions to sts:SetSourceIdentity", and when chaining it is "required in both the permissions policy of the principal who is assuming the role and in the role trust policy of the target role". tools/aws/fetch_sts_source_identity.py vendors it into tools/aws/sources/sts-source-identity.json. regen_request_condition_keys.py reads it for sts (CONDITION_SOURCES), so sts:SourceIdentity is read from AssumeRole's SourceIdentity, and regen_iam_authorized_actions.py crosses it with the reference's AuthorizedActions and botocore's request members into a new companions section of iam-authorized-actions.json: AssumeRole needs sts:SetSourceIdentity when it names SourceIdentity or its caller carries aws:SourceIdentity.
Enforcement checks the companion action on the role with the request's keys, and for a caller that is itself a role session checks it of the caller's own permissions alone too, since a trust policy naming the caller's role would otherwise stand in for them in the same account (the table's callerPolicyWhenChained, from the page's sentence on role chaining). STS checks it in the trust policy before the assume, as AWS names it where a statement granting both is conditioned on another sts:SourceIdentity. The session records the value under the key the table gives, aws:SourceIdentity, which its requests carry and a session assumed from it carries on, read there as sts:SourceIdentity too, and the response returns it. A chained request naming another value is refused with ValidationError, "The source identity is already set for this assume role session", and an AssumeRole naming a session tag key twice with InvalidParameterValue, "Duplicate tag keys found. Please note that Tag keys are case insensitive.", both as AWS's evaluation suite records them.
Part of #6640.
Create and clean up the singleton in a dedicated account so Organizations management-account state cannot replace the intended quota error. Verify that the rejected second creation leaves the original instance intact.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Check the XML document and its root before creating a store or updating
its comment. A rejected update keeps the existing comment and ETag.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
CloudFormation's cfn-response helper sends its ResponseURL callback
with an empty Content-Type, and the request context throws
IllegalArgumentException parsing an empty or whitespace one.
PassedRoles.jsonBody asked for it before reading the body, so role
inspection of such a request failed. It now reads a blank Content-Type
as none and parses the body as JSON, a supplied type still choosing
JSON or CBOR, and the body stays readable by the handler.
Co-authored-by: Hai Yan <8153134+oeyh@users.noreply.github.com>
EventBridge V2 took tags only when a bus, a subscriber or an event source was created. TagResource, UntagResource and ListTagsForResource now add, remove and list them, and IAM reads the changed tags for aws:ResourceTag conditions.
AWS allows 50 tags on a resource, refuses keys that start with aws: in any case, and refuses to tag or untag a revoked resource. It lists the tags in the order of a HashMap copied from one filled in key order. One lookup finds the taggable resource for the tag calls and for the IAM resource tags, and each kind is tagged through a copy, so a failed write leaves its tags as they were.
The two ECS volume cleanup tests now assert the log levels from their own thread, through one helper. The cleanup runs synchronously, but parallel tests can write to the same class logger during capture, and the volume-listing test picked up an unrelated INFO record between its expected cleanup messages.
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Preserve creation time, use the injected clock, and return timestamps the AWS SDK decodes correctly.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Under enforcement a role whose trust policy conditions the assume or sts:TagSession on aws:RequestTag/<key> or aws:TagKeys refused every tagged AssumeRole, and a Deny keyed on them never applied: STS built the trust policy's context by hand, with the session name and external ID alone. The Service Reference gives sts:AssumeRole both keys, and the IAM user guide's session tags page has a trust policy reading them: with aws:RequestTag "you can allow the principal to pass the specified session tags, but only with the specified values", and with aws:TagKeys "pass only session tags with the specified tag keys".
The trust policy's context now takes the request's keys from the generated tables, as the caller's own policies do: the members request-condition-keys.json gives sts:AssumeRole, its RoleSessionName and ExternalId, and the tags iam-tag-on-create.json reads from its Tags, as aws:RequestTag/<key> and aws:TagKeys. The assume and the sts:TagSession permission are each checked once for every set of tags a reading of the list gives, past a gap in its numbering or with each value of a key sent twice, as the enforcement filter checks the caller's policies, so a Deny on a tag holds however the list is sent. The filter's per-set helper moves to IamConditionContextResolver beside requestContextsOfForm, which STS calls, and formParameters shares its first-value reading with it.
Both read the list as STS does. TagOnCreate read sts: tags under Tags.member up to the first gap, while STS reads them through AwsQueryLists, Tags.member.N or the bare Tags.N at every index, so a tag sent as Tags.1, or after a gap, reached the session and not the check, and a policy requiring it refused a call AWS allows. sts: is now read through the shared reader, as iam: is, and the shared reader takes the members in the order of their indices, as AwsQueryLists gives them, so a key sent twice keeps the value the handler keeps.
Part of #6640.
StartConfigurationRecorder marked a customer managed recorder as
recording, with a new start time, even when its account and Region had
no delivery channel. It now refuses that start with HTTP 400
NoAvailableDeliveryChannelException, "Delivery channel is not
available to start configuration recorder.", and leaves the recorder's
status as it was, as AWS does. A missing recorder still answers
NoSuchConfigurationRecorderException first. The start and
DeleteDeliveryChannel take the same recorder lock, so a concurrent
delete can't leave a recorder running without its channel.
Co-authored-by: Andre Kurait <akurait@amazon.com>
Under enforcement a VPC association call scoped by route53:VPCs was refused for every VPC, as #8367 reports: the request condition key table never filled the key, so a condition on it never saw a value. Neither botocore nor the Service Reference says where a request carries the key or in what form.
Route 53's developer guide says both, in its table of condition keys: route53:VPCs "Represents a list of VPCs in the request of AssociateVPCWithHostedZone, DisassociateVPCFromHostedZone, ListHostedZonesByVPC, CreateHostedZone, CreateVPCAssociationAuthorization, and DeleteVPCAssociationAuthorization, in the format of "VPCId=<vpc-id>,VPCRegion=<region>". A vendored source, tools/aws/sources/route53-condition-keys.json, written by tools/aws/fetch_route53_conditions.py from that page, gives each key the table gives in a format of request members, with its operations and members, and the generator reads it for route53 (CONDITION_SOURCES) beside the record keys it already reads.
The table writes a key a format composes as that format with each member's place holding where the request carries it (VPCId={VPC.VPCId},VPCRegion={VPC.VPCRegion}), and a member of the query string as ? and its name (ListHostedZonesByVPC's ?vpcid and ?vpcregion), and the request condition reader fills the format from them, read from an XML body or the query string, when each member holds one value. A request naming no VPC, as a public CreateHostedZone does, carries none.
Route 53 reads the VPC only where its schema puts it, the VPC below the request's root, where IAM reads it, and refuses a second VPC, a second VPCId or VPCRegion, or a repeated vpcid or vpcregion query parameter with InvalidInput, as it already refuses a change batch naming an element twice. It used to take the first VPC anywhere in the body, so a request naming a denied VPC beside another carried no value for the Deny to match and still acted on the denied one.
Closes#8367.
Apply integration and authorizer credential ARNs during stack creation and updates. Clear only credentials removed from previously declared template properties, preserve externally configured values, and restore integration credentials during rollback. Preserve current integration subtype defaults and rollback behavior.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
KinesisCfnProvisioner never read StreamEncryption, so a stack with an encrypted AWS::Kinesis::Stream reached CREATE_COMPLETE with an unencrypted stream. The encryption type and key are now set by createStream, so they are in place while the stream is still CREATING. An update with a new or changed type or key calls startStreamEncryption, removing the property calls stopStreamEncryption, and an unchanged setting makes no call.
A setting the resource schema refuses, an EncryptionType other than KMS or a missing EncryptionType or KeyId, fails with InvalidRequest model validation before anything is created or changed.
Closes#9511
ElbV2IntegrationTest had no SetSubnets case that stays inside a custom
VPC. The new case creates an Application Load Balancer on subnets A
and B of a custom VPC, replaces B with C, and checks that
DescribeLoadBalancers keeps that VPC and lists exactly A and C, as
SetSubnets replaces the previously enabled subnets. createVpc and
createSubnet helpers now build every VPC and subnet the class creates.
EventBridgeV2WebhookIntegrationTest read its queues with up to three
one-second long polls, so each of its two empty-queue checks waited
three seconds. A webhook request is answered only after its event has
been delivered to the subscribers' queues, as a PutEvents call is, so
the test now reads each queue with one zero-wait receive, and its
helpers lose the expected count the polling needed.
Under enforcement a CreateAccessEntry scoped by eks:principalArn or eks:accessEntryType was refused for every entry, and an AssociateAccessPolicy scoped by eks:policyArn or eks:namespaces for every association, as #8311 reports: the request condition key table read none of these keys, so a condition on them never saw a value. Neither botocore nor the Service Reference says which request member carries them.
The Service Authorization Reference's table of the keys EKS defines says it: eks:principalArn, eks:kubernetesGroups, eks:policyArn and eks:namespaces filter on "the <member> present in the access entry requests" or in "the associate / disassociate access policy requests", and eks:accessEntryType and eks:username on "the access entry type" and "the Kubernetes username" present in them, the access entry requests' type and username. A vendored source, tools/aws/sources/eks-condition-keys.json, written by tools/aws/fetch_eks_conditions.py from that page, gives each key its member, and the generator reads it for eks (CONDITION_SOURCES) beside the cluster keys it already reads.
The page gives what a request carries, so a vendored key is read from an action's request only where the reference lists it on the action itself; one the reference gives a resource type alone is the stored resource's value. A list's values are each read (kubernetesGroups, accessScope.namespaces). A vendored member the request carries outside its body, as DisassociateAccessPolicy carries policyArn in its path, or as a structure, as accessScope is, the page not saying which of its values the key holds, is not read.
The keys the reference gives the access entry itself, its stored principal, type, groups and username on the operations acting on one, are not read yet: those requests are checked on an access entry ARN whose identity and id are left open, which names no one entry to read them from.
Closes#8311.
EksRegistryHostsDockerNightlyIntegrationTest waited for its node to be
Ready before the node group replaced it and before restarting the
replacement, but a Ready node keeps Kubernetes'
node.cloudprovider.kubernetes.io/uninitialized NoSchedule taint until
the cloud controller initializes it. The test now also waits for that
taint to clear, with the service account, Ready nodes and renewed
leases it already waited for, before the replacement, before the
restart and after it, then reads hosts.toml once and starts the pod.
Co-authored-by: Andre Kurait <akurait@amazon.com>
Check for a stop request when the worker acquires the execution lock to
register its action. A queued action can otherwise register after stop
has already visited the action list and then invoke its provider.
Adapted from Andre Kurait's CodePipeline action admission change in
5fe030e5dd4713bfdd2efbfb49f7dc6664ec8008.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
An EKS Auto Mode NodeClaim whose expireAfter was Never, longer than 21
days, missing or unreadable never expired, where Auto Mode terminates
an instance once it has lived its 21-day maximum lifetime. A claim now
expires at the earlier of its expireAfter and 21 days from its
creation. A claim whose creationTimestamp can't be read still doesn't
expire, and an unreadable expireAfter is logged.
No test named CreateCapacityReservationDateChangeQuote or its
capacity-reservation-modification-quote resource type. The quote now
joins the SQS and RDS cases in TagOnCreateTest's own-action test,
pinning that the operation's own action is checked with its request
tags, as the Service Reference lists aws:RequestTag and aws:TagKeys on
that resource, and that ec2:CreateTags is the tagging action it also
needs.
An HTTP task reads its EventBridge connection to authorize the request, but TaskPermissions.httpInvoke checked only states:InvokeHTTPEndpoint, so under IAM enforcement a role lacking the connection's permissions succeeded where AWS refuses it. The task now also needs events:RetrieveConnectionCredentials on the connection and secretsmanager:GetSecretValue and secretsmanager:DescribeSecret on the secret EventBridge keeps its credentials in, the grants the CDK's HttpInvoke task writes (aws-stepfunctions-tasks/lib/http/invoke.ts, buildTaskPolicyStatements). EventBridge answers the secret ARN through StoredResourceArns.recorded.
The secret lookup and the call that uses the connection share one lookup by ARN, connectionNamedBy, so they cannot drift apart. The secret lookup reads the connection in the account its ARN names, in place, also finding one the default account saved under a bare key before stores kept accounts apart. A connection belongs to the account its ARN names: a lookup by ARN from another account finds none, and the call moves a legacy connection only into the account its ARN names, so a connection whose secret is not checked cannot be used.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>