Commit Graph
163 Commits
Author SHA1 Message Date
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
TATSUNO “Taz” Yasuhiro 385ffcfdd0 feat(lambdaweb): set the WebFunctionAuthType condition keys on endpoint routes (#6893) 2026-10-29 00:54: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
Attila Kis 84442d83ce fix(build): build the amd64 native binary on Ubuntu 24.04 so it runs on x86-64-v2 CPUs (#6644)
On Ubuntu 26.04, which ubuntu-latest is moving to, the amd64 native
binary asks glibc for x86-64-v3 whatever -march says, so it does not
start on x86-64-v2 CPUs. Pin the amd64 native jobs to ubuntu-24.04, as
the arm64 jobs are, and check the ISA level after the nightly and
release builds, so CI catches it next time.
2026-10-26 23:02:10 -05: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
Hector Ventura e8ef0b147e chore(ci): name the Java package in one place for tools and CI (#6596)
The docs tools, the partition gate and their registries each spelled
out src/main/java/io/github/hectorvent/floci/. tools/java_sources.py
now holds the package path, the tools import it, and services.yaml and
service_matrix.yaml list sources relative to the package root, so the
move to io.floci.aws changes one line here. A registry entry still in
the repo-relative form fails with a message naming the new form.
prefetch-images.sh finds TestImages.java by name.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-26 23:06:11 -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
Hector Ventura 45d4c28e33 chore(ci): start Checkstyle suppression paths below the package root (#6584) 2026-10-26 19:53:46 -04: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
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
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
Hector Ventura 9dcb1b65ae feat(core): translate LocalStack variables in Java instead of the entrypoint (#5851)
* feat(core): translate LocalStack variables in Java instead of the entrypoint

The LocalStack-to-Floci variable mapping (PERSISTENCE, EDGE_PORT,
LOCALSTACK_HOST, GATEWAY_LISTEN, LS_LOG/DEBUG, the Lambda and Docker
variables, the DNS suffixes, USE_SSL, CUSTOM_SSL_CERT_PATH) lived in
docker/localstack-parity.sh, sourced by the image's entrypoint. A JVM run or
a native binary on the host never saw it.

LocalStackParity now computes the same mapping and LocalStackParityConfigSource
serves it at ordinal 301, just above environment variables, as the exported
variables did. A key is produced only when its Floci variable is unset, so an
explicit Floci setting still wins; the DNS suffixes are still appended to any
configured ones; LOCALSTACK_PARITY=false still turns it all off.
TlsConfigSource, which reads its properties before the configuration exists,
consults the mapping too.

The script, its shell test and every Dockerfile copy of it are removed; the
test cases move to LocalStackParityTest.

Refs #5767

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

* fix(core): keep TLS backends on loopback, keep configured DNS suffixes, and pass LocalStack settings to hooks

Review follow-ups for the Java LocalStack translation:

- Dockerfile.compat took docker-entrypoint.sh from the published native
  image, which still sourced the removed localstack-parity.sh, so the compat
  image never became healthy. It now copies the entrypoint from the build
  context, as it already does healthcheck.sh.
- At ordinal 301 the parity source outranked TlsConfigSource's loopback pin
  (300): with TLS on and GATEWAY_LISTEN set, the backends bound the gateway
  address while the proxy dialled 127.0.0.1. It now sits at 299, below
  environment variables and the TLS source and above .env and
  config/application.yml, where the exported variables used to be.
- floci.dns.extra-suffixes is no longer a translated property, which on JVM
  and native runs replaced suffixes set in application.yml. The five
  readers append LocalStack's and Floci's suffixes to the configured list
  through LocalStackParity.withDnsSuffixes instead.
- GATEWAY_LISTEN=0.0.0.0:4566 (or [::]:4566, or a list) gives the host to
  quarkus.http.host and the port to floci.port when EDGE_PORT is unset,
  instead of a host Floci rejects as malformed.
- Init hooks get the translation as FLOCI_*/QUARKUS_* variables again, as
  they did when the entrypoint exported them.

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

* fix(core): parse LOCALSTACK_HOST and GATEWAY_LISTEN the way LocalStack does

Both take LocalStack's host-and-port forms (HostAndPort.parse in its
config.py): host:port, host, :port, [v6]:port and [v6].

- LOCALSTACK_HOST is <hostname>:<port>, localhost.localstack.cloud:4566 by
  default. Its port went into floci.hostname, so the base URL came out as
  http://localhost.localstack.cloud:4566:4566. floci.hostname now gets the
  host alone.
- GATEWAY_LISTEN=:4566, LocalStack's default host on 4566, did not match
  and stopped startup with "Refusing to listen on malformed host". An empty
  host now keeps Floci's own bind address and takes just the port.

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

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-17 17:37:15 -04:00
Andre Kurait 720f95bebe fix(ci): retain Docker fixture sockets and bound result uploads (#5877)
Signed-off-by: Andre Kurait <akurait@amazon.com>
2026-10-17 14:09:42 -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
Hector Ventura 1ec4f957af ci: drop the em-dashes from the release-cut concurrency comment (#5704)
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-14 23:36:17 -05:00
Hector Ventura cb58b12b41 ci: cut a release at 00:30 Central on the 15th and last day of the month (#5698)
Schedule release-cut.yml at 00:30 on the 15th and on days 28-31 with timezone America/Chicago, so GitHub handles DST. A gate job passes only on the 15th or on the actual last day of the month; manual dispatch is unchanged. The release-cut concurrency group moves to the release job so skipped scheduled runs never hold or replace a pending cut.

README.md, CONTRIBUTING.md and the docs/ pages now describe the new train: stable releases on the 15th and the last day of each month, cut automatically at 00:30 US Central time.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-14 23:29:36 -05:00
dependabot[bot] ad68ae3248 chore(deps): bump the actions-minor-patch group with 3 updates (#5682)
Bumps the actions-minor-patch group with 3 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact), [actions/download-artifact](https://github.com/actions/download-artifact) and [actions/setup-node](https://github.com/actions/setup-node).


Updates `actions/upload-artifact` from 7.0.1 to 7.0.2
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/043fb46d1a93c77aae656e7c1c64a875d1fc6a0a...cf430e030ddbb5b0abf93d22962f4752f3646cd9)

Updates `actions/download-artifact` from 8.0.1 to 8.0.2
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c...9000827ccba6bdab643e8b6fd33ac0654aef8333)

Updates `actions/setup-node` from 7.0.0 to 7.1.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/820762786026740c76f36085b0efc47a31fe5020...949feb2413d6458794dcd2491c4babbbce0c15c1)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-minor-patch
- dependency-name: actions/download-artifact
  dependency-version: 8.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-minor-patch
- dependency-name: actions/setup-node
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-14 18:31:52 -05:00
Hector Ventura d3999ad416 chore(compat): run the partition nightly in GovCloud and EUSC too (#5616)
The partition compatibility nightly ran the Java SDK suite in cn-north-1
only. GovCloud (IAM signs us-gov-west-1, no CloudFront) and EUSC (no
global endpoints) take their own code paths and had no end-to-end check.
The job is now a matrix of cn-north-1, us-gov-west-1 and eusc-de-east-1;
a dispatch that names a region runs that region alone.

Measured locally on main 367ae0b2d with a JVM image: a us-east-1 control
run and one run per new region, 2461 tests each. Beyond the control
run's one failure, GovCloud showed one and EUSC four, all in tests that
assumed the commercial partition, so they are fixed here and both new
allowlists start empty:

- WafV2Test.cloudfrontScopeIsolated created a CLOUDFRONT-scope IP set,
  which Floci refuses where CloudFront does not exist. It now runs only
  in the partitions that have CloudFront.
- S3Test built its LocationConstraint through the SDK enum, which has no
  value for eusc-de-east-1 and is then sent as the literal "null". It
  passes the region id as a string.

The workflow checks the suite out at the commit the nightly image was
built from, so the new legs first run with these fixes on the nightly
after this lands.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-13 23:58:24 -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 379086f818 ci: let a running main CI run finish instead of cancelling it (#5396)
* ci: let a running main CI run finish instead of cancelling it

A CI run takes about 18 minutes and merges often land closer together
than that, so cancel-in-progress on refs/heads/main stopped runs partway
through: from 2026-10-05 to 2026-10-09, 77 of 138 CI runs on main were
cancelled, leaving most main commits without a result and a break
pointing at the wrong commit.

Cancel only on pull requests. On main the concurrency group still holds
one pending run that a newer merge replaces before it starts, so a burst
of merges is tested once, at its newest commit, and no run stops halfway.

Refs #5085

* ci: stop cancelling main runs in the other workflows that run on pushes to main

Checkstyle, Docs in sync and Partition Literals run on pull requests and
on pushes to main, so they get the same rule as ci.yml: cancel a superseded
run only on pull requests. The docs deploy never runs on pull requests, so
it stops cancelling altogether.

The remaining workflows named in #5085 (compatibility, compat-partitions,
iam-namespace-drift, nightly) have no push trigger, so a merge to main
never cancels them and they are left as they are.

Refs #5085

* ci: state the measured cancellation figures in the ci.yml comment

The comment quoted one-day figures (30 of 47 runs, a 13 minute median gap, 546 runner-minutes) that the run history does not reproduce. Replace them with the count measured from it: 77 of 138 CI runs on main cancelled from 2026-10-05 to 2026-10-09.

Refs #5085

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

---------

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-11 00:06:59 -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
Niels Kootstra 546d7e894e ci: abort hung tests with a thread dump and time out a stuck surefire fork (#4940)
* ci: abort hung tests with a thread dump and time out a stuck surefire fork

A hung test ran until the 20-minute job limit killed the shard, leaving no surefire report that named it.

Give every test and lifecycle method a 2-minute JUnit default with a thread dump, set through surefire configurationParameters so quarkus-junit's own junit-platform.properties (its profile-aware class orderer) is not shadowed. In CI, -Dsurefire.timeout=900 kills a fork whose test ignores the interrupt (deadlock, blocking I/O) before the job limit; shards' test steps take 10-11 minutes. SageMakerDockerIntegrationTest waits up to 150 s for real containers, so it gets a 3-minute timeout.

* test: give two Docker-backed tests a timeout that covers their own waits

EksRegistryHostsDockerIntegrationTest (three 60 s cluster-ready waits plus 105 s of polling) and TimestreamInfluxDbDockerIntegrationTest (three 180 s status waits) can legitimately run past the new 2-minute default.

* ci: size the fork timeout to the slowest shard and cover the remaining long tests

surefire.timeout caps a whole shard, and shard 2 already spends 903 s running tests, so 900 s would kill a passing run. Raise it to 1200 s and the job limit to 25 minutes so surefire still reports first. Give the Timestream test headroom beyond its 540 s of status waits, and the opt-in GPU SageMaker test a timeout covering its 300 s poll.
2026-10-10 09:22:05 -05:00
dependabot[bot] 2444c52811 build(deps): bump graalvm/setup-graalvm (#5336)
Bumps the actions-minor-patch group with 1 update: [graalvm/setup-graalvm](https://github.com/graalvm/setup-graalvm).


Updates `graalvm/setup-graalvm` from 1.6.6 to 1.6.7
- [Release notes](https://github.com/graalvm/setup-graalvm/releases)
- [Commits](https://github.com/graalvm/setup-graalvm/compare/0426e2e191540e8514dff98dc52a5f5146a2a276...27b360dbb857524eaf0b4c4cef364d38e5b4f173)

---
updated-dependencies:
- dependency-name: graalvm/setup-graalvm
  dependency-version: 1.6.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-08 23:14:18 -05:00
dependabot[bot] 52985a2f19 build(deps): bump the actions-minor-patch group with 8 updates (#4867)
Bumps the actions-minor-patch group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [graalvm/setup-graalvm](https://github.com/graalvm/setup-graalvm) | `1.6.4` | `1.6.6` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `7.0.0` | `7.0.1` |
| [actions/download-artifact](https://github.com/actions/download-artifact) | `8.0.0` | `8.0.1` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `4.3.0` | `4.4.1` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `7.3.0` | `7.4.0` |
| [actions/setup-java](https://github.com/actions/setup-java) | `6.0.0` | `6.0.1` |
| [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) | `6.2.3` | `6.3.0` |
| [aws-actions/amazon-ecr-login](https://github.com/aws-actions/amazon-ecr-login) | `2.0.1` | `2.1.7` |


Updates `graalvm/setup-graalvm` from 1.6.4 to 1.6.6
- [Release notes](https://github.com/graalvm/setup-graalvm/releases)
- [Commits](https://github.com/graalvm/setup-graalvm/compare/5298d94fb55a4f185c602eeac5de1b553882abe2...0426e2e191540e8514dff98dc52a5f5146a2a276)

Updates `actions/upload-artifact` from 7.0.0 to 7.0.1
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v7...043fb46d1a93c77aae656e7c1c64a875d1fc6a0a)

Updates `actions/download-artifact` from 8.0.0 to 8.0.1
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v8...3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c)

Updates `docker/setup-buildx-action` from 4.3.0 to 4.4.1
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/37fe631027851001ddb9b187196cc803df7f5f0e...f87e5991a6d7451dcb8d9637bfbc97413f497069)

Updates `docker/build-push-action` from 7.3.0 to 7.4.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/53b7df96c91f9c12dcc8a07bcb9ccacbed38856a...c3c9e263c25d99ce0380d002d59b67737d91b0dc)

Updates `actions/setup-java` from 6.0.0 to 6.0.1
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/dd06d9cba3e5552c54d9f8ea23572deb30010f7c...de7274f081f381c8f8158605e0321c36c376e2e6)

Updates `aws-actions/configure-aws-credentials` from 6.2.3 to 6.3.0
- [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases)
- [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws-actions/configure-aws-credentials/compare/e6de054238d6b7531b4efff3b6587d9aade6a06c...e1253824e5c10ff9df46874f81ed3ec929e19cfd)

Updates `aws-actions/amazon-ecr-login` from 2.0.1 to 2.1.7
- [Release notes](https://github.com/aws-actions/amazon-ecr-login/releases)
- [Changelog](https://github.com/aws-actions/amazon-ecr-login/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws-actions/amazon-ecr-login/compare/062b18b96a7aff071d4dc91bc00c4c1a7945b076...03f1aad4c6c7ffd436567f42f9384779290529bd)

---
updated-dependencies:
- dependency-name: graalvm/setup-graalvm
  dependency-version: 1.6.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-minor-patch
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-minor-patch
- dependency-name: actions/download-artifact
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-minor-patch
- dependency-name: docker/setup-buildx-action
  dependency-version: 4.4.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
- dependency-name: docker/build-push-action
  dependency-version: 7.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
- dependency-name: actions/setup-java
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-minor-patch
- dependency-name: aws-actions/configure-aws-credentials
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
- dependency-name: aws-actions/amazon-ecr-login
  dependency-version: 2.1.7
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-08 22:18:24 -05:00
David Phillips da6a7dd085 build: enforce Java import order with Checkstyle (#5326)
* style: align Java imports with project guidelines

* build: enforce consistent Java import order

* style: follow IntelliJ import order
2026-10-08 20:50:53 -04:00
Vũ Thế Huy dc41417e79 fix(ec2): avoid Docker waits on the first CreateVpc (#5179)
* fix: avoid Docker waits on first EC2 CreateVpc

* fix(ec2): reseed default VPC resources after a state reset

Ec2Service now implements Resettable: clear() forgets the seeded account
scopes and seeds the default region again, so a reset followed by
DescribeVpcs still returns the default VPC and subnets.

Also run Ec2CreateVpcLatencyTest in the non-mock EC2 compatibility job,
where VPC planning is active and a regression of the first-call Docker
wait would be caught.

* refactor(ec2): share one default-region seeding method between startup and reset

Ec2Startup and Ec2Service.clear() repeated the same enabled check and seed call. Both now go through Ec2Service.seedDefaultRegionIfEnabled() so they cannot drift apart. Also reorder the Resettable import.
2026-10-08 19:25:31 -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
Hector Ventura d1fc2654a9 ci: cap open PRs at 4 with drafts and 2 ready for review (#5283)
Describe the new open-PR limits (floci-loft decision 0021) in CONTRIBUTING.md
and the PR template, and grant the caller contents: write, which the shared
workflow needs to convert a PR back to a draft.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-07 17:49:31 -05:00
Hector Ventura 6d417e522f fix(ci): pass VERSION to the nightly native image build (#5165)
The native nightly step built docker/Dockerfile.native-package without the VERSION build argument, so FLOCI_VERSION fell back to latest and a nightly reported itself as latest on the health endpoint. The compat step and release.yml already pass it.
2026-10-05 23:56:39 -05:00
Hector Ventura 8d056e9456 ci: limit contributors to 2 open pull requests (#4864)
Call the shared floci-io/.github pr-limit workflow on opened, reopened and
ready_for_review, and on closed and converted_to_draft to clear stale
labels. Runs for the same pull request queue rather than cancel, and manual runs use their own concurrency group. Contributors
keep at most 2 open, non-draft pull requests: the 3rd and 4th get the
over-pr-limit label and a reminder, and from 2026-10-08 the 5th and later
are closed automatically. Bots and maintainers are exempt.

This replaces the advisory bot that labelled authors with more than 5 open
pull requests: the limit is now 2, drafts no longer count, and the logic and
wording live in one shared workflow.

CONTRIBUTING.md and the pull request template describe the policy.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-10-01 17:44:05 -05:00
Hector Ventura ea06896984 test(compat): run the Java SDK suite nightly in cn-north-1 against an allowlist of known failures (#4790)
* test(compat): run the Java SDK suite nightly in cn-north-1 against an allowlist of known failures

Part of #4272 (P11). The partition work is covered by unit and integration
tests over all eight partitions, but nothing ran a real SDK whose own
partition logic (arn:aws-cn: ARNs, China signing scopes, the LocationConstraint
S3 CreateBucket sends) has to round-trip.

The Partition Compatibility workflow runs after each Nightly against the image
it published, or on dispatch with an image and region: Floci starts with
FLOCI_DEFAULT_REGION=cn-north-1 and sdk-test-java runs with AWS_REGION set,
which TestFixtures now reads (default us-east-1, so the per-PR legs are
unchanged). It runs once a night rather than per PR, to keep the shared runner
pools free.

compat-allowlist-check.py compares the JUnit results with
compat-partition-allowlist-<region>.txt and fails on a failure the list does
not name, on an entry that no longer fails, or on missing results, so the list
only shrinks. The cn-north-1 list holds the 112 failures measured locally on
main plus #4787: 96 tests that pin commercial ARNs, regions or zones, 13 that
exercise commercial-only behaviour, and 3 still to explain.

* test(compat): pin the nightly China run to its image's commit and catch an aborted suite

Greptile on #4790: the workflow checked out the Nightly run's head_sha but
pulled the mutable floci/floci:nightly tag, so the image and the tests could
come from different commits; it now pulls the image first and checks out the
commit in its org.opencontainers.image.revision label. And Maven exits
non-zero for allowlisted failures too, so a suite that stopped partway could
pass; the checker now takes --test-sources and requires a report for every
test class in that tree.

The cn-north-1 allowlist groups its entries by the verified cause: the RDS and
SSO portal entries are Floci bugs (an RdsService ownership check against the
literal partition "aws", and an arn:aws: seeded Identity Center instance),
and SsoAdminAccountAssignmentTest#createInstanceQuotaUsesAwsSdk passes alone
and fails only after OrganizationsTest leaves an organization behind.
2026-10-01 00:33:54 -04:00
TATSUNO “Taz” Yasuhiro 76adb9a97e chore(style): Enforce NoVar rule on new files, existing bad files later (#4362)
* chore: ban var with Checkstyle in CI

Checkstyle runs tools/checkstyle/checkstyle.xml over src and compatibility-tests/sdk-test-java in its own workflow. It stays out of the Maven lifecycle because a full run takes about 30 seconds.

Code that already uses var is listed in tools/checkstyle/suppressions.xml, one entry per service and one per compatibility-tests file, so each can be cleaned and removed in its own PR.

* docs: point AGENTS.md and CONTRIBUTING.md at Checkstyle

* chore: load Checkstyle suppressions from checkstyle.xml

IDE plugins such as CheckStyle-IDEA set config_loc to the config directory and now apply the same suppressions as CI. Maven sets config_loc through propertyExpansion.

* chore: exclude files, not directories, from the var check

New files in services that still use var are now checked too.

* chore: exclude the renamed NativeDynamoDbJsonHandler files from the var check
2026-09-30 21:53:14 -05:00
Hector Ventura 8ff1eae121 ci: run the per-PR hygiene checks in one job and skip drafts without a gate job (#4703)
* ci: run the per-PR hygiene checks in one job

The signed commits, AI attribution, Conventional Commits, em-dash and PR
template checks were five workflows with one job each, so every push to a
pull request started five runners for about ten seconds of work apiece. At
busy times those jobs queued for up to twenty minutes behind the CI shards
and the compatibility suites under the account's concurrent-job limit.

They now run as steps of a single "PR hygiene" job. Each step keeps the old
check's name, script and annotations, and runs under !cancelled() so one
failure does not hide the others. The signature check also runs on
"edited" now: with one job, an edit-triggered run replaces the whole
result, and skipping signatures there would turn an unsigned PR green. A
per-PR concurrency group cancels superseded runs.

The path-filtered checks (docs tables, partition literals, changelog guard)
keep their own workflows.

* ci: skip draft PRs with a job condition instead of a gate job

CI and Compatibility Tests reached the draft rule through a reusable
workflow that started its own job on every run. That job did about three
seconds of work, but every other job in the run needed it, so under the
account's concurrent-job limit its queue wait sat at the head of the
critical path: on recent PR runs a median of about 35 seconds, and nine to
thirteen minutes at the tail, before a shard or native build could even be
queued.

The same condition now sits on the root jobs as a job-level if:, which
GitHub evaluates without a runner. Drafts, closed PRs and edited events
still skip the suites and pushes to main still run; the native suites
follow build-native. CI summary keeps always() so a failed shard still
reaches the partition check and report, and uses the same condition so it
does not run on a draft. pr-draft-gate.yml has no callers left and is
removed.
2026-09-30 09:26:42 -04: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
Kenshin Okinaka ac706264a3 ci: pull the Firelens router from Docker Hub and correct why (#4622)
* ci: pull the Firelens router from Docker Hub and correct why

A post-merge run showed the ECR Public quota is per runner IP and per
byte, not specific to the docker/library mirror: the Firelens router
failed with "toomanyrequests: Data limit exceeded" right after the same
job had pulled two Lambda runtimes from ECR Public. The router is the same
image AWS publishes on Docker Hub (same manifest, config and layer digests
on both architectures), so the Firelens test now names it there, through
a TestImages pin the prefetch reads. The Lambda runtimes stay on ECR
Public: their Docker Hub copies lag by more than a year and some tags are
missing. The TestImages Javadoc now gives the corrected reason.

* ci: annotate a stale, unreadable or misrouted prefetch

The prefetch already writes a line when a key names a class that no longer
exists or when a TestImages pin cannot be read, but only into a log nobody
reads unless a shard fails. The results step now turns those lines into
workflow warning annotations, and adds one more: an image prefetched from
ECR Public that is not a Lambda runtime, since everything else the tests
start is carried by Docker Hub and belongs there. The prefetch stays
best-effort, so these are annotations, not failures.

* ci: warn on a misrouted prefetch whether or not its pull succeeded

The routing warning matched only "prefetched" lines, so an image on the
wrong registry whose pull failed on the quota, the very case the warning
is for, produced only the raw failure line. It now matches
"prefetch failed" lines too.
2026-09-28 23:30:24 -05:00
Priamo Germosen 26146a3f94 feat(iam): expand wildcard service grants against a vendored namespace catalog (#4544)
GetServiceLastAccessedDetails reports the services an entity can reach, but
a grant that names no namespace could not be expanded: "Action": "*", a
globbed prefix such as s3*, and any NotAction all denote a set no policy
document spells out. A user holding only AdministratorAccess came back with
an empty report. Closes #4487.

The list of namespaces is vendored in aws/iam-service-namespaces.json and
generated by tools/aws/regen_service_namespaces.py from AWS's Service
Reference Information index, whose per-service "service" field is the IAM
namespace itself. botocore is deliberately not the source, even though every
other vendored file here comes from it: a namespace is not any botocore
field, since CloudWatch's endpointPrefix is monitoring and its serviceId is
CloudWatch against an IAM namespace of cloudwatch. A rule over botocore
metadata is wrong for some service, and a wrong namespace is worse than a
missing one because it names something IAM does not have.

That index is a live endpoint rather than a pinned dependency, so unlike
regen_partitions.py a fresh generation is not byte-identical and byte
equality is the wrong gate. What must be guaranteed is that nothing in the
file is invented, which is checked directly: make iam-namespaces-check
validates the file's shape offline, and make iam-namespaces-verify checks
online that every namespace in it still exists upstream, failing on one that
does not. Services AWS has added since the last sync are reported without
failing, since the file being behind makes the report incomplete rather than
wrong.

A namespace a policy names outright is kept whether or not the catalog knows
it, so a catalog trailing an AWS launch still reports an explicitly named
service; only wildcard expansion depends on it being current. A globbed
prefix now expands to the namespaces it matches rather than being treated as
every service and then dropped.
2026-09-28 22:02:13 -05:00
Kenshin Okinaka 903efdf58e ci: key the ECR Public prefetch on the classes that start each image (#4600)
* ci: key the ECR Public prefetch on the classes that start each image

prefetch-images.sh keyed the four Lambda runtimes on any /lambda/ path in
shard.txt, and partition.sh spreads the Lambda tests over every shard, so
each of the four shards pulled all four runtimes (674 MiB) plus the Firelens
router (105 MiB) from ECR Public anonymously before its tests started. ECR
Public counts that transfer per runner IP, and once the quota is spent every
later anonymous pull fails with "toomanyrequests: Data limit exceeded",
which is how a 2 MiB busybox pull took a shard down on main twice on
2026-09-27.

Measured from a full four-shard run by pairing each ImageCacheService
"Pulling image" / "Image already present locally" line with the class that
logged it: nodejs:20 is reached from every shard, python:3.14 and
python:3.12 each have one Docker-backed class, nodejs:18 was pulled by every
shard and started by none, and the Firelens router has one class. Each entry
now keys on those classes, which cuts a shard's ECR Public prefetch from
about 800 MiB to between 120 and 330 MiB. A class the list misses pulls
inline, as before.

The tests also used three busybox tags (latest, 1.36, stable) for the same
2 MiB image. They now share one pin, TestImages.BUSYBOX (busybox:stable,
the tag application.yml and the compatibility suites already use), and the
prefetch script reads that pin from the class the way it reads the sidecar
pins from application.yml, so one prefetch serves every test and the two
cannot drift apart. The one test that pulls the other architecture keeps a
tag of its own: a foreign-platform pull replaces what the local tag points
at on a daemon without the containerd image store, and the docker build in
the VolumesFrom test resolves its base from that local tag.

Each key that names a class is checked against src/test/java, and a stale
name is written to the log, so a rename cannot silently turn a prefetch off.

The prefetch also set off ECR Public's per-second limit on its own: every
pull started in the background at once, so the shard's ECR Public pulls
landed in the same second. They are now queued and pulled one after another,
a second apart, small images first because core/common/docker sorts near
the top of every shard, while the Docker Hub pulls stay parallel. And each pull now
writes one result line to prefetch-images.log, printed by a step after the
tests, so a failed or still-running prefetch can be told apart from a test
pulling the image itself.

* ci: pull the Docker library test images from Docker Hub

The first run of the prefetch results log showed where the quota actually
runs out. On the two shards that failed, the very first pull of the job,
docker/library/busybox or docker/library/python from the ECR Public mirror,
came back with "toomanyrequests: Data limit exceeded" before the job had
transferred anything, so the shard's own volume was not what spent it. The
same runner then pulled busybox from Docker Hub seven seconds later and a
116 MiB lambda/ image from ECR Public half a minute after that, both fine.
The mirror at public.ecr.aws/docker/library has an anonymous quota of its
own, shared by runner IP and often already spent when a job starts, while
GitHub-hosted runners pull Docker Hub without a limit: the fourteen Docker
Hub images each shard prefetches have never failed.

TestImages now names busybox and python-alpine the Docker Hub way, with the
reason in its Javadoc, and the prefetch pulls them with the other Docker Hub
images instead of queuing them behind the ECR Public runtimes. The three
python-alpine literals share one pin. The pin is read with a regex that
tolerates spacing, and a pin the script cannot read writes a "prefetch
skipped" line instead of silently pulling nothing. An image two entries
name is pulled once. The results step also lists any docker pull still
running, so an early exit does not make an unfinished pull look like one
that never ran.

* test(compat): pull the SageMaker and CodeBuild images from Docker Hub

The SageMaker compatibility tests (Java and Python) and the CodeBuild one
named busybox through the public.ecr.aws/docker/library mirror, the same
namespace whose anonymous quota fails the Build and Test shards, and the
native Python jobs of another PR failed on it the same way. They now name
the image the Docker Hub way. The CodeBuild digest is the same on both
registries, so that reference only changes its host.
2026-09-28 21:17:51 -04:00
TATSUNO “Taz” Yasuhiro dce7983b15 chore(ci): native CI now fails when the native image breaks a Docker call (#4514)
* chore(ecs): read the task metadata stats from inside a container

No compatibility test reached Docker's stats API, so the native image could lose the docker-java stats models without any test failing.

* chore(compat): reach the Docker commands no native test used

Recording the Docker API calls of the Java suite against the native
image showed commands no test reached. Cover the ones a CI run can reach:

- ECS Exec resizes the terminal of an interactive session
- a Lambda function with 33 MB of unzipped code is served from a code
  volume, which lists the volumes
- Timestream for InfluxDB reboots an instance

* chore(ci): run container-backed EC2 against the native image

The native suites run EC2 in mock mode, so no native test reached the
Docker calls only container-backed EC2 makes: building the security group
helper image, committing an instance as an AMI and removing that image,
and the VPC networks. A new job starts the native image with
container-backed EC2, once with security group enforcement and once
without, since an enforced instance lives in its helper's network rather
than on a VPC network. It ends by killing and restarting Floci, which must
remove the VPC network the tests leave behind.

* chore(compat): trust Floci's test certificate in the ECS Exec session client

The native CI job runs Floci with TLS, which makes the ExecuteCommand stream URL wss:// on Floci's test CA.

* chore(ci): launch arm64 EC2 guests in the container-backed EC2 job

The job runs on an arm64 runner, and the x86_64 AMI starts its guest as linux/amd64. The VPC network instances never reached running there. Maven also logs its test counts now, so a skipped phase shows in the job log.

* chore(compat): say why the new tests' cleanup failures are ignored

* chore(ci): stop waiting for Floci once it reports unhealthy in the EC2 job

The wait kept polling for the full minute after an unhealthy status, unlike the existing wait step in the same workflow.
2026-09-28 21:04:01 -04:00
Priamo Germosen 238e21770e ci(compat): skip test compilation in the native build (#4539)
-DskipTests only stops surefire; testCompile still ran and compiled all of src/test on both arches before the native image build. -Dmaven.test.skip=true skips test compilation as well.
2026-09-27 18:16:15 -05:00
Matheus Oliveira c357d37fa9 feat(release): sign published image attestations with keyless cosign (#3914)
Move signing into its own sign-images job that consumes push-native's
digest outputs, so a Fulcio or Rekor outage can no longer strand a
partially published release, and document the cosign verify invocation
for consumers.

Closes #2397

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-09-26 01:34:46 -05:00
Matheus André 288cc01268 ci: verify the source-derived shard class list against compiled test classes (#4245)
all-classes.txt is derived from src/test/java file names so shard.txt
exists before Compile. A test class whose name differed from its file
would drop out of both all-classes.txt and the shard union, and the
completeness check in CI summary would not notice. After Compile, derive
the list from target/test-classes as before and fail the shard if the
two disagree.
2026-09-26 01:19:58 -05:00
Priamo Germosen a3a06bb7b6 ci: raise the shard timeout from 15 to 20 minutes (#4437)
Measured on recent green runs, shards take 10m49s to 13m47s, so the
slowest had about a minute of margin under a 15 minute ceiling. Shard 1
timed out twice on an unrelated PR because of exactly that.

timeout-minutes is a kill switch for a hung job rather than a budget.
Actions bills the minutes a job actually uses, so raising the ceiling
costs nothing while runs stay the length they are, and it stops a slow
runner or a contended queue turning a passing suite into a red build.

This does not make anything faster, and it is not a substitute for the
work in #3963: it removes the failure mode while the suite sits where it
sits. Per shard that is about 1m15s compiling, 2.3 to 3.2 min building
one application per distinct test profile, and 7.2 to 8.2 min running
test classes, with the class time spread too flat to have a hot spot
left.

ci-summary keeps its 10 minute ceiling; it finishes in seconds.
2026-09-25 16:57:57 -05:00
Hector Ventura 0dd080a46f feat(core): partition foundation from botocore's published partition data (#4317)
P1 of the multi-partition initiative (#4272). tools/aws/regen_partitions.py
vendors botocore's partitions.json and endpoints.json (8 partitions, 46 regions,
the partition-wide endpoints with their signing regions) plus the CDK's opt-in
and S3 website rules into src/main/resources/aws/partitions.json, checked by
make aws-data-check. AwsPartition and AwsPartitions replace the hand-typed rules
behind AwsRegions; RequestContext carries the request's partition from its
SigV4 signing region; RegionResolver mints global ARNs in that partition and
buildArn routes a blank region there; floci.partitions.id pins the deployment's
partition behind a startup validator that refuses a contradiction with the
default region.

Behaviour a reviewer will see, all AWS-faithful: DescribeRegions follows the
request's partition and the opt-in model (17 commercial regions by default, all
34 with AllRegions=true, RegionName.N filters, endpoints on the partition's DNS
suffix); TLS SANs cover every published region; the EKS registry mirrors follow
the deployment partition's regions. The partition-literal baseline drops by two.

Part of #4272
2026-09-24 10:33:05 -04:00
Hector Ventura 0a601d54eb chore(tooling): gate partition literals in src/main against a per-file baseline (#4270)
P0 of the multi-partition plan. tools/partition/partition_literals.py inventories
the arn:aws: prefixes, amazonaws.com hosts, hosted-zone ids and hand-rolled
partition regexes in src/main/java per file against tools/partition/baseline.tsv.
A literal in a new file fails, growth in an existing file fails, and a drop fails
until the baseline is regenerated, so the remaining count only shrinks. Escapes
are a `// partition-literal: <reason>` comment or an allowlist.yaml entry.

Makefile targets (partition-check, partition-baseline, partition-audit,
partition-test), a python-only workflow, AGENTS.md and CONTRIBUTING.md
paragraphs, and the ResourceExplorer2 assertion now checks the partition against
the ARN's region instead of a literal arn:aws:.
2026-09-24 07:08:28 -04:00
Matheus André 375d83c0f4 fix(ci): add draft PR handling to CI workflows for compatibility and build tests (#4292)
Signed-off-by: Matheus André <matheusandr2@gmail.com>
2026-09-23 22:48:50 -05:00