The sesv2 model moved ListEmailIdentities and ListConfigurationSets to the
POST /v2/email/list-* routes between botocore 1.43.104 and 1.43.105. SDKs built
before that move still send GET /v2/email/identities and
GET /v2/email/configuration-sets, which matched no route of the model, so those
requests were allowed whatever the caller's SES grants were, an explicit Deny
included.
The REST route generator now reads those routes from botocore 1.43.104's own
model: LEGACY names the release, and build_legacy vendors, for an operation both
models hold on another route, the older route as an alternative checked as the
operation's action. A regeneration carries them over offline, --fetch-legacy
(make legacy-routes-sync) reads them again, and --verify compares the vendored
block against the release. carried_legacy checks the vendored block.
Closes#9818
From emr-7.14.0, a cluster with Trino alone runs no YARN or HDFS, so Floci ran no container for its core and task
nodes and its Trino had no workers. Each of those nodes that runs a worker, up to trino.max-workers, now runs that
worker alone, in a container of its own on the cluster's network with its node's host name and instance metadata.
The nodes run the cluster's bootstrap actions as themselves, as nodes that run YARN do, and a resize starts and
removes workers with its nodes. A worker started before its node's own bootstrap ended starts again from the image it
left. A container given a link-local address keeps the alias of its DNS name, which Docker dropped as Floci
reconnected it.
The request-resources table gives resource-tag keys to ElastiCache's user, user group, replication group, cluster,
snapshot, subnet group, parameter group and serverless cache types, but ElastiCache gave IAM none of the tags it
stores, so an aws:ResourceTag condition on one of its actions never matched: an Allow scoped to a tag never applied
and a Deny scoped to one never refused.
ElastiCacheStoredResourceArns reads ElastiCacheService.storedTags, and ElastiCacheServerlessService.storedTags for a
serverless cache. A resource stored with its ARN is matched on its kind and id, as the handlers find it: those that change or delete
a user, user group, replication group, cluster or snapshot find it by its id whatever Region a request is signed
for, so IAM checks the one they act on; a subnet group,
stored by name alone, only in the request's Region, where ListTagsForResource reads it; a parameter group in the
ARN's Region. A user group's id and a serverless cache's name are read in lower case, as the handlers find them,
so a request spelling one in another case is checked with its tags. Each is read in place (AccountAwareStorageBackend.readInAccount): the handlers' lookups move a
pre-multi-account entry into the caller's account, which a read made before the request is allowed must not do. Each
kind's tags change in place under its own lock, so the read copies them under that lock, taken
only once the resource is found (an ARN naming nothing leaves no lock behind) and finding it again under it. A
serverless cache's tags are replaced whole on each change, so its copy needs no lock.
ElastiCacheResourceTagIamIntegrationTest checks a caller allowed elasticache:DeleteUser and
elasticache:DeleteCacheParameterGroup only on resources tagged team=blue deletes the blue one and is refused the red
one, and the same for elasticache:DeleteUserGroup with the group's id in upper case, and that a Deny on
team=red refuses a delete of the red user signed for another Region; ElastiCacheServiceTest and ElastiCacheServerlessServiceTest check the reads, their copies, the ARNs that name
nothing, that reading those leaves the lock count as it was, and that a legacy user is read where it is.
The request-resources table gives resource-tag keys to Transfer Family's server and user types and to SES's
identity, configuration set, template, contact list, custom verification email template, dedicated IP pool and
tenant types, but neither namespace gave IAM the tags it stores, so an aws:ResourceTag condition on one of their
actions never matched: an Allow scoped to a tag never applied and a Deny scoped to one never refused.
TransferStoredResourceArns reads TransferService.heldTags: the tags the server or user the ARN names holds, in the
ARN's account and Region, read in place under every key the handlers find it under (its Region's, or one from
before keys named the Region or the account), matched on the whole ARN, and copied. AccountAwareStorageBackend gains
getForAccountWithLegacyKeys for that: the value getForAccountMigratingLegacyKeys returns, under the same keys and
owner check and the same monitor, with nothing moved. It writes nothing: the handlers' lookups move a resource under an old
key to its Region's key, and the tag read stores the tags it merges, neither of which a read made for IAM may do.
SesStoredResourceArns reads SesService.storedTags: the tags ListTagsForResource reads for the resource of each
taggable kind, in the ARN's account and Region; none for an ARN of another account, with no Region, or naming no
resource SES holds. Each domain reads it in place (SesTaggable.storedTags, through
AccountAwareStorageBackend.readInAccount): the lookup the tag operations make moves a pre-multi-account entry into the
caller's account, which a read made before the request is allowed must not do. Each tag change stores a new list, so
the copy is of one whole set. A tenant's ARN ends in the id SES mints, which a request naming the tenant by its name
(GetTenant, DeleteTenant) leaves out, so SesStoredResourceArns.find resolves the name to the stored tenant's ARN,
read in place too.
StoredResourceTagIamIntegrationTest checks a caller allowed transfer:DescribeServer and ses:GetConfigurationSet
and ses:GetTenant only on resources tagged team=blue reaches the blue one and is refused the red one; TransferServiceTest and
SesServiceStoredTagsTest check the reads, their copies and the ARNs that name nothing.
Adds Amazon Kinesis Video Streams (kinesisvideo, REST JSON, 2017-09-30)
with the stream lifecycle control plane: CreateStream, DescribeStream,
ListStreams and DeleteStream, stored per account and Region.
A stream's ARN ends with its creation time in milliseconds and is
distinct for every stream, even one recreated within the same
millisecond, and its KmsKeyId defaults to alias/aws/kinesisvideo.
ListStreams pages by the last returned name, so deleting between pages
skips nothing. Requests are checked against the constraints of the
botocore model, vendored by tools/aws/regen_kinesisvideo_shapes.py, and
refusals carry the codes and wording AWS sends.
Under IAM enforcement every request is checked as its kinesisvideo:
action on the stream it names, read through the stream's stored ARN and
tags, and a tagged CreateStream also needs kinesisvideo:TagStream. The
IAM data comes from the generators.
A stream is ACTIVE as soon as CreateStream returns, and DeleteStream
removes it at once, where AWS passes through CREATING and DELETING.
Let built-in helper Dockerfiles include sibling classpath files through a
<Dockerfile>.files manifest. The builder sends those declared files in the
Docker context and includes their contents in the recipe hash, so a changed
script rebuilds the image even when its Dockerfile stays the same. Invalid,
duplicate or missing filenames fail before a build starts. The native
resource rule includes the manifests and declared files alongside their
Dockerfiles.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
A node from an image with kubeletRegistersNode ran its pods, but the API server couldn't reach its kubelet:
- k3s dialled kubelets through its agent tunnel, which only a k3s agent opens. The server now runs with
--egress-selector-mode=disabled and dials each kubelet directly, as EKS's API server does. Floci's other nodes have
no kubelet, so only the server's own is otherwise reached, at its own address.
- Nothing approved the kubelet's kubernetes.io/kubelet-serving CertificateSigningRequest, so it served no TLS. Auto
Mode's reconcile approves a pending one from a node it launched when it names only that node (CN
system:node:<name>, O system:nodes) and the node's instance ID, private DNS name or private address, with server
usages, as EKS approves it after checking the names are its instance's.
- The kubelet trusted only the cluster CA, while k3s signs the API server's client certificate with its client CA.
The NodeConfig's certificateAuthority now carries both, where EKS's one CA signs everything.
Kubernetes signs the names of a request's first extension request, while the check read the last. A request with more
than one is now refused. A request list that can't be read, or an approval that fails, is logged and left for the next
pass, the rest of the pass going on. certificateAuthorities takes the client CA as a nullable String.
A node.id in a cluster's trino-node classification reached its Trino workers too (#9797), so every node had the
coordinator's id, where Trino needs it "unique for every node". It stays the coordinator's, and each worker is
named after its node's host, as a node given no id is.
Follow-ups of the stored-tags batches (#9794, #9799), from their reviews.
Config's TagResource keeps tags for any config ARN of a kind it holds no resource of (an aggregator, a stored query),
and storedTags read them, so a caller allowed config:TagResource could store tags on such an ARN that then satisfied
an aws:ResourceTag condition. AwsConfigService.heldTags answers only for the kinds Config holds and checks before
tagging (a rule, a conformance pack, an aggregation authorization, the configuration recorder), and finds the
resource without creating the per-Region maps or the lock its tag changes use, which the locked read did for the
Region of any ARN a request named, denied ones included; it takes that lock only once the resource is found. EFS's
storedTags likewise finds the file system or access point before taking its lock.
MemoryDbServiceTest checks that every map of tags MemoryDB answers is a copy, and the MemoryDB and Route 53 Resolver
integration tests' cleanups name the port, as they run after the test method once Quarkus has reset RestAssured's
(Route53ResolverRequests gains a port overload).
EMR's Trino follows a "coordinator-worker model, where each component has a specialized role in query
execution", and Floci ran the coordinator alone. Each core and task node Floci runs now runs a Trino worker,
in a container that shares the node's network, up to trino.max-workers with trino.worker-memory-mb each, and
the coordinator runs the queries itself only on a cluster with no workers. Every node shares a secret Floci
makes as the coordinator starts, and a worker starts and goes with its node, a resize's among them.
The request-resources table gives CloudWatch's alarms, dashboards and metric streams the aws:ResourceTag keys, which
the Service Reference lists for them, but CloudWatch answered no storedTags, so a condition on a resource tag never
matched: a caller allowed cloudwatch:DeleteAlarms only on alarms tagged team=blue was refused it on the blue alarm as
on any other.
CloudWatchStoredResourceArns reads the tags CloudWatch's tag operations read, each kind from the service keeping it:
an alarm's from the metrics service, a dashboard's from the dashboards service and a metric stream's from the metric
streams service. An ARN of another account, or one naming no resource CloudWatch holds, reads none.
The dashboards and metric streams services changed a resource's tags in place under no lock, and their tag read
handed out the live map, which an IAM check reading it while another request tags the resource could see half
changed or fail on. Their tag read, tag and untag are now synchronized, and the read returns a copy, as the metrics
service's already were; the dashboards and metric streams service tests check the read is a copy.
Each kind is told by the resource part its ARN starts with (alarm:, dashboard/, metric-stream/), as the table's
formats name it. isDashboardArn and isMetricStreamArn matched their word anywhere in the ARN, and an alarm may be
named x:dashboard/y, which then went to the dashboards service, read no tags and escaped a tag-scoped Deny; the tag
handlers dispatched with the same helpers, so they now match the prefix too.
The request-resources table gives AWS Config's rules, aggregators, conformance packs and other resources, EFS's file
systems and access points, and Route 53 Resolver's endpoints, rules and firewall domain lists the aws:ResourceTag
keys, which the Service Reference lists for them, but none of the three services answered storedTags, so a condition
on a resource tag never matched for them: a caller allowed an action only on resources tagged team=blue was refused
it on the blue one as on any other.
Each service's stored-ARN class now reads the tags it keeps on the resource the ARN names, under the lock that
resource's tag changes hold, so a concurrent change is seen whole or not at all: Config through ListTagsForResource's
own locked read; EFS from the caller's file system or access point the ARN names, matched on its stored ARN and
copied under its resource lock (EfsService.storedTags); Route 53 Resolver from its tag store for the caller's
endpoint, rule or firewall domain list, under the monitor its tag changes hold. An ARN of another account reads none, as these services keep no resource of it for the caller.
The request-resources table gives MemoryDB's clusters, users and ACLs the aws:ResourceTag keys, which the Service
Reference lists for them, but MemoryDB answered no storedTags, so a condition on a resource tag never matched: a caller
allowed memorydb:DeleteUser only on users tagged team=blue was refused it on the blue user as on any other.
MemoryDbStoredResourceArns reads the tags MemoryDB's ListTags reads, for the caller's cluster, user or ACL the ARN
names. Its tag changes mutated the stored map in place under no lock, and ListTags handed out that live map, which an
IAM check reading it while another request tags the resource could see half changed or fail on; the tag read, tag and
untag are now synchronized, and each returns a copy.
DescribeImages answers the commercial account ids behind the amazon and aws-marketplace owner aliases in every partition; Floci has no source for the ids in the other partitions yet.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
The Lambda API reference says of GetFunction's Tags "Lambda returns tag data only if you have explicit allow
permissions for lambda:ListTags", and the Service Reference lists lambda:ListTags among the actions GetFunction is
authorized by. Floci returned a function's tags to every caller allowed lambda:GetFunction.
tools/aws/fetch_lambda_response_permissions.py vendors, from the API reference page of each operation the Service
Reference lists as authorized by an action beside its own and the reference's operations page documents, each
response element's sentence saying it is returned only with a permission, with the element and the action. It
refuses a sentence naming a permission and a lambda: action in any other wording, and a page whose response elements
section is missing or lists no element without saying the response is empty, so a reworded or relaid page fails
rather than dropping the check. The authorized-actions generator reads it into a returnedOnlyIf
section, where botocore's response of the operation has a member of the element's name and the Service Reference
lists the action among the operation's: GetFunction returns Tags only with lambda:ListTags. IamAuthorizedActions
reads it, and LambdaController leaves the member out of a GetFunction response to a caller not allowed the action on
the function, checked with the function's tags through IamEnforcementFilter.authorizeEntryResource. TagsError is not
set, as no recording of AWS's answer for that case gives its code and message.
IamEnforcementFilter.requestAuthorization, which hands a handler the caller the filter evaluated, now treats a blank
Authorization header as no credential, as the filter itself does, and falls back to the presigned X-Amz-Credential;
before, a request with a blank header and a query credential passed the filter as that credential and the handler's
check as unsigned, so GetFunction returned Tags to a caller not allowed lambda:ListTags.
The NodeConfig an EKS Auto Mode instance joins with named the cluster's
endpoint as DescribeCluster returns it, the one Floci publishes for
clients outside the VPC (the Docker host's port, or localhost), which an
instance in the VPC can't reach, so a kubelet image's node never joined.
It now names the API server's address in the cluster's VPC, the cluster
node's address in its subnet on port 6443, which k3s names in its
serving certificate as it does every --node-ip, as an EKS private
endpoint answers inside the VPC. A cluster node without a subnet address
keeps the published endpoint.
From emr-7.14.0, "When you select Trino as the only application at launch, Amazon EMR no longer starts YARN
and HDFS." A cluster whose Applications name Trino alone now runs neither: its primary node runs the metastore
EMR still installs with Trino, and Trino, without a NameNode or DataNode, and it starts no YARN and no core or
task node containers. Where Floci runs no Trino, such a cluster's steps get its volumes,
and its network, where they read their primary node's instance metadata.
An EKS Auto Mode instance whose image's own kubelet registers its node
(kubeletRegistersNode) was looked for under its private DNS name, while
the node is authenticated as system:node:<instance-id>. Node restriction
refuses that kubelet a node under the DNS name, and one registered under
the instance ID was never found, so the instance was terminated once its
registration wait was up.
The node is now named by the instance ID whoever registers it, and the
NodeConfig Auto Mode launches with turns on nodeadm's InstanceIdNodeName
feature gate, so the kubelet registers it under that name.
The API reference's required permissions for BatchGetSecretValue say "you must have secretsmanager:GetSecretValue for
each secret", and the Service Reference lists that action among the operation's. Floci checked the batch action only,
so a caller allowed secretsmanager:BatchGetSecretValue read every secret, whatever its policies said about
GetSecretValue on each one.
The authorized-actions generator now reads that clause, already vendored by
fetch_secretsmanager_required_permissions.py, into a perEntry section: the action an operation needs on each entry it
reads, with the type of the action the clause's words name as the generators' names go (stem: secret is Secret),
where the Service Reference lists the action among the operation's. IamAuthorizedActions reads it, and the Secrets
Manager handler checks each secret a batch read returns against it, both by SecretIdList and by Filters. A secret the
caller may not read goes to Errors as AccessDeniedException, under the id it was requested as (its ARN for a filtered
read), and the others are returned, as AWS's own fidelity check records it
(check_batch_get_secret_value_returns_partial_results_with_a_per_secret_error_for_a_denied_secret).
Each secret is checked with the condition keys of its own stored tags (aws:ResourceTag/<key>,
secretsmanager:ResourceTag/<key>), through IamEnforcementFilter.authorizeEntryResource, so a grant or a deny scoped to
a tag holds for each secret of a batch as it does for a GetSecretValue of that secret alone.
The gates this change runs need today's AWS too, so the tables they cover are synced: the Service Reference lists 37
more Glue actions with no resource type and S3 Tables' ListStorageLensConfigurations (iam-authorized-actions.json),
S3 Tables' StorageLens type on its tagging actions with its ARN format and tag keys, and the elasticfilesystem-endpoint
and s3files-endpoint namespaces it does not read (iam-request-resources.json), three S3 actions taking
s3:ResourceAccount, GetBucketDefaultStorageClass, PutBucketDefaultStorageClass and GetIncompleteUpload
(s3control-tag-condition-keys.json), and the S3 user guide's permissions table gives the two default storage class
operations (tools/aws/sources/s3-required-actions.json).
The files a cluster's trino-password-authenticator names were read whole into Floci's heap before being copied
into Trino's container, so a bootstrap action writing a file of several gigabytes could run Floci out of
memory. ContainerFiles.copy now copies a file between containers through an owner-only temporary file, one
Docker request after the other, and refuses one larger than the memory Trino's container gets, which Trino
reads it into, before any of it is written.
The node lifecycle controller marked every node Floci registers for a
joined instance Unknown once node-monitor-grace-period had passed (40
seconds up to Kubernetes 1.31, 50 from 1.32), tainted it unreachable
and evicted its pods, since no kubelet renewed its Lease. Every 10
seconds, as a kubelet does, Floci now renews each running instance's
node Lease in kube-node-lease, owned by the node and 40 seconds long,
and posts Ready again for a node the controller marked not Ready. A
stopped instance's node is not renewed, so it goes not Ready as on EKS.
The renewal runs on a scheduler of its own, apart from the readiness
poller, with each cluster on its own thread, so a slow API server
delays no other cluster's heartbeat, and a sweep that throws is logged
without ending the schedule. The kubectl apply command is now built
once, by EksClusterManager.kubectlApply.
The Service Reference lists lambda:GetLayerVersion among the actions CreateFunction and UpdateFunctionConfiguration
are authorized by, and the Lambda Developer Guide says what it is checked on: "Make sure that you have permission to
call the GetLayerVersion API on the layer version". Floci checked neither operation as it, so a caller allowed to
create or update functions added any layer version of its account, whatever its policies said about reading it.
tools/aws/fetch_lambda_layer_permissions.py vendors that sentence from the adding-layers page, with the action and
the resource it names, and refuses a page asking for permission to call an API in any other wording. The
request-resources generator reads it (api_permission_resources): an operation the Service Reference lists as
authorized by that action is also checked as it on each value of the request's member holding botocore's ARN shape
for the type the words name (`<Type>Arn`, as minted_types reads it; `Layers`, a list of `LayerVersionArn`, for a
`layerVersion`). CreateFunction and UpdateFunctionConfiguration now check lambda:GetLayerVersion on each layer
version their Layers give, and a request giving none is not checked as it; no other operation changes.
--verify reports an operation checked so whose action the Service Reference stops listing (verify_api_actions).
CreateFunction is the first operation checked by parts that also tags what it creates, so IamEnforcementFilter now
checks an operation's own action, where it is one of the parts, as it would be alone: with the request's tags
(aws:RequestTag, aws:TagKeys) and carried values, not the bare part context. The checks made after it, the tagging
action a create also needs, a companion and a forwarded action, are made on the resources that action was checked on,
not on *, so lambda:TagResource is again checked on the function a tagged create makes.
Another account's layer version is checked on its ARN alone: LambdaStoredResourceArns answers reachedInItsAccount
for it, as Lambda reads such a layer in its owner's account through the owner's policy and never as the caller's layer
of that name, where IAM also checked the caller's same-named layer before (GetLayerVersionByArn too).
The table is regenerated against today's Service Reference too, which the online gate this change runs requires: AWS
added SageMaker's leaderboard and model-monitor-config types (their ARN formats and tag keys, and the types of
AddTags, DeleteTags and ListTags) and lists a backup-external namespace the table does not read.
The docs and two comments in LambdaService and LambdaLayerService no longer say Floci implements no layer
permissions.
Adds the two recursion config operations, so Terraform's
aws_lambda_function_recursion_config converges. RecursiveLoop is
stored on the function, Terminate until one is put, and an ARN of
another account or partition is a ResourceNotFoundException.
Allow lifts the 16-hop bound on a chain of asynchronous invocations,
since AWS takes no action on a loop it detects for such a function.
The setting is read from $LATEST whichever version or alias is
invoked, and an invocation past the bound starts on a thread of its
own, so the pool's caller-runs fallback cannot nest the loop on one
stack.
With TLS on, Floci's TLS proxy holds floci.tls.aws-https-port (443 by
default) for AWS API calls and cfn-response callbacks, so an ALB HTTPS
listener on that port could not bind it and received no traffic, where
AWS serves it.
- an HTTPS listener on the proxy's port is served on loopback, and the
proxy reads the ClientHello's SNI without terminating TLS and hands the
connection to the listener that claims the name; Floci's own endpoint
names, no SNI and unclaimed names stay with Floci
- the proxy waits for a whole ClientHello only while such a listener is
served behind it, from one deadline armed by the first bytes, and sends
anything else to Floci on its first bytes as before
- each proxied connection is pinned to the listener its ClientHello
selected, and carries the client the proxy accepted it from, so targets
see the client in X-Forwarded-For and X-Forwarded-Port names the
listener's port
- the proxy and the embedded DNS server share one list of Floci's DNS
suffixes
- a failing route lookup is logged at warn, and the connection goes to
Floci
Refs #8613
Co-authored-by: Jonathan Morley <jonathanmorley@users.noreply.github.com>
A cluster's trino-password-authenticator now makes its Trino's password-authenticator.properties, which a
trino-config http-server.authentication.type of PASSWORD turns on. The files it names (file.password-file,
the LDAP key and trust stores) are copied into Trino's container from the image the cluster's bootstrap
actions left. Trino gets a shared secret for its internal communication unless trino-config names one, as EMR
configures one, and is found ready by its image's health check, which needs no credentials. Trino takes a
password only over HTTPS, so through Floci with its TLS on.
ContainerFiles reads one file out of a container; ElastiCache's snapshot read and Lambda Web's init-error read
move onto it.
AddLayerVersionPermission, RemoveLayerVersionPermission and GetLayerVersionPolicy had no handler, so a layer's owner
could not grant another account, an organization or everyone lambda:GetLayerVersion on one of its versions, as the
Lambda Developer Guide says it must ("To use a layer in another account, the owner of that account must grant your
account permission in a resource-based policy").
LambdaLayerPolicyService keeps a layer version's statements with the version, in the order they were added, each
granting lambda:GetLayerVersion to an account (written as its root ARN), to everyone, or to an organization
(aws:PrincipalOrgID), with a revision each change renews. Its answers are AWS's, as the aws-emulator evaluation
suite records them: a statement id already in the policy is a ResourceConflictException that leaves the revision as
it was; a RevisionId other than the latest a PreconditionFailedException, before anything changes; an OrganizationId
with an account principal an InvalidParameterValueException; a policy past 20480 characters a
PolicyLengthExceededException; the model's constraints a ValidationException in member order; and a version that
never had a policy and one whose every statement was removed answer differently ("No policy is associated with the
given resource." and "Layer version ... does not have any resource policy.").
LambdaResourcePolicyProvider now returns a layer version's policy, owned by the account in its ARN, so under IAM
enforcement a caller in another account is refused lambda:GetLayerVersion on it until its owner grants that account.
Reading another account's layer once granted is not served yet: GetLayerVersionByArn still resolves a layer only in
the caller's own account.
A k3s node whose container exited without Floci stopping it (k3s
crashing, say) stayed stopped until Floci restarted, and a container
started again outside Floci had none of its attached EBS volumes'
devices, so their mounts failed. Floci now watches each node container,
as it watches an EC2 instance's, adopts one that exited again as a
restart adopts it, and makes its volumes' devices again. Once its API
server answers, the readiness poller sets it up and finalizes it as it
does a replaced node, so the link-local metadata and Pod Identity
addresses, the VPC routes and the log follower are made again in the
started container. A node that exits more than three times within ten
minutes is left stopped.
The exit goes to EksService, as EC2 hands a guest's shutdown to
Ec2Service, and EksService starts the node again under the cluster's
capacity lock, which DeleteCluster and the first node group's
replacement hold, so an exit handled while the cluster is deleted, or
once it is gone, leaves the node stopped. Each restart has its own
number that the poller clears only once it finalized that one, so a
restart during the finalize is kept, and deleting a cluster forgets its
restarts. The node restart Docker test's volume helper image is
prefetched under its own class name.
The Service Reference lists the actions each Secrets Manager operation is authorized by without saying when each is
needed, so a request was checked as its own action alone: a BatchGetSecretValue using Filters without
secretsmanager:ListSecrets, a CreateSecret adding replica Regions without secretsmanager:ReplicateSecretToRegions and
a ValidateResourcePolicy without secretsmanager:PutResourcePolicy were all let through.
Each operation's page in the API reference says it, in its required permissions: "If you use filters, you must also
have secretsmanager:ListSecrets", "To add replica Regions, you must also have secretsmanager:ReplicateSecretToRegions",
"Required permissions: secretsmanager:ValidateResourcePolicy and secretsmanager:PutResourcePolicy".
tools/aws/fetch_secretsmanager_required_permissions.py copies that paragraph for each operation the Service Reference
lists as authorized by another of its actions, with each clause's action and what it is needed for or on, into
tools/aws/sources/secretsmanager-required-permissions.json. Two generators read it:
- regen_iam_authorized_actions.py: an action needed when the request does something is a companion of the request
member the clause's words name as the generators' names go (filters is Filters, add replica Regions
AddReplicaRegions), where the Service Reference lists it for the operation and does not mark it as tagging, which
the tag-on-create table checks. A companion a request member sets may now carry no session key.
- regen_iam_request_resources.py: actions an operation always needs beside its own are each checked on what the rules
read for it (ValidateResourcePolicy and PutResourcePolicy on the secret its SecretId names). A request checked by
parts that names nothing is now checked on * as each action the table checks on the same resources as its own, not
as its own alone, so a ValidateResourcePolicy naming no secret still needs PutResourcePolicy.
The fetcher refuses a sentence naming a secretsmanager: action in a wording it does not read, so a reworded page fails
rather than dropping a check, and the enforcement test runs on the AWS SDK.
Not read: GetSecretValue for each secret of a batch, which AWS reports per secret in Errors rather than refusing the
call; PutResourcePolicy for a cross-account replica and DeleteResourcePolicy for one stopped replicating, whose words
name no member of the request; and the KMS permissions of a secret on a customer managed key.
#9743 read which queue each action of a message move task is checked on from two parameter sentences of the API
reference picked one by one (SourceArn's "only ARNs of dead-letter queues (DLQs)", DestinationArn's "specify the
destination queue"), a list of the three operations' pages, and a reading of its own for ListMessageMoveTasks: a queue
no parameter named was the one the row named the operation's own action of.
The developer guide's steps to configure a redrive's minimum permissions group the actions by queue instead:
"Permissions for the DLQ (source queue): sqs:StartMessageMoveTask, ..., sqs:ReceiveMessage, sqs:DeleteMessage,
sqs:GetQueueAttributes" and "Permissions for destination queue: sqs:SendMessage". The fetcher now copies those groups,
and group_permission_resources places each action the Service Reference lists an operation as authorized by on the
queue its group names, the member of the request the group's words name as the generator's names go (the source queue
is SourceArn, the destination queue DestinationArn), as CodeArtifact's destination repository is its
destinationRepository. The parameter sentences, the list of operations and the own-queue reading are gone. The table
is unchanged.
GetApiKeys ignored the name and customerId filters and returned every
key. name now keeps the keys whose name starts with it and customerId
the keys of that customer; the filtered keys are paged by limit and
position as before.
ApiGatewayRestApiPageCapTest and ApiGatewayApiKeyPageCapTest become one
parameterized ApiGatewayPageCapTest over the collections paged through
pageById.
StartMessageMoveTask was checked as sqs:StartMessageMoveTask alone, on both its SourceArn and its DestinationArn, so a
caller granted the permissions AWS requires was refused on the destination, and one granted the action alone on the
dead-letter queue was let through. ListMessageMoveTasks was checked as its own action alone.
The Amazon SQS developer guide's table of a dead-letter queue redrive's minimum permissions gives each task's actions
of each queue: "Add the sqs:StartMessageMoveTask, sqs:ReceiveMessage, sqs:DeleteMessage, and sqs:GetQueueAttributes
of the dead-letter queue", "Add the sqs:SendMessage of the destination queue", and "Add the sqs:ListMessageMoveTasks
and sqs:GetQueueAttributes of the dead-letter queue". The API reference names each queue's parameter: SourceArn "only
ARNs of dead-letter queues (DLQs)", DestinationArn "specify the destination queue". AWS's own fidelity check
(iam__sqs__sts/check_start_message_move_task_requires_composite_source_and_destination_permissions in
aws/aws-emulator-evaluation-suite) refuses a caller granted sqs:StartMessageMoveTask alone on the dead-letter queue,
naming sqs:ReceiveMessage on it, and lets the call through once the five are granted.
tools/aws/fetch_sqs_redrive_permissions.py copies the table's rows and those parameter sentences into
tools/aws/sources/sqs-redrive-permissions.json, a new PERMISSION_SOURCES entry, and the request-resources generator's
task_permission_resources reads it: the row naming the operation's own action, each action on the resource the rules
read from the parameter naming its queue, a queue the request names by no such parameter being the one the row names
the operation's own action of. --verify checks each row's actions against the Service Reference's AuthorizedActions.
Only StartMessageMoveTask and ListMessageMoveTasks change; CancelMessageMoveTask names its task by handle and keeps
its reading.
AWS's Auto Mode instances carry aws:eks:cluster-name and no karpenter.sh/nodeclaim tag (measured). Floci now writes aws:eks:cluster-name and no longer tags an instance with its claim's name: a pass finds each instance's claim by its status.providerID, as Karpenter matches them, else by the old tag on an instance launched before, else by the derived name, another derivation when an older instance's claim has it.
A claim whose launched status write failed keeps the name its launch chose, as claims Auto Mode doesn't manage and claims a provider ID places stay reserved, and with the claims unreadable a pass launches nothing, so a launch can't take a name already in use.
S3 Tables accepted tags only at CreateTableBucket and CreateTable, so a
client could not read them back or change them.
The three operations are served on their modelled restJson1 routes,
POST, DELETE and GET /tag/{resourceArn}, for a table bucket's ARN or a
table's ARN. They read and change the tags the create operations store,
the same ones IAM reads for aws:ResourceTag conditions, so a tag set
with TagResource is what the next request's condition sees. The IAM
route and action tables already mapped the routes to
s3tables:TagResource, UntagResource and ListTagsForResource. Like S3
Tables' other routes, /tag is rewritten only for a request signed for
s3tables, so a path-style S3 request for a bucket named tag still
reaches S3.
A table keeps its tags through a rename, as its ARN ends in a minted id,
and tagging leaves its versionToken. An unknown table bucket answers
NotFoundException "The specified bucket does not exist.", and a table
ARN whose table or bucket is missing "The specified table does not
exist.", as AWS does.
TagResource refuses with BadRequestException a missing or non-object
tags member, a value that is not a string, a key beginning with aws:, a
key outside the tag character set, a key or value outside the modelled
lengths (in Smithy's validation wording), or more than 50 tags on the
resource counting the ones it already has. The aws:, character set, key
length and 50-tag messages are the ones AWS answers. CreateTableBucket
and CreateTable now apply the same rules to the tags they are given,
and no longer store a null or non-string value as its text.
TagResource and UntagResource build the new tags apart and restore the
old ones if the save throws, so a failed WAL write leaves nothing
visible to ListTagsForResource or IAM resource-tag conditions.
Tag condition keys come from generated data, and that table covers only
the IAM namespace, so S3 Tables' TagResource and UntagResource stay
without aws:RequestTag and aws:TagKeys, as most services' tagging
actions do.
AWS invokes a Lambda target with a JSON array of up to MaxBatchSize
events (10 by default), synchronously unless InvocationType is EVENT,
and with LambdaParameters.Qualifier resolved from each event. It checks
a Lambda TargetArn's form, then the Region and account of any target,
then that the parameter block is the target's.
A reset or deleting the subscriber drops the invocations still waiting.
AWS drops a waiting event only once it outlives the subscriber's
MaxEventAgeInSeconds or uses up MaxRetryAttempts, so a burst behind a
slow function is not cut at a fixed count.
Auto Mode's node pool guide: the sum of expireAfter and terminationGracePeriod can't exceed 21 days, and expireAfter can't be Never. The NodePool kind took a Never or 720h pool. It now has the three rules and messages AWS's NodePool kind has on an Auto Mode cluster, keyed on an eks.amazonaws.com NodeClass ref, and expireAfter's schema as AWS's (a 336h default and a duration-or-Never pattern); terminationGracePeriod's schema is Karpenter's published one.
A presigned or browser POST upload answered 204 whatever the form asked.
It now honors success_action_redirect and the deprecated redirect field
with a 303 whose Location is that URL plus bucket, key and etag query
parameters, and ignores a URL S3 cannot interpret, as AWS does. Without
a redirect, success_action_status 201 returns the PostResponse XML with
the object's absolute Location, 200 an empty body, and 204 or any other
value the default. The 201 Location follows the bucket the virtual-host
routing chose and the forwarded host and scheme.
SigV4Canonicalization.percentEncode now shares uriEncode's byte loop.
The generated IAM condition key table had iam:AccountPropertyNamespaces in notRead on both actions the Service
Reference lists it on, so a policy keyed on it matched nothing: the IAM user guide's DenyRoleManagerEnablement
statement, ForAnyValue:StringEquals on RoleManager, let a caller enable role manager, and an Allow requiring the
namespace refused every call.
Neither botocore nor the Service Reference says where the value is; AWS's pages do. The IAM user guide's condition
key table: iam:AccountPropertyNamespaces "Specifies the account property namespaces being read or modified in the
request ... When you call PutAccountProperties or GetAccountProperties". The API reference on PutAccountProperties'
Properties: "Each key uses the format Namespace/PropertyName. The key must contain exactly one / separating the
namespace from the property name". tools/aws/fetch_iam_account_property_namespaces.py copies both sentences into
tools/aws/sources/iam-account-property-namespaces.json with what they name: the key, the operation, the parameter,
the format, its separator and the part that is the namespace. regen_iam_condition_keys.py takes that entry as it
stands, refusing it unless the Service Reference lists the pair and botocore models the parameter as a map of
strings, and writes it to a new fromMapKeys section, which the IAM context resolver reads from the request's map as
the operation's handler does. GetAccountProperties names no properties, so it stays in notRead.
Use the retained stack when a resource read names its ID. This lets SDK
clients inspect the original resources after deletion or name reuse until
the configured retention window expires.
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
SES v2 refused the headers it sets itself (From, To, Cc, Bcc, Subject,
Date, Message-ID, Reply-To, Return-Path, MIME-Version, Content-Type and
Content-Disposition, in any case) only in a SendEmail's
Content.Simple.Headers. Content.Template.Headers and the SendBulkEmail
default and replacement headers now refuse them too, with 400
BadRequestException "Header <Name> is not supported" and the name as
sent. On SendBulkEmail one refused header, default or in any entry,
fails the whole call. As probed on AWS, the refusal comes right after
the request shape, ahead of the sender, content and template data
checks, the destination count, the template and configuration set
lookups and the sender verification.
UpdateClusterConfig refused every kubernetesNetworkConfig member other
than elasticLoadBalancing, so turning EKS Auto Mode on through the
Terraform AWS provider failed: its update carries the cluster's current
ipFamily and serviceIpv4Cidr beside elasticLoadBalancing. The cluster's
own values are now accepted unchanged, ipFamily in any case. Another
value for either is still refused, as EKS sets both only when it creates
a cluster and Floci doesn't change them.