mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 06:00:46 -05:00
06ceec2aeefd02db5c6877228d1130cec0aec49f
506
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
06ceec2aee |
feat(redshift): materialize Glue external tables into PostgreSQL (#4996)
* feat(redshift): materialize Glue external tables into PostgreSQL Add ExternalTableMaterializer, which loads a Glue-backed external table into the cluster's PostgreSQL through a staging table, plus SpectrumCatalogResolver (Glue binding first, phase-one catalog as a fallback) and SpectrumGlueCsvAdapter (simple CSV tables keep the streaming path and need no floci-duck sidecar). The bound IAM role is enforced for every S3 object read, including Iceberg metadata, manifests and data files, before DuckDB sees them. SpectrumS3Reader now reads through the role as well, so a phase-one external schema needs a real role associated with the cluster. Spectrum semantics: hidden files and folder markers are ignored, a partitioned table without registered partitions returns no rows, and a sized string value wider than its column in bytes becomes NULL. Also: PartitionProjection accepts IN lists for injected columns and checks each table alias, S3Service hides the Spectrum scratch bucket from ListBuckets, S3TransferException becomes public, and FLOCI_SERVICES_REDSHIFT_SPECTRUM_MAX_ROWS is added. * fix(redshift): harden external table loads against review findings - A session outside a transaction waits for a slow load instead of failing after 30 seconds; only a session in a transaction keeps the timeout, since it can hold a PostgreSQL lock the Java lock cannot see. - A missing S3 bucket is reported as XX000, not as access denied. - A load failure goes to the log with its cause and returns a generic message, because the cause can carry DuckDB request text. - The partition fingerprint includes input format and SerDe, so a format change at the same location reloads the table. - A partition value wider than its sized string key becomes NULL, as a data column does, instead of failing the whole load. - The first load of an account removes scratch objects left by a JVM that died mid-load, keeping those younger than an hour. - Document why the phase-one reader enforces the role without the cluster association check. * fix(redshift): use a real IAM role in the Spectrum compat test The external schema now enforces its IAM role, so the compat test needs a role that exists, trusts redshift.amazonaws.com and is associated with the cluster. Create it through the IAM SDK client, pass it to CreateCluster and delete it in the cleanup. * fix(redshift): address review findings on the external table materializer - PartitionProjection: a table name must end at an identifier boundary, comma separated sources are checked like FROM and JOIN sources, an unqualified injected column is accepted when exactly one source declares it, and a constant may be wrapped in parentheses. - The partition fingerprint covers the whole descriptor (columns, formats, SerDe and parameters), and an Iceberg table is read on every query because its snapshot can change without any visible change to the Glue table. - A transactional load that keeps the committed columns keeps the schema signature, so a view that depends on the table can still be refilled. - Files under a hidden folder such as _temporary are ignored, not only hidden file names. - The scratch bucket is told apart from a user bucket of the same name by a tag: a user bucket is listed, never written to, and never swept. - Drop the SPECTRUM_MAX_ROWS row from the docs until routing makes the cap reachable. * fix(redshift): verify slow-load wait with timeout |
||
|
|
fde5170335 |
test(compat): take the partition and region from TestFixtures in the last 33 suites (#5052)
Third and last batch of the cn-north-1 allowlist burn-down (#4272). The 41 remaining entries all pinned commercial values: ARNs built as arn:aws:<svc>:us-east-1:..., arn:aws: prefix assertions, us-east-1 zones, hosts and filter strings, and clients or signers created for us-east-1 next to the cn-north-1 fixture clients. Among them, the RDS IAM-token tests signed their tokens for us-east-1, OrganizationsTest built its invited account's client for us-east-1, Route53Test associated VPCs as us-east-1 that live in the fixture region, and SesEventPublishingTest failed in setup on a us-east-1 event bus ARN. All 33 classes now derive those values from TestFixtures, so the allowlist is empty: any failure in the China nightly fails the run. |
||
|
|
7ff3363899 |
test(compat): run the Marketplace Entitlement and Agreement tests in every region Floci serves (#5050)
Since #5028 Floci serves Entitlement in us-east-1, cn-northwest-1 and eusc-de-east-1, and Agreement in us-east-1, the three ISO regions and eusc-de-east-1. The compat guards still skipped both tests outside us-east-1; they now take the same region sets, so a run in those regions exercises the wider support. |
||
|
|
3e81b24c9b |
chore(compat): bump the pinned AWS SDKs for the compatibility suites (#5037)
The SES v2 model release of 2026-09-29 moved ListEmailIdentities to POST /v2/email/list-identities and ListConfigurationSets to POST /v2/email/list-configuration-sets, each with a new Filter member. Floci now serves both bindings, so the suites can move to SDKs that send the new ones. Java moves 2.55.3 to 2.55.11 and Python 1.43.100 to 1.43.108, the current releases of each. |
||
|
|
ae3adfe992 |
fix(apigateway): validate and cache REST Lambda authorizers (#5002)
* fix: evaluate and cache REST Lambda authorizer policies * fix: share REST request context and complete parameter mappings * fix: prevent stale REST authorizer caching after stage flush * fix: use valid authorizer policies in REST import tests * chore: align API Gateway imports with repository style * fix(apigateway): isolate authorizer contracts and validate cached identities * chore(apigateway): align restored context code with style guide * chore: order API Gateway SDK test imports |
||
|
|
6deb0d4d2b |
test(compat): run the China-absent tests per partition instead of allowlisting them (#5027)
* test(compat): run the China-absent tests per partition instead of allowlisting them Third batch of the cn-north-1 allowlist burn-down (#4272): the 13 tests that exercised something AWS does not offer in China. Seven keep running there with the China shape: - S3Test: only the us-east-1 endpoint creates a bucket in another region, so elsewhere the location-constraint round trip names the client's own region. - StsTest: the SAML assertion's Recipient is the partition's console sign-on URL (the CDK region facts), signin.amazonaws.cn in China. - Ec2Tests: China names its interface endpoint services cn.com.amazonaws, so the S3 gateway and interface offerings are two services there. - IamTest: GetAccountSummary reports GlobalEndpointTokenVersion only in the commercial partition, the one with a global STS endpoint. Six skip where the service has no endpoint: the five Marketplace tests (the regions botocore publishes for each) and Lightsail (commercial only). The allowlist's China-absent section is gone, 13 entries, 73 to 60. * test(compat): derive VPC endpoint names from the DNS suffix and keep Marketplace guards to us-east-1 The ECR interface service is named under the partition's DNS suffix reversed in every China, EUSC and ISO region (eu.amazonaws, gov.ic.c2s, ...), not only in China, so describeVpcEndpointServices now takes that prefix from the SDK's partition metadata. S3 keeps the China-only split, the only regions where AWS lists it. Floci serves Marketplace Agreement and Entitlement only in us-east-1, so their guards no longer admit the other regions AWS runs them in; widening both is a separate change. |
||
|
|
290f952cb1 |
feat(iam): model signing certificates (#5024)
UploadSigningCertificate, ListSigningCertificates, UpdateSigningCertificate and DeleteSigningCertificate, stored per user with the documented quota of two and account-wide duplicate detection compared on the encoded form. The body is parsed on upload, because MalformedCertificate cannot be answered without reading it. Status accepts Active, Inactive and Expired: the API Reference gives all three as valid values even though the parameter's prose explains only the first two. UserName is optional on every operation and resolves from the access key that signed the request. A certificate blocks DeleteUser until it is removed, which AWS lists as a prerequisite, and follows the user across an UpdateUser rename rather than being stranded on a name that no longer exists. The credential report's cert_1 and cert_2 columns are backed by the store instead of always reporting FALSE, reporting N/A for the rotation date unless the certificate is Active, as the User Guide defines them. |
||
|
|
ae0a591bb1 |
feat(cognito): provision user pool users (#4805)
* feat(cognito): provision user pool users Add a CloudFormation provisioner for AWS::Cognito::UserPoolUser. Ref is the username Cognito reports (the sub in an email-as-username pool). Every property is createOnly: a changed custom-named user is refused as on AWS, any other change replaces the user, and each delete targets the pool the user was created in. * fix(cognito): refuse a RESEND user pool user that already exists * fix(cognito): keep the user's pool out of Fn::GetAtt * fix(cognito): keep only owed users in the pool record |
||
|
|
bdab4448d6 |
perf(kms): drop unused BouncyCastle curves from the native image (#4868)
* perf(kms): build the KMS curves directly so unused BouncyCastle curves leave the native image Any BouncyCastle named curve lookup reaches every curve the tables know, including the binary SecT curves. BcEcKeys now builds the five curves KMS uses from their own BouncyCastle classes and encodes keys itself, in the same DER layout as before. RsaKeyType builds the PSS signer's key parameters from the JDK key instead of going through BouncyCastle's key factories. * test(compat): cover the KMS key paths that call BouncyCastle directly secp256k1 signing, EC key import for every curve, and RSA PSS digest signing had no test in the suite that runs against the native image. * chore(kms): note where each curve generator comes from |
||
|
|
9e178d77a0 |
feat(wafv2): provision web ACL associations (#4804)
* feat(wafv2): provision web ACL associations WafV2CfnProvisioner now serves AWS::WAFv2::WebACLAssociation with Ref ResourceArn|WebACLArn, as measured on AWS. Any property change replaces the pair through ReplacementCleanup. Delete disassociates only while the resource still uses that ACL, so cleanup of an old pair keeps the new one. Rollback re-associates the restored pair. * test(wafv2): cover ResourceArn replacement and read stack outputs with XmlPath |
||
|
|
dfe2117fed |
test(compat): take the partition and region from TestFixtures in five more suites (#5025)
Second batch of the cn-north-1 allowlist burn-down (#4272). These tests pinned the commercial partition, so they failed against a China deployment for the test's own reasons, not Floci's: - AppSyncTest asserted the arn:aws:appsync: prefix on four ARNs. - Ec2DescribeSpotPriceHistoryTest filtered on us-east-1a and us-east-1b. - PipesTest built its role, SQS and Kinesis ARNs in arn:aws and us-east-1. - IamTest looked its user up by an arn:aws ARN; its AWS managed-policy prefix and the SimulatePrincipalPolicy source now follow the partition too. - CloudWatchLogsMetricFilterTest replaced the recorded @aws.region dimension with us-east-1, and MetricFilterQueryAssertions signed its Query request for us-east-1, so it read another region's metrics. All now derive the partition and region from TestFixtures. The allowlist drops 19 entries, from 73 to 54. |
||
|
|
9c49ecf255 |
feat(rds): restore DB instances and clusters to a point in time (#4963)
Serve RestoreDBInstanceToPointInTime and RestoreDBClusterToPointInTime, and report the restorable window: LatestRestorableTime on DescribeDBInstances, EarliestRestorableTime and LatestRestorableTime on DescribeDBClusters. Requests are checked as the API reference describes: exactly one of RestoreTime (RestoreToTime) and UseLatestRestorableTime, a time inside the window or InvalidRestoreFault, PointInTimeRestoreNotEnabled for an instance with backups off, and exactly one source. An instance source is named by identifier or DbiResourceId, a cluster source by identifier, ARN or DbClusterResourceId; automated backups ARNs answer DBInstanceAutomatedBackupNotFound since no automated backups are kept. Floci keeps no transaction log, so the target is seeded from a pg_dumpall of the source taken when the request arrives, as read replicas are. The restored data is the source's latest state for any time in the window, and LatestRestorableTime is the current time. Only PostgreSQL sources are accepted, as for CreateDBSnapshot. Closes #4952 |
||
|
|
823f8751de |
feat(lambda): store DurableConfig on functions (execution later) (#5007)
* feat(lambda): accept and echo DurableConfig on functions CreateFunction and UpdateFunctionConfiguration take DurableConfig, PublishVersion snapshots it, and every read echoes it. ExecutionTimeout is required on create, RetentionPeriodInDays defaults to 14, a durable function's Timeout defaults to min(ExecutionTimeout, 900) and its logging to JSON. Update merges the members, and a function created without DurableConfig cannot gain one. KMSKeyArn is validated against its pattern and stored, the key itself is not looked up. * chore(lambda): trim the DurableConfig tests to one case per rule * feat(lambda): durable functions log in JSON format only A durable function rejects LogFormat Text on create and update, and a LoggingConfig without LogFormat reads back as JSON. An empty KMSKeyArn means no key. * chore(lambda): let the logging helpers own the durable JSON rule validateLoggingConfig and applyLoggingConfig take the durable flag, so a durable function's default format and the Text rejection live in one place and a LoggingConfig without LogFormat keeps its log levels. applyDurableConfig sets the retention default and merges, and the test uses chainable helpers. * chore(lambda): say why the durable compat test ignores a failed cleanup |
||
|
|
ba944df922 |
fix(cloudformation): resolve change sets by ARN without stack name (#4885)
* fix(cloudformation): resolve change sets by ARN without stack name * test(cloudformation): verify change set ARN execution with SDK * test(cloudformation): wait for change set execution status * fix(cloudformation): tighten change set ARN validation tests |
||
|
|
fa30cd7834 |
test(compat): take the partition and region from TestFixtures in SES and SSO Admin tests (#5017)
* test(compat): take the partition and region from TestFixtures in SES and SSO Admin tests The cn-north-1 nightly allowlists 25 cases in SesTagResourceTest, SsoAdminAccountAssignmentTest and SesConfigurationSetEventDestinationTest that fail only because the tests pin commercial values: ARNs built as arn:aws:<svc>:us-east-1:..., the arn:aws: AWS-owned SSO application provider and managed policies, and a us-east-1 primaryRegion. Floci answers correctly in China. TestFixtures gains region(), partition() (from the SDK's region metadata) and arn()/globalArn() builders, and the three classes use them. The rejected-bus cases move from @CsvSource, which only takes constants, to a @MethodSource whose mismatched-region bus is another region of the fixture partition. The 25 entries leave the allowlist (98 to 73). Part of BL-020. * test(compat): keep the SES bus rejection cases running in a single-region partition Greptile on #5017: the method source threw when the fixture partition has no second region (aws-eusc and aws-iso-e list one), so the custom-bus and mismatched-account cases, which need no second region, never ran there. The other region is now optional: the two cases always run, and only the mismatched-region case is left out of a single-region partition. |
||
|
|
a18aa246d3 |
fix(eventbridge): preserve target role ARN configuration (#4946)
* fix(eventbridge): preserve target role ARN configuration * fix(eventbridge): handle stored targets without an ARN --------- Co-authored-by: Vamsi Akavarapu <16164447+vamsiak@users.noreply.github.com> |
||
|
|
d0c7c23f6b |
feat(iam): model server certificates (#4975)
Replace the ListServerCertificates stub with the server-certificate lifecycle: UploadServerCertificate, GetServerCertificate, UpdateServerCertificate, DeleteServerCertificate, ListServerCertificates and the tag operations. The uploaded material is really parsed, because two of the upload's modeled errors cannot be answered otherwise. CertificateBody, and every certificate in CertificateChain rather than only its first block, must be readable PEM or the upload is MalformedCertificate; the private key must match the certificate's public key or it is KeyPairMismatch. The match is a sign-then-verify check, so it holds for RSA and EC alike. All of it goes through core.common.Pem rather than a second copy of the parsing. Expiration is read from the certificate's own notAfter rather than stored separately, so it cannot drift from what it describes. ServerCertificateId uses AWS's ASCA prefix. The private key is stored and never returned: AWS marks privateKeyType sensitive and models it only on the upload, so neither reader echoes it back, and ListServerCertificates returns metadata only as AWS documents. Request shapes are enforced from the wire model: the 16384-character caps on the body and key, the much larger 2097152 cap on the chain, and the per-account quota of 20 that the User Guide's table publishes, counted under the same lock as the write. A rename that only changes case is allowed, excluding the certificate from its own duplicate check by id the way updateUser does. GetAccountSummary's ServerCertificates count is now backed by the store instead of a hardcoded zero. ResourceArnBuilder gains an iam case naming the certificate an operation targets, so a policy statement scoped to one certificate constrains it under enforcement. Every other IAM action still resolves to *, which is long-standing behaviour rather than something this adds; documented in docs/services/iam.md and tracked in #4979. DeleteServerCertificate does not raise the in-use DeleteConflict AWS returns when a load balancer still references the certificate. Floci cannot determine that yet, because ELB Classic and CloudFront store certificate identifiers without resolving them against IAM. Documented, and tracked in #4875. |
||
|
|
543f01618f |
fix(ecr): support image scanning configuration updates (#4928)
* fix(ecr): support image scanning configuration updates * fix(ecr): validate scanning configuration booleans * fix(ecr): accept null scan-on-push values * docs(ecr): list the image scanning configuration actions Add PutImageScanningConfiguration and BatchGetRepositoryScanningConfiguration to the Supported Actions table. The table is not generated, so the docs check does not catch a missing row. |
||
|
|
ef9ed50742 |
feat(ses): apply the ListContacts filter (#4981)
* feat(ses): apply the ListContacts filter ListContacts now honours Filter.FilteredStatus and Filter.TopicFilter the way SES v2 matches them, with the validation messages and precedence SES answers. The filter is applied before the page is cut, so filtered pages are exact, and a token stays a position in the list, as on SES, rather than being bound to the filter. * test(ses): name the filter unit test SesContactFilterServiceTest |
||
|
|
4e842a85aa |
chore(style): replace var in files no open PR touches (#4789)
* chore(style): replace var with explicit types in src/main Drop the NoVar suppressions of the src/main files that no open PR touches. * chore(style): replace var with explicit types in src/test Drop the NoVar suppressions of the src/test files that no open PR touches. * chore(style): replace var with explicit types in sdk-test-java Drop the NoVar suppressions of the compatibility test files that no open PR touches. |
||
|
|
bb3dd2de92 |
feat(ses): paginate the contact, dedicated IP pool, suppressed destination and receipt rule set lists (#4877)
* feat(ses): paginate the contact, dedicated IP pool, suppressed destination and receipt rule set lists Page ListContactLists, ListContacts, ListDedicatedIpPools, GetDedicatedIps, ListSuppressedDestinations and v1 ListReceiptRuleSets with the probed bounds and messages. ListContacts serves 50 by default and receipt rule sets 100, the figure the model documents; the lists whose default could not be measured serve up to 1000. Where SES's own order is not stable Floci keeps the order its unpaged lists already had. A suppressed-destination token is bound to the reason filter and tenant it was taken with, as on SES. * test(ses): isolate the contact paging compat test and cover v1 receipt rule set paging on the wire The contact paging compatibility test cleared every contact list in the account before and after it ran; it now runs as its own account and removes only the list it created. A new integration test pages 101 receipt rule sets through the Query API, where the earlier coverage only reached the service. * docs(ses): note that SES lists receipt rule sets by name Floci pages ListReceiptRuleSets in the creation order its unpaged list already had; the paging paragraph now says SES lists them by name. |
||
|
|
5de9b0d6c1 |
fix(dynamodb): match the AWS shape of the Kinesis destination responses (#4917)
DisableKinesisStreamingDestination now returns EnableKinesisStreamingConfiguration with the precision the destination still carries, like AWS does. Drop DestinationStatusDescription from the Enable and Disable responses. AWS carries that member on DescribeKinesisStreamingDestination only, where it stays. Build both responses from one snapshot taken while the call runs, so a concurrent call on the same destination cannot change the status this answer reports. Add an SDK compatibility test, because the SDK parses the typed response members that handcrafted HTTP cannot check. Document that Enable and Disable report the precision too. |
||
|
|
3ce093f208 |
fix(scheduler): validate expressions and target role ARNs (#4561)
* fix(scheduler): validate expressions and target role ARNs * fix(scheduler): keep persisted weekly schedules firing * test(scheduler): use valid role ARNs in SDK error cases * fix(scheduler): validate rate units and format constraint errors * fix(scheduler): match AWS validation message details * fix(scheduler): exempt quoted model pattern from partition scan --------- Co-authored-by: Vamsi Akavarapu <16164447+vamsiak@users.noreply.github.com> |
||
|
|
044c700d68 |
feat(emr): scaling and termination policies and block public access (#4893)
Serve PutManagedScalingPolicy, GetManagedScalingPolicy, RemoveManagedScalingPolicy, PutAutoTerminationPolicy, GetAutoTerminationPolicy, RemoveAutoTerminationPolicy, PutAutoScalingPolicy, RemoveAutoScalingPolicy, GetBlockPublicAccessConfiguration and PutBlockPublicAccessConfiguration. The managed scaling and auto termination policies are stored on the cluster and the automatic scaling policy on its instance group, as the JSON given. RunJobFlow and AddInstanceGroups accept the same policies instead of dropping them, and ListInstanceGroups reports an attached automatic scaling policy. Validation follows the API model: ComputeLimits members and minimum not above maximum, IdleTimeout 60 to 604800 seconds, automatic scaling only on core and task groups, port ranges within 0 to 65535. Block public access is kept per account and Region and starts at the AWS default (public rules blocked, port 22 permitted). The cluster mutators are synchronized, since each reads, changes and stores the whole cluster. Refs #4888 |
||
|
|
c800cc375e |
test(compat): keep the China nightly allowlist free of an order-dependent entry (#4891)
The first Partition Compatibility run (36963820252) went red on one stale entry: SsoAdminAccountAssignmentTest#createInstanceQuotaUsesAwsSdk passed. It only fails when OrganizationsTest#testFullLifecycle leaves its organization behind, which made the caller the management account for every later test, and that happened because the organization's own assertions, including the arn:aws: one that fails in cn-north-1, ran before the try whose finally deletes it. The assertions now run inside the try, so the organization is deleted however they end, and the stale entry is gone from the cn-north-1 allowlist. Part of #4272. |
||
|
|
436c15ca38 |
fix(sts): reject AssumeRole for roles that do not exist (#4463)
* fix(sts): từ chối AssumeRole khi role không tồn tại trong IAM AssumeRole trước đây cấp credential cho mọi role ARN, kể cả role chưa từng được tạo (iam:GetRole trả NoSuchEntity). Giờ trả AccessDenied như AWS, bất kể enforcement có bật hay không; trust policy vẫn chỉ được đánh giá khi enforcement bật. Các test cũ assume role chưa tạo được sửa để tạo role trước. Closes #4392 * fix(sts): so sánh chính xác role ARN và cập nhật compatibility tests - StsQueryHandler: kiểm tra roleArn khớp chính xác role.getArn() để tránh chấp nhận role cùng tên khác path - StsQueryHandlerTest: đổi tham số helper sang IamRole thay vì Optional, bổ sung test case từ chối role khác path - AssumeRoleTrustPolicyIntegrationTest: sửa Javadoc mô tả đúng hành vi từ chối unknown role - Cập nhật compatibility tests (Java, Node, Python, AWS CLI) để tạo role trước khi assume và kiểm tra lỗi 403 khi role không tồn tại * fix(sts): accept partition-correct role ARNs and strictly catch cleanup exceptions - StsQueryHandler: match role ARN structurally using AwsArnUtils to admit valid noncommercial partition ARNs - StsQueryHandler: preserve caller partition when generating assumedRoleArn - StsTest, test_sts.py, sts.test.ts: only ignore NoSuchEntity/EntityAlreadyExists in cleanup, re-raising unexpected errors per AGENTS.md - StsQueryHandlerTest, AssumeRoleTrustPolicyIntegrationTest: add unit and integration coverage for partition-correct role ARNs * fix(sts): preserve role partition in resolved session caller ARN * fix(sts): preserve stored role partition in assumed identity * fix(sts): validate web identity role ARN * fix(sts): require role existence in AssumeRoleWithWebIdentity and reuse path helpers * fix(sts): keep IAM ARN partition behavior unchanged * fix(sts): derive trust caller account from identity ARN * fix(iam): migrate legacy credential reports by partition * fix(iam): serialize legacy credential report migration * test(iam): make credential report race deterministic * fix(sts): address review feedback * fix(sts): reuse IAM role path normalization |
||
|
|
a22e65f993 |
feat(ses): paginate the tenant and import job lists (#4819)
* feat(ses): paginate the tenant and import job lists Page ListTenants, ListTenantResources, ListResourceTenants and ListImportJobs on the shared SES paging, each with its own token namespace, and delete SesTenantService.validateListPaging. The tenant lists answer the probed SES rules: PageSize 1 to 100 with the Smithy validation messages, an empty NextToken refused with its Smithy message before the tenant or resource is looked up, an unreadable token answered "Invalid Next Token", tenants listed by name, a tenant's resources by ARN and a resource's tenants in association order. ListImportJobs could not be probed and is modelled on the tenant lists, keeping Floci's oldest-first order. Without a PageSize all four lists serve up to 100, a Floci assumption where nothing could be measured. * fix(ses): follow the probed order, aggregation and token binding on the tenant lists A second probe of real SES showed three differences on ListTenantResources and ListResourceTenants: the tenant or resource is looked up, and the filter checked, before the page size and token; a page size outside the bound and an empty NextToken are reported together in one validation message; and a token is refused once the tenant, resource or filter changes. ListImportJobs, which cannot be probed, follows the same rules. The service docs keep the per-list paging detail and gain a paragraph for these four lists. |
||
|
|
b2dd5665db |
fix(s3): validate notification destinations before storing configuration (#4747)
* fix(s3): validate notification destinations before storing configuration * test(s3): consume validation events before POST notifications * fix(s3): preserve bucket lifecycle during notification validation * fix(s3): enforce SQS queue policies for notifications * fix(s3): align notification validation with IAM enforcement * fix(test): stub IAM config for S3 failure delivery * fix(s3): validate cross-account SNS without test publish * fix(sns): recognize legacy topics during destination validation * docs(s3): describe cross-account notification validation * fix(s3): skip cross-account SNS notification test publishes |
||
|
|
bc2592e300 |
fix(ecs): send container logs to the awslogs group and stream from the task definition (#4808)
* fix(ecs): send container logs to the awslogs group and stream from the task definition * fix(ecs): keep console output for containers without awslogs |
||
|
|
fa4d4663a2 |
feat(lambda): honour the Invoke Qualifier and wait between asynchronous retries as AWS does (#4733)
* feat(lambda): honour the Invoke Qualifier query parameter * feat(lambda): wait between asynchronous retries as AWS does A failed Event invocation now waits floci.services.lambda.async-retry-delay-seconds before its first retry and twice that before its second (default 60, matching AWS), capped at the event's remaining maximum age. The concurrency permit is held only for each attempt, and an emulator reset drops retries still waiting. * test(lambda): prove asynchronous retries end to end * docs(lambda): document asynchronous retry timing and the Invoke Qualifier * fix(lambda): drop retries of deleted functions and tighten async retry edges - Drop a pending asynchronous retry when its function (or version) was deleted. - Decide expiry once, on the injected clock, when a retry is scheduled. - Check the reset generation at routing, so no stale outcome is delivered. - Restore upstream behavior when an attempt throws: stop retrying and route the previous result, or UnknownError when there is none. - Harden tests: in-order permit release, deterministic reset, error types and an unqualified-ARN Qualifier case for Invoke. * fix(lambda): drop a deleted function's pending events on every path Replace the store lookup with a per-function deletion counter, captured when the event is invoked and checked wherever an event is attempted or routed. This covers the expiry path, which bypassed the old check, and a delete-and-recreate of the same name during the wait, which the lookup could not see. Verified against AWS that DeleteFunction drops pending retries without delivering a record. * fix(lambda): clear deletion counts before bumping the reset generation An invoke between the two statements of clear() captured the new generation with a stale deletion count and its event was dropped. The expiry-path deletion test now drops inside the first attempt, so it no longer races the one-second maximum event age. * fix(lambda): keep deletion counts across a reset Clearing them while the old generation was still current let a deleted function's pending event see a zero count and be routed. A reset now only bumps the generation, in one atomic step. * fix(lambda): drop an Event invoke that races DeleteFunction An Event invoke that resolved the function just before a concurrent DeleteFunction could take its deletion-count snapshot after the delete had already moved the count. The event then never looked stale, so the deleted function could still be started and a failure record could still reach its destination. DeleteFunction now moves the deletion count only after the function has left the store, and an Event invoke checks that the function is still in the store after it takes its snapshot and before it queues the event. Either the check sees the function gone and the invoke answers 202 without queueing anything, or the snapshot predates the count change and the event is dropped as stale later. * fix(lambda): validate the Invoke Qualifier query parameter Invoke treated an empty or blank Qualifier as if none had been given and ran $LATEST, and it passed a qualifier longer than 128 characters on to the lookup, which answered 404. AWS rejects both with a 400. A supplied Qualifier must now be 1 to 128 characters of letters, digits, $, _ and -, or Invoke fails with ValidationException. The controller reads the parameter from the raw query, because @QueryParam reports a present but empty value as null and the check could not see it. * fix(lambda): stop pending events before a delete or reset removes state DeleteFunction moved a function's deletion count only after it had removed the function's code and store entry. A retry whose timer fired in that gap still passed the staleness check, tried to start a function with no code, and could deliver a failure record to its destination. An attempt that finished in that gap could deliver its OnFailure record. DeleteFunction now moves the count before it deletes anything, which stops every queued or running event, and again after the store entry is gone, which stops an Event invoke that read the count in between. An emulator reset wiped storage before the executor's clear() moved the reset generation, so a retry firing during the wipe could run or deliver against half-cleared state. The executor now also moves the generation in beforeReset(), which runs before the wipe. clear() still moves it, to drop events accepted between the two. * test(lambda): fix a doc comment and name the tolerated Docker ping failure The class comment now reads "wait as they do on AWS". The Docker ping check names its caught exception "expected" and says why returning false is safe: the test is then skipped rather than failed. * fix(lambda): count version and alias invokes against the function's reservation Routing the Invoke Qualifier to a published version meant a qualified invoke took its permit against the version's snapshot, which carries no reservation, so a reserved concurrency of 0 on the function no longer throttled it and a positive one stopped counting those invokes. The name-qualified path (fn:1, fn:alias) already had the same gap. Reserved concurrency is function-wide in AWS, so the executor now takes the permit against the function's $LATEST record, which holds the reservation. That covers direct Invoke with a Qualifier, qualified names and ARNs, aliases, event source mappings and asynchronous retries alike. It reads the stored record rather than the limiter's region registry because event source pollers can invoke before LambdaService has rehydrated that registry after a restart. * fix(lambda): drop a deleted function's pending events before draining its containers DeleteFunction drained the warm pool before fencing pending asynchronous events, and draining blocks while idle containers stop. A retry whose timer fired in that window still passed the staleness check and could cold-start a container after the drain, leaving it warm for a function that no longer exists. The fence now goes up first. |
||
|
|
cf04f433b6 |
fix(iam): give a role session's aws:PrincipalArn as its role's ARN under enforcement (#4810)
Follow-up from the review of #4716. The enforcement filter put the assumed-role session ARN (arn:aws:sts::<account>:assumed-role/<role>/<session>) in aws:PrincipalArn for a caller using role-session credentials. AWS puts the ARN of the role that was assumed there, path included ("For IAM roles, the request context returns the ARN of the role, not the ARN of the user that assumed the role", IAM User Guide, global condition keys). So an identity or resource policy keyed on the role's ARN never matched its sessions: an Allow scoped that way refused them and a Deny written that way never fired, while a condition naming the session ARN, which AWS says not to use for this key, matched. The filter now reads both values from one lookup of the key, through a new IamService.resolveCallerArns: the caller ARN, still the session ARN for a role session, and the principal ARN, the role ARN the session recorded when it was issued (#4716). A user's key and the account-root principal give the same value for both. One lookup matters: two could straddle the session's expiry, answer the first and not the second, and leave a fallback to fill aws:PrincipalArn with the session ARN, so a Deny keyed on the role's ARN would miss. resolveCallerArn and resolvePrincipalArn now read through it, and the STS trust check, which made the same two lookups, uses it too. Both places the filter fills the key (the request's own authorization and authorizeAdditionalResource) take it from there. The session ARN stays the caller's principal for matching a resource policy's Principal, which is a separate change. docs/services/iam.md describes the key for role sessions and drops the caveat about the session name, which no longer applies to it. The integration test covers both paths: IAM calls whose policy is keyed on the role's ARN, and an SSM GetParameter on a Secrets Manager reference, whose secretsmanager:GetSecretValue check goes through authorizeAdditionalResource. The SDK compatibility suite's IamEnforcementTest gets the same IAM checks with AWS SDK clients; like the rest of that class it runs only against a Floci with IAM enforcement on. |
||
|
|
0a54d0708e |
feat(eventbridge): execute target retry and dead-letter policies (#4736)
* feat(eventbridge): execute target retry and dead-letter policies PutTargets now validates, stores and returns a target's RetryPolicy and DeadLetterConfig. Failed deliveries from PutEvents and scheduled rules are retried with backoff within the configured attempts and event age, and exhausted or non-retryable events are sent to the standard SQS dead-letter queue with the AWS failure attributes. * fix(eventbridge): order target retries by due time and honour a lowered retry limit Pending retries are kept in a queue ordered by their next attempt, so each wake-up takes only what is due instead of scanning every pending retry. The clock is read again for each retry, so a slow target cannot let a later retry run past its event age, and a reset mid-tick stops the remaining retries. A retry now checks the target's current MaximumRetryAttempts before invoking it, as it already did for MaximumEventAgeInSeconds. * fix(eventbridge): drop a target retry that outlives a reset An attempt still running when the emulator resets can fail afterwards. Its retry or dead-letter delivery is now dropped, so a rule and target recreated under the same names after the reset do not receive a pre-reset event. A scheduled retry wake-up keeps only its due time, not the event. * fix(eventbridge): wake a target retry at its due time after a slow attempt The retry delay was measured from when the failed attempt started but counted from when it failed, so every retry after a slow attempt woke late by the attempt's duration, and an expired event reached its dead-letter queue late. * fix(eventbridge): drop a removed target's retries and drive retries from one tick RemoveTargets now drops the removed targets' pending retries, so a target re-added under the same Id does not receive an event from before its removal. Pending retries are taken by one periodic tick, as in the scheduler's dispatcher, instead of a timer per retry, so a reset leaves no timers behind. * fix(eventbridge): warn about a blank dead-letter queue ARN PutTargets accepts a whitespace-only DeadLetterConfig Arn, since AWS constrains only its length. Delivery skipped it without a word; it now gets the same WARN as any other dead-letter queue that is not a standard SQS queue in the rule's region. |
||
|
|
75b56d49e2 |
fix(sqs): honor ReceiveMessage message attribute selectors (#4699)
* fix(sqs): honor ReceiveMessage message attribute selectors * fix(sqs): match receive attribute checksum to selected fields * test(sns): use the SQS Query message attribute selector * fix(sqs): match message attribute prefix selectors |
||
|
|
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. |
||
|
|
ea41b775aa |
feat(ses): paginate the identity, configuration set and custom verification template lists (#4781)
* feat(ses): paginate the identity, configuration set and custom verification template lists Move paging into the SES services, so each resource's cursor lives with its list and the v1 and v2 operations of the same resource share it. Page ListIdentities/ListEmailIdentities, ListConfigurationSets (v1 and v2) and ListCustomVerificationEmailTemplates (v1 and v2) with the probed defaults, bounds and messages: identities default to 25 on v2, configuration sets and custom verification templates to 50, and a v1 page size outside the bound is served the probed size instead of refused. * fix(ses): refuse a list token replayed in another region A list token carried only the resource kind and the cursor, so the same list in another region read it as a position and could answer an empty last page. Real SES refuses such a token with the operation's unreadable-token error (probed on the identity and configuration-set lists), so the token namespace now includes the region. The v1 and v2 lists of one resource still share tokens within a region. |
||
|
|
31038ee2a4 |
feat(cognito): add GetUserAuthFactors (#4764)
* feat(cognito): add GetUserAuthFactors * fix(cognito): refuse access tokens with no scope claim where a scope is required * fix(cognito): use AWS's message for a missing access-token scope |
||
|
|
7654a7cbec |
fix(appsync): supply reflection config so VTL runs on native image (#4729)
* test(appsync): run a VTL resolver in the native compatibility suite AppSyncTest created and updated resolvers but never queried one, so no native test evaluated a VTL template. The new test runs a query whose templates touch everything VTL reaches through reflection: the #return directive, $ctx and the JDK maps, lists and strings behind it, each $util helper, and $util.error. * fix(appsync): register what VTL reaches through reflection in the native image Velocity loads the #return directive by class name and calls every template method through reflection. None of it was registered, so in the native image every AppSync mapping template failed. Register the directive, the $util helpers, and the JDK maps, lists and strings that $ctx, literals and $util results are made of. |
||
|
|
18128b432a |
fix(organizations): start a new root with no policy types enabled (#4756)
CreateOrganization (and EnableAllFeatures) seeded the root with SERVICE_CONTROL_POLICY already ENABLED, so the first EnablePolicyType a caller issues was rejected with PolicyTypeAlreadyEnabledException. That is exactly what Terraform's aws_organizations_organization does with enabled_policy_types right after CreateOrganization, so the common "create the org and turn on SCPs" configuration failed at its first resource. On AWS a new root has an empty PolicyTypes list: the provider's acceptance test for a plain organization asserts roots.0.policy_types is empty, and its enabled_policy_types test enables SCPs on a fresh organization successfully. DescribeOrganization's AvailablePolicyTypes used to read the root's list, which is what the seed was standing in for. It is now reported separately and, as AWS documents for the deprecated field, lists only SERVICE_CONTROL_POLICY for an ALL organization. Tests that relied on the seed now call EnablePolicyType first, as a real caller must. The CloudFormation test creates the stack without its SCP, enables the type, then adds the SCP by UpdateStack, because no CloudFormation resource enables a policy type. |
||
|
|
fd094aee05 |
fix(stepfunctions): return the PascalCase execution envelope from states:startExecution, .sync and .sync:2 (#4737)
AWS returns, as the Task result of the optimized states:startExecution
integration (measured in ap-northeast-1 on 2026-09-30):
- request-response: the StartExecution response, {ExecutionArn, StartDate},
StartDate in epoch milliseconds
- .sync: the child's DescribeExecution response, PascalCase with its keys
in alphabetical order, dates in epoch milliseconds, Input and Output as
JSON strings
- .sync:2: the same envelope with Input and Output as JSON values
Floci returned camelCase with dates in seconds for the first two and the
child's output alone for .sync:2, so a state machine written against AWS
found nothing at $.Output, $.ExecutionArn or $.Status.
The failure cause of the two .sync modes already built this envelope
(#4675). It now builds the success result too: a SUCCEEDED child carries
Output, OutputDetails and RedriveStatusReason and reports NOT_REDRIVABLE.
Request-response returns the response TaskSubmitted already records.
This changes the result shape for state machines written against Floci's
earlier one: the child output of .sync:2 moves from $ to $.Output.
Closes #4723
Co-authored-by: mitsukado-shinagawa <mitsukado-shinagawa@users.noreply.github.com>
|
||
|
|
d267ba3a9d |
fix(ses): validate EventBridge default bus ARNs (#4677)
* fix(ses): validate EventBridge default bus ARNs Signed-off-by: boulea7 <zln1905391059@163.com> * fix(ses): reject EventBridge bus account and Region mismatches Signed-off-by: boulea7 <zln1905391059@163.com> --------- Signed-off-by: boulea7 <zln1905391059@163.com> |
||
|
|
5aad012e78 |
feat(emr-serverless): tag, untag and list tags for applications (#4667)
EMR Serverless had no tagging API: no TagHandler was registered for the emr-serverless ARN service, so TagResource, UntagResource and ListTagsForResource could not be routed, and a tagged aws_emrserverless_application could not be planned. Register an emr-serverless handler with the shared /tags dispatcher, answering 200 as the model does, over the tags already stored on the application. Validate keys and values, the user guide's 50 tag limit and its reserved aws: prefix, refuse job run ARNs as not found, and synchronize the application mutators so a tag write cannot lose a concurrent update. Closes #4662 |
||
|
|
560de5c13f |
fix(tagging): find resources by the tags their own service holds (#4563)
* fix(tagging): list resources by the tags their own service holds
GetResources, GetTagKeys and GetTagValues merge the tagging store with every
ResourceProvider, so SQS, Lambda and Logs tags are discoverable. Resource type
filters now parse colon and leading-slash ARNs (function:f, log-group:x, /apikeys/k),
and TagResources/UntagResources write through to the owning TagHandler.
* fix(apigateway): expose tagged resources and API key tags to the tagging API
ApiGatewayService is a ResourceProvider for REST APIs, stages, API keys, usage plans and
domain names, and ApiGatewayTagHandler serves /apikeys/<id> ARNs, so GetResources finds
API Gateway resources by tag and tagging-API writes land on the API key itself.
* fix(cloudformation): forward AWS::Lambda::Function Tags
CreateFunction now receives the template Tags; an in-place UpdateStack untags dropped keys and retags the desired set, mirroring SqsCfnProvisioner.
* fix(tagging): scope global-ARN resources by region and clamp stale page tokens
Provider resources with an empty ARN region use their own region, stale page tokens
past the end return an empty page, and provider tags are copied inside the skip guard.
* test(compat): discover SQS, Lambda, Logs and API Gateway resources by tag
* docs(tagging): describe owning-service discovery
* fix(tagging): forward tags only for resources the owning service lists
* fix(apigateway): report the calling account and tag usage plans
* docs(cloudformation): note Lambda tag reconciliation on update
* fix(tagging): match declared resource types and scope owner writes to the request
API Gateway API key and usage plan ARNs must now name the key or plan at the
start of the resource part, so a nested /apikeys/ segment no longer tags the key.
* fix(tagging): match AWS type filters, regions and failure codes
Compared against a live AWS account: type filters, IAM listing, cross-region
TagResources and FailedResourcesMap entries now answer as AWS does.
* fix(cloudformation): keep Lambda tags added outside the template
* fix(tagging): route TagResources to V1 tag handlers too
* fix(apigateway): reject sub-resource ARNs when tagging a REST API
* fix(tagging): write tagging API tags through to SQS, Lambda and Logs
TagResources and UntagResources now reach the queue, function or log group's own tags through TagHandler beans qualified @TaggingApiOnly, so ListQueueTags, Lambda ListTags and Logs ListTagsForResource show them. The qualifier keeps these handlers off the /tags/{arn} and /v1/tags/{arn} paths, since each service defines tags in its own protocol.
* fix(cloudformation): forward SSM parameter tags
AWS::SSM::Parameter now applies its Tags after the overwriting put. On UpdateStack only the keys the previous template set and the new one drops are removed, tracked in the internal FlociSsmTemplateTagKeys attribute, so tags added outside the template are kept.
* fix(tagging): hide tagging-store copies of global resources
GetResources no longer lists an IAM role or user tagged through TagResources, since AWS never lists global resources.
* fix(tagging): reject every wildcard log group ARN
TagResources and UntagResources now send a log group ARN ending in :* to CloudWatch Logs even when the group does not exist, so it is rejected as in AWS instead of stored.
* fix(tagging): clear store tags on every untag
UntagResources now removes the keys from the tagging store for every ARN, even one the owning service rejects, so a copy stored earlier can always be cleared.
* fix(cloudformation): tag an adopted Lambda function
When CreateFunction conflicts and the provisioner adopts the existing function, the template's tags are now applied to it.
* fix(apigateway): tag only exact domain and stage ARNs
A domain or stage segment nested elsewhere in an API Gateway ARN, such as /restapis/<id>/domainnames/<d>, is now rejected instead of tagging that domain or stage.
* fix(cloudformation): leave an adopted Lambda function's tags alone
Adoption uses the existing function as it is, as before, so a function outside the stack keeps its tags.
* fix(cloudformation): record no template tag keys for an adopted Lambda function
An adopted function keeps its own tags, so a later update adds the template's tags without removing any it never set.
* fix(tagging): never list IAM ARNs from the tagging store
A role tagged through TagResources stays hidden after DeleteRole, as AWS never lists IAM resources.
* fix(tagging): fail a write when an owning service cannot be read
A provider that fails while routing TagResources or UntagResources now returns InternalServiceException instead of writing the tagging store and reporting success.
* fix(tagging): fail only unresolved ARNs when a provider cannot be read
A provider failure no longer fails the whole TagResources or UntagResources call; only ARNs whose owner could not be resolved are reported in FailedResourcesMap.
* fix(tagging): report another account's ARN instead of storing it
TagResources and UntagResources report an ARN from another account in FailedResourcesMap with AccessDeniedException, as AWS reports it per ARN, and never write it to the tagging store.
* fix(tagging): keep stored tags for an ARN an untag could not resolve
UntagResources leaves the tagging store unchanged for an ARN it reports as unresolved or from another account; an ARN its owner rejected is still cleared.
* fix(tagging): fail an unresolved ARN only when its own service cannot be read
A provider failure now only affects unlisted ARNs of the services that provider declares.
* fix(tagging): copy stored tags under the writers' lock
GetResources, GetTagKeys and GetTagValues no longer race a concurrent TagResources on a stored mapping.
* fix(apigateway): reject reserved tags when tagging a usage plan
TagResources on a usage plan now refuses floci:override-id as the other API Gateway tag paths do, instead of dropping it and reporting success.
* fix(apigateway): reject tag ARNs with an account or another region
The /tags path now answers an ARN with an account segment with BadRequestException and one naming another region with NotFoundException, as AWS does, instead of resolving the id in the caller's region.
* fix(ssm,lambda): reject tag keys outside the AWS pattern
AddTagsToResource, PutParameter, TagResource and CreateFunction now reject a tag key outside the AWS pattern or 1 to 128 characters with ValidationException, as AWS does, which also keeps the CloudFormation managed-key attributes lossless.
* fix(ssm,lambda): validate CloudFormation tag keys before changing the resource
* docs(tagging): say every handled ARN ending in :* reaches its service
* fix(tagging): read a negative pagination token as the first page
|
||
|
|
6b7d17698c |
fix(ec2): an interface VPC endpoint reports its network interfaces, and they resolve (#4598)
* fix(ec2): report an interface VPC endpoint's network interfaces
DescribeVpcEndpoints never emitted networkInterfaceIdSet, so an interface (PrivateLink)
endpoint came back with no interfaces at all. Terraform's aws_vpc_endpoint surfaces that
element as network_interface_ids, and modules feed the output downstream to
security-group rules, flow-log filters and DNS, so the empty list does not merely differ
from AWS: it propagates into whatever consumes it.
The interfaces already existed. Ec2Service.endpointNetworkInterfaces derives one per
subnet deterministically, with a stable id, the subnet's availability zone and
interfaceType vpc_endpoint, so flow-log generation can attribute AWS-service traffic to a
stable endpoint address. Nothing reported them on the wire.
So this adds a reader rather than a new resource. endpointNetworkInterfaceIds returns the
same ids that endpointNetworkInterfaces synthesizes, reusing endpointEniId, deliberately
derived instead of stored: a second, stored copy could disagree with the one flow-log
attribution reads, and then two answers would exist for one question. It mirrors the
existing endpointDnsEntries accessor, which the same XML writer already calls.
A Gateway endpoint is a route-table entry and owns no interfaces. AWS reports none for
one, and so does this: the element is omitted rather than emitted empty.
Ec2VpcEndpointNetworkInterfaceIdsIntegrationTest covers one interface per subnet with
distinct ids, the ids being stable across two DescribeVpcEndpoints calls (Terraform reads
them between plan and apply), a single-subnet endpoint reporting exactly one, and a
gateway endpoint reporting none. That last case is what stops a change that simply
emitted the set unconditionally from passing.
Verified by reverting the emission alone: 2 of the 3 tests fail, and the gateway case
correctly still passes. Restored, all 3 pass.
Ec2*Test is 1246 tests with 2 failures, both in Ec2VolumeBlockDeviceDockerIntegrationTest
(Docker block devices, mke2fs). Measured on a clean checkout of upstream/main with these
changes removed: the same 2 fail. Pre-existing and environment-specific, not from this
change.
* fix(ec2): reattach the DnsEntries javadoc to its own method
The previous commit inserted endpointNetworkInterfaceIds and its javadoc between the
endpointDnsEntries javadoc and endpointDnsEntries itself. Java binds a doc comment to the
next declaration, so that left two consecutive blocks on the new method -- the first
dangling, the second the real one -- and endpointDnsEntries documented by nothing.
Moving the new method above the DnsEntries javadoc restores that binding and puts the
accessor next to endpointEniId, the helper whose ids it returns. Comment placement only;
no behaviour changes.
Ec2VpcEndpointNetworkInterfaceIdsIntegrationTest: 3 tests, 0 failures.
* refactor(ec2): derive endpoint ENI ids from the interfaces, not beside them
Review found that the javadoc on endpointNetworkInterfaceIds asserted an invariant the
code did not have. It said the ids were derived from endpointNetworkInterfaces so a
second copy could not disagree with what flow-log attribution reads. They were not
derived from it: both called endpointEniId independently, and they filtered differently.
endpointNetworkInterfaces skips a subnet whose record has gone; the id method emitted one
for every entry of getSubnetIds() unconditionally.
The gap is reachable. deleteSubnet checks only for transit-gateway attachments, so
nothing stops a subnet being deleted out from under a live endpoint, and the two were
then measured reporting different sets -- two answers to one question, with flow-log
attribution reading the shorter. Real AWS answers DependencyViolation to that delete and
Terraform's graph destroys the endpoint first, so the state is reachable only in an
emulator. That is the argument for the emulator staying self-consistent in it, not
against.
Extracts endpointNetworkInterfacesOf(VpcEndpoint). The region-wide
endpointNetworkInterfaces(String) is now that method looped, and the id list is mapped
over it, so one copy of the subnet-existence filter serves both and congruence holds by
construction rather than by inspection.
A distinct NAME rather than an overload: endpointNetworkInterfaces(VpcEndpoint) beside
endpointNetworkInterfaces(String) makes a Mockito any() ambiguous, and
FlowLogServiceTest:31 already uses one. Caught by the compiler; a new method should not
make an existing test stop compiling.
Incidental saving: vpcEndpointXml called the region-wide scan once per endpoint in a
response, so DescribeVpcEndpoints was quadratic in subnet lookups. It no longer is.
THE TEST WAS DECORATIVE UNTIL IT WAS MEASURED. Its first draft compared the wire ids to
the service's list for an endpoint whose subnets all still existed -- a case where both
derivations trivially agree, and it passed against the buggy version. It now deletes a
subnet out from under the endpoint first. Verified both ways: it FAILS on the old
independent derivation and PASSES on this one.
Ec2VpcEndpoint*, FlowLogServiceTest, Ec2ServiceTest and Ec2NetworkInterfaceIntegrationTest:
1251 tests, the only failures being Ec2VolumeBlockDeviceDockerIntegrationTest's known 2
of 8 (Docker block devices, mke2fs), measured identically on a clean upstream/main
checkout.
Not addressed here, filed separately: the ids this publishes do not resolve through
DescribeNetworkInterfaces, which never consults endpointNetworkInterfaces. Real AWS
returns endpoint ENIs there as requester-managed with interfaceType vpc_endpoint. That
gap predates this branch; publishing ids makes it visible rather than creating it, and no
corpus module looks one up today.
* docs(ec2): narrow the congruence claim to what the code actually guarantees
Three findings from review of #21, none behavioural.
The javadoc said the wire ids are BY CONSTRUCTION "the interfaces flow-log attribution
reads". Within one account that is exact -- vpcEndpoints.scan and subnets.get share a
prefix and both stores are account-wrapped. But FlowLogService runs on a scheduler with
no request context, so it reads the default account while this path reads the caller's;
for a non-default account the flow-log side sees no endpoints at all. Each side stays
internally consistent, which IS the property the refactor established and the one worth
claiming. Both seeing the same endpoints is not, and the absolute phrasing claimed it.
Restated as shared derivation rather than shared view.
endpointNetworkInterfacesOf was public with no caller outside the class -- not in
Ec2QueryHandler, which calls endpointNetworkInterfaceIds, and not in any test. Every
sibling helper in the same block is private (endpointEniId, endpointDnsDiscriminator,
endpointServiceToken, endpointPrivateIp), so public was the outlier. Now private. The
javadoc's argument for the distinct NAME stands untouched; that was about the Mockito
ambiguity, not the visibility.
The same javadoc cited FlowLogServiceTest:31 for that ambiguity. The line is 44 on this
base, and a comment carrying a line number is wrong again at the next rebase, so it now
names the stub instead.
Also drops a stray backslash in "method\'s" that survived from the heredoc the comment
was written in.
* test(ec2): say what the gateway case actually catches, which is less than claimed
The class javadoc and the PR description both said the gateway assertion is "what stops a
change that simply emitted the set unconditionally from passing". It is not. The emission
is guarded by `if (!endpointEniIds.isEmpty())`; remove that guard and a gateway endpoint
gets an empty `<networkInterfaceIdSet/>`, whose `item` list is empty, so
`eniIdsOf(...).isEmpty()` still holds and the test still passes.
Found by review of #21. Third claim on this branch that asserted more than the code
delivered -- after the javadoc that claimed a congruence invariant the code lacked, and
the one that claimed both sides see the same endpoints across accounts.
Not fixed by tightening the assertion to pin absence, which was the obvious move and the
wrong one: real AWS emits the empty element where this omits it. Absent and empty are
indistinguishable to any ec2query SDK, and Terraform's TypeSet lands both as an empty set,
so the behaviour is fine -- but an assertion pinning absence would pin the side of that
choice further from AWS, and make a later move toward AWS look like a regression.
So the comment now states the limit instead. The case still earns its place as a
regression guard: a gateway endpoint must never report interface ids.
Also orders the new test's imports like the sibling SubnetConfiguration suite.
* fix(ec2): an endpoint on a subnet whose CIDR is not dotted IPv4 must still answer
Both findings from the Greptile review of #4598.
P1. endpointPrivateIp splits the subnet's CidrBlock on dots and reads parts[1] and
parts[2]. CreateSubnet calls setCidrBlock with whatever it was given and never validates
the address family, so the value is not guaranteed to be dotted IPv4 -- "2001:db8::/56"
splits to one element and parts[1] throws.
This PR is what makes that reachable from a request. Deriving an endpoint's interfaces
used to happen only on the flow-log scheduler, where a throw was contained; it now also
happens while rendering CreateVpcEndpoint and DescribeVpcEndpoints, so the same odd subnet
turns into a failed EC2 response rather than a degraded address. Measured, with the guard
removed:
Unhandled error dispatching Query action CreateVpcEndpoint for service ec2:
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
Falls back to the same default the existing null-CidrBlock branch already uses, so "no
usable IPv4" has one behaviour instead of two. Deliberately NOT fixed by validating in
CreateSubnet: rejecting a non-IPv4 CidrBlock is what AWS does and is probably right, but
it is a behaviour change with a wider blast radius than this PR should carry, and it would
not help an IPv6-only subnet, which legitimately has no IPv4 CIDR at all.
anEndpointOnASubnetWithoutIpv4StillAnswers is a regression guard and states so. Measured
both ways: it FAILS at CreateVpcEndpoint without the guard and PASSES with it. Reviewer
found the defect by reading; the test is what keeps it found.
P2. Import order -- io.restassured sorts before jakarta. I reordered the first two imports
in an earlier commit and did not notice the same rule applied further down the block.
Ec2VpcEndpoint* and FlowLogServiceTest: 52 tests, 0 failures.
* fix(ec2): the non-IPv4 fallback gave every subnet on an endpoint the same address
Second Greptile round on #4598, and a defect introduced by the fix for the first.
The crash fix fell back to a CONSTANT network, 172.31.0.0. The host octet is derived from
the ENDPOINT, so it is identical across that endpoint's interfaces; on the IPv4 path the
only thing making them distinct is each subnet supplying its own network. Collapsing the
network to a constant threw that away, so every non-IPv4 subnet on one endpoint got the
same private address -- a crash traded for a silent collision. Measured:
got [172.31.0.249, 172.31.0.249]
The third octet now comes from the subnet id, restoring the property the IPv4 path has by
construction rather than by luck. The ENI ids were never affected -- endpointEniId already
mixes the subnet in -- and the new test asserts both, so a later change cannot fix one and
break the other.
twoSubnetsWithoutIpv4GetDistinctAddresses measured both ways: it FAILS on the constant
fallback with the collision above and PASSES with the subnet-derived one. The existing
non-IPv4 test could not have caught this: it uses a single subnet, where a collision has
nothing to collide with.
Ec2VpcEndpoint*, FlowLogServiceTest, Ec2ServiceTest, Ec2NetworkInterfaceIntegrationTest:
264 tests, 0 failures.
* test(compat): validate the endpoint's network interface ids through the Java SDK
Greptile's P2 on #4598. The integration test asserts the wire element over RestAssured,
which is deliberate -- an absent networkInterfaceIdSet and an empty one are different
things and only raw XML can tell them apart. But AGENTS.md's "Management APIs should be
validated with AWS SDK clients, not only handcrafted HTTP requests" sits under AWS Protocol
Rules, not under Compatibility Project, so it is general and "not only" is the operative
phrase. Both, not either.
src/test cannot host it: the main module has no AWS SDK dependency at all. sdk-test-java is
where the repo keeps SDK validation and already had 60 EC2 tests, covering
DescribeVpcEndpointServices but not an endpoint's own interfaces.
What this proves that the XML assertions cannot: that the real Java SDK DESERIALIZES the
element into networkInterfaceIds(). A response can be well-formed XML and still not populate
the model -- a wrong element name or nesting fails silently and leaves an empty list rather
than raising, which is the exact symptom this PR fixes.
Asserted on CreateVpcEndpoint and again on DescribeVpcEndpoints, and that the two agree,
because Terraform reads from one and re-reads from the other between plan and apply.
DeleteVpc moves from @Order(50) to @Order(51) so this runs while the shared VPC still
exists.
* fix(ec2): an endpoint's published interface ids have to resolve too
Blocking finding from hectorvent on #4598, and the gap it names is one this branch
filed as separate work (floci-5wby) on reasoning that turns out to be wrong.
DescribeVpcEndpoints publishes one ENI id per subnet in networkInterfaceIdSet.
describeNetworkInterfaces enumerated instance-attached interfaces and the standalone
CreateNetworkInterface store only, never endpointNetworkInterfaces, so asking about a
published id got InvalidNetworkInterfaceID.NotFound from the same emulator that had
just handed it over.
WHY IT CANNOT SHIP SEPARATELY. The bead argued no corpus module writes
data "aws_network_interface", so nothing resolves one. The corpus check was right and
the conclusion was wrong: the provider does the lookup ITSELF, inside its own read of
aws_vpc_endpoint. resourceVPCEndpointFlatten calls
findSubnetConfigurationsByNetworkInterfaceIDs over every id in network_interface_ids to
build subnet_configuration, and returns the lookup error rather than tolerating a
NotFound -- it handles retry.NotFound for the prefix list a few lines above and
pointedly does not here. So the blast radius is not "modules that look up an ENI", it is
every interface endpoint read. Publishing the ids without this turns an empty list on
main into a hard read failure, which is a regression against main rather than a
pre-existing gap left unfixed.
Endpoint interfaces now answer describeNetworkInterfaces: listed unfiltered, resolvable
by id, and selectable by interface-type, subnet-id and vpc-id. interface-type had no arm
at all, so it matched everything through the default; requester-managed is new alongside
it.
WIRE SHAPE. interfaceType vpc_endpoint and requesterManaged true, which is what AWS
reports for an interface it creates on the customer's behalf, and requesterManaged is now
emitted for every interface, false included, as the documented sample response does.
requesterId is left unset on purpose: real AWS reports an internal service account there,
which floci cannot know, and an invented twelve-digit id would be a wrong answer rather
than a missing one. No attachment block, for the same reason -- AWS reports one carrying
an AWS-side owner alias that would have to be fabricated, and the provider reads none of
it.
The new arm is deliberately NOT account-scoped, unlike the two above it. describeVpcEndpoints
is not account-scoped either, so scoping here would leave an id that IS published to a
caller unresolvable BY that caller -- the exact defect being closed. Its ids are added to
foundIds before the filter check, matching the other arms, so an id asked for by name and
then excluded by a filter is absent from the answer rather than NotFound.
Measured both ways at
|
||
|
|
c0ec98b43e |
feat(ec2): return spot price history for known instance types (#4698)
* feat(ec2): return spot price history for known instance types * fix(ec2): address review feedback on spot price history pagination and platforms * style(ec2): fix import ordering and inline qualified class names |
||
|
|
433893d298 |
feat(cognito): support software-token MFA setup and challenges (#4620)
* feat(cognito): require TOTP MFA after primary authentication * test(cognito): verify TOTP MFA with Java SDK * fix(cognito): reject disabled users completing TOTP challenges * fix(cognito): preserve new-password trigger through TOTP * fix(cognito): gate custom password auth with required MFA * fix(cognito): limit failed TOTP verification attempts * fix(cognito): report code mismatch for invalid TOTP setup |
||
|
|
b8aec4c50f |
fix(elasticache): serve a second cache asking for 6379 instead of refusing it (#4693)
* fix(elasticache): serve a second cache asking for 6379 instead of refusing it
CreateReplicationGroup answered a second cache on port 6379 with
InvalidParameterValue: Port 6379 is already in use by another
replication group.
AWS has no such rule. Port belongs to a cache's own endpoint, and 6379 is
the Redis default, so nearly every ElastiCache cluster uses it and they
coexist: AWS gives each cache a DNS name of its own and the port never has
to tell them apart. Floci puts every cache's proxy on one host, where a TCP
port is exclusive and the port IS the only thing that tells them apart. Any
module standing up two Redis clusters, and any suite running one per test in
parallel, failed at the second create.
A pinned port that is free and inside the proxy range is still honored. One
that is taken, or outside the range, now yields a port from the range rather
than a rejection, and that port is what the cache's endpoint reports.
The port a cache reports is always the port it is actually on. That is the
whole design, and it rules out the tempting alternative of reporting the
pinned port while listening elsewhere: the endpoint would then name a
DIFFERENT cache's listener, and a client following it reads the wrong
cache's data with no error at all. Measured, on a build that did exactly
that: two no-auth caches pinned to 6379, write through each, then read
through the second's advertised endpoint and get the FIRST cache's value,
from the host and from inside a container both. #4094 removed that same
failure from the restore path last week, where "the old endpoint then
reached an unrelated cache instead of failing cleanly".
What a caller gives up is the pinned port when Floci cannot serve it, which
terraform surfaces as a replacement-forcing diff on the next plan. A visible
difference, against a silent wrong answer: the create still succeeds, which
is what unblocks the modules.
The out-of-range rejection goes for the same reason. That range bounds what
this emulator may listen on and never bounded what AWS accepts. The only
rejection left is AWS's own, 1150 to 65535, as RdsService already applies.
Tests: the two that pinned the old rejections now pin the substitution, and
ElastiCachePortSharingIntegrationTest asserts at the DATA plane, writing
through each cache's own advertised endpoint and reading its own value back.
A control-plane-only test passes against the wrong-endpoint design too,
which is how that design survived review. ElastiCache surface: 214 tests,
0 failures.
Refs: floci-j55a
* test(elasticache): gate Docker per test, tie each endpoint to its own group
Five review points, no behaviour change. The service diff is the 1150 comment.
CORRECTING THE PREVIOUS COMMIT MESSAGE, which cannot be amended without a
force-push. It said a control-plane-only test "passes against the wrong-
endpoint design too, which is how that design got through four rounds". False
about this file: Order(2) compares the two REPORTED ports and requires them to
differ, and the withdrawn design reported 6379 for both, so it fails there
before anything connects. The general point stands, but not as stated. An
assertion about a SINGLE reported value cannot see a wrong-endpoint design,
because "the API says 6379" is satisfied whatever 6379 serves. An assertion
about a RELATIONSHIP between reported values often can. That is the
distinction, not control plane against data plane. Both javadocs said the
wrong thing and both are rewritten.
@BeforeAll gated the whole class on Docker, and only Order(6) needs it: a
group reaches available with no daemon reachable. On a Docker-less runner the
entire regression test for this fix would have vanished, silently and green,
including the control-plane assertion that catches the original bug. The
assumption now sits in Order(6) alone.
Order(6) claimed more than it proved. Writing "first" and "second" through the
two endpoints and reading each back passes under a consistent relabelling,
where each endpoint reaches a distinct cache that is not its own. Each group
now carries its own AuthToken and each proxy validates the token of the group
it was started for, so an endpoint reaching the other group's proxy is refused
its own group's token. The test AUTHs with its own token and requires the
other group's to be refused, which is what makes the method name true. Order(2)
stays: the two catch different things and neither subsumes the other.
Those refusal assertions check the proxy's actual error text, not the helper's
prefix, because a connection returning nothing would also fail to start with
"+OK" and must not read as a pass.
The docs section stated two rules as the service's that are false for
Memcached: CreateCacheCluster routes that engine to a path Port is not passed
to, so a pinned port is ignored and the 1150 check never runs. Scoped to
redis/valkey, with Memcached's behaviour stated. Third time on this work that
a Redis-path rule was written as though it covered the service.
The 1150 bound is no longer called AWS's own, in docs or javadoc. It is the
bound RdsService applies to the same argument; nothing here establishes
ElastiCache's real limit. It is strictly more permissive than the check it
replaced, so the risk is accepting a port AWS would refuse, never refusing one
AWS accepts. The upper arm was untested and now is.
ElastiCache surface: 215 tests, 0 failures, 0 skipped.
Refs: floci-j55a
* test(elasticache): stop the method name claiming the bound is AWS's
Two review points, both about claims rather than behaviour. The only
non-comment change in the diff is the rename.
aPortOutsideTheRangeAwsAcceptsIsStillRefused was the last place in the tree
still asserting that 1150 to 65535 is what AWS accepts, after the previous
commit removed that claim from the docs, the service javadoc and the unit
test. It is now aPortOutsideTheAcceptedRangeIsStillRefused, and its javadoc
says the bound is the one RdsService.reserveProxyPort applies to the same
argument, with nothing here establishing ElastiCache's real limit.
It survived a round that corrected the identical claim in three other places
because a method name does not present itself as prose. It is read far more
often than the body under it and re-read far less, which is true of a display
name, a bead title and a commit subject too.
Order(2) carried a one-line javadoc about the original bug, so a reader
landing there sees no reason it is not redundant against Order(6). It now says
what it catches that Order(6) cannot: comparing the two REPORTED ports is what
rejects a build reporting one port for both caches, it does so before anything
connects, and it still runs on a machine where Order(6) skips for want of
Docker. The non-subsumption was already stated in the class javadoc and in
Order(6)'s, which is not where someone doubting Order(2) is standing.
ElastiCache surface: 215 tests, 0 failures, 0 skipped. The renamed test is
present in the surefire report under its new name.
Refs: floci-j55a
* test(elasticache): SDK coverage for port sharing, and two test defects
Three Greptile findings on #4693, all in the tests. Verified live against
|
||
|
|
0383ecf53e |
fix(apigateway): resolve AWS variables on REST import (#4547)
* fix(apigateway): resolve AWS variables on REST import * fix(apigateway): preserve OpenAPI mapping templates * fix(apigateway): resolve imported authorizer variables * chore(ci): retry Docker Hub limited tests * fix(apigateway): resolve import variables across definitions * test(apigateway): cover variable imports with AWS SDK * refactor(apigateway): remove unused import validation region * style(apigateway): sort OpenAPI parser import * fix(apigateway): preserve imported authorizer merge behavior --------- Co-authored-by: Vamsi Akavarapu <16164447+vamsiak@users.noreply.github.com> |
||
|
|
86c4904bcc |
fix(ssm): resolve Secrets Manager references in GetParameter (#4581)
* fix(ssm): resolve Secrets Manager references in GetParameter GetParameter and GetParameters now answer /aws/reference/secretsmanager/<secret-id>[:<version-id-or-label>] from Secrets Manager, with the checks, error texts and response fields measured against AWS: WithDecryption must be true, a missing secret is ParameterNotFound, and GetParameters lists a reference it cannot answer in InvalidParameters. ECS task secrets and CodeBuild parameter-store variables read through the same path; a CloudFormation AWS::SSM::Parameter::Value<String> parameter still refuses one, as on AWS. * fix(ssm): check secretsmanager:GetSecretValue on a Secrets Manager reference AWS reads /aws/reference/secretsmanager/ with the caller's own secretsmanager:GetSecretValue, checked before the secret is looked up. With IAM enforcement on, a caller allowed only ssm:GetParameter now gets the ValidationException AWS sends, and GetParameters fails as a whole. * fix(ssm): authorize a Secrets Manager reference on the secret's ARN A grant on a secret's exact ARN, which CDK grantRead and a CloudFormation Ref produce, did not match the suffix-less name ARN, so an allowed caller was refused. The check now uses the secret's ARN and falls back to the name only when the secret does not exist. * fix(ssm): check a Secrets Manager reference's value on the secret it came from The value is read by name after the check, so a secret force-deleted and recreated in between was returned on the old secret's grant. The ARN of the secret actually read is now checked too. * fix(ssm): read a Secrets Manager reference's value from the secret it described * docs(ssm): note the partial-ARN fallback a Secrets Manager reference read leaves * fix(ssm): return SourceResult on a Secrets Manager reference * fix(ssm): reject a malformed Secrets Manager reference before checking IAM * chore(ssm): sort SsmService imports |
||
|
|
78c06239be |
feat(sns): support SMS account preferences (#4597)
* feat(sns): support SMS account preferences * fix(sns): include result element in SetSMSAttributes response * fix(sns): validate SMS sender IDs and cover JSON updates * refactor(sns): centralize SMS preference storage key |
||
|
|
33617e340d |
fix(iam): match condition values case-sensitively (#4672)
* fix(iam): match condition values case-sensitively * chore(ci): retry transient registry pull failure |