Commit Graph
390 Commits
Author SHA1 Message Date
Priamo Germosen e8f16911d2 fix(iam): check EKS requests on the resources the generated table gives them (#9070)
EKS was built by hand: ResourceArnBuilder walked an EKS path, looked
each resource up through EksService, and checked a tagging route on the
caller's cluster named after the ARN's last segment; the request
resources table held no EKS operation, and nothing gave a policy
condition an EKS resource's tags. eks moves from HAND_BUILT to
NAMESPACES, so the table gives each operation the cluster its path
names, the node group, add-on or Fargate profile EksStoredResourceArns
finds by its cluster and name, the ARN a tagging route carries, and
parts of an ARN the request does not give open. CreateCluster, for which
the Service Reference lists no resource type, is checked on the cluster
its body names from a MEASURED entry quoting the EKS user guide's
example policy for creating a cluster. ResourceArnBuilder's EKS section
and its EksService dependency go. EksStoredResourceArns answers the
stored tags of a cluster, node group, Fargate profile, add-on, Pod
Identity association or access entry; EKS's tag changes take one lock
and give a cluster, node group or Fargate profile a new map, whose tags
field is now volatile, and a cluster is tagged only when its ARN is the
whole ARN the request names. Tag changes and tag reads find a cluster,
node group or Fargate profile through one lookup, and an ARN with a part
left open is not looked up. Read from its model, EKS tags only on
/tags/{resourceArn} with the ARN encoded, as the SDKs send it, so the
tagging tests that sent it unencoded now encode it. Only EKS's
operations change in the table.
2026-11-19 23:25:25 -04:00
Priamo Germosen 1a888867ad fix(iam): check STS requests on the resources the generated table gives them (#9033)
STS was built by hand: ResourceArnBuilder checked AssumeRole on the role
its RoleArn named and every other operation on *, IamEnforcementFilter
sent STS requests there by action, and the request resources table held
no STS operation. sts moves from HAND_BUILT to NAMESPACES, so the table
gives each operation what the Service Reference and botocore give it:
AssumeRole the role its RoleArn names, as before, GetFederationToken the
federated user its Name names and AssumeRoot the root user, where the
hand builder checked both on *, and the operations that act on no
resource type * as before. StsStoredResourceArns answers that a role IAM
holds in the account its ARN names is assumed there, as the handler
finds it, so a cross-account AssumeRole is checked on that role alone
and not also on the caller's role of that name. ResourceArnBuilder's STS
section and the filter's STS case go. Only STS's operations change in
the table.
2026-11-19 21:56:53 -04:00
Andre Kurait 430088b772 fix(ci): pass IAM drift changed paths through a file (#9025)
A large pull request diff could fail the IAM data gate before any check
ran, because the workflow passed every changed path in one make argument
("Argument list too long"). The workflow now writes the paths to a file
and iam-data-verify reads it through CHANGED_FILE, keeping affected-check
selection, the CHANGED interface, full verification for an empty diff or
the weekly run, and the report of every failed check. A Python test runs
the target with stubbed checks for each of those cases.
2026-11-19 21:19:01 -04:00
Andre Kurait 875794c538 fix(iam): select EC2 interface and endpoint authorization resources (#8892)
* fix(iam): select EC2 interface and endpoint authorization resources
2026-11-19 19:24:56 -04:00
rajp33 9f959a3f27 feat(iot): support SetV2LoggingOptions and GetV2LoggingOptions (#8945)
* feat(iot): support SetV2LoggingOptions and GetV2LoggingOptions
* fix(iot): keep omitted V2 logging options and require role and level on first set
* fix(iot): validate SetV2LoggingOptions log level and member types
* fix(iot): answer SetV2LoggingOptions with an empty body
* test(iot): cover V2 logging setup, updates, errors and account scoping in the SDK suite
* test(iot): sign V2 logging requests with the shared EnforcementFixtures.auth helper
* test(iot): cover V2 logging persistence and document eventConfigurations and verbose limits
* docs(iot): count the V2 logging routes in the service matrix
* fix(iot): reject a SetV2LoggingOptions body that is not a JSON object
* fix(iot): reject a blank roleArn in SetV2LoggingOptions
* fix(iot): serialize the SetV2LoggingOptions read-merge-write
* test(iot): share one IoT client builder in the SDK fixtures
* fix(iot): stop refusing a blank roleArn in SetV2LoggingOptions
* fix(iot): build the V2 log level refusal with SmithyValidationErrors
* refactor(iot): share IoT request body readers between logging and fleet indexing
2026-11-19 19:14:50 -04:00
Jeremy Chapeau 3a9f529158 fix(sts): give AssumeRole's identity-based policies the sts:RoleSessionName and sts:ExternalId keys (#8922)
With IAM enforcement on, the caller's identity-based policy, permissions boundary, session
policy and SCPs were evaluated for sts:AssumeRole without the request's sts:RoleSessionName
and sts:ExternalId, which the role's trust policy already sees, so a condition on either never
matched. The Service Authorization Reference lists both among the condition keys of
AssumeRole. STS now joins the generated request condition key table, which reads them from the
AssumeRole form; an AssumeRole without ExternalId names no sts:ExternalId. AssumeRoleWithSAML
carries no session name member, so it is listed as not reading it from the request.

sts:SourceIdentity, sts:TransitiveTagKeys and the session tag keys are not read: Floci does not
model source identity or session tags, as the STS page already says.

Closes #8921
2026-11-19 17:17:17 -04:00
Priamo Germosen 66dbdd2935 fix(iam): check Aurora DSQL requests on the clusters they name, from the generated table (#9011)
Aurora DSQL was built by hand: ResourceArnBuilder read a cluster or
stream from its path, or a tagging route's ARN, IamEnforcementFilter
sent DSQL requests there without their operation, the request resources
table held no DSQL operation, and nothing gave a policy condition a
cluster's tags. dsql moves from HAND_BUILT to NAMESPACES, so the table
gives each operation the cluster or stream its path names, or the ARN
its modeled /tags/{resourceArn} carries, from botocore's REST model;
ListClusters, for which the Service Reference lists no resource type, is
checked on cluster/* from a MEASURED entry citing the AccessDenied
message AWS returned in #6328. ResourceArnBuilder's DSQL branch, with
the path and tagged-ARN helpers only it still used, and the filter's
DSQL case go, and the shared tags controller now serves DSQL's
tagging on its modeled route only, refusing the bare /tags. Only DSQL's
operations change in the table. DsqlStoredResourceArns answers a
cluster's stored tags; TagResource and UntagResource give the cluster a
new map under its lock, and its tags field is volatile.
2026-11-19 13:31:17 -04:00
Priamo Germosen 56d8b9aedc fix(iam): check EventBridge Pipes requests on the pipes they name, from the generated table (#9000)
Pipes was built by hand: ResourceArnBuilder read a pipe's name from its
path or a tagging route's ARN, IamEnforcementFilter sent Pipes requests
there without their operation, the request resources table held no Pipes
operation, and nothing gave a policy condition a pipe's tags. pipes
moves from HAND_BUILT to NAMESPACES, so the table gives each operation
the pipe its path's Name names, or the ARN a tagging route carries, from
botocore's REST model, and ResourceArnBuilder's Pipes branch and the
filter's Pipes case go. Only Pipes' operations change in the table.
PipesStoredResourceArns answers a pipe's stored tags; TagResource and
UntagResource give the pipe a new map one call at a time, and its tags
field is volatile.
2026-11-19 12:17:15 -04:00
TATSUNO “Taz” Yasuhiro f094103b31 feat(lambda): add InvokeWithResponseStream (#8964)
* feat(lambda): add InvokeWithResponseStream
* feat(lambda): report a streaming handler's error in InvokeComplete
* fix(lambda): send response stream chunks while the function runs
* fix(lambda): build Invoke qualifier violations with the shared helpers
* test(lambda): exit the streaming handler from the write callback
2026-11-19 11:10:09 -04:00
Oleksandr Nikolaichuk 5a0529ba31 fix(cloudformation): update an API Gateway stage in place and delete it with the stack (#8851)
An AWS::ApiGateway::Stage was created again on every stack update, dropping stage variables set outside the stack. It is now patched in place for DeploymentId and Description and restored on rollback. A StageName change replaces it, and a RestApiId change moves it: the stage left on the old API is deleted through the lifecycle records once the update commits, with its delete events, unless UpdateReplacePolicy: Retain keeps it. A new stage whose name is already taken on the API is refused with "Stage already exists", and the stage is deleted with the stack.
2026-11-19 10:36:39 -04:00
Priamo Germosen 43d6ea4961 fix(iam): check Kinesis Data Streams requests on the resources they name, from the generated table (#8989)
Kinesis was built by hand: ResourceArnBuilder read a request's
StreamARN, StreamName or ResourceARN into one ARN and checked everything
else on stream/*, the request resources table held no Kinesis operation,
and nothing gave a policy condition a stream's tags. kinesis moves from
HAND_BUILT to NAMESPACES, so the table gives each operation the
resources botocore's members name as the Service Reference types them:
the stream by StreamARN or StreamName, a consumer by ConsumerARN, a
tagged resource by ResourceARN, and the KMS key StartStreamEncryption
and StopStreamEncryption name. Its ResourceArnBuilder branch goes. Only
Kinesis's operations change in the table. KinesisStoredResourceArns
answers a stream's or a consumer's stored tags; the tag calls give the
resource a new map under their lock, and the tags fields are volatile.
2026-11-19 10:04:27 -04:00
Priamo Germosen aabe2247c5 fix(iam): check SNS requests on the topics they name, from the generated table (#8971)
SNS was built by hand: ResourceArnBuilder read a request's TopicArn and
checked everything else on the account's open topic ARN, the request
resources table held no SNS operation, and nothing gave a policy
condition a topic's tags. sns moves from HAND_BUILT to NAMESPACES, so
the table gives each operation the topics botocore's members name
(TopicArn, ResourceArn, TargetArn, and CreateTopic's Name), and its
ResourceArnBuilder branch goes. Only SNS's operations change in the
table. SnsStoredResourceArns answers a topic's stored tags; TagResource
and UntagResource give the topic a new map one call at a time, and its
tags field is volatile.
2026-11-19 08:50:08 -04:00
Priamo Germosen 634073fb83 fix(iam): check SQS requests on the queue their URL reaches, from the generated table (#8943)
SQS was built by hand: ResourceArnBuilder read a request's QueueUrl or
QueueName into a queue ARN, the request resources table held no SQS
operation, and nothing gave a policy condition a queue's tags. botocore
documents every QueueUrl as "The URL of the Amazon SQS queue ...", which
the generator's documentation rule did not read: it took only a name, an
id or an identifier as what a member names, and the service's own name
stood between "the" and the type's word. It now reads a URL as one more
such kind, and a member's lead drops its model's own service name as
botocore's metadata spells it before the word it qualifies, and a
hyphenated word before the type's word qualifies it ("The URL of a
dead-letter queue"), so QueueUrl names the queue; being neither the
queue's name nor its id, SQS finds it (find). Only SQS's operations
change in the table. sqs moves from HAND_BUILT to NAMESPACES and its
ResourceArnBuilder branch goes. SqsStoredResourceArns finds the queue a
URL reaches as the handlers do, in the account the URL names, and
answers a queue's stored tags; TagQueue and UntagQueue give the queue a
new map one call at a time, and its tags field is volatile.
2026-11-19 07:16:17 -04:00
Jimmy Liu Jia 8619ad65cc fix(cloudformation): apply SES string schema constraints (#8879)
The CloudFormation property types generator now keeps minLength, maxLength and pattern on every string the published schemas constrain, and HandlerReader checks them for AWS::SES::ConfigurationSetEventDestination with CloudFormation's wording: "expected minLength: 36, actual: 0", "expected maxLength: 1024, actual: 1100" and "failed validation constraint for keyword [pattern]". A blank required string counts as missing only where the schema sets no constraint.

Follow-up to #8733.
2026-11-18 20:34:57 -04:00
Priamo Germosen 4fe226c253 fix(iam): refuse a service namespace that names no AWS service (#8865)
The member's pattern admits anything word-shaped, so a value like
amazon-s3 satisfied everything the model declares and was answered 200
with an empty policy list, telling a caller the identity reaches nothing
rather than that the question was wrong.

Both operations that take a namespace hold it to the vendored catalog now,
through AwsServiceNamespaces.isPublished so nothing keeps a second list,
and each answers the sentence recorded for it: the list operation names
the rejected values inside AWS's own brackets, and the entity reader
carries AWS's own misspelling of namepace.

ServiceNamespaces is vendored for that to hold. The generator held the
whole member back because the operation answered an empty list with a
sentence of its own, and the cost was that no value in the list was read
at all: one breaking the published pattern reached the catalog check and
was answered InvalidInput where AWS answers ValidationError. The member
is read now, each value held to serviceNamespaceType and the list to its
bounds of 1 to 200, which also retires two answers that were this
package's own: an absent list is the required member the model declares,
and a list over 200 is the model's bound rather than a check beside it.

A namespace the job itself reports stays readable on
GetServiceLastAccessedDetailsWithEntities whether the catalog publishes it
or not, so the job is read first. The catalog is vendored, and a policy
may grant a service published after it: the report keeps the namespace
that policy names, so refusing it there would be this package disagreeing
with itself. Nothing else is exempt, and the list operation, which takes
namespaces rather than reporting them, holds every value to the catalog.
2026-11-18 09:55:49 -04:00
Priamo Germosen 4292bca198 docs: check the REST service matrix rows against their controllers (#8861)
Every Service Matrix row now has its operation count checked, or a stated
reason it cannot be. The REST rows map their JAX-RS controllers in
action_count_sources, with:

- rename_actions for a method not named after its AWS action, and a list
  for a method that answers several actions by query parameter
  (CreateRestApi and ImportRestApi on POST /restapis?mode=import)
- route_prefix and skip_route_prefix on a REST source, so API Gateway's v1
  and v2 rows split the one controller that serves both
- a tag_handler source mode: a TagHandler class is what gives a service the
  three tagging actions the shared /tags controllers serve
- exclude_actions for operations that always fail (InvokeModelWithResponseStream
  answers 501, ExecuteSql BadRequestException, Amazon MQ's user calls
  BadRequestException for RabbitMQ brokers)

A new coverage gate fails when a row is neither checked nor listed under
hand_counted with its reason, when two rows share a link target, or when a
row has no numeric count. It replaces the required-sources list. S3 is the
one hand-counted row: its handlers pick most operations by query string.

Most REST rows were undercounted, EKS by the most (7, served 35). IoT Data
gets its own anchor, as it shared iot.md with IoT Core and its count was
never read. The AppSync, CloudFront, EKS, Lambda and Pipes pages now list
the operations their controllers serve: AppSync's listed names that do not
exist, and CloudFront's called stored-only operations unsupported.

Closes #4999
2026-11-18 08:27:23 -04:00
Oleksandr Nikolaichuk 29fc72d156 fix(cloudformation): update an API Gateway authorizer in place and replace it on a RestApiId change (#8841) 2026-11-18 08:06:09 -04:00
Priamo Germosen 39cdaa5075 docs: check the switch-dispatched service matrix rows against their handlers (#8854)
The Service Matrix count check covered generated action tables and fifteen
single-dispatcher rows. Rows served by several dispatchers, rows linking to a
section of a shared page, and the rest of the deferred handlers had no check,
and six of them had drifted.

action_count_sources now takes a list of sources per row, an exclude list for
labels that are not actions, and a `slug#anchor` key for a row linking to a
section. regen_action_docs.py gains a map_entries mode for actions answered
from a Map.entry lookup table (Lightsail's empty-list answers). Eighteen more
rows are checked, and the stale counts are corrected: CloudWatch Logs 17 to
53, CloudWatch Metrics 11 to 25, DynamoDB 28 to 53, ECR 34 to 47, SSM 22 to
48, Cost and Usage Reports 6 to 7. The SSM and DynamoDB pages gain rows for
the actions their handlers dispatch but the pages did not list.

Refs #4999
2026-11-18 07:43:19 -04:00
Oleksandr Nikolaichuk f082117a85 fix(cloudformation): create an EKS cluster with its VPC, logging and access settings (#8747)
As the next step of #6606, an AWS::EKS::Cluster is now created with its ResourcesVpcConfig, Logging and AccessConfig, a replacement included, and ClusterSecurityGroupId resolves through Fn::GetAtt. A template naming a subnet that does not exist fails the stack, as on AWS, and an EnabledTypes entry with no Type fails the resource. An in-place change to the three is logged and not applied until Floci has UpdateClusterConfig. CreateCluster now also refuses subnets from two VPCs, a PublicAccessCidrs entry that is not a CIDR, and an IPv6 block on an IPv4 cluster, and runs every check before it creates the cluster security group, so a refused request leaves no group behind for a stack's VPC rollback.
2026-11-18 07:35:25 -04:00
luiseterc f511cd8a44 fix(ec2): authorize launch template names against stored resource ARNs (#8850) 2026-11-18 07:27:48 -04:00
Hector Ventura 7f90aeecf5 chore(iam): refresh the managed policy catalog and name the drift on a stale check (#8825)
`make aws-data-check` failed on a clean main whenever local/aws was present, because the iam-dataset checkout had moved past the vendored managed-policy catalog. The catalog is regenerated from iam-dataset ee63e16 (1,594 policies): 8 added and 44 moved to a newer default version. The dataset now marks AWSIoTEventsFullAccess and AWSIoTEventsReadOnlyAccess deprecated; Floci already served both and AWS keeps a deprecated policy working for the identities it is attached to, so they join AWSLambdaFullAccess in RETAINED and stay unchanged. A failing --check now also prints the dataset commit, when the dataset is a git checkout of its own, and the policies a fresh generation adds, removes and changes, path-only changes included.
2026-11-18 07:03:00 -04:00
Jimmy Liu Jia 6bde4e6bb3 fix(cloudformation): provision Bedrock application inference profiles (#8772) 2026-11-17 21:08:02 -04:00
Oleksandr Nikolaichuk 523eba559e fix(cloudformation): create an EKS cluster with its encryption and network settings, a replacement included (#8739) 2026-11-17 18:53:23 -04:00
Oleksandr Nikolaichuk 790b93e739 fix(cloudformation): update a KMS key in place unless the engine says it must be replaced (#8718)
An AWS::KMS::Key update created a new key every time and left the old one enabled. The key now keeps its id: Description, KeyPolicy, Enabled, EnableKeyRotation and Tags are updated in place, keeping tags added outside the stack, and a failed stack update puts them back. A changed KeySpec, KeyUsage, Origin or MultiRegion fails the update, as the AWS::KMS::Key reference says. Create now honors KeyPolicy, Enabled, EnableKeyRotation, Origin and MultiRegion, and a key that a failed create or update leaves behind is scheduled for deletion.

Part of #6606
2026-11-17 16:33:26 -04:00
Oleksandr Nikolaichuk 9c9792a019 fix(cloudformation): update an EKS nodegroup in place unless the engine says it must be replaced (#8734)
An AWS::EKS::Nodegroup update no longer creates another nodegroup. One that changes no create-only property keeps its name and ARN, and its stack-managed tags are reconciled while tags added outside the stack stay; a failed update puts them back. A change to a property the registry marks create-only replaces the nodegroup and deletes the old one once the update commits. EksService cannot apply the other mutable properties, so the cluster and the nodegroup accept any change the engine reports beyond Tags with a warning. The nodegroup is created with its template tags, and a rolled-back replacement puts back the tag-key records of the entity it restores.

Part of #6606
2026-11-17 12:59:49 -04:00
Oleksandr Nikolaichuk a221e18838 fix(cloudformation): update an EKS cluster in place unless the engine says it must be replaced (#8730)
An AWS::EKS::Cluster update used to create another cluster every time, so an unnamed cluster left the old one behind and a named one failed. The cluster now keeps its name on an update the engine does not mark as a replacement, and the tags the last deployment wrote are reconciled from a recorded key list, leaving tags added outside the stack alone. A change to a create-only property (Name, RoleArn, EncryptionConfig, BootstrapSelfManagedAddons, OutpostConfig, AccessConfig.BootstrapClusterCreatorAdminPermissions or the network family and CIDR) replaces the cluster and deletes the old one once the update commits, and a failed update puts the tags or the prior cluster back. A Version change is accepted with a warning and not applied. EventBridge's tag reconcile now shares CfnRollback.reconcileTags.

Part of #6606
2026-11-17 09:07:49 -04:00
Yang Hao 93c1d39348 feat(account): implement GetAccountInformation and PutAccountName (#8725) 2026-11-17 06:58:24 -04:00
Oleksandr Nikolaichuk b3582da1f5 fix(ecr): list untagged images and honour tagStatus in ListImages and DescribeImages (#8684) 2026-11-17 05:57:04 -04:00
Priamo Germosen 8b1de6cdbe fix(iam): read the delegation request owner a policy condition names (#8688)
The Service Reference publishes iam:DelegationRequestOwner on the
delegation-request resource type rather than on the actions that act on one,
and only ListDelegationRequests carries the owner in a parameter. On the seven
others the value is the stored request's, so the key reached no request
context: an allow conditioned on it matched nothing and a deny conditioned on
it applied to nothing, where AWS evaluates both.

The table gains a fromResource section for a key published on a resource type,
each entry carrying the type, the member of its record the value is read from
and the type's ARN format. The filter then asks the service holding the
resource an ARN names for what its record keeps there, which is the
per-resource read that already gives a resource its tags, and the delegation
store answers through the port that already keeps IAM from depending on it.

Which member carries the owner is the one thing neither botocore nor the
Service Reference says, so the generator states it where it states anything by
hand, with AWS's own word quoted and linked: the key "Filters access based on
the AWS identity or principal that owns the delegation request", whose owner is
"the AWS identity or principal in the customer account that initiated or
received the delegation request". The generator refuses an entry whose evidence
does not link to itself, or whose member botocore's record of the type does not
hold as a string.

The owner is answered from the same scan the owner listing reads, by request id
rather than by owner, so an authorization costs a lookup rather than a pass over
the store under the lock every claim and expiry takes: this runs on every
request for the actions the key is published on, which the listing does not.

A call naming no request carries no value, so CreateDelegationRequest, whose
request does not exist while it is authorized, and a request nobody has claimed
are both left without the key rather than given a wrong one. The owner is
answered to the account that owns the request and to no other, the line the
service draws when it reads one request by id.

One difference stays and is on the IAM page: the same guide lists
UpdateDelegationRequest among the operations the key supports and the Service
Reference publishes it on neither that action nor a type it acts on, so the
generated reading is what this follows.
2026-11-16 21:15:46 -04:00
Priamo Germosen ef07bfd4b3 feat(athena): check the Glue permissions a DDL statement needs as the caller (#8657)
Athena runs a DDL statement against the Glue Data Catalog with the
caller's identity, so on AWS a caller without the Glue permissions a
statement needs starts the query, and the query fails with
"Insufficient permissions to execute the query." and the Glue denial.
Floci never checked them: under IAM enforcement a caller holding only
athena:* created and dropped Glue databases and tables through Athena.

Neither botocore nor the Service Reference says which Glue actions a
statement needs. Athena's user guide does, in its table "Examples of
database and table-level permissions":

- tools/aws/fetch_athena_glue_ddl_permissions.py vendors that table as
  it stands into tools/aws/sources/athena-glue-ddl-permissions.json:
  each statement's sentence and example policy, and the sentence that
  names the example database and table. --verify compares the file
  with the live page, and athena-glue-ddl-permissions.prompt.md says
  how to rebuild it when the page's layout changes.
- regen_iam_request_resources.py reads it as a source of the IAM
  request table (STATEMENT_SOURCES, for this table alone). Each action
  of a policy statement acts on each of its resources whose type the
  Service Reference gives the action, the type whose format the example
  ARN matches, its variables filled with what the page says the example
  names stand for. The table gains statementActions, the reference's
  types for each action, and statements. --check derives both offline,
  and --verify checks the types and the page. The sync also carries
  the Service Reference's changes since the last one.
- IamEnforcementFilter.statementRefusal checks those requests as the
  caller, the way a forwarded request is checked (aws:ViaAWSService,
  the caller's keys, the resource's policy), and returns AWS's denial.
  authorizeAdditionalResource's caller and decision steps move into
  helpers the two share.
- AthenaService checks CREATE DATABASE, CREATE [EXTERNAL] TABLE, DROP
  TABLE and MSCK REPAIR TABLE in the default catalog before running
  them, naming the database and table lowercase as Glue stores them
  (GlueService.normalizeName), and a denial fails the query with
  AWS's reason. As the guide says, DROP TABLE of a table without
  partitions needs no partition action; a table Glue cannot read for
  another reason fails the query.

AthenaGluePermissionsIntegrationTest runs the guide's policies under
IAM enforcement, and a deny on a lowercase name against a query that
spells it in capitals. RequestResourcesTest and the generator's and
fetch script's tests cover the rest, and athena.md says so.
2026-11-16 21:03:21 -04:00
Priamo Germosen 0741baf9da refactor(iam): state the restore kms:Decrypt check in MEASURED, not in a FORWARDED table of its own (#8649)
The request-resources generator stated facts by hand in two places:
MEASURED, what AWS checks where neither botocore nor the Service
Reference says it, and FORWARDED, added by #8309 for the Redshift and
Redshift Serverless restores asking KMS to decrypt with the snapshot's
key. The Redshift Management Guide sentences that entry cites are
MEASURED evidence, so the two restore entries are now MEASURED entries
naming another action AWS checks the caller for ({"action", "of"}),
admitted under the checks FORWARDED had, and FORWARDED is gone. MEASURED
is again the only hand-stated part of the file. The generated table,
the enforcement and the restore check are unchanged.

The table is also regenerated from today's Service Reference, which
added Glue's dataQualityEvaluationConfig and Lambda's runtime,
runtimeAlias and runtimeVersion resource types.
2026-11-16 18:11:51 -04:00
Jimmy Liu Jia 5f77b841a2 feat(cloudformation): provision SES event destinations (#8620)
* feat(cloudformation): provision SES event destinations
* fix(cloudformation): validate SES event destination replacements
* fix(cloudformation): apply SES event destination review feedback
* test(cloudformation): use shared stack waits for SES event destinations
2026-11-16 17:08:48 -04:00
Jimmy Liu Jia 3e0cd437d7 feat(cloudformation): provision SES configuration sets (#8551)
* feat(cloudformation): provision SES configuration sets
* refactor(cloudformation): simplify SES configuration set provisioning
2026-11-16 08:40:08 -04:00
luiseterc 2cbdef4b23 fix(rds): enforce lifecycle resource scopes and tags (#8401)
IAM enforcement now reads RDS requests from the generated
request-resources table: all 168 RDS operations are checked on the
resources they name, from the Service Reference and pinned botocore,
so a policy scoped to a DB parameter group, proxy, snapshot or other
RDS resource applies. Stored tags of RDS and DocumentDB resources come
from the existing tag lookups for aws:ResourceTag conditions, read
only, in the ARN's own account.

Closes #8396
2026-11-16 08:09:35 -04:00
Priamo Germosen 9eda97cf84 feat(emr-containers): emulate the EMR on EKS control plane (#8543)
Floci had no emr-containers service, so Airflow's EmrContainerOperator, the
aws emr-containers CLI and the SDKs had nothing to call. This adds its 25
operations: virtual clusters, job runs, job templates, managed endpoints,
security configurations and tags.

Job runs follow the job run states without running Spark on Kubernetes: a
run completes as soon as it is submitted, or after
floci.services.emrcontainers.job-run-duration-seconds. When Floci's EKS has
no cluster of the virtual cluster's container provider id, the run is FAILED
with "Cluster <id> does not exist." and CLUSTER_UNAVAILABLE, as AWS's "Common
errors when running jobs" page gives it; that page also gives the wording for
a job run on a missing or non-RUNNING virtual cluster. A job template's
${name} placeholders are filled from jobTemplateParameters or the parameter's
default. Deleting a virtual cluster clears its tags, as the development guide
says, only resources in an active state of the request's Region take tags,
and a job run's template and request tags together keep the 50-tag limit. A
virtual cluster created on an EKS cluster whose authenticationMode admits
access entries is access entry integrated, which ListVirtualClusters'
eksAccessEntryIntegrated filters on.

Every request is checked against botocore's emr-containers constraints,
vendored by tools/aws/regen_emr_containers_shapes.py and gated by make
aws-data-check. Routes sit under a signed-service prefix, so a path-style S3
request for a bucket named virtualclusters still reaches S3. The routes are
added to IAM's REST route table, and emr-containers to the IAM generators'
namespaces, so each operation is checked on the resource its path names,
StartJobRun and CreateManagedEndpoint need iam:PassRole on their
executionRoleArn, and the create operations need emr-containers:TagResource
for their tags, all from AWS's Service Reference.
2026-11-16 06:58:29 -04:00
Priamo Germosen 0b6077d374 fix(glue): check the Iceberg REST endpoint's routes under IAM enforcement (#8548)
No botocore model describes AWS Glue's Iceberg REST endpoint, so no
vendored route mapped its paths to an action, and the endpoint refused
every IAM principal under enforcement, letting only root credentials
and Floci's own query engine through.

- regen_rest_routes.py reads an endpoint botocore does not model from
  the AWS page documenting it (DOCUMENTED): Glue's "REST APIs for Apache
  Iceberg specifications" gives each operation's REST path, IAM action,
  CloudTrail event and a link to its definition in the Apache Iceberg
  REST catalog OpenAPI specification. Each row of the Iceberg REST
  Catalog API is the Glue operation its IAM action and CloudTrail event
  name, refused when they differ, on the method and path of the
  definition it links, under the root and the catalogs/{catalog} prefix
  the page's path gives. Rows of one operation are its route and its
  alternatives. Where the page's own path differs from the definition
  (DeleteNamespace's "namespces", CreateTable's GET), the definition is
  taken and the difference recorded. Nothing is typed by hand.
- Reading the page needs the network, so a regeneration carries the
  routes over from the vendored file, --fetch-documented reads them
  again, and --verify checks them against the page;
  documented-routes-verify runs in iam-data-verify.
- rest-routes.json gains the endpoint's ten Glue operations under the
  glue scope, and iam-authorized-actions.json lists glue's actions of
  no resource type, as it does for every routed scope. The same
  regeneration takes the actions AWS has added since: GuardDuty's
  ListInvestigationRecords and Route 53's IP guardrail policy actions.
- The controller's refusal of IAM principals goes. Each route is now
  checked as its Glue operation, on the account's Data Catalog whichever
  catalog the prefix names: the request-resource table reads no Glue
  member from an Iceberg request, so a grant or deny scoped to a
  federated catalog, a database or a table does not apply here.
  Floci's own engine's token is not checked again.
- A request a documented route takes is another API's, so it carries
  none of its operation's members: the enforcement filter has every
  member reader (request resources, condition keys, tag-on-create,
  passed roles) read none from it, so a Glue member a caller adds to an
  Iceberg body, such as Tags or DatabaseInput, names no resource and
  gives no condition key a value.

GlueIcebergIamIntegrationTest checks a principal allowed GetCatalog and
GetDatabase reading the configuration and the namespaces and refused
creating a namespace or loading a table, by GET or HEAD, a deny on the
catalog holding under an allow on everything, and root credentials and
a minted token answered, and a Glue member added to an Iceberg body
neither satisfying an aws:RequestTag condition nor naming a database.
glue.md and iam.md say so.
2026-11-16 00:45:42 -04:00
Priamo Germosen 53ef87af1c fix(iam): grant a delegation request's holder what the guide gives it (#8531)
Under enforcement, the identity that owns a delegation request was denied every
operation on it unless a policy named them, so a customer who claimed a request
could not read it, forward it, reject it or release its token without being
granted each one. AWS grants those by default. The customer page's note, under
"Managing Permissions for Delegation Requests", reads "By default, IAM
principals who initiate a delegation request are automatically granted
permissions to manage that specific request. They can associate it with their
account, view request details, reject a request, forward it to an administrator
for approval, release the exchange token to the product provider after admin
approval, and list delegation requests that they own."

So the holder now carries a grant over the requests it owns:
GetDelegationRequest with GetHumanReadableSummary, UpdateDelegationRequest,
which is the forward, RejectDelegationRequest and SendDelegationToken on those
requests, and ListDelegationRequests. The summary sits beside the read because
the reference puts it there itself: its "rules are identical to
GetDelegationRequest API behavior, such that a party who has permissions to call
GetDelegationRequest for a given delegation request will always be able to
retrieve the human readable summary for that request".

Listing names no resource, the Service Reference giving that action none, and is
scoped by the condition key the same reference publishes on it:
iam:DelegationRequestOwner, under ArnEquals, held to the owner's own ARN. That
is the line the guide draws between its two listing permissions, the table's
"List delegation requests for your account", which an administrator grants, and
the note's "list delegation requests that they own", which an owner has without
one. So an owner names itself in OwnerId and is answered with its own requests,
while naming another owner, or naming none, is refused, and the account's whole
listing stays with the granted permission. The key is read from the request's
OwnerId member through the IAM condition-key table, which names the member for
the pair so that the table's own gates re-derive it. The seven other delegation
actions the reference lists that key on take its value from the stored request
rather than from a parameter, so they stay unread.

The grant reaches whoever claimed the request, user or role session alike:
AssociateDelegationRequest stores "the ARN of the current calling identity", so
a session is recorded under its own assumed-role ARN and is looked up by that
rather than by the role it assumed. It is read where an identity's policies are
assembled, beside the password self-service grant that works the same way, so a
live request, a simulation and the user's access report all see it.

That lookup runs wherever policies are assembled, so on every authorized
request and not only on a delegation one. It answers an empty store without
reading it, and otherwise from a view of who owns what that one scan builds and
any stored write invalidates whole, so the usual answer costs a lookup rather
than a scan of every record in every account. Invalidating the view whole is
what keeps it true: nothing updates it in place, so a claim, an expiry and a
reload all land the same way. An emulator reset wipes the backend without a
request passing through that one method, so the service is Resettable and drops
the view in clear(), which makes the invariant a hook rather than a
coincidence of the store being empty afterwards.

Two abilities the note names are left out, each for its own reason. Approving is
not implicit: the same page lists iam:AcceptDelegationRequest among the
permissions an administrator grants, which is the step the flow keeps for one.
Associating cannot be granted here at all, because a request records no owner
until it is claimed, so before the claim there is no identity to write a grant
for; the claim still needs a permission and everything after it does not.

The ownership itself comes through a port rather than a new dependency:
DelegationRequestOwnership, implemented by DelegationRequestService and asked by
IamService, which is how ScpProvider and ResourcePolicyProvider are declared so
that IAM does not reach into another store.
2026-11-15 23:51:05 -04:00
Priamo Germosen e6f57d849d fix(iam): check Glue requests on the resources they name (#8529)
Glue was one of the namespaces the table of request resources did not
read yet, so under enforcement every Glue request was checked on *: a
grant scoped to one database or table could not allow anything, and a
deny scoped to one did not hold.

- Glue moves from NOT_COVERED to NAMESPACES and the generator reads all
  314 of its operations. A table operation is checked on the account's
  Data Catalog, the database and the table, the three types the Service
  Reference gives glue:GetTable and its kin; a database operation on the
  catalog and the database; jobs, crawlers, triggers, workflows and
  connections on the ARNs Glue mints for them.
- Where a Glue request names its resources in ways the generator did not
  read yet, its rules read a little further, each from botocore alone:
  Input and List drop from a member's stem as Config and plurals do
  (DatabaseInput.Name, ConnectionNameList); a list whose own list shape
  is named for the type's names fills it (BatchDeleteTable's
  TablesToDelete, a BatchDeleteTableNameList); "being" ends a type's name
  in documentation (GetWorkflowRun's Name, "name of the workflow being
  run"); a type of no variables of its own, the account's catalog, is no
  longer dropped as an alternative to the unnamed type a create makes;
  and a create whose request carries tags and whose action acts on other
  types alone tags the resource it makes when the request names it in
  full (CreateConnection's tags on connection/<ConnectionInput.Name>),
  which the table reader now accepts.
- Outside Glue those rules change four entries: Redshift's
  BatchModifyClusterSnapshots is checked on the snapshots its
  SnapshotIdentifierList names instead of *, and EventBridge's
  CreateEventSource and QuickSight's CreateDataSet and CreateTopic gain
  a makes that changes nothing at runtime. Every other entry is
  unchanged.
- What the table does not read stays as the metadata gives it: a
  CatalogId is not read, so another account's or a federated catalog is
  checked on the caller's account's ARNs, and a schema named by its
  registry and name on schema/<SchemaName>, the Service Reference's
  format, whose botocore pattern takes no slash.

IamRequestResourceEnforcementIntegrationTest checks a table on the
catalog, its database and itself, a database and a job on the ARNs Glue
gives them, a deny on one table or connection holding inside a batch
delete, a database's creation on its DatabaseInput.Name, a connection's
tags on its ConnectionInput.Name, and a workflow run on its workflow.
The generator's tests cover each rule; iam.md says so.
2026-11-15 23:50:07 -04:00
mrfelek cf4e1101a9 fix(s3vectors): check S3 Vectors requests under IAM enforcement (#8518)
Under IAM enforcement no S3 Vectors request was checked: its model was
not among the vendored REST routes and the s3vectors namespace's request
resources were not read, so every call went through. regen_rest_routes.py
now vendors its routes and the request-resources and tag-on-create
generators read the namespace, so a vector bucket call is checked on the
bucket its vectorBucketName or vectorBucketArn names, an index or vector
call on the index its bucket and indexName or its indexArn names, and
ListVectorBuckets on *. Nothing in IAM is written by hand for it.

The IAM tests of REST services (CloudFront, EMR Serverless, S3 Tables,
S3 Vectors) sign and send their requests through one shared
SignedRestRequests helper.
2026-11-15 19:59:56 -04:00
Maxence LEFEBVRE 9e05c07bfc feat(cloudformation): provision ElastiCache replication groups (#8448)
CloudFormation now provisions AWS::ElastiCache::ReplicationGroup instead
of completing the stack with no cache behind it. The group is created
through the ElastiCache service, Ref returns its id, and Fn::GetAtt
exposes the configuration endpoint for a cluster-mode group or the
primary, reader and per-node read endpoints otherwise. A create-only
change replaces the group, an explicit ReplicationGroupId that stays the
same is refused, and an update that reuses the group warns only about the
properties it ignores.

Optional booleans in the ElastiCache, IoT authorizer, API Gateway API key
and StackSet provisioners are read through
ProvisionContext.resolveOptionalBoolean, which refuses a value that is
neither true nor false instead of reading it as false.

Closes #8447
2026-11-15 11:40:48 -04:00
Priamo Germosen 92a61c2b86 fix(s3tables): check S3 Tables requests under IAM enforcement (#8424)
Under IAM enforcement no S3 Tables request was checked: its model was
not among the vendored REST routes and its namespace's request
resources were not read, so no request mapped to an action and every
call went through, DeleteTableBucket and the policy calls included.

s3tables is now vendored by regen_rest_routes.py and read by the
request-resources, tag-on-create and passed-role generators. A table
bucket call is checked on the bucket its path names. A table's ARN ends
in an id the service mints, which no request carries: a request names
the table by its table bucket's ARN, its namespace and its name. A new
generic rule in the request-resources generator reads such a type,
found by its service by those path labels (or GetTable's query string
members, when tableArn is absent), instead of filling the bucket's name
from the table's name or reading the bucket's ARN as the table's.
S3TablesStoredResourceArns answers it from the stored table, read only.
2026-11-15 10:47:17 -04:00
Priamo Germosen 0f223224ce fix(cloudformation): check CloudFormation requests on the resources they name, from the generated request resources (#8426)
CloudFormation was not read by the request-resources generator, so under IAM
enforcement every CloudFormation request was checked on *: a grant scoped to a
stack or a stack set was refused, and a deny scoped to one never applied.
cloudformation now moves into NAMESPACES (100 operations). One rule is fixed:
an account member named after another record's shape names that record's
account, not the type's (StackInstanceAccount is a StackInstance's), so a
stack instance call is checked on its stack set in the caller's account.

A stack or a stack set named by its name is checked on the ARN CloudFormation
minted for it, which CloudFormationStoredResourceArns finds, reading only, or
with its id open when it does not exist yet. A request naming its stack by
no StackName (a change set by its ARN alone, DescribeStackResources by
PhysicalResourceId alone) stays on *, as the generated data gives it.
DescribeStackSet now returns StackSetARN, which botocore gives and Floci
left out, in the Region of the request naming it.
2026-11-15 09:59:32 -04:00
Jackson Price b8014cbd4e fix(lambda): accept layer ARNs when deleting versions (#8409)
* fix(lambda): accept layer ARNs when deleting versions
* test(lambda): share layer publication cleanup
* test(iam): include layer deletion in the resource inventory
* fix(lambda): read Lambda's IAM resources whole from the generated table
2026-11-15 01:56:37 -04:00
Priamo Germosen 4a70910c53 fix(scheduler): check EventBridge Scheduler requests from the generated request resources (#8406)
EventBridge Scheduler was built by hand in ResourceArnBuilder. It now moves
out of HAND_BUILT into NAMESPACES, so every operation's resources come from
iam-request-resources.json, and the hand builder and the enforcement filter's
routing to it are gone.

A schedule a request names with no group is in the default group, as
botocore documents GroupName: "If you omit this, the default schedule group
is used" (CreateSchedule, DeleteSchedule), and "EventBridge Scheduler
assumes that the schedule is associated with the default group"
(GetSchedule, UpdateSchedule). The rule that reads ECS's "If you do not
specify a cluster, the default cluster is assumed" now reads this phrasing
too, and SchedulerService answers the default group's ARN, reading only. A
resource already chosen by whether its member names the default (an
EventBridge rule on the default bus or on another) takes no default of its
own, so EventBridge's entries stay as they are.

Tagging is checked on the group Scheduler's modeled /tags/{ResourceArn}
carries, the only tagging route AWS gives it. The shared tags controller
now serves a namespace the generated table reads whole only on the routes
its model gives: the bare /tags, or an ARN whose slash is not encoded, is
refused for Scheduler, EMR Serverless, GuardDuty and Security Hub with the
controller's existing "Invalid resource ARN", and tags nothing, rather than
being checked on * where a Deny on the resource would not apply.
2026-11-14 23:59:33 -04:00
luiseterc 4c7f057072 fix(secretsmanager): resolve stored resource tags for IAM conditions (#8359)
* fix(secretsmanager): resolve stored resource tags for IAM conditions
* fix(secretsmanager): read secret tags through the generated resource-tag keys
2026-11-14 21:33:20 -04:00
Priamo Germosen 1b14d10b1f fix(secretsmanager): check Secrets Manager requests from the generated request resources (#8365)
Secrets Manager was built by hand in ResourceArnBuilder. It now moves out of
HAND_BUILT into NAMESPACES, so every operation's resources come from
iam-request-resources.json, and the hand builder and the enforcement filter's
routing to it are gone.

The six characters Secrets Manager mints after a secret's name come from
botocore, which documents CreateSecret's Name: "Secrets Manager automatically
adds a hyphen and six random characters after the secret name at the end of
the ARN". A new rule records them as mintedSuffixes ("-??????") and has the
create name the secret it makes by Name. The reader appends them open to a
secret Secrets Manager does not hold. An ARN given for a secret, a partial
one included, is checked on the ARN of the secret the operations read it as,
alone: SecretsManagerService resolves it through resolveStoredArn to the
caller's secret in the ARN's Region, else to the one the ARN's account holds
under that full ARN, reading only.

ARNs the table renders, and the resource a create makes that its tags are
checked on, take the request's partition for every namespace, as the
Secrets Manager builder did, so a Region Floci does not know keeps the
partition of the request.
2026-11-14 19:50:46 -04:00
soreavis 6de963848b fix(config): check requests against the modeled constraints (#8363)
The Config handler read each member with asText, asInt or path and
checked only some of them by hand, so an empty or over-long Arn on the
two recorder Describe calls answered
NoSuchConfigurationRecorderException, and an empty ResourceArn on the
three tag operations was accepted, as was an over-long one that isn't
a Config resource's ARN.

tools/aws/regen_config_shapes.py now vendors every Config operation's
request constraints from botocore, kept in sync by make aws-data-check,
and RequestConstraintCheck checks each served operation's request
before it runs. A violation is a ValidationException, which the model
documents for missing required fields and input that fails validation,
and a Limit out of range answers the InvalidLimitException its
operation models.

The hand-written checks the table covers are gone, putConfigRule's
included: ConfigCfnProvisioner now checks the rule it builds as a
PutConfigRule request before storing it, so a template property outside
the constraints fails the resource. A rule without a ConfigRuleName
keeps its InvalidParameterValueException, since the model doesn't
require the member.

The loop that drops blob and timestamp members moves into
request_shapes as drop_blob_and_timestamp_members, used by both the
Config and Kinesis generators. Both vendored files are unchanged.
2026-11-14 19:35:00 -04:00
luiseterc 16745c3804 fix(ec2): resolve interface identity for tag authorization (#8352)
* fix(ec2): resolve interface identity for tag authorization
* fix(ec2): read resource condition keys through the generated table
* fix(ec2): look up a tag batch's interfaces in one pass
2026-11-14 18:42:23 -04:00
Jackson PriceandAndre Kurait ade406bac2 fix(lambda): accept layer ARNs in GetLayerVersion (#8345)
GetLayerVersion took an unversioned layer ARN as a literal layer name
and answered ResourceNotFoundException. It now resolves the ARN through
the existing layer resolver, keeping its account and partition checks,
and builds the archive URL from the layer's own Region.

Both GetLayerVersion and GetLayerVersionByArn take their IAM resources
from the generated request-resource table. The generator reads a
name-or-ARN alternative on URI and query members, and fills an ARN
variable from the integer shape named after it, so the layer version is
read from the model. A REST route keeps its modeled operation when AWS
authorizes it under another action name, and an ARN selector is checked
on the stored version it resolves to, in that version's account and
Region. The lookup tests share one layer archive fixture.

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
2026-11-14 17:33:47 -04:00
Priamo Germosen 6305250206 fix(ecs): check ECS requests on the resources they name, from the generated request resources (#8341)
ECS was not read by the request-resources generator, so under IAM enforcement
every ECS request was checked on *: a grant scoped to a cluster, service or
task definition was refused, and a deny scoped to one never applied. ecs now
moves into NAMESPACES, and where the rules misread it the rule is fixed:

- a member whose documentation spells a type of two variables as its format
  does ("(family:revision)" for a task definition) is found by its service,
  each element of a list, rather than read as an ARN alone;
- a member documented as naming its service's default when left out ("If you
  do not specify a cluster, the default cluster is assumed") names it
  (defaults), rather than naming nothing;
- a member documented as a name or an ARN of another type, in either order or
  naming the type before them, reads that type's ARN (arnOf), as a pattern
  taking one does;
- a list element's id field beside an enum field holding the target's type,
  whose one value is the action's type, fills that type's last variable
  (PutAttributes' attributes[].targetId).

The reader fills a defaults member from the default the service gives, finds
each value of one list member, and names a resource given by its own full ARN
for a type of several variables too, also giving the variable that ARN's value
beside the request's other members, as a handler may read either. EcsService
answers the lookups, reading only: the revision a reference the table finds
resolves to, and the default cluster. It now mints a service's deployments
and revisions under the service, as AWS does.

The ECS task arms of Step Functions now take the action from
IamAuthorizedActions and the resources from RequestResources.ofBody, as the
EMR arm does, so a service, cluster or task definition ECS does not have is
checked on the ARN the request names, as the direct call is.
2026-11-14 16:01:34 -04:00