Commit Graph
59 Commits
Author SHA1 Message Date
galsuchetzky-act bb689885a3 fix(lambda): retain MicroVM image request configuration and tags (#8102) 2026-11-12 10:51:23 -04:00
Jimmy Liu Jia 637e62d0c3 fix(kinesis): validate requests against generated shapes (#8084)
* fix(kinesis): validate requests against generated shapes

* fix(kinesis): preserve modeled request error codes

* fix(kinesis): keep modeled validation in generated shapes
2026-11-12 10:25:17 -04:00
Niels Kootstra efd8971241 fix(cur): keep report definition tags and serve the tag operations (#8095)
PutReportDefinition now stores its Tags on the report definition, and
TagResource, UntagResource and ListTagsForResource read and change them
by ReportName instead of answering empty stubs. ModifyReportDefinition
keeps the tags, a missing report answers ResourceNotFoundException, and
the TagList and TagKeyList constraints from the model are checked.

Closes #7952

PutReportDefinition and TagResource now fail with ValidationException when the report would hold more than 50 tags, when Tags is not a list, or when a tag key, value or TagKeys entry is not a string.

tools/aws/regen_cur_shapes.py vendors the TagResource, UntagResource and ListTagsForResource input constraints from botocore, and CurRequestShapes checks them, and the Tags of PutReportDefinition, through RequestConstraintCheck in place of the hand-written limits.
2026-11-12 10:23:21 -04:00
Oleksandr Nikolaichuk 410e09bf62 fix(cloudformation): generate the create-only table from the registry and compare nested pointers (#8093) 2026-11-12 07:58:09 -04:00
jwoa95 a27670c4bb feat(rekognition): add face collection lifecycle and search (#8001) (#8004)
Recreate the reviewed Rekognition changes on the existing upstream main base using a verified commit. The complete file tree is identical to PR head 19f259b43e1ec8a3ce5fd2a50eb9c21e4ed604df, preserving the collection, pagination, persistence and model-validation fixes while removing the unsigned merge.

Generate constraints for every modeled operation with constraints=True. Select the served operation in the handler, validate its request once, then dispatch. Preserve UnknownOperationException for unserved actions.

Move constraint tests to the handler boundary and verify newly modeled operations are detected without maintaining an allowlist. Verified 189 Java tests, 55 generator tests, Checkstyle, generated-data, documentation and partition checks. Addresses review 5865133468.
2026-11-11 22:19:38 -04:00
jwoa95 77587de2e6 feat(athena): support named queries (#8002)
Closes #8000

Workgroup deletion bypassed saved-query storage and ignored RecursiveDeleteOption. Reject non-recursive deletion when saved queries exist, and remove saved queries and retry records before deleting the workgroup. Serialize deletion with named-query creation to prevent orphaned records.

Vendor all Athena input constraints from pinned botocore and check requests through RequestConstraintCheck. Remove copied named-query bounds and type checks, allow creation without a client request token, and share workgroup scans and isolated test-client setup. Update required-field expectations and cover generation drift, nested constraints, Unicode bounds, and untokened creation.

Move the standard member-constraint Messages implementation and formatter into RequestConstraintCheck, parameterized by error code. Migrate Athena, ECR, and both Payment Cryptography APIs and remove the redundant PaymentCryptographyShapeErrors class. Preserve HTTP 400, existing rule wording, operation-prefix removal, nested list paths, and each service error code with shared contract and service tests.
2026-11-11 14:08:46 -04:00
Jimmy Liu Jia 6e75e4096e feat(securityhub): import and query ASFF findings (#7692)
fix(securityhub): validate provider fields and preserve default product metadata

fix(securityhub): preserve custom names and reconcile provider updates

fix(securityhub): prefer provider fields on first import

docs(securityhub): update findings operation count

fix(securityhub): validate initial verification state
2026-11-07 09:18:47 -04:00
Jimmy Liu Jia 856970a24f feat(apigateway): add documentation part operations (#7712) 2026-11-07 02:09:21 -04:00
Murtuza Chhil 4617e4a4f8 feat(paymentcryptography): the data plane as a service of its own (#7396)
* feat(paymentcryptography): the data plane as a service of its own

docs(paymentcryptography): the data plane has a page of its own

fix(paymentcryptography): a MAC under a three-key Triple DES key is computed

test(paymentcryptography): a key of another purpose does not encrypt data

feat(paymentcryptography): the data plane's IAM is generated

fix(paymentcryptography): a DUKPT MAC needs a base derivation key

fix(paymentcryptography): a key whose material is not held is refused

docs(paymentcryptography): the data plane's example runs

test(paymentcryptography): the data plane through the AWS SDK

test(paymentcryptography): the data plane through the AWS CLI

fix(paymentcryptography): the CLI test removes the keys it makes

docs(compat): the AWS CLI suite names the data plane

test(paymentcryptography): the route is read as the registry reads it

test(paymentcryptography): the request names its method and its URI

fix(paymentcryptography): the cipher pads no data

fix(paymentcryptography): the data plane takes the service scope

fix(paymentcryptography): a MAC length that is not a number is refused

docs(paymentcryptography): the data plane says the cipher pads no data

fix(paymentcryptography): the data plane ciphers with Triple DES as well

fix(paymentcryptography): the scope alias names the model's scope

fix(paymentcryptography): the Triple DES cipher is BouncyCastle's

fix(paymentcryptography): the usage and the blob keep their comments

fix(paymentcryptography): a key's family is read from its algorithm

fix(paymentcryptography): the cipher reads the vector through one helper

test(paymentcryptography): the keys are built by one builder

fix(paymentcryptography): the data plane checks the model's rules

fix(paymentcryptography): the Triple DES check value is BouncyCastle's

fix(paymentcryptography): the SDK names it TDES_2_KEY

docs(contributing): the ciphers come from BouncyCastle

refactor(paymentcryptography): the model owns the request shapes

refactor(paymentcryptography): the ciphers are BouncyCastle's

test(compat): one helper makes a key of either algorithm

docs(contributing): the cipher rule comes out

fix(paymentcryptography): the refusals are the model's

refactor(paymentcryptography): the ciphers are one helper each

refactor(paymentcryptography): the generators share the helper

docs(paymentcryptography): the javadocs name both ciphers

test(aws): the moved constants read from the shared helper

fix(paymentcryptography): the deprecated cipher constructors go

chore(paymentcryptography): the duplicate import goes

test(paymentcryptography): the DUKPT vectors the standard publishes

fix(paymentcryptography): the DUKPT refusal is the derivation's

docs(paymentcryptography): the retail MAC is over a double-length key

fix(paymentcryptography): the ISO 9797-1 MAC pads only a partial block

refactor(paymentcryptography): the refusals the model already makes

chore(aws): the routes are generated from the models again

* chore(aws): the IAM resources are generated again
2026-11-06 20:05:00 -04:00
Aymen JAMAAOUI 5bcb83b932 fix(iam): check Redshift requests on the resources they name (#7287)
Under IAM enforcement, Redshift requests were checked on `*`, so a
grant scoped to a cluster, a snapshot or a database user was refused,
and a deny scoped to one never applied.

The redshift namespace moves from NOT_COVERED to NAMESPACES in the
request resources generator, with corrections where the generated rule
checks the wrong resource. GetClusterCredentials now also gives the
redshift:DbUser condition key, from a new generated table, to its own
check and to the CreateClusterUser check that AutoCreate adds.

Refs #5907

fix(redshift): act only on a snapshot of the cluster the request names

A snapshot request is checked on snapshot:<cluster>/<name> for the
cluster it names, but DeleteClusterSnapshot, RestoreFromClusterSnapshot
and DescribeClusterSnapshots found the snapshot by its name alone. A
caller allowed on one cluster's snapshots could act on a snapshot of
another cluster by naming the allowed one.

A snapshot taken from another cluster than the one the request names,
in SnapshotClusterIdentifier, the cluster of a SnapshotArn, or
DescribeClusterSnapshots' ClusterIdentifier, is now not found.

Refs #5907

chore(iam): generate the Lambda Web and Redshift condition keys into one table

chore(redshift): read a restore's snapshot ARN once
2026-11-05 11:57:59 -04:00
Priamo Germosen 7bc09c7925 chore(tools): read the answers AWS already gave out of LocalStack's snapshots (#7494)
Several questions this repository had about AWS behaviour were settled one
at a time by opening LocalStack's AWS-validated snapshots by hand: the two
IAM constraint messages showing that IAM leaves the offending value out,
the enum set UpdateAccessKey names, the STS message for an invalid
parameter. A test LocalStack marks @markers.aws.validated ran against a
real account, so what its snapshot carries is a recording rather than an
emulator's answer, and there are 37 services' worth of them.

This asks the whole set at once. Per recording it prints the service, the
test, its marker, the date LocalStack recorded it, the path inside the
recorded content, and the error code, status and message. --grep adds every
other recorded string carrying a text, for a question that is not about an
error code; --services all reads every service that carries a snapshot, for
a wording Smithy writes rather than a service does; --tsv is one row per
line, for pasting into an issue. A marker other than validated is not
evidence of AWS behaviour, so those tests are left out unless
--all-markers asks for them, and then each line says which marker it
carries.

Three things decide whether what it prints can be trusted.

The markers are read off the parsed test file rather than matched line by
line. A parametrized test stacks @pytest.mark.parametrize between the
marker and the def, over a line per case, and matching lines found 10 of
IAM's 84 AWS-validated tests before this read the decorators instead. A
class's marker carries to the tests inside it, and a test's own wins over
it.

A marker is looked up by the key a snapshot names: Class::name for a test
in a class, the bare name for one at module level, and the bare name as
well for a name the file carries exactly once, since a snapshot key
sometimes names no class for a test that now sits in one. LocalStack
carries 20 names defined in more than one class, so keying those bare would
let one class's validated marker stand for another class's unmarked test,
and an unclassified recording would read as AWS evidence.

An answer is read off the object that holds it rather than by walking the
path string back down, so an error nested in a list keeps its message and
status, and a key with a dot in it is one step rather than two. The path
stays as a label for the reader. A field that would end the row or the
column, a newline or a tab, is escaped: 53 of the messages in these
snapshots carry one.

A snapshot is looked for all the way down a service's directory, since it
sits beside its test: 137 of the files in that tree are a directory or two
below the service's own door and hold 1505 recordings, which a search one
level deep reads none of. The service a recording belongs to is the
directory under tests/aws/services rather than the one the file sits in,
and a recording is reported under its key's own tail,
test_iam.py::TestOne::test_x[case], so two classes carrying one test name
stay two tests in the output and in the count. That tail is cut at the file
rather than at the last slash: 33 keys in that tree carry a slash inside
the parameter, and cutting there leaves name] where a test should be.

LocalStack is not vendored here, so the tool takes a checkout:
make snapshot-mine LOCALSTACK=../localstack. Its own tests cover each of
those readings and run with make snapshot-mine-test. A full run over a
checkout reads 2173 recordings over 1195 tests.
2026-11-04 08:06:03 -06:00
Priamo Germosen 251bb39375 feat(iam): check REST routes no rule maps by botocore's models (#7461)
A REST request gets its IAM action from IamActionRegistry's
hand-written rules, and a route no rule maps gets none, which the
caller allows: under enforcement such a request runs unchecked.
IamRestRoutes (#7085) reads botocore's routes at runtime, but only for
the operations a hand-written list enrolls, ValidatePolicy alone, and
only by literal paths.

A request no rule maps is now the operation whose route in botocore's
model it matches, and it is checked as that operation's action
(IamAuthorizedActions), as a Query or JSON request naming its
operation is, when Floci checks it on the resources AWS does: those
its request names, which ResourceArnBuilder builds for its namespace
or the vendored request resources read for the operation, or none,
when the Service Reference gives the action no resource type, as AWS
authorizes such an action on `*`. An action AWS checks on a resource
Floci neither builds nor reads stays unchecked, as before: checked on
`*`, a grant scoped to its resource would be refused. That is the
reason #7085 gave for enrolling ValidatePolicy alone, now read from
generated data instead of a list.

- The actions of no resource type come from the Service Reference's
  Actions, through regen_iam_authorized_actions.py, into
  iam-authorized-actions.json, for each credential scope whose routes
  rest-routes.json reads: 88 over 7 scopes. They are read from Actions,
  not Operations, because the reference lists one SDK client's
  operations per namespace, OpenSearch's `es` client alone. --check
  fails until a scope rest-routes.json adds is listed, and --verify
  fails when AWS gives a listed action a resource type.
- IamRestRoutes now matches every route of a model: literal segments,
  a label taking one segment, a greedy label the rest of the path, and
  the query a route names, which must be on the request. Of the routes
  a request matches, the most specific wins, segment by segment from
  the left a literal, then a segment mixing a literal and a label, then
  a label, then a greedy label; then the route naming more of the
  query. The path is the one the rules match, still percent-encoded and
  without a trailing slash, and a segment may still end in a matrix
  parameter, which the router ignores.
- The rules come first, so nothing they map changes. S3 and API Gateway
  are listed as handRouted, with their reasons, and routed by their
  rules alone: S3 tells apart the operations of one route by their
  query and headers, and API Gateway is checked by HTTP method. The
  route generator fails when one route names two operations of any
  other scope.
- OpenSearch Service's models, both API versions, are read under `es`:
  59 of their 147 operations are checked by their routes (29 of the
  `es` model's 51, 30 of the `opensearch` model's 96), 53 of which ran
  unchecked, ListDomainNames and ListVersions among them. The other six
  are the VPC endpoint operations #7351 mapped by hand: their rules are
  removed, as their routes give the same actions.
- Access Analyzer's 9 operations of no resource type are checked by
  their routes, ListAnalyzers among those Floci serves, where
  ValidatePolicy alone was; its analyzer operations are not.

Lambda's, EKS's, Scheduler's, Pipes' and DSQL's resources are built
by hand and their routes all mapped by their rules, so none is checked
differently. IamRestRouteCoverageTest checks every route of a scope
not hand-routed: by the vendored routes alone it is its own operation,
and through the registry it is its action when its resources are built
by hand or read, or its action has no resource type, and unmapped
otherwise.
iam.md and access-analyzer.md say which routes are checked.
2026-11-03 23:18:31 -06:00
Aniket Shukla eb65ad88d2 feat(accessanalyzer): add basic ValidatePolicy checks (#7085)
* feat(accessanalyzer): add policy validation JSON endpoint

* feat(accessanalyzer): report policy grammar findings with source spans

* feat(accessanalyzer): secure policy validation pagination and IAM

* fix(accessanalyzer): report repeated policy keys

* fix(iam): authorize policy validation through modeled routes

* refactor(iam): resolve policy validation from vendored routes

* refactor(iam): share condition operator metadata
2026-11-03 13:51:07 -04:00
Ovidiu (Ovi) 3308ea2f1c feat(logs): add vended log delivery sources, destinations and deliveries (#7411) 2026-11-03 13:20:11 -04:00
Hector VenturaandPriamo Germosen 0260a54ee2 chore: keep aws-cdk flags out of botocore-bump and tidy two follow-ups (#7271)
regen_partitions.py reads each region's optIn and s3WebsiteDashForm from the
aws-cdk checkout, so make botocore-bump could carry unrelated flag changes and
aws-data-check-botocore accepted them. Add --carry-region-flags, which keeps the
stored flags and refuses a region with none, and use it in the botocore-only
targets. aws-data-sync and aws-data-check still read aws-cdk.

Hold the ses-account lock in SesCustomVerificationEmailTemplateTest, which sends
and could overlap a test that turns account sending off.

Correct the lambdaTaggedArn Javadoc, which still described the MicroVM tag target
from before #7145.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com>
2026-11-02 08:56:39 -04:00
Murtuza Chhil 6906759c9a feat(paymentcryptography): the Payment Cryptography control plane (#7090) 2026-11-02 08:14:58 -04:00
Oleksandr Nikolaichuk 42bc856258 test(cloudformation): run the schema coverage ratchet in CI (#7282) 2026-11-02 07:37:06 -04:00
Hector Ventura b38fe7d96d chore(deps): bump botocore to 1.43.118 and drop it from Dependabot (#7223) 2026-11-01 12:44:09 -04:00
Robin Baeckman 07f2d62c17 feat(eks): vendor AWS's add-on version catalog for every supported Kubernetes version (#6735) 2026-10-30 07:21:01 -04:00
Priamo Germosen c9c1c0990b feat(sts): read a Query request's declared constraints from the model (#6891)
`GetAccessKeyInfo`, `GetSessionToken` and `GetWebIdentityToken` are held to
the constraints botocore's STS model declares, which
`tools/aws/regen_sts_shapes.py` vendors into `aws/sts-request-shapes.json`
and `StsRequestShapes` reads through the same `QueryConstraintCheck` walk
IAM reads its own file with. The two services share the protocol, the
message wording and the generator, so what is new is which operations are
read rather than how.

What it adds is on `GetSessionToken`: `SerialNumber`, `TokenCode` and
`MinimumSessionTokenSize` are declared and nothing read them, so a serial
number under 9 characters, a token code that is not six digits and a size
past 4096 answer `ValidationError` where they answered credentials. The size
is still only validated, the token staying the length this emulator mints.

`GetAccessKeyInfo` and `GetWebIdentityToken` keep the messages they already
answered, from the same bounds and the same patterns, and about 130 lines
of hand-written audience, tag and access-key checks come out. One answer moves:
a value breaking two constraints is answered for both, where the if-else
chain stopped at the first. That is the reading #6402 settled and #6580
already took for an empty role name.

`jwtAlgorithmType` publishes a fixed length of 5 and no enum, the two values
coming from the reference, so the walk takes a documented constraint keyed
by member name and reports it in that member's place, which keeps a
collected message in the model's order. It is reported only for a member the
request carries that breaks nothing the model declares, which is the
exclusivity the hand-written helper had.

A value that is no number at all stays `InvalidParameterValue`, answered
before the constraints, since the model declares a range and says nothing
about what counts as a number; a digit string is a number of any width, so a
`DurationSeconds` of `99999999999` breaks the maximum rather than being
called no integer, as #6625 settled for an oversized `MaxItems`. Each
operation asks for its violations where its own check ran rather than ahead
of the switch, because `GetSessionToken` refuses session credentials before
it reads anything.

The whitespace around a number comes off wherever this handler reads one. The
check takes a padded value and holds it to its range, so the read behind it
parses the same text: parsing the value as the request spelled it threw there
and fell back to the default, so a ` 3600 ` asking for an hour would have been
handed the twelve hours `GetSessionToken` defaults to, or the five minutes a
web identity token defaults to. IAM reads its own `MaxItems` that way already.

The generator is not new code. `request_shapes.main` already drives the five
generators that vendor member types, so it takes an `operations` argument
now and both Query-protocol generators hand it their model, output and
operations the same two-line way, which takes the hand-rolled driver out of
`regen_iam_shapes.py` as well. ECR and Resource Groups still carry theirs
and are a refactor of their own.

The generator contract tests move with it: that a vendored file carries
exactly the operations its generator lists and resolves every shape it names
is one parametrized test over all four constraints generators rather than a
copy per generator, and `build_constraints`'s own properties are tested
once, where the shared module already tested them. The model transform the
driver takes is driven through it as well, the file it writes carrying what
the transform left and the staleness check calling that file current only
when it prepares the model the same way, and IAM's own tests read the
vendored file for each paged request reduced.

Three sentences this handler wrote out by hand go the same way. The two
range refusals and the length refusal on `TargetPrincipal` come from
`SmithyValidationErrors`, which already wrote them word for word, and the
"Must be an integer." refusal has one writer and three callers. The length
comparison counts code points rather than UTF-16 units as a result, which is
the reading the rest of the package uses.
2026-10-29 00:34:23 -05:00
TATSUNO “Taz” Yasuhiro 385ffcfdd0 feat(lambdaweb): set the WebFunctionAuthType condition keys on endpoint routes (#6893) 2026-10-29 00:54:49 -04:00
Allen Sanborn 3212ce3c15 fix(iam): page ListUsers, ListGroups and policy lists with MaxItems and Marker (#6267)
* fix(iam): page ListUsers, ListGroups and policy lists with MaxItems and Marker

ListUsers, ListGroups, ListAttached{User,Group,Role}Policies and
List{User,Group,Role}Policies read neither MaxItems nor Marker and always
answered IsTruncated=false with every entry. They now go through the same
paginate helper ListRoles and ListPolicies use: an omitted MaxItems returns
100 items as the API reference documents, a MaxItems outside 1 to 1000 is a
ValidationError, a Marker the handler did not issue is InvalidInput, and a
Marker appears only on a truncated page.

Users, groups and inline policy names are listed in name order and attached
policies in ARN order, so a Marker keeps pointing at the same place between
calls even when the entry it names is removed in between.

* fix(iam): resume the newly paged IAM lists only from their own markers

ListUsers, ListGroups and the attached and inline policy lists read a
Marker they could not verify as a list offset, so Marker=1 silently
skipped the first entry, and a marker issued for one role's list resumed
another role's list after the same policy. These lists have only ever
issued signed markers, so their cursor now carries the action and, for a
per-principal list, the principal, and any other marker is InvalidInput.
ListRoles, ListPolicies and the other readers keep their existing marker
handling.

Also covers the omitted-MaxItems default on ListUsers and ListGroups with
101 entries: 100 on the first page, IsTruncated and a Marker that fetches
the last one.

* fix(iam): bind the newly paged IAM lists' markers to the request account

IAM entities are stored per account, but the marker cursor named only the
action and principal, so a marker issued in one account resumed the same
listing in another account after the same name and skipped its earlier
entries. The cursor now carries the account the request reads from, and a
marker from another account is InvalidInput.

* feat(iam): generate the IAM paginator table from botocore

tools/aws/regen_iam_paginators.py writes src/main/resources/aws/iam-paginators.json
from botocore's iam/2010-05-08 model, as the other tools/aws generators do: every
operation whose request models Marker, with its input and output token, limit
key, truncation flag and result keys, the MaxItems bounds of maxItemsType
(1 to 1000), the default page size the limit's documentation states ("defaults
to 100"), and markerType's bounds.

The 34 operations botocore's paginators-1.json lists take their tokens and
result keys from it. The six that model Marker without a paginator
(GetServiceLastAccessedDetails, GetServiceLastAccessedDetailsWithEntities,
GetOrganizationsAccessReport, ListServiceSpecificCredentials,
ListDelegationRequests, ListPoliciesGrantingServiceAccess) are read from
their request and response shapes and marked paginator: false.
ListServiceSpecificCredentials documents no default and
ListPoliciesGrantingServiceAccess models no MaxItems; the table records
both as such rather than inventing a value.

make aws-data-sync regenerates it and make aws-data-check fails when it is
stale against the pinned botocore.

* fix(iam): page every IAM list through one path driven by the paginator table

IamQueryHandler paged eight lists by hand through paginateScoped, a few more
through paginate, and left the rest (the tag readers, ListAccessKeys,
ListInstanceProfiles, ListPolicyVersions, GetGroup, ListGroupsForUser,
ListEntitiesForPolicy, GetAccountAuthorizationDetails, the simulations and
others) ignoring MaxItems and Marker with IsTruncated=false. Every operation
the generated aws/iam-paginators.json lists now pages through one paginate
path that reads its entry: the limit's bounds and default, the members that
resume and continue it, and the result keys pagedList and pagedLists write
under. paginateScoped, paginateByMarker and the hardcoded 100/1000 are gone.
ListEntitiesForPolicy and GetAccountAuthorizationDetails page their several
lists as one, in the paginator's order.

Marker semantics, chosen deliberately: a Marker is opaque and resumes only the
listing that issued it, on every paged operation. AWS documents it as "the
value of the Marker element in the response that you received", so a value
Floci did not issue, a bare number included, is InvalidInput; ListRoles,
ListPolicies and the report readers no longer read one as an index. The
marker names the last item of its page, so a deletion or creation ahead of
it skips nothing and repeats nothing, and it is signed (not prefixed) over
the account, the operation and every request member except Marker and
MaxItems, so a marker from another operation, principal, filter or account
is refused while the page size may change between calls. Signing the scope
instead of carrying it keeps issued markers short. markerType's 320-character
bound is not checked separately: every other value is refused as unissued,
and a long ARN key could otherwise push an issued marker past it.

MaxItems is now checked before Marker, as a malformed request is rejected
before anything is read from it. An omitted MaxItems is the documented 100;
ListServiceSpecificCredentials, which documents no default, returns its whole
list.

IamListPaginationIntegrationTest.everyPaginatedOperationHonoursMaxItemsAndMarker
iterates the table's 34 paginated operations, each with a fixture listing two
items, and checks the MaxItems bounds, a one-item page, resumption without
loss or repetition, the default page, and refusal of an unissued, bare-index
or other operation's marker. Its fixture map must name exactly the table's
operations, so one AWS starts paging later fails until it has one.
ListAccountAliases can hold one alias, so it is checked for everything but a
cut page. The tests the table test subsumes are removed; the ordering, anchor,
cross-listing and cross-account tests stay. Two ServiceLastAccessed tests
that walked by bare index now use issued markers.

* fix(iam): hold paged requests to the model through IamRequestShapes

MaxItems and Marker are request constraints, and main now checks a
request against the model before it runs. Every operation the paginator
table pages joins that wave in regen_iam_shapes.py, and the bounds leave
iam-paginators.json (which keeps only defaultItems, the documented page
size) and limit(), which now only parses the number and applies the
default. A pytest pins that every operation the paginator table carries
is in the wave, so a list AWS starts paging later cannot slip past the
bounds.

Six paged operations join with Marker and MaxItems alone: the three
report readers, whose JobId is answered by hand as "length equal to 36"
and whose SortKey enum is checked by hand; ListPoliciesGrantingServiceAccess,
whose empty ServiceNamespaces is answered InvalidInput; and the two
Simulate operations, whose ContextEntries nest a list inside a list of
structures, which the walk refuses. Vendoring their whole request would
reword answers main already settled; vendoring nothing would leave their
paging unbounded (SimulateCustomPolicy with MaxItems=0 was a 500).

Markers fit markerType's 320 characters. A marker embeds the key of the
item its page ended on, so a policy ARN with a long path produced one
of 610 characters, which the model check would now refuse on the way
back. SignedMarkers takes a maximum length: a cursor that would exceed
it is carried as a SHA-256 digest (119 characters once signed and
encoded), and the instance keeps the digest -> key mapping. That keeps
the existing resume semantics exactly: the marker still resolves to the
full key, so a deleted anchor resumes at the first key after it, and
the signature still binds account, operation and filter. Two stateless
alternatives were rejected: a truncated key prefix plus digest cannot
order a deleted anchor against items sharing the prefix, and a position
index skips or repeats when items ahead of it are deleted. The cost is
one map entry per distinct long key a page has ended on, never evicted
(marked ponytail in the code); markers already do not survive a
restart, as the signing key is per instance. Keys short enough to embed
are carried as before.

Checkstyle (./mvnw checkstyle:check) reported six errors in files this
PR touches: javax import order and two inline org.w3c.dom.Node in the
pagination test, and an inline java.util.Base64 in SignedMarkersTest.
The test now parses through XmlParser.parseDocument instead of its own
DocumentBuilderFactory. The switch statements in ListEntitiesForPolicy
and the test's holder fixture are switch expressions.

Tests: aMarkerEndingOnALongPolicyArnFitsTheModelAndResumesPastItsDeletion
attaches three policies under a 391-character path, pages with
MaxItems=1, deletes the anchor and resumes through the model check.
Constructing SignedMarkers without the limit fails it (610 characters);
restoring the pre-wave iam-request-shapes.json fails the table-driven
test (MaxItems=0 answered 500, MaxItems=1001 answered 200).

* fix(iam): bind a caller-resolved list's marker to the resolved user

ListAccessKeys, ListMFADevices, ListSSHPublicKeys, ListSigningCertificates
and ListServiceSpecificCredentials default an omitted UserName to the
caller. The marker was signed over the raw request members, so two users
in one account who both omitted UserName shared a scope and one's marker
resumed the other's listing. These handlers now page over the request
with UserName set to the resolved user, so the marker is bound to the
user the list was read for, named or implicit.

* fix(iam): bound the SignedMarkers digest map and trim the pagination test

SignedMarkers held every long cursor it had issued a digest for, in a map
that never shrank. It is now an access-ordered LinkedHashMap capped at
10,000 entries, the idiom CloudWatch Logs uses for its Insights queries. A
marker whose digest was evicted resolves to null, the same as an unknown
digest, so callers refuse it as an invalid marker.

IamListPaginationIntegrationTest spent most of its time in RestAssured's
per-request overhead on the hundred-item fixtures. Those creates and
deletes now go concurrently through java.net.http. The users and groups
default test keeps its first-page checks of the default of 100 and drops
the second page, which the roles default test and the every-operation test
already cover. The SSH public key fixture is generated once per run.
2026-10-28 16:37:49 -04:00
galsuchetzky-act f926968167 fix(s3control): take TagResource and UntagResource tag condition keys from generated data (#6677)
The Service Authorization Reference lists aws:RequestTag/${TagKey} and
aws:TagKeys as condition keys for s3:TagResource, and aws:TagKeys for
s3:UntagResource. botocore's s3control model says where the request
carries them: TagResource's Tags list in the body, UntagResource's
TagKeys in the tagKeys query parameters.

With IAM enforcement on, Floci checked both S3 Control actions with no
request tag keys. A policy that allows TagResource only for certain tag
values, or UntagResource only for certain keys, matched no request, so
a request it allows was denied, and a ForAllValues condition on
aws:TagKeys allowed UntagResource whatever keys it named.

tools/aws/regen_s3control_tag_condition_keys.py now generates
s3control-tag-condition-keys.json from the two sources, as the DynamoDB
condition key table is generated: every s3 action the reference gives
either key, and every S3 Control operation's request members that feed
them, found as the tag-on-create table finds tag members.
IamConditionContextResolver reads it for a request on an S3 Control
route. The make targets check the members offline against the pinned
botocore in CI and the actions online against AWS in the IAM data drift
workflow. S3's own bucket and object tag keys stay as written, since
they were measured against AWS and do not all match the reference.
2026-10-28 10:14:26 -04:00
lex00 967e87d7f7 fix(iam): set iam: condition keys from a table generated from the Service Reference (#6762) 2026-10-28 07:00:43 -04:00
Andre Kurait 52c9c51a7b fix(dynamodb): enforce the default Select for IAM (#6702)
* fix(dynamodb): enforce effective read selection in IAM policies

Preserve generated action and request-member coverage, effective read projections, PartiQL attributes and independent BatchGetItem contexts. Rebase on current main and scope condition data verification to its vendored file, generator, tests and imported modules, retaining all existing IAM data gates.

Signed-off-by: Andre Kurait <akurait@amazon.com>

* fix(dynamodb): derive transaction read conditions from modeled members

Use the generated transaction Get member paths before GetItem IAM extraction, so ignored legacy projection members cannot authorize whole-item reads.

Signed-off-by: Andre Kurait <akurait@amazon.com>

---------

Signed-off-by: Andre Kurait <akurait@amazon.com>
2026-10-27 10:05:55 -04:00
TATSUNO “Taz” Yasuhiro b0cd70401b feat(iam): check lambda:PassNetworkConnector from a table generated from the Service Reference (#6699)
* feat(lambdaweb): check lambda:PassNetworkConnector as AWS does

A revision that sets egressNetworkConnectorArn needs
lambda:PassNetworkConnector on the connector version ARN as given.
Lambda checks it after the connector ARN checks and before it looks
the connector up.

A refusal names the first policy type that refuses, in the order
identity policies, permissions boundary, session policy. An explicit
deny in a managed policy or a boundary also names that policy's ARN.

* fix(lambdaweb): apply service control policies to the account root when passing a connector

* fix(lambdaweb): name the managed policy that denies a session token caller

* feat(iam): check lambda:PassNetworkConnector from a generated table

Move the check out of Lambda Web into the IAM enforcement filter, where
iam:PassRole is checked. tools/aws/regen_iam_passed_network_connectors.py
joins AWS's Service Reference and botocore's models into
src/main/resources/aws/iam-passed-network-connectors.json, and the filter
reads it for Web Functions, MicroVM images and MicroVMs.

A MicroVM request that names no egress connector, or an empty list, passes
the Lambda-managed INTERNET_EGRESS connector, and RunMicrovm with no ingress
connector passes HTTP_INGRESS, as AWS checks them. AppSync's data source
operations are listed too, but botocore's model has no member for their
connector, so they are not read.

The refusal text now comes from AccessDeniedMessages, which
LambdaTaskAuthorizer and GetStackOutputRoleAuthorizer use as well.
2026-10-26 23:26:25 -04:00
Priamo Germosen 0410a2b4ea fix(iam): check PutEvents on each entry's event bus (#6704)
PutEvents was checked on `*`: the request-resources table gave it no
resources, as its bus is a field of each entry, which no rule read. A
policy allowing or denying events:PutEvents on one event bus therefore
did not hold for publishing.

Each entry's EventBusName is "the name or ARN of the event bus to
receive the event", and "if you omit this, the default event bus is
used". Bus policies grant events:PutEvents on `event-bus/<name>`. The
EventBridge User Guide checks events:PutEvents against "the bus, once
per entry in the request", and says "Publishing is authorized against
the bus ARN for every entry in the request. If one entry fails an
authorization condition, EventBridge denies the whole request." It says
so in its section on the Custom Event Bus, which keeps the events: IAM
namespace of the Classic one; nothing in the guide says otherwise for a
Classic bus, whose API model lists AccessDeniedException among the error
codes of an entry without saying when.

The table now reads PutEvents' `Entries[].EventBusName`, a field of each
of a list's structures, one resource for each entry:

- The generator takes a correction filling a variable from such a field,
  and finds a field whose pattern takes an ARN before a name inside a
  list's structures, as it does a top-level member, so the field gets
  `arnOf` from botocore.
- The loader reads `Name[].Field` in `fill`, and in `absent` and `arnOf`
  when it fills a variable.
- The reader gives one value for each entry, the `absent` value for an
  entry that names no bus, gives a null or a blank, as the handler's
  `asText(null)` does, and none for no entries, which stay on `*`. Each
  value that is an ARN puts its own entry's bus in that ARN's account and
  Region, checked as given and as the caller's, which the handler
  publishes to; until now the first ARN a request gave set the account
  and Region of every value.

The filter checks every resource, so one entry for a bus the caller may
not publish to refuses the whole request, as the guide gives it.

Not in this change: the events:source and events:detail-type condition
keys (Floci supplies neither), EndpointId (the handler ignores it), and
PutPartnerEvents, which stays on `*`.

The upstream drift check on a pull request now verifies only the
vendored IAM files the pull request changes, each with its generator,
its tests and the modules that generator imports. It verified all six
files whichever one a pull request touched, so this change, which
touches only the table of the resources requests name, failed on the
service namespace list, which AWS's index stopped matching when it
dropped `codestar`: drift in a file the change leaves alone. The
pull request's job passes the paths its merge commit changes to
`make iam-data-verify CHANGED=...`, which names each check it skips;
the weekly and manual runs, and a diff that cannot be read, still
check every file, so the namespace list's drift is reported there.
2026-10-26 21:52:09 -05:00
David ec21cf38c7 feat(rds): DescribeCertificates, ModifyCertificates and an instance's CA certificate (#6106)
* feat(rds): DescribeCertificates, ModifyCertificates and an instance's CA certificate

DescribeCertificates lists the Region's RDS certificate authorities with the
thumbprint and validity AWS reports, vendored from the certificate bundles AWS
publishes by tools/aws/regen_rds_ca_certificates.py, and pages them.
ModifyCertificates sets or removes the account's default for new instances.
CreateDBInstance, ModifyDBInstance, the two instance restores and
CreateDBInstanceReadReplica take CACertificateIdentifier, and instances report
it with CertificateDetails. AWS::RDS::DBInstance takes the property and
resolves the two CertificateDetails attributes. The identifier is metadata:
the auth proxy keeps presenting Floci's own CA.

Closes #5806

* fix(rds): follow the user guide on CAs and leave a blank CA alone

- An instance stored without a CA reports rds-ca-rsa2048-g1, since an
  override applies only to instances created after it.
- ap-south-1, ap-southeast-4, ca-west-1, eu-central-2, eu-south-2 and
  il-central-1 offer only rds-ca-rsa2048-g1, as the user guide says.
- A blank CACertificateIdentifier on modify leaves the instance's CA.
- --download skips a Region only on 403 or 404 and exits 1 on other
  failures.
- Reuse regionFromArn, add a createDbInstance stub helper and import
  Executable in the tests.
2026-10-26 09:29:56 -04:00
Priamo Germosen bb48983b9c feat(iam): read the managed-policy family's constraints from the model (#6580)
The declared constraints on IAM's managed-policy operations are read from the
pinned model rather than from a hand-written check, through the vendored data
tools/aws/regen_iam_shapes.py generates and a Query walk of it. Twelve
operations go first: GetPolicy, DeletePolicy, the four policy-version
operations, and the six attach and detach pairs. The vendored file carries that
wave rather than all 180 operations, as the ECR and Resource Groups files carry
theirs, and grows a wave at a time.

The machinery was already here for the JSON protocols. request_shapes
build_constraints vendors required members, lengths, patterns and enums;
RequestConstraintCheck walks a JSON body against them; SmithyValidationErrors
already writes the awsQuery wording. What was missing is the walk a Query
request needs, which is why QueryConstraintCheck sits beside
RequestConstraintCheck rather than inside it: a JSON body arrives as a tree,
where a Query request arrives as flat parameters named after the members that
carry them, and the violations are collected into one "N validation errors
detected" message in the model's member order instead of the first one being
thrown. A test sends two broken members in the opposite order to the model's
and gets the model's order back, so the ordering is the model's rather than the
wire's.

What changes for a caller is the status, in the direction #6402 settled for this
package: a PolicyArn under arnType's 20 characters, a VersionId outside
policyVersionIdType's pattern or an absent required member used to reach the
store and answer NoSuchEntity 404, where AWS's validation layer runs ahead of
the operation and answers ValidationError 400. AttachRolePolicy's RoleName is
the parity case for every value but one: IamService.validateRoleName already
answered it from the same bounds and the same pattern, and for a name outside
its pattern the message is unchanged by the model taking it over, which a test
pins.

An empty name is that one value, and the one place the wording moves rather
than the status. validateRoleName stops at the first constraint an empty name
breaks and reports the minimum alone, where the model also reports the pattern
it breaks, so these twelve operations answer two violations where they answered
one. That is the reading #6402 merged for a value breaking two of its
constraints, and it makes validateRoleName the drift rather than the
reference. The operations still on the hand-written check keep the single
violation until a later wave takes them over, which a test holds still on
CreateRole so that the wave which does has to settle the wording first.

Two answers are the package's own rather than new. A member breaking two
constraints is reported twice, which is what #6402 merged for a
ServiceSpecificCredentialId that breaks both its length and its pattern, so an
empty PolicyDocument reports its minimum and its pattern. The offending value
stays quoted, as SmithyValidationErrors and validateRoleName already quote it;
whether current IAM quotes it at all is an open question, and reading the
constraints in one place is what would make that one helper to change rather
than every message in the package.

Scalars only so far. An operation whose input shape carries a list or a map is
refused when the vendored file loads rather than passed over with its
constraints unread, since reading one means reading Name.member.N and
Name.entry.N.key and naming each index as the request spelled it. A boolean is
declared and holds no constraint to be read against, so a SetAsDefault that is
neither true nor false still reaches the operation, which reads anything but
true as false. A test pins that rather than changing it, since what AWS answers
for a malformed boolean is unrecorded here.
2026-10-25 22:30:35 -05:00
Hector Ventura 383315194a chore: add the package rename tool (report and apply) (#6556)
Floci's Java package moves from io.github.hectorvent.floci to io.floci.aws,
the convention the other emulators already use. The rename lands as one
mechanical cut, prepared by smaller PRs, and this is the tool for both.

tools/rename/rename_package.py report counts every reference to the old
package by where it sits: package and import lines, inline names in
code, strings, comments, non-Java files, and anything the cut would not
rewrite. Each prep PR can show its count going down. apply performs the
cut in the two commits it lands as: --moves-only renames the trees with
git mv so every file is a 100% rename, and --rewrite-only rewrites the
references, including the Maven groupId and the native-image directory.
The artifactId stays floci. CHANGELOG.md and the tool itself are left
alone.

It reuses code_text from tools/partition/partition_literals.py, so
comments and strings are read the way the partition gate reads them.
make rename-test runs its tests in the Partition Literals workflow, so a
change to that shared lexer cannot break the tool silently.

A dry run on main moved 5,966 files and rewrote 26,016 lines with no old
name left outside CHANGELOG.md; main and tests compile, and 245 focused
tests pass. Checkstyle then fails only in the 357 files whose
suppression paths start with /floci/, which a follow-up makes
package-independent.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-25 23:10:14 -04:00
Priamo Germosen 932af22f4a fix(iam): check requests on the resources they name (#6511)
Under IAM enforcement a request is checked against the resources it acts
on. ResourceArnBuilder builds their ARNs by hand for 17 namespaces;
every other request was checked on *, so a grant scoped to a resource
was refused and a deny scoped to one never applied.

AWS's Service Reference lists the resource types each action acts on and
each type's ARN formats, but not which request member names a resource;
botocore's models give the members. A new generator,
tools/aws/regen_iam_request_resources.py, joins the two into
src/main/resources/aws/iam-request-resources.json: for each operation,
the action it is checked as, that action's resource types and the
resources its request names, by a member holding a resource's ARN or by
members filling the variables of a type's format, matched by name. A
variable nothing fills is left open, as a service mints a new resource's
id; a type nothing names is not checked, as an action lists the optional
resources its requests may use; and types named only through the same
members are alternatives, of which the one named in full is kept.
Corrections give a v2 CreateLoadBalancer the load balancer of its Type,
application when it gives none (a Type outside application, network and
gateway is now refused, as AWS refuses it, rather than read as an
application load balancer the table does not name), and read
StartExecution's and StartSyncExecution's stateMachineArn up to a #, as
Floci runs the machine before Step Functions Local's test case. A state
machine's version or alias, stateMachine:<name>:<qualifier>, is checked
on the state machine's ARN, as Step Functions authorizes it, so an
execution started through one is the state machine's too.

RequestResources reads them from a JSON or CBOR body or a Query form,
for the namespaces the table reads, and ResourceArnBuilder uses them
where it has no branch. They are read for the operation the request is
dispatched as, which IamEnforcementFilter resolves and checks the action
of (the Query action, the JSON target or the Smithy RPC v2 path's
operation), never for an X-Amz-Target or Action the request names again,
and as the handlers read them: a list only from a list, a number or a
null as its text. A member whose botocore shape is an account id gives
the account of the types named by variables: ECR's registryId selects
the registry its handler acts in, and a JSON null is no registry, the
caller's, as ECR reads it. ECR's
BatchGetRepositoryScanningConfiguration, whose AWS request has no
registryId, no longer reads one: it acts in the caller's registry, where
IAM checks it. An ARN value counts when it matches the format of a type
the action acts on; one naming another account or Region is checked as
given and as each resource of that name a handler may act on instead, in
its account or the caller's and its Region or the request's (ECR's tag
handlers keep the ARN's account in the request's Region). A request
naming none, or whose action acts on no resource type, stays on *, as
AWS checks it. A create's tagging action is checked on the same
resources, except where the create makes a resource under a parent its
action acts on: CreateListener acts on a load balancer and CreateRule on
a listener, and their tags are checked on the new listener or rule,
built from the parent's ARN with the type word replaced and its own id
open. The table gives these from the formats: a child type's is its
parent's with one id appended. So the AWS Load Balancer Controller's
policy, which allows AddTags at creation only on target groups and
application and network load balancers, and on listeners and rules, now
holds.

The first namespaces read are Elastic Load Balancing, ECR, Step
Functions and Cognito user pools (298 operations); the 99 others Floci
serves are listed as not read yet, with their reason, and
RequestResourceNamespacesIntegrationTest fails for a served namespace in
none of the lists. make iam-request-resources-check, part of
aws-data-check, re-derives every operation from the pinned botocore;
make iam-request-resources-verify, part of iam-data-verify, checks the
actions, types and formats against AWS, and the IAM data drift workflow
also runs on a change to the table or its generator.

Not in this change: the 99 other namespaces, Query lists other than
Name.member.N, identifiers inside structures (SetRulePriorities,
CreateStateMachineAlias' routing configuration) and EventBridge.
2026-10-25 14:51:39 -05:00
Mario Toffia bab7af3a21 fix(apigateway): return a usage plan's API stages, throttle and quota (#6360)
* fix(apigateway): return a usage plan's API stages, throttle and quota

* fix(apigateway): refuse a usage plan create whose text or number member is a list, map or wrong scalar

* fix(apigateway): refuse an unknown usage plan quota period before any other create check

* fix(apigateway): check a usage plan create body against API Gateway's vendored request shapes

* fix(apigateway): read a usage plan create body the way API Gateway does

* fix(apigateway): truncate a usage plan's integer limits without a double rounding

* refactor(apigateway): reuse SmithyValidationErrors and a shared request shape lookup
2026-10-25 07:55:54 -04:00
Priamo Germosen 64f4f9e489 fix(iam): check a create's tags on its own and its tagging action (#6452)
Under IAM enforcement a request that tags the resource it creates was
checked only for the operation's own action. AWS also checks the
service's tagging action, as the SNS API reference says: "To be able to
tag a topic on creation, you must have the sns:CreateTopic and
sns:TagResource permissions." A caller allowed to create but not to tag
could set at creation the tags that a tag-based policy trusts. The
operation's own action did not see the tags either: aws:RequestTag and
aws:TagKeys were set only for Logs, S3 and EC2 RunInstances, so a
policy allowing sqs:CreateQueue only with aws:RequestTag/team never
matched, and one denying it when aws:RequestTag/team is null refused a
tagged create.

AWS's Service Reference lists the tagging action among each operation's
authorized actions and marks the actions that only tag, but does not say
which request member carries the tags; botocore's models do. A new
generator, tools/aws/regen_iam_tag_on_create.py, joins the two into
src/main/resources/aws/iam-tag-on-create.json: 581 operations over 69
namespaces, those Floci authorizes by operation. An
operation is in it when the reference lists, beside its own, an action
that only tags and adds tags; its tags are read from a top-level member
named Tags, TagList, TagSpecifications or the like that holds a tag list
or map. 569 are read from the table (579 members), CloudWatch Logs
CreateLogGroup is checked by hand as before, and 11 carry no tags this
file can read, each with its reason. A correction gives SQS's Query
name, Tag.N, and one drops an EC2 IPAM pool's allocation rule, which
tags nothing.

When a request carries tags, IamEnforcementFilter checks the tagging
action for each resource's tags apart, with them as aws:RequestTag/<key>
and aws:TagKeys, and, where the action takes it, the operation as its
namespace's CreateAction key (ec2:CreateAction is RunInstances for an
instance launched with tags). A tag specification's tags are checked on
the resource of the type it names, from the ARN the reference gives the
type with its name left open (arn:aws:ec2:<Region>:<account>:instance/*),
which the table carries for EC2 and RDS; other tags on the resources the
operation is checked on. Lambda's CreateFunction is now checked on the
function its body names, which the reference gives it, rather than on *,
so a grant scoped to the function covers both its action and its tags.
The operation's own action is checked with the
same two keys, once for each resource's tags, where the reference lists
them for it or for a resource it acts on (542 of the 569), keeping any a
service's own condition keys set. The table is keyed by operation, so
the filter now carries the operation it resolved beside the action,
which differs for an operation AWS authorizes under another name
(Budgets' CreateBudget is budgets:ModifyBudget).

The tags are read as the Floci handler that applies them reads them, so
the check sees the tags the resource gets. A form's are read under the
SDK's spelling, from 1 to the first number with no key, and under the
further spellings the RDS, DocumentDB, Neptune, ElastiCache and Redshift
handlers read, numbered as each numbers them; EC2's from every tag
specification under either TagSpecification spelling, to the first
naming no resource type. A body's member is read under its own name, and
CloudWatch's PutMetricAlarm and PutCompositeAlarm also under tags, and a
CodeDeploy tag as Key and Value or key and value, each as text whatever
it holds, as its handler reads. The
tagging action is also checked for tags under any other spelling a
handler might read (a name, key or value in any case, any list spelling
and number, an object's structures), so none a handler applies goes
unchecked. The operation's own action is checked with every reading, its
handler's, any other spelling's, and none where its handler reads none,
and refused if any is denied, so a deny on a tag holds and a required tag
counts only where the handler applies it.

make iam-tag-on-create-check, part of aws-data-check, re-derives every
member from the pinned botocore; make iam-tag-on-create-verify, part of
iam-data-verify, checks every operation against AWS, and the IAM data
drift workflow also runs on a change to the table or its generator.

Not checked: sts:TagSession in a role's trust policy, service-specific
request tag keys such as rds:req-tag, EC2 RequestSpotFleet's nested
tags, and the REST services whose routes no rule maps yet.
2026-10-24 22:12:56 -05:00
Priamo Germosen 1276a8857f fix(iam): check iam:PassRole from a table generated from the Service Reference (#6422)
Under IAM enforcement a request that names a role is checked for
iam:PassRole only where PassedRoles has a case for its operation, so most
of the operations AWS's Service Reference lists with iam:PassRole went
through without it: a caller allowed to create a CodeBuild project, a
Firehose stream, a Glue job or an SSM association could hand it any role
in the account. Adding a case per operation took one pull request per few
services.

The Service Reference names, for each operation, the services its role
goes to, but not the request member that names it; botocore's models give
the members. tools/aws/regen_iam_passed_roles.py joins the two into
src/main/resources/aws/iam-passed-roles.json: every operation listing
iam:PassRole in the namespaces Floci serves over JSON, Query and Smithy
RPC v2 CBOR, and in the REST services whose routes are authorized as
operations, each either read from the table, read by hand in PassedRoles,
or not read with a reason. Generation fails on an operation in none of
the three.

A member names a role when its name ends in Role, RoleArn or RoleName (a
plural, or one followed by Update or Override) and it holds a string or a
list or map of them, not an enum. A member whose documentation says it
takes a role by name is checked on the ARN IAM holds the role under. A
role the Service Reference passes to no named service, as it does
Cognito's, is checked with no iam:PassedToService. The generator records
its corrections with their reasons: members that pass no role (the roles
a Budgets action attaches a policy to, a CodePipeline action's role,
which the pipeline's role assumes, SSM target accounts' execution roles,
the roles a Glue job's generated nodes assume with STS, Firehose's
Snowflake role), members the rule does not see (a Cognito user pool's SMS
caller roles, a Glue connection's ROLE_ARN property and a view's definer,
Service Catalog's AssumeRole and LAUNCH_ROLE keys), and which service a
member's role goes to where the reference names several.

PassedRoles reads a table member from a JSON or CBOR body, or from Query
form parameters in either list form. Its own cases now return null for an
operation they do not read, and the table covers the rest. New cases read
SNS's role attributes (a topic's delivery status roles, a platform
application's, a Firehose subscription's and the SMS one, as the SNS
handlers read the map; an attribute with no value names none), a
CloudWatch Logs subscription filter policy's RoleArn, a Service Catalog
launch constraint's role, by the type Service Catalog holds for the
constraint on an update and in any case, since Floci keeps the type as
given, and an SWF decision's Lambda role from the attributes its type
names.

Not read: requests that name no role, roles that are a runbook's
parameter, operations whose roles go to several services without the
reference saying which member goes where (EMR RunJobFlow, EKS
UpdateClusterConfig, CloudWatch Logs CreateImportTask, SageMaker
CreateTrainingSession), XML bodies (S3 PutBucketReplication), EC2's
RequestSpotFleet, and REST services whose routes no rule maps yet.

make iam-passed-roles-check, part of aws-data-check, re-derives every
member from the pinned botocore; make iam-passed-roles-verify, part of
iam-data-verify, checks every operation against AWS; the IAM data drift
workflow now also runs on a change to the table or its generator.
PassedRoleNamespacesIntegrationTest fails for a namespace Floci serves
that the table neither reads nor names as not read yet.
2026-10-24 08:38:14 -05:00
Priamo Germosen 15de90c3ff feat(stepfunctions): add the emr-serverless optimized integrations (#6386)
A Task can now use the six optimized EMR Serverless integrations the
Step Functions guide lists: createApplication, startApplication,
stopApplication, deleteApplication, startJobRun and cancelJobRun, each
request-response and .sync. Each calls Floci's EMR Serverless in the
state machine's Region. They failed with "Unsupported resource" before.

A Task names the API's members in PascalCase where the API writes them
in camelCase, so a request and a response are mapped against botocore's
EMR Serverless model, now vendored as aws/emr-serverless-shapes.json by
tools/aws/regen_emr_serverless_shapes.py: a structure's members are
renamed, a map keeps the keys the state machine wrote (tags,
InitialCapacity's DRIVER, a configuration's Properties such as
spark.executor.memory), and a member the model does not have is
dropped. A member, ApplicationId and JobRunId included, may be written
in either case. One the model has and Floci's request class lacks is
refused rather than dropped, and a test holds the classes to the model.
request_shapes.py can now keep output shapes for it. A request
without ClientToken gets a random one, as the SDK fills an idempotency
token in; the guide's examples leave it out.

The result is the API's response in PascalCase, or {"ApplicationId"}
where the API answers nothing, as the guide's table says. The guide
finds no difference between a .sync response and the API's, so a .sync
result is the starting call's own: state machines read a
createApplication.sync result's ApplicationId and a startJobRun.sync
result's JobRunId. A .sync Task records TaskSubmitted and polls
GetApplication or GetJobRun until the state the guide names, as the
elasticmapreduce ones do; a run that ends FAILED or CANCELLED, or an
application that can no longer get there, fails the Task with
States.TaskFailed and the describe response as the cause. A wait that
ends early cancels the run of a startJobRun.sync, stops the application
of a startApplication.sync and deletes the one a createApplication.sync
made, the call each integration's IAM policy grants beyond its own and
its read. EMR Serverless answering that the application or run is gone
or past undoing is logged and leaves the Task ending as it was; any
other failure is raised.

An EMR Serverless error keeps its code under EmrServerless., the
exception prefix the guide gives the service; no record shows the
optimized integration's. A Task without the ApplicationId, or a
cancelJobRun without the JobRunId, it acts on fails with
States.TaskFailed before EMR Serverless sees it.

CreateApplication now stores the configurations UpdateApplication
already did (runtime, monitoring, scheduler, disk encryption,
interactive, Identity Center and job-level cost allocation), and
ImageConfiguration keeps applicationLevelDigestResolution. Both were
dropped, from a Task and from the API alike. A runtime configuration
kept only its properties, lifted out of their member: Jackson bound the
properties member to the field of that name holding every member read.
It keeps its classification and properties now, on update as well.

GetApplication no longer returns the application's clientToken, which
its Application has no member for and which the .sync waits read. The
token stays with the stored application, which CreateApplication's
retries are matched on.

The .sync wait loop the elasticmapreduce integrations had is now shared
by both, as are their request and failure helpers, and the two EMR
Step Functions tests share their state machine helpers.

Part of #6046 (part 11).
2026-10-23 22:16:08 -05:00
David 1f96bf42f1 feat(ecr): registry policy, replication and scanning configuration (#5817)
* feat(ecr): registry policy, replication and scanning configuration

PutRegistryPolicy, GetRegistryPolicy, DeleteRegistryPolicy, PutReplicationConfiguration,
DescribeRegistry, PutRegistryScanningConfiguration and GetRegistryScanningConfiguration store
the registry's own settings per account and Region and return them as written. Floci does not
replicate or scan images or evaluate the policy, as with repository policies.

- The policy must be a JSON object; a missing one is RegistryPolicyNotFoundException.
- Replication destinations, filters and rule counts are checked against the service model, and
  an empty rules list clears the configuration.
- Scanning defaults to BASIC with no rules, and CONTINUOUS_SCAN is refused with BASIC.

Closes #5803

* fix(ecr): put the registry setting writes under one lock

PutRegistryPolicy, DeleteRegistryPolicy, PutReplicationConfiguration and
PutRegistryScanningConfiguration read the registry's one settings record, change a
field and write it back. Terraform applies the three resources in parallel, so two
writers could start from the same record and the later write dropped the other's
setting. The read, change and write now happen under a lock per account and Region.

* refactor(ecr): check registry setting requests against the vendored model

The Resource Groups request walker moves to core.common as RequestConstraintCheck, so
a service can check a JSON request against botocore's constraints: member types,
required members, lengths and counts, number ranges, patterns and enums, each
answered in the service's own words. Resource Groups keeps its BadRequestException
messages.

- tools/aws/request_shapes.py gains build_constraints, which
  regen_resource_groups_shapes.py now calls; its vendored file is unchanged.
- tools/aws/regen_ecr_shapes.py vendors ecr-request-shapes.json for the seven
  registry setting actions, and aws-data-sync and aws-data-check run it.
- EcrJsonHandler checks those requests first, answering InvalidParameterException in
  ECR's form. The hand-written checks the model states are gone; a policy that is
  not a JSON object and CONTINUOUS_SCAN with BASIC stay, as the model cannot say
  them.
2026-10-20 10:03:30 -04:00
Andre Kurait be2cb677d0 feat(resourcegroups): support EC2 capacity reservation pools (#6011)
Signed-off-by: Andre Kurait <akurait@amazon.com>
2026-10-20 00:04:50 -04:00
Priamo Germosen 24a960a599 fix(iam): check the API Gateway and Lambda routes the action map names, and test them (#6036)
Under IAM enforcement a REST request is checked as the action its route
maps to, and a route no rule maps is let through unchecked. On #5604 the
S3 and API Gateway entries of iam-authorized-actions.json were noted as
never read, since those requests are authorized by route, with a test
comparing them with the route table asked for. This adds that test,
against each operation's real route, and fixes what it found.

- IamRestRouteCoverageTest builds a request on each operation's route,
  as botocore's model gives it, and checks that the registry resolves
  every S3, API Gateway and Lambda entry of iam-authorized-actions.json
  to the action the entry names. The routes are vendored, one operation
  to a line, in src/test/resources/aws/rest-routes.json by the new
  tools/aws/regen_rest_routes.py, which make aws-data-sync and
  aws-data-check now run.
- API Gateway: only /account and /restapis were mapped, so API keys,
  usage plans, client certificates, base path mappings, domain names
  and all of the v2 API went unchecked. The management API is now
  checked as apigateway:<method> on any route, as AWS authorizes it,
  and RejectDomainNameAccessAssociation and PutRoutingRule as their own
  actions. The v2 operations AWS checks only as actions of their own
  names, routing rules and portals, are not served by Floci.
- Lambda: InvokeWithResponseStream went unchecked; it is now checked as
  lambda:InvokeFunction, against the qualified function as an invoke
  is. GetLayerVersionByArn is checked as lambda:GetLayerVersion. It
  shares its path with ListLayers, so a rule can now require a query
  parameter.
- S3: the two bucket metadata configuration entries are not applied.
  Floci serves no metadata configuration, and such a request falls
  through to ListObjects or DeleteBucket, so it stays checked as the
  operation that runs.
2026-10-19 21:32:37 -05:00
Alessandro Lattao e5a206554f refactor(cloudformation): read property types from the vendored resource schemas (#5988)
* refactor(cloudformation): read property types from the vendored resource schemas

Follow-up asked on #5958: the types EventsCfnProvisioner checked a rule
target's members against were written by hand from describe-type, and
LambdaCfnProvisioner named the JSON type of each property it reads. They
now come from src/main/resources/aws/cfn-property-types.json, which
tools/aws/regen_cfn_property_types.py generates from the resource
schemas AWS publishes for us-east-1, in the request shapes' layout so
RequestShapeModel reads it: a structure, list, map or scalar per shape,
and "json" for what a schema leaves free.

The schemas come from AWS's live archive rather than a pinned package.
cfn-lint ships copies, but widens some types: a Lambda environment
variable's value takes any JSON type there and a string in the published
schema, where CloudFormation refuses an object or a list with "Property
[AB] expected type: String, found: JSONObject" (measured). The archive
keeps no older copy, so the generator follows the IAM data's split:
--check is offline and structural and runs on every pull request,
--verify compares a fresh generation with the vendored file and runs in
cfn-schema-drift.yml, weekly and on changes to the file or its generator.

CfnPropertyTypes.Reader walks the vendored shapes instead of type trees,
maps included: a map's values are read as its value shape, and a
mismatch names the key, as CloudFormation does ("Property [h] expected
type: String, found: JSONObject", measured). Every member of a rule
target is now read against its schema type, not only the four #5958
typed, and Lambda reads the properties it already typed through the same
reader, nested members included (VpcConfig.SubnetIds, EphemeralStorage.
Size, ImageConfig.Command, TracingConfig.Mode, Environment.Variables).
The messages for the newly checked members were measured on
CloudFormation (eu-west-1) and are in the tests.

* fix(cloudformation): keep a literal list's blank entries where the template put them

Review of #5988: the reader read every list of strings through the
engine's resolveStringList, which drops blank entries, so a rule
target's HttpParameters.PathParameterValues ["", "b"] became ["b"]
and moved "b" into the first wildcard. CloudFormation passes a literal
list on as written (measured: SecurityGroups ["", "sg-..."] reaches the
target as both). A literal list is now read through the engine's new
resolveLiteralList, which keeps blanks and still expands a list-valued
intrinsic in place; a list an intrinsic yields keeps the engine's
reading. Lambda's literal lists, read through the same reader, keep their
blanks too, for Lambda to judge as on AWS.

resolveLiteralList delegates to the private resolveListElements rather
than opening it: tests that mock the engine and call resolveStringList's
real code would otherwise get the mock's empty list from it, as
IamUserCfnProvisionerTest did.

* refactor(cloudformation): read a launch configuration's MetadataOptions by its schema shape

Review of #5988: #5964, merged after this branch opened, read
AWS::AutoScaling::LaunchConfiguration's MetadataOptions through the type
trees this PR removes. The generator now vendors that resource type too,
and AutoScalingGroupCfnProvisioner reads the block by the shape its
published schema declares (HttpTokens and HttpEndpoint strings,
HttpPutResponseHopLimit an integer, the same types #5964 wrote by hand),
so its tests pass unchanged. The hop limit's type is an anchor of the
generator's offline check.
2026-10-19 12:40:17 -04:00
Alessandro Lattao 98b2429e58 fix(ecs): launch a container with its linuxParameters, checked as RegisterTaskDefinition does (#5951)
* fix(ecs): launch a container with its linuxParameters, checked as RegisterTaskDefinition does

RegisterTaskDefinition kept a container's linuxParameters and
DescribeTaskDefinition returned them, but the container was launched
without any of them. A worker that set initProcessEnabled so its orphaned
browser processes would be reaped ran with its own command as PID 1, and
they stayed zombies until the container ended; capabilities, devices,
/dev/shm size, tmpfs mounts and swap limits were ignored the same way.

ECS documents each member as a docker run option, and the container is
now created with them: initProcessEnabled is --init (through
ContainerSpec.init, the flag main already has for it), capabilities are
--cap-add and --cap-drop, devices are --device (read, write and mknod when
no permissions are given, at the host path when no container path is),
sharedMemorySize is --shm-size in MiB, each tmpfs entry is a --tmpfs of
its size in MiB with its mount options, maxSwap is --memory-swap as the
container's hard limit plus that many MiB, and swappiness is
--memory-swappiness. ContainerSpec gains LinuxOptions for the rest,
applied in ContainerLifecycleManager's HostConfig; a constructor with the
former signature keeps every other caller unchanged.

A container behind a security group already had NET_ADMIN and NET_RAW
dropped, because the group is enforced by nftables in the namespace the
task's containers share. Docker applies a named --cap-add over a
--cap-drop, so those two are now also removed from what the container
asks to add; ALL can stay, since Docker grants every capability but the
dropped ones then (measured: docker run --cap-add ALL --cap-drop NET_ADMIN
--cap-drop NET_RAW reports CapEff 000001ffffffcfff, bits 12 and 13 clear).

Measured on RegisterTaskDefinition (eu-west-1, 2026-10-03 and 2026-10-16),
with the SDK's own validation off, and now checked the same way before
anything is stored:
- every capability must be one the KernelCapabilities reference lists, in
  any case and without a CAP_ prefix ("Unrecognized Linux capabilities in
  add: [CAP_NET_ADMIN]", likewise for drop);
- a device needs a hostPath ("Device cannot have empty hostPath") and only
  read, write and mknod as permissions, as written ("Invalid permission:
  READ for device /dev/null");
- a tmpfs mount needs a containerPath, a size above zero and options the
  Tmpfs reference lists, as written ("The NOEXEC tmpfs mount option
  specified is invalid.");
- sharedMemorySize must be above zero, maxSwap zero or more and needs a
  swappiness ("When a container has a swap memory, it must also specify a
  swappiness value."), from 0 to 100;
- the checks run capabilities, devices, tmpfs, then swap, all before the
  Fargate rules;
- on Fargate a non-empty devices list, sharedMemorySize, maxSwap and
  swappiness are refused in that order ("Fargate compatible task
  definitions do not support devices", with no trailing period, unlike
  AWS's other Fargate refusals), and any capability added but SYS_PTRACE
  as written ("NET_ADMIN is not allowed on Fargate.");
- a swappiness without maxSwap is accepted and dropped, and capabilities
  are stored with both an add and a drop list.

EcsLinuxParameters holds all of it, validation, the stored form and the
launch, and reads the members through one set of helpers, so EcsService
only calls it.

Not done: swap is not limited for a container with no hard memory limit,
since Docker cannot limit swap without one, and a daemon on cgroup v2
discards swappiness, as Amazon Linux 2023 does on ECS.

Tests: EcsLinuxParametersTest and ContainerLifecycleManagerLinuxOptionsTest
for what reaches Docker, EcsLinuxParametersDockerIntegrationTest for a
real container (PID 1, capabilities, device, /dev/shm, tmpfs),
EcsFargateEdgeCaseIntegrationTest for the measured refusals and the stored
form, and EcsLinuxParametersRegistrationTest in sdk-test-java for the
same through the SDK.

* fix(ecs): read linuxParameters as RegisterTaskDefinition does, and guard devices like host volumes

Review of #5951 (Qodo).

A device hands the container the host's hardware, and reached Docker with
no check, where a host volume at the same path is refused by default.
HostVolumePolicy now covers each device's hostPath too, naming the field
it checks: refused unless floci.services.ecs.host-volume-roots holds it or
allow-unsafe-host-volumes is set, at RegisterTaskDefinition after AWS's
own checks (so their messages still come first) and again at launch,
through EcsContainerManager.checkDeviceHostPaths. The registration check
sits in EcsService rather than beside the host volume one in
EcsJsonHandler, so a template's definition gets it too.

Measured with raw requests on RegisterTaskDefinition (eu-west-1,
2026-10-18):
- a member of the wrong JSON type is refused with an
  InvalidParameterException from the deserializer, before any rule on the
  values: "Unexpected field type" for a scalar where an object or a list
  is expected, "Unexpected value type in payload" for a device or a tmpfs
  mount that is not an object, "Start of structure or map found where not
  expected" for an object where a list or a scalar is expected,
  "NUMBER_VALUE cannot be converted to String", "STRING_VALUE cannot be
  converted to Integer", "TRUE_VALUE ...", "NUMBER_VALUE cannot be
  converted to Boolean", "Unexpected token received from parser" for text
  that is not true or false, and no message at all for a list where none
  is expected;
- numbers are read as integers, the fraction dropped (sharedMemorySize
  1.9 is stored as 1, 0.5 as 0 and refused) and the range capped
  (3000000000 is 2147483647); a boolean may come as text in any case; a
  null member or list entry is absent, and a null device is an empty one.

Floci kept such values as written and silently skipped what it could not
read, so a definition stored one size and launched another. The stored
form now holds what AWS stores.

Tests: EcsFargateEdgeCaseIntegrationTest for every measured shape, the
stored numbers, booleans and nulls, and a device refused by default; the
Docker test allows /dev/null through host-volume-roots. All fail on the
previous head.

* refactor(ecs): check linuxParameters' JSON types against the vendored ECS model

Review of #5951. EcsLinuxParameters hand-wrote the deserializer's type
check member by member, where Floci already drives that check from
botocore for DynamoDB and SES v2 (RequestShapeModel, with the shapes
vendored by tools/aws/request_shapes.py).

tools/aws/regen_ecs_shapes.py vendors botocore's ECS model as
src/main/resources/aws/ecs-request-shapes.json (botocore 1.43.113, the
release requirements.txt pins), registered in make aws-data-sync and
aws-data-check and in the shared generator's tests. EcsRequestShapes
walks a container's linuxParameters against the LinuxParameters shape
with ECS's InvalidParameterException messages, the ones measured on
RegisterTaskDefinition; EcsLinuxParameters' own member list is gone.
The messages and their order are unchanged.

The device change named host volumes only in two more descriptions of
floci.services.ecs.host-volume-roots: docs/configuration/
environment-variables.md and the configuration table in
docs/services/ecs.md now name devices too, as does the host volume
section and the allow-unsafe-host-volumes Javadoc.

Tests: EcsRequestShapesTest for every measured message against the
vendored model; EcsFargateEdgeCaseIntegrationTest passes unchanged.

* refactor(core): walk request shapes once, with each service's messages

Review of #5951: EcsRequestShapes walked the vendored model the same way
DynamoDbRequestShapes and SesV2RequestShapes do (a null is absent, an
unknown member is skipped, a structure's values are read as members and a
list's or a map's as elements, a boolean reads from "true" or "false" in
any case, a scalar of the wrong kind is named by its JSON token), with only
the error code and a few messages apart. That walk is now
RequestShapeCheck, next to RequestShapeModel in core.common, and each
service hands it its deserializer's wording as RequestShapeCheck.Messages:
DynamoDB's SerializationException with DECIMAL_VALUE and the base-64
message for a blob, SES v2's SerializationException with its "can not be
converted to a" wording and only strings and blobs checked, as probed, and
ECS's InvalidParameterException with no message for a list where none is
expected.

The three services' tests pass unchanged. SES v2's wording becomes
constants in SesV2Json, which its member helpers and the walk share.
2026-10-18 22:21:54 -04:00
Hector Ventura 5370920012 chore(release): publish standalone floci-aws binaries as release assets (#5844)
* chore(release): publish standalone floci-aws binaries as release assets

The release already built Linux native executables, but only to package them
into the images; they were discarded after a day and releases carried no
assets. Users without Docker had nothing to download.

release.yml now also builds macOS (arm64, and x86_64 under Rosetta) and Windows
x86_64 binaries with GraalVM Community, smoke-tests every binary on its own
runner with .github/scripts/smoke-binary.sh (version matches the tag, SQS and
DynamoDB round trips, clean stop on SIGTERM), and checks that the Linux amd64
binary still starts on glibc 2.34 (Ubuntu 22.04). A new publish-binaries job,
the only one with write access to the release, stages the six executables as
floci-aws-<os>-<arch>, writes sha256sums.txt, signs every file with keyless
cosign sign-blob, attests build provenance, and uploads them to the release
semantic-release created. Build artifacts are kept 7 days so that job can be
re-run on its own.

make native-install now installs floci-aws, since floci is the CLI.

Refs #5767

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* fix(release): check the glibc 2.34 floor on every Linux binary and wait for the release

Review follow-ups for the binary release jobs:

- The floor check started the amd64 binary on Ubuntu 22.04, whose glibc is
  2.35, so a binary that needed 2.35 would have passed. check-glibc-floor.sh
  now reads the newest GLIBC_ symbol version the binary requires with
  readelf and fails above 2.34, then starts it in UBI 9, whose glibc is 2.34.
- The two arm64 builds had no floor check at all; they run the same script.
- publish-binaries waits up to 10 minutes for semantic-release to create the
  GitHub Release before uploading, instead of failing if it is not there yet.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

* fix(release): build darwin-amd64 with a pinned, checksummed GraalVM Community

The macOS x86_64 job downloaded Oracle GraalVM from download.oracle.com's
"latest" URL: not the Community build the job's comment names, unpinned and
unchecked, though its output is then signed and attested as ours. It now
fetches GraalVM Community 25.0.1, the last release with a macOS x64 build,
from graalvm-ce-builds and checks it against the published SHA-256 before
extracting it.

The publish-binaries header said semantic-release creates the release
before pushing the tag; it pushes the tag first, as the upload step says.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-17 12:36:20 -04:00
Priamo Germosen 30d8d3ff5c fix(core): route a Query action by its service's botocore model (#5879)
A Query request without a usable credential scope is routed by its
Action and Version, and IAM enforcement authorizes it under the service
that routing picks. The names each service routed were kept by hand in
AwsQueryController and had drifted from what the services serve: 170
names Floci dispatches, across eight services, reached no service and
fell through to SQS. They answered UnsupportedOperation in SQS's
namespace and were authorized as SQS actions.

Each Query service's API versions and operations now come from its
botocore models: tools/aws/regen_query_services.py writes them, from the
pinned botocore, to aws/query-services.json, and make aws-data-check
fails when the file is stale. Every name a service defines reaches it,
implemented here or not. Floci keeps the list of services and their
order, Cognito's names, which no Query model holds, and ElastiCache's
ValidateIamAuthToken, which no model defines.

A name several services define goes to the first of them when the
request names no Version. Ten such names get a pinned owner instead,
the service that serves them here, where the order would pick an
earlier one that does not. The routing parity test checks every
dispatched action with and without a Version and no longer needs its
list of known gaps.
2026-10-17 10:17:18 -05:00
Kenshin Okinaka e24a2882bc fix(ses): check v2 send request bodies against the service model (#5765)
* fix(ses): check v2 send request bodies against the service model

SendEmail, SendBulkEmail and SendCustomVerificationEmail read their
members by hand, so a member of the wrong JSON type was coerced, read as
empty, or rejected with a Floci-specific BadRequestException, depending
on which member it was. AWS deserializes the whole body against the
model first and answers the first member of the wrong type, in body
order, with a SerializationException and its deserializer message.

tools/aws/regen_sesv2_shapes.py vendors the body shapes of botocore's
SES v2 model into src/main/resources/aws/sesv2-request-shapes.json, kept
in sync by make aws-data-check like the DynamoDB shapes.
SesV2RequestShapes checks a body against them, and the three send
endpoints call it before reading any member. The type checks it makes
redundant are removed from the send helpers. A null address list
element still passes and fails as "Invalid email address null.", as on
AWS.

Only the string, blob, list, structure and map messages have been
probed, so number, boolean and timestamp members are left to their
controllers.

* fix(ses): report a null v2 send address where SES does

A null element of a v2 send address list was rejected for the whole
request while the body was read. SES lets it through deserialization
and reports it later: SendEmail answers "Invalid email address null."
after its content and sender checks and before the tenant lookup, and
SendBulkEmail reports it as the INVALID_PARAMETER status of the entry it
belongs to, of every entry for a null Reply-To, or as "Destination
cannot be empty" when no entry of the request has a non-null recipient.

The address lists now keep the null, SendEmail checks for it ahead of
the tenant gate, and the bulk entry check reports it per entry. Two
ordered integration tests that shared an @Order value get their own.

* chore(core): share the vendored request-shape model

DynamoDbRequestShapes and SesV2RequestShapes each carried the same
Shape and Model records and the same parse() and load(), and load()
repeated VendoredResources.read. RequestShapeModel in core.common now
holds that half and both checks use it; each keeps its own walk and its
protocol's messages.
2026-10-16 06:46:25 -04:00
Vũ Thế Huy 77384dc3de feat(redshift-serverless): validate requests against the AWS model constraints (#5641)
* feat(redshift-serverless): validate requests against the AWS model constraints

Generate the input constraints (required members, length, pattern, enum,
number range, list size) from botocore's Redshift Serverless model with
tools/aws/regen_redshift_serverless_shapes.py and vendor them under
src/main/resources/aws, like the DynamoDB request shapes. A new
RedshiftServerlessRequestShapes check runs before dispatch and answers a
ValidationException. Pagination members are left to the services, which keep
reporting InvalidPaginationException.

Move the request parsing and error helpers that the JSON handler, the usage
limit service and the service each carried a copy of into ServerlessSupport,
so the resource families that follow share one implementation.

* fix(redshift-serverless): address review findings on request validation

- Match a model pattern against the whole value, so an unanchored pattern such
  as the account id no longer accepts a value that merely contains a match.
- Count string lengths in Unicode code points, so a tag of 200 supplementary
  characters is not rejected for exceeding 256 UTF-16 units.
- Validate only the actions the handler implements, so a modeled but
  unsupported action keeps answering UnknownOperationException.
- Read every string member through ServerlessSupport.text and reject a tag key
  or value that is not a string, so a numeric nextToken or tag member is a
  ValidationException instead of being treated as absent or coerced.
- Regenerate the vendored shapes from botocore 1.43.113, the version
  tools/aws/requirements.txt pins.
- Cover the rejected-request case with a state check, and add the pattern, code
  point, page token and tag regressions.

* refactor(redshift-serverless): use VendoredResources, ServerlessSupport.notFound and update docs
2026-10-15 09:06:46 -04:00
Andre Kurait 63e0302c12 fix(apigateway): validate and normalize imported integration types (#5543)
Signed-off-by: Andre Kurait <akurait@amazon.com>
2026-10-13 23:48:12 -04:00
Priamo Germosen eba058266b fix(iam): authorize an operation as the action AWS checks for it (#5604)
Under enforcement a request naming its operation, in a Query Action or an
X-Amz-Target header, was authorized as <namespace>:<Operation>, the operation's
own name. AWS authorizes some operations as an action of another name: SQS
SendMessageBatch, DeleteMessageBatch and ChangeMessageVisibilityBatch as
sqs:SendMessage, sqs:DeleteMessage and sqs:ChangeMessageVisibility, and SNS
PublishBatch as sns:Publish. None of the batch names is an IAM action, so a policy
AWS honours for a batch call was denied, and a policy naming the batch operation
granted something AWS does not check.

AWS publishes the mapping in the Operations of each Service Reference file.
tools/aws/regen_iam_authorized_actions.py vendors the operations authorized by
exactly one action of their own namespace under another name, 235 over 33
namespaces, into src/main/resources/aws/iam-authorized-actions.json. Everything else
keeps its own name. The generator leaves out operations that list:
- several actions, whose extras apply only when tags or a role are passed;
- no action, which is missing data;
- an action of another namespace;
- another action while one of the operation's own name exists;
- a tagging action alone;
- the same action for several SDK clients, which AWS can authorize differently,
  as S3 and S3 Control's GetPublicAccessBlock;
or whose name is listed again with another answer. A record of the wrong shape
fails the run instead of being skipped.
make iam-authorized-actions-check gates the file's shape on pull requests that touch it, and
iam-authorized-actions-verify, run by the IAM Data Drift workflow, checks every
entry against AWS.

IamAuthorizedActions reads the file through the new core.common
VendoredResources, rather than adding one more copy of the read-or-fail block a
dozen catalogs carry, and the Query and X-Amz-Target paths ask it for the action.
DynamoDB TransactGetItems, which AWS authorizes as dynamodb:GetItem, keeps its own
name: the transaction check recognizes the call by it and checks every Get as
dynamodb:GetItem on its own table, with its own dynamodb:LeadingKeys. Renamed, the
call would skip that check and be authorized as one GetItem whose body has no
top-level Key, which a ForAllValues condition accepts, so a fine-grained policy
would grant every key.

The check for operations AWS serves without credentials reads the Query action
directly, rather than through resolve with a placeholder scope, now that resolve
returns the authorized action. A Query request naming no action is not one of them.

An SDK compatibility test covers SendMessageBatch and PublishBatch, granted by
the single-item action and refused under the batch name, with enforcement on.
2026-10-13 22:29:06 -05:00
Priamo Germosen d884d55c26 fix(iam): evaluate every IAM action against the resource it acts on (#5404)
Under enforcement, almost every IAM action reached the policy evaluator with
* as its resource, because ResourceArnBuilder named only the server-certificate
operations and everything else fell through to the wildcard. A statement naming
an IAM resource was therefore ignored, and wrongly in both directions, because
the evaluator globs the statement's pattern against the request's resource and
a resource of * is matched as that literal string. So a Deny on
arn:aws:iam::000000000000:user/bob did not stop DeleteUser for bob, while an
Allow scoped to that same user did not permit DeleteUser on anyone at all: a
least-privilege policy naming the resource it meant to grant refused the call.
Measured both ways by reverting this resolver to the wildcard, which turns the
permitted call in aResourceScopedAllowGrantsThatUserOnly into a 403 and the
refused call in aDenyNamingOneUserLeavesTheOthersAlone into a 200. Nothing
failed and nothing warned, which is the dangerous shape for an emulator people
test policies against.

The resource type each action is evaluated against now comes from AWS's own
authorization metadata for IAM, action by action. That is not the parameter an
action happens to take: AddUserToGroup and RemoveUserFromGroup are evaluated
against the group, AddRoleToInstanceProfile and RemoveRoleFromInstanceProfile
against the instance profile, and EnableMFADevice, DeactivateMFADevice and
ResyncMFADevice against the user rather than the device they name. Mapping those
from the request's parameters would have scoped them to the wrong resource and
let a deny on the right one pass.

An action acting on a resource that exists is checked against that resource's
stored ARN. The reference gives the formats as user/${UserNameWithPath},
group/${GroupNameWithPath} and so on, so the path is part of the ARN a policy
names, and only the store knows it; the stored ARN also carries the partition
the resource was created in, which re-minting from the caller's signing region
would get wrong. A create has nothing stored, so its ARN is minted from the
request's own Path: reading a stored path there would authorize a create into
/team/ against the root path.

A policy, MFA device, SAML provider, OIDC provider or principal is named by an
ARN the request already carries, so that is passed through rather than rebuilt
from parts. Only an ARN is: a hardware MFA device's SerialNumber is a bare
serial, and naming the request after it would produce a resource no policy could
be written against.

That table is read before the one keyed by resource type, so an action in both
would silently take its ARN parameter and the mistake would look like a resource
that never matches rather than like a bug. An attach is the case that makes it
worth pinning down: it carries both a user and a policy ARN, and the reference
gives it the user alone, so it stays out of that table and
iamNamesTheUserRatherThanThePolicyOnAnAttach is what holds it there.

UpdateUser and UpdateGroup join UpdateServerCertificate in naming both the old
resource and the one the request would produce. Both are documented, which the
certificate case was not: UpdateUser's reference says the requester "must have
appropriate permissions on both the source object and the target object", and
UpdateGroup's that a principal allowed to update the old group but not the new
one has the update fail.

Two actions name their role indirectly and are derived rather than looked up.
CreateServiceLinkedRole does not name the role it creates, so the check reads
the same ServiceLinkedRoles table the create reads and cannot name a different
role. GetServiceLinkedRoleDeletionStatus carries only a DeletionTaskId, and its
reference publishes that identifier's format as
task/aws-service-role/<service-principal-name>/<role-name>/<task-uuid>, which is
the role's own path and name with a prefix in front and a uuid behind; the role
is already deleted by the time the status is asked for, so there is no stored ARN
left to read either way. The /aws-service-role/ path moved to that class, so there is one copy of
it rather than a second in the builder. GetAccessKeyLastUsed names only a key,
and is evaluated against a user: the User Guide's own iam:*AccessKey* example
scopes exactly that set to user/${aws:username}, so the owner is resolved from
the key.

That covers all 130 of the IAM actions this emulator dispatches that AWS gives a
resource type, out of 164 in total. The remaining 34 have no resource type in the
reference, such as ListUsers, GetAccountSummary and SimulateCustomPolicy, so *
is the right answer for them. An action that names its target only by defaulting
to the calling user, such as GetUser or ChangePassword with no UserName, is
resolved from the credential instead, which the last paragraph here sets out.

Nine enforcement tests drive the whole path rather than the ARN the builder
returns, since the defect was invisible: a scoped statement was ignored, not
rejected. They cover a deny that must bind to one user and leave another alone,
the stored path being part of the ARN, the group and the instance profile being
the resource where two entities are named, a managed policy named by ARN, a
create authorized against the path it asks for, a rename refused on its
destination alone, and a scoped Allow granting one user only. Reverting the
mapping to the wildcard fails all nine.

The map is vendored rather than written out here, because a hand-written copy of
AWS's metadata is exactly what tools/aws exists to prevent.
regen_iam_action_resources.py generates src/main/resources/aws/iam-action-resources.json
from the same reference, 190 actions with the resource types each is authorized
against plus the ARN format of all 15 resource types, and it gates the file the
way regen_service_namespaces.py gates the namespace list: --check offline for
shape, --verify online against AWS. A type the file claims and AWS does not fails,
since that would authorize against a resource AWS does not use, which is the one
outcome worse than the wildcard. A type or an action AWS has added is reported
without failing, because being behind leaves that action on * and failing there
would break this build for someone else's launch. make
iam-action-resources-check runs per pull request beside the namespace check, and
make iam-action-resources-verify weekly in the drift workflow. Its unit tests need
no step of their own: make aws-data-test in that same job already runs every
generator's.

So no list of actions is written down here. What stays in code is the half that is
Floci's rather than AWS's: the parameter each resource type arrives in, the nine
creates and the name each spells, the actions whose request carries an ARN, the
three resolved from something other than a name, and the three resource types
that belong only to actions the handler does not dispatch. IamActionResourcesTest
checks the code against the data: every resource type AWS uses must be resolved
or declared unresolved, every create must have exactly one type to mint, and
every minted prefix must match the ARN format AWS publishes for that type. A
regeneration that brings in a new resource type then fails a test naming the
type, rather than quietly putting that action back on *, which is the permissive
answer and a silent one. The create check reads the resolver's own map rather
than restating it, so a create added there is checked too, and the minting falls
back to the wildcard instead of indexing an empty list: a create AWS authorizes
against no single type has no ARN to build, and a request should not fail on
what is a defect in this class.

The reason each declared-unresolved type gives is a claim about the handler, not
about the builder, so nothing inside the builder can check it, and getting it
wrong is silent and fail-open: dispatching such an action without teaching the
resolver its type leaves it evaluated against *, which is the gap this closes.
UnresolvedResourceTypesIntegrationTest therefore sends every action carrying one
of those types and holds it to answering UnsupportedOperation, naming the action
and what to do if it no longer does. No other vendored-data loader validates at class init
either, so the checks read the data the way AwsPartitions and
AwsServiceNamespaces do: parse, and let the gate and the tests have the opinion.

The nineteen user actions whose UserName the model marks optional act on the
user who signed the request, so that user is the resource they resolve to. The
access key id in the credential names the identity, which is the same lookup
GetAccessKeyLastUsed already makes on a key passed as a parameter, and the
stored ARN carries the path and partition as everywhere else here. The wildcard
still stands when the signer is not an IAM user, an account's root stand-in and
a session credential having no user record to name.

What stays at the wildcard is what AWS gives no resource type, 34 of the 164.

Closes #4979

The online gate verifies the ARN formats as well as the action mapping. A format
drifts invisibly otherwise: the offline check only asks whether it still looks
like an IAM ARN, and a changed one does, while the minting reads that string to
place the resource type. So a right-looking file could build a wrong ARN.

The resource types this class covers are worked out from its own tables rather
than restated in the test, so a type cannot be waved through by adding it to a
list in the test file. That is the check the earlier startup guard made.

The three actions whose resource the request carries in some other form hold
their own resolver, rather than being listed in one place and routed by name in
another. A list cannot then say an action is handled while the dispatch has
nothing for it, since adding a key means supplying the resolver that goes with
it.

The enforcement suite removes what it creates. The emulator is shared, so a user,
group, role, profile, policy or provider left behind turns up in the next class
to list one, and the shared fixture helper grew the prerequisites IAM enforces
before a delete: group memberships and attached policies for a user, inline and
managed policies for a role and a group. A rename leaves its destination name
behind rather than the name that was created, and the create test goes through
the enforced path, so both register their own removal.

The drift workflow stays one check, and make iam-data-verify is what keeps that
honest. Two sequential steps stop at the first failure: while the namespace list
was stale, the action resource check this change adds never ran at all, so the
gate arrived unexercised in CI. The target runs both regardless of the first
result and then fails, naming the file that drifted rather than leaving a reader
to guess from one message. The workflow file is renamed to match what it covers,
and the IAM targets it uses join .PHONY, which they should have done when they
were added.

That namespace check was red because AWS retired evidently and iotevents, and
the vendored list still claimed both. Regenerating it drops those two, picks up
end-user-messaging and startups, and leaves the count at 456. A retired
namespace only narrows wildcard expansion; a policy naming one literally is
still reported, since a namespace written out is kept whether or not the catalog
knows it.
2026-10-11 09:12:29 -05:00
Hector Ventura c6068e8cf5 chore(iam): generate the managed-policy catalog from iam-dataset (#5403)
* chore(iam): generate the managed-policy catalog from iam-dataset

The three managed-policy resources were hand-seeded in #2194, #3237 and #3275,
so nothing noticed when AWS added or revised a policy. tools/aws/
regen_managed_policies.py now rebuilds them from the local/aws/iam-dataset
checkout: names, paths, versions and update dates from
aws/managed_policies.json, documents from aws/managedpolicies/. Deprecated
policies leave the catalog except AWSLambdaFullAccess, which #2194 kept on
purpose. createDate (from the AWS managed policy reference pages) and the
curated descriptions are not in the dataset and are carried over.

It joins make aws-data-sync and aws-data-check. CI has no iam-dataset, so
there the check verifies the three files agree and keep their shape, the way
regen_region_facts.py handles its missing corpus.

This commit changes no data; only the catalog header gains a generated-by
line. The files were taken from three dataset days, and the generator
reproduces each from its own: the names from 2026-08-12 (f18cb038), the
versions from 2026-09-08 (a52abe16), and the documents from 2026-09-08 too,
except AWSCodeStarServiceRole, which matches 2026-09-07 (1c729479).

* chore(iam): refresh the managed-policy catalog from iam-dataset 2026-09-19

make aws-data-sync against the local/aws/iam-dataset checkout (72d2a4f62,
2026-09-19). Catalog 1566 -> 1578 policies:

- 12 added: AIDevOpsChannelAccessPolicy, AIDevOpsReleaseManagementVPCPolicy,
  AWSWellArchitectedAgentOrganizationsServiceRolePolicy,
  AmazonBioDiscoveryFullAccess, AmazonBioDiscoveryInAppFullAccess,
  AmazonODBAutonomousDatabaseAdmin, AmazonODBExadataVmClusterAdmin,
  AmazonODBExascaleStorageVaultAdmin, AmazonODBExascaleVmClusterAdmin,
  AmazonSageMakerHyperPodInferenceGatewayAccess, AssuranceServiceRolePolicy,
  NetworkSecurityManagerServiceRolePolicy. All are on v1, so their
  createDate is the dataset's date.
- 0 removed.
- 22 changed: 21 moved to a new default version with a new document and
  update date (among them ReadOnlyAccess and SecurityAudit), and
  AWSCodeStarServiceRole kept v12 but took the document and update date
  the dataset recorded on 2026-09-08.

No path or description changed, and the service-linked role table still
matches the documents (make slr-check).

* chore(iam): make the managed-policy generator's date fetch and offline check stricter

--fetch-create-dates now reads the reference page of every policy past v1
that has no creation date, not only of policies new to the catalog, so a
policy first vendored without the flag can be dated by a later run. A page
that cannot be read leaves that one policy undated with a warning instead
of ending the run with nothing written.

The offline check compares the catalog with a re-render of its parsed
entries, so content outside the generated header and policy entries fails
it instead of passing unnoticed.

* chore(iam): refresh the managed-policy catalog from iam-dataset 2026-10-09

The dataset moved after the first refresh. Regenerated against 2244bd78a
(2026-10-09) with --fetch-create-dates. Catalog 1578 -> 1586 policies:

- 11 added. Ten are on v1 and take the dataset's date;
  AWSCloudWatchOmniServiceRolePolicy is on v2 and takes its creation date
  from its reference page.
- 3 removed: the CloudWatch Evidently policies, which the dataset now
  marks deprecated.
- 45 moved to a new default version, among them SecurityAudit (v94) and
  ReadOnlyAccess (v190).

The generated header said createDate falls back to the dataset's date for
a policy with no reference page. It does so only for a policy that entered
the catalog on v1; one past v1 stays undated, and the header now says so.
AWSConfigRole is still the only policy without a creation date.
2026-10-10 13:40:04 -04:00
Priamo Germosen df4fa58ea1 fix(iam): take service-linked role names and suffix support from AWS evidence (#5293)
CreateServiceLinkedRole guessed both things it cannot derive. The role name came
from capitalising the principal, which is wrong for 141 of the 162 services the
table covers: acm.amazonaws.com is AWSServiceRoleForCertificateManager on AWS and
was AWSServiceRoleForAcm here. And a CustomSuffix was accepted for every service,
where AWS refuses one for 68 of the 71 it has been recorded against, so the
emulator minted roles AWS would have rejected outright.

Both now come from iam/service-linked-roles.tsv, generated by
tools/slr/service_linked_roles.py and gated by make slr-check. One table, because
both facts come out of one pass over the same AWS-validated snapshot: the name
from a recorded create response, the suffix verdict from the test's own
parameterisation. Writing either by hand only captures what someone noticed, and
every finding behind this change came from grepping.

Sources, each row recording its own: recording, actual create responses and the only
source that can establish suffix support; policy-documents, role ARNs in the vendored
AWS managed policies, names only; and docs, from AWS's own service-linked role
pages, quoted and linked in the generator. Counts live in the table's header, where
this script keeps them right.

Two shapes in the policy documents have to be refused rather than read, and both
were being read. A name followed by `*` is a prefix pattern: the policy writes
AWSServiceRoleForAmazonCognitoIdpEmail* where the recorded create returns
AWSServiceRoleForAmazonCognitoIdpEmailService, so reading the prefix invents a role
AWS never mints. Twenty-one principals rested on nothing but such a prefix. And a
role name is unique per account, which these documents ignore: they point
maintenance.elasticbeanstalk at the parent's AWSServiceRoleForElasticBeanstalk, so
taking that at face value made the sibling's create fail as a duplicate of a role
it does not own. A collision guard drops the weaker row back to the derived
fallback and says so; an unresolvable collision is an error for a human.

KNOWN_SOURCE_CONFLICTS is empty as a result. Its one entry was never a
disagreement between sources, only that truncated prefix read as a name. The
mechanism stays for a real one.

make slr-check runs offline: policy-documents rows must still match the vendored
JSON, every vendored service must be in the table, it must be sorted, and a suffix
verdict on a non-recording row is an error because nothing but a recording can
establish one. Three extraction traps have a test each, all three being ones the
real data walked into: an underscore can be part of a name, so splitting on the
CustomSuffix separator truncates ApplicationAutoScaling_CassandraTable; a policy
matching suffixed roles writes the prefix with a trailing separator; and a
wildcard ARN names a role without saying which principal mints it, which is how an
earlier pass handed plain GuardDuty the MalwareProtection role's name.

The name was not only wrong against AWS, it was inconsistent within the tree.
ConnectService built an ARN for AWSServiceRoleForAmazonConnect while
CreateServiceLinkedRole minted AWSServiceRoleForConnect for the same principal:
two roles for one purpose. GuardDutyService, MacieController and RamController
each hard-coded their own name too, and all four were right where IamService was
wrong. They read the table now, and a test fails if a principal any of them builds
an ARN for loses its row, since the fallback would quietly derive a name again.

ApplicationAutoScalingService was wrong a different way. It maps a namespace to a
dimension itself, and had no arm for appstream, cassandra, ec2 or sagemaker, so
all four fell to CustomResource where AWS names them AppStreamFleet,
CassandraTable, EC2SpotFleetRequest and SageMakerEndpoint. It prefers the table
now and keeps its switch for the namespaces nothing records, where the shape is
right even when the dimension is a guess. Its dynamodb arm is gone with the rest:
the table covers that namespace, so the arm was unreachable and a second copy of a
fact the table owns, free to disagree with it while never running. A test pins
dynamodb resolving through the table, since removing the arm is what left nothing
else covering it.

Two behaviour changes worth calling out. rds.amazonaws.com is AWSServiceRoleForRDS
rather than the derived Rds, which flipped one existing expectation. And two table
names are long enough that a suffix alone breaches the 64-character RoleName
limit, ApplicationDiscoveryService's ContinuousExport role leaving three
characters and SageMakerEndpoint six, so that check now reports "The role name"
rather than "The derived role name", which stopped being true.

cloud9 is in the table because deleting IamService's three-entry override map
dropped it: autoscaling and ram were covered, cloud9 was not, and it regressed to
the derived AWSServiceRoleForCloud9. Two tests caught it. Rather than restore the
literal, which is the circular sourcing this work exists to remove, its User Guide
settles it and the row carries that citation.

The table is registered in quarkus.native.resources.includes rather than exempted
from it. AwsManagedPolicies is exempt because parsing its 3.5 MB at image build time
and keeping the result in the heap beats shipping the source twice; at 13 KB that
saving is not worth depending on the static initialiser running at build time, and
NativeImageResourceIncludesTest is the thing that says so.

The header records the sha256 of the snapshot the recording rows came from, because
that half cannot be rechecked offline and --check can only say so rather than fix
it. A digest makes the next --refresh a diff against a known source: an unchanged
digest means any difference in the table came from the vendored policy documents,
and a changed one says the recordings moved with it. --check cannot verify the
digest without the snapshot, but it does reject a table that has quietly lost the
line, or one claiming no snapshot while carrying recording rows.

Refs #5084
2026-10-08 07:49:50 -05:00
TATSUNO “Taz” Yasuhiro 1465251e0c fix(dynamodb): reject a request member of the wrong JSON type (#4636)
* chore(dynamodb): vendor the input shapes of botocore's DynamoDB model

tools/aws/regen_dynamodb_shapes.py keeps each operation's input shape and
the type of every shape it reaches, from the pinned botocore release.
make aws-data-sync regenerates it and make aws-data-check keeps it in sync.

* fix(dynamodb): reject a request member of the wrong JSON type

DynamoDB answers a member of the wrong JSON type with a
SerializationException before it runs the operation, such as
"NUMBER_VALUE cannot be converted to String" for a number BillingMode or
IndexName. The message names the JSON token and the Java type, or says
"Unexpected field type", "Unexpected value type in payload",
"Start of structure or map found where not expected" or "UnknownError"
by where the value sits. The first bad member in body order is reported.
A JSON null counts as absent and an unknown member is ignored.

Floci now checks every DynamoDB JSON request against the vendored input
shapes. A number in an ExclusiveStartKey S value is one of these errors on
AWS, so that test now expects the SerializationException.

* fix(dynamodb): keep provenance out of the shapes freshness check

The shapes file now carries its provenance in a _source block, like the
other vendored AWS data, and --check compares it without that block. A
run against --botocore-data or a local checkout no longer reports the
file as stale when only the botocore label differs.
2026-09-29 11:18:40 -04:00