Files
floci/tools/partition
Hector Ventura 2cccc73499 fix(core): build and recognise AWS hostnames in every partition (#4451)
* fix(core): build and recognise AWS hostnames in every partition

AwsEndpoints builds the AWS-shaped hosts Floci returns from the region's partition DNS suffix: execute-api, the S3 bucket, regional, dual-stack and website hosts, Cognito and EKS OIDC issuers, APS, Bedrock AgentCore, AppSync and EC2 public DNS names. partitions.json records the regions whose S3 endpoint publishes a dual-stack variant, so DualStackDomainName is only returned there. The S3 virtual-host fallback, the execute-api host filter, the ECR image URI and the CloudFront S3-origin parsers recognise every published suffix, longest first. The CloudFront domain suffix Cognito and API Gateway mint comes from floci.services.cloudfront.domain-suffix.

Two commercial bugs go with it: WebsiteURL uses the dash form (s3-website-<region>) in the nine regions that keep it and ends with a slash, and EMR's public DNS name is compute-1 only in us-east-1.

Also carries the follow-ups from the #4444 review: accessDeniedResponse gets its Javadoc back in IamEnforcementFilter, IamAuthValidator's imports are in order, and the IAM test helper's pair loop cannot read past the array.

Part of #4272

* fix(core): keep CloudTrail S3 hosts and CFN dual-stack attributes consistent with their region

CloudTrail built an S3 data event's Host, TLS host header and resource ARNs from the request scope, but the log writer emits its own deliveries from the flush thread, where the request region falls back to the deployment default: a cn-north-1 trail's self-delivery record said awsRegion cn-north-1 with a .amazonaws.com host and an arn:aws: ARN. buildS3Record now takes the event region emitS3DataEvent already resolves and derives all of them from it.

AWS::S3::Bucket drops a prior DualStackDomainName when an update lands in a region without an S3 dual-stack endpoint, since provision receives the previous attributes on update.

* test(resourceexplorer2): check a regionless ARN's partition against the resource's region

The cn-north-1 CloudTrail self-delivery test left its bucket behind in the shared emulator, and ResourceExplorer2's partition assertion then failed on arn:aws-cn:s3:::loop-logs-..., a correct ARN: S3 ARNs carry no region, so the expected partition fell back to aws. The assertion now takes a regionless ARN's partition from the Region the listing reports, and skips it when that is not a published region (global resources). The CloudTrail test deletes its trail, objects and bucket after each case through PartitionCleanup.
2026-09-26 10:15:18 -04:00
..