mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 14:10:49 -05:00
4e42f477400a2ab72d82b6129db775a0f9195475
421
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
f2d6710b24 |
fix(rds): apply DBInstanceClass, AllocatedStorage and EngineVersion on ModifyDBInstance (#4214)
* fix(rds): apply DBInstanceClass, AllocatedStorage and EngineVersion on ModifyDBInstance ModifyDBInstance parsed the password, IAM auth, subnet group, option group, security groups and the backup and monitoring settings, but never read DBInstanceClass, AllocatedStorage or EngineVersion. A resize or an engine upgrade returned 200 while DescribeDBInstances kept reporting the values the instance was created with, so a caller that diffs its configuration against a read-back saw the same pending change on every run. The three members move into a DbInstanceScalingChanges record that the handler fills from the request and the service applies, with the rules the AWS API reference states for them: - AllocatedStorage below the current size fails with InvalidParameterCombination - an increase under 10% is rounded up to 10% greater on PostgreSQL, MySQL and MariaDB, and taken as given on SQL Server - the same size is not a change and is left alone - a different major EngineVersion needs AllowMajorVersionUpgrade Floci applies the change immediately rather than deferring it to the preferred maintenance window: it runs no maintenance window and models no PendingModifiedValues, so a deferred change would never be applied at all. * fix(rds): reject a ModifyDBInstance scaling change before applying any member The scaling members were validated as they were assigned: the class was set, then the storage was resolved, which can refuse a shrink, then the engine version was checked, which can refuse a major upgrade. The instance a modify works on is the stored object rather than a copy, so a request refused at the second or third step had already written the earlier ones, and a read-back reported a class the 400 said it never got. The checks now run in resolveFor, ahead of every setter in modifyDbInstance, including the password rotation that reaches the running container. applyTo is left as pure assignment of an already-resolved record. |
||
|
|
d214144c86 |
chore(compat): bump the pinned AWS SDKs for the compatibility suites (#4237)
The SES tenant-level deliverability launch on 2026-09-17 added a TENANT_NAME metric dimension to BatchGetMetricData and a TenantName filter to the message insights export. Both reached the Java SDK in 2.55.0 and botocore in a release after the pinned one, so the suites could not express either against the versions pinned here. Java moves 2.52.0 to 2.55.3 and Python 1.43.69 to 1.43.100, the current releases of each. |
||
|
|
4b3923712a |
feat(redshiftserverless): add namespace lifecycle and tagging (#3631)
* feat(redshiftserverless): add namespace lifecycle Amazon Redshift Serverless was absent entirely: every call returned UnknownOperationException, so Terraform's aws_redshiftserverless_namespace could not be planned or applied against Floci. Add a JSON 1.1 service under the RedshiftServerless. target prefix with CreateNamespace, GetNamespace, ListNamespaces, UpdateNamespace, and DeleteNamespace. Namespaces are account and Region scoped and stored through StorageFactory. AWS defaults are applied on create (dbName dev, kmsKeyId AWS_OWNED_KMS_KEY, empty logExports, status AVAILABLE), adminUserPassword is accepted and never returned, DeleteNamespace returns the removed namespace with status DELETING, and UpdateNamespace applies only the supplied fields. Workgroups, snapshots, and the tagging operations remain unemulated. * feat(redshiftserverless): add namespace tagging operations Terraform's aws_redshiftserverless_namespace calls ListTagsForResource on every read once tags are involved, so the namespace lifecycle alone left the resource broken as soon as a config set tags. Add ListTagsForResource, TagResource, and UntagResource. Lookup is by resourceArn rather than namespace name, scoped to the caller's Region, since that is how AWS keys these operations; the namespace is currently the only taggable Redshift Serverless resource, so any other ARN is reported absent. TagResource merges into the existing tags, UntagResource removes by key, and tags passed to CreateNamespace are readable back and survive UpdateNamespace. * fix(redshiftserverless): emit creationDate as ISO-8601 per the API model The awsJson1.1 default is epoch seconds and 133 call sites use it, but this model overrides it: TimestampFormatTrait ISO_8601 on creationDate (and on all eleven other timestamp members in the package, audited). Strict clients broke on the number: Terraform's Go SDK failed to decode and orphaned the created namespace outside state; the Java SDK failed to unmarshall. Only botocore's lenient parsing let CLI checks pass. Emitted via the repo's millisecond-ISO idiom; format pinned by regex in the integration test and by a new handler-level unit test class covering the wire layer that had none (timestamp shape, nextToken emission, maxResults type guard). Checklist note added to AGENTS.md + CONTRIBUTING.md so the next service checks the trait before reaching for the epoch idiom. * docs(redshiftserverless): the ISO-8601 rule is per member, not model-wide Review follow-up: the earlier claim that every timestamp member in this model carries TimestampFormatTrait(ISO_8601) is wrong — 15 of the model's 30 INSTANT members carry no trait and fall back to the awsJson1.1 epoch default. The shipped code is unaffected (creationDate, the only timestamp emitted, is genuinely ISO_8601), but the claim was load-bearing guidance: whoever adds snapshots or scheduled actions next would have applied ISO-8601 to trait-free members and reintroduced the bug in the opposite direction. Narrowed in all four places it appeared. * fix(redshiftserverless): validate collection types, copy-on-update; drop em dashes A present iamRoles, logExports, tags or tagKeys member that was not a JSON array parsed to null and was then indistinguishable from an omitted member, so a malformed UpdateNamespace silently kept the stored value and returned 200 instead of reporting the request as invalid. Only a missing or null member now means "omitted"; a present member of the wrong type, or a collection holding a non-string element, is a ValidationException naming the member. updateNamespace mutated the stored Namespace in place while GetNamespace and ListNamespaces read without taking the same monitor, so a concurrent reader could observe a torn object with some fields updated and some not. Build the new state on a copy and store that instead, which also makes the write-back explicit. The same in-place mutation was present in tagResource, untagResource and deleteNamespace, so all four now copy. Merge semantics are unchanged. Replace the em dashes in the timestamp guidance with commas and periods, per the repository ban. * fix(redshiftserverless): reject Redshift reserved words as namespace names CreateNamespace rejects a namespace name that is an Amazon Redshift SQL reserved word, so names like select or user passed the length and [a-z0-9-] checks here and were persisted. Add the documented reserved word list to the shared namespace-name validator, which create, get, update and delete all reach, so the rejection is consistent. |
||
|
|
133ef62d27 |
feat(dynamodb): vector indexes and SearchVectors (#4215)
* feat(dynamodb): define vector indexes on the table control plane * feat(dynamodb): serve SearchVectors against vector indexes * feat(dynamodb): validate vector attributes on write * feat(dynamodb): report vector write capacity on writes * fix(dynamodb): reject a PartiQL read of a vector index * test(dynamodb): cover vector search in Floci's own suite * fix(dynamodb): match AWS on vector member paths and the f32 number format * fix(dynamodb): match AWS on the vector search validation gaps * perf(dynamodb): stop retaining and recomputing per candidate in vector search * docs(dynamodb): document that indexes are not stored |
||
|
|
e947b6a2a1 |
feat(ses): add v2 GetMessageInsights (#4157)
* feat(ses): add v2 GetMessageInsights Serves the per-recipient event timeline for a sent message. The timeline is derived at send time from the events SesRecipientEvents classifies for the send, the same classification that drives configuration-set event publishing and identity notifications, then stored on the SentEmail record, so the read path is a plain lookup and no new event store is needed. SentEmail also gains the EmailTags the operation returns, and a raw send now stores its parsed MIME subject, when present, as a simple send does. Insights additionally report DELIVERY for an ordinary recipient so a plain send does not look stuck at SEND; a suppressed recipient never gets DELIVERY, since it is dropped before the relay, and a message the content scan rejected ends every recipient's timeline at REJECT. What gets published is unchanged. Probed against real SES in us-east-1: the operation is gated on Virtual Deliverability Manager and reports that before it looks at the message id, a missing message names the account alongside the id, Isp carries the literal UNKNOWN_ISP when the provider cannot be identified, BounceType is the upper-case enum member, and an account-suppressed recipient is reported with BounceSubType ON_ACCOUNT_SUPPRESSION_LIST and SES's own suppression text as the diagnostic, the upper snake spelling this operation uses where the published events say OnAccountSuppressionList. Floci deliberately records the mailbox-simulator sends and the multi-recipient mail that VDM drops, because dropping both would leave insights permanently empty, and returns one entry per envelope recipient where an AWS response carries at most one. * test(ses): pin the message-insights VDM gate to one account The gate reads the account VDM attributes, which are account-scoped like every other SES store, but no test said so: the isolation test enables VDM for both of its accounts. An account that never enabled it now has to meet the gate while others in the same region are past it. * feat(ses): report a content-rejected raw send in message insights The raw send path classified its recipients with a hardcoded false, because the content scan did not exist on this branch's base. It does now, so the real scan result reaches the timeline: a rejected raw send reports SEND then REJECT instead of a delivery it never had. Its stored tags follow the same rule the published events already use, the request's own tags only, so tags read off a refused message's headers cannot resurface through GetMessageInsights. |
||
|
|
fcc89c0e8d |
feat(ecs): implement ExecuteCommand (#4121)
* feat(ecs): implement ExecuteCommand ECS Exec was accepted at the API but opened nothing: a client got a response it could not connect to. This implements the whole path, so `aws ecs execute-command` gives a real shell in a task's container. The gate matches AWS. The session must be interactive, which is the only mode ECS supports; the task must belong to the cluster the request names, must be RUNNING and must have been run with enableExecuteCommand; and the container must have a runtime behind it, so a mock-mode task answers TargetNotConnectedException. The response carries a session with a single-use tokenValue and a streamUrl pointing at Floci's own data channel, which is where session-manager-plugin then connects. Floci plays the SSM agent's half of the Session Manager protocol on that channel, the binary AgentMessage framing, the handshake, sequenced acknowledgements and terminal resizes, and bridges it to a docker exec with a TTY. Two threads meet on that channel. Every call into the Docker daemon blocks, so it runs on a worker rather than on the event loop, and the daemon streams the container's output back on its own thread; frames are written from the channel's Vert.x context only, which also keeps the outbound sequence numbers in the order they reach the wire. The command is attached to only once the client has accepted the handshake, so no output can be written to a channel that is still being opened. Deliberate limits, documented in docs/services/ecs.md: - The command runs through /bin/sh -c, so an image without a shell cannot be exec'd into. - Sessions are in memory, single use, and expire after five minutes if nobody connects. - ExecuteCommand logging, the executeCommandConfiguration that sends session transcripts to S3 or CloudWatch, is not implemented. The cluster field still round-trips. EcsExecSessionRegistry holds a SecureRandom, so it is registered under --initialize-at-run-time for the native image. AgentMessageTest covers the wire framing against a JDK-side encode and decode, EcsExecuteCommandIntegrationTest covers the API gate, and EcsExecChannelDockerIntegrationTest runs a real session end to end under Docker. * fix(ecs): compare the ECS Exec session token in constant time The token is the single gate in front of an interactive shell in a container, so compare it with MessageDigest.isEqual on the UTF-8 bytes rather than String.equals, which returns on the first differing character. Matches the constant-time comparison the repo already does in ScimController, IamAuthValidator and LambdaLayerService. A failed claim still leaves the session in place: dropping it would let anyone holding a session id cancel somebody else's session. * fix(ecs): expire an unclaimed ECS Exec session on read Only create() swept the session map, and neither claim() nor find() looked at createdAt, so a session nobody connected to stayed claimable, token included, until the next ExecuteCommand call happened to come in. On an idle emulator that is forever, which also made the five minute expiry documented in docs/services/ecs.md untrue. claim() and find() now go through liveSession(), which drops a session past SESSION_TTL and reports it as gone: claim() rejects it before the token comparison, and the WebSocket upgrade refuses to open a channel for it. The registry takes the CDI Clock so the tests exercise expiry without waiting out the TTL. |
||
|
|
343e1574fa |
fix(s3): reject unsigned checksum headers on presigned requests (#4153)
Match S3 behavior by requiring supported x-amz-checksum-* headers to be included in X-Amz-SignedHeaders. Return AccessDenied with HeadersNotSigned when a presigned request includes an unsigned checksum header. |
||
|
|
4753428567 |
fix(rds): bind PostgreSQL IAM tokens to the published endpoint and authorize rds-db:connect (#4100)
* fix(rds): bind PostgreSQL IAM tokens to the published endpoint The PostgreSQL proxy validated IAM auth tokens with the two-argument validator, so a token generated for any host, port or region was accepted as long as the signature and DBUser matched. The MySQL proxy already checked the token against the endpoint it publishes. Thread the same binding into the PostgreSQL handler and validate against it. * fix(rds): carry account and resource ids in the proxy binding RdsService now builds the proxy binding itself at every relay start (instances, clusters, RDS Proxy relays and restart restores) from the published endpoint, port, region, account and DbiResourceId or DbClusterResourceId, so the auth proxy has everything rds-db:connect is scoped to. The convenience startProxy overload that re-derived the region from the relay key is gone along with it. * feat(rds): authorize rds-db:connect when IAM enforcement is on After the token signature checks out, the auth proxy now asks IAM whether the token's principal may perform rds-db:connect on arn:aws:rds-db:<region>:<account>:dbuser:<resource-id>/<db-user>, the same check AWS runs. It only applies when services.iam.enforcement-enabled is on; a caller IAM does not know keeps the filter's bypass. The client still sees the engine's generic authentication failure, and the denial is logged in AWS's wording so the cause is visible server-side. * refactor(rds): rename RdsMysqlBinding to RdsProxyBinding Both engines, Aurora clusters and RDS Proxy relays now validate IAM tokens against it, so the MySQL-specific name was misleading. * docs(rds): describe IAM token endpoint binding and rds-db:connect * test(rds): cover a replayed IAM token in the JDBC compat suite * fix(rds): accept IAM tokens generated for the loopback name of the endpoint Floci advertises the name containers reach it by (host.docker.internal natively, its own address in Docker), while a client on the host connects to the same proxy over the loopback interface and generates its token for localhost or 127.0.0.1. Binding tokens strictly to the advertised host therefore refused every native client; the published port still has to match, so a token for another instance on the same host is still refused. The compatibility workflow sets FLOCI_SERVICES_RDS_ENDPOINT_HOST=floci as it already does for Redshift, so the tests' tokens name what the containerised Floci publishes. * feat(rds): make the PostgreSQL IAM token endpoint binding opt-in Refusing a PostgreSQL token generated for another hostname, port or region matches RDS but breaks clients whose tokens name a different host than the endpoint publishes, so the check now sits behind services.rds.iam-token-endpoint-binding (FLOCI_SERVICES_RDS_IAM_TOKEN_ENDPOINT_BINDING), off by default. MySQL and MariaDB keep requiring the endpoint as before, and the rds-db:connect check still runs whenever IAM enforcement is on. The compatibility workflow turns the flag on so the replayed-token case stays covered. * fix(rds): refuse an IAM token that reaches the validator without a binding Every proxy publishes a binding, so a token without one has nothing to be checked against; validating its signature alone was a fail-open path. The signature-only validate(token, user) overload and the MySQL handleAuth overloads that passed no binding are removed; production only ever used the ones that pass it. * fix(rds): sanitize the rds-db resource named in the refused connection warning The database user is part of that resource and comes straight from the client's startup message, so it is stripped of control characters like the other client-controlled values in the warning. * docs(rds): call a refused IAM token the engine's ordinary authentication failure The exact message differs per engine, and RDS PostgreSQL words it differently from Floci's handler today, so the docs no longer promise one wording. * docs(rds): move the IAM token binding row into the RDS variables table The row had landed above the page heading, where it rendered as a stray one-row table; it now follows FLOCI_SERVICES_RDS_ENDPOINT_HOST as it does on the RDS page. * fix(rds): bind PostgreSQL IAM tokens to the endpoint by default A stock Floci still accepted a PostgreSQL token generated for another endpoint, the replay this change set out to close, and PostgreSQL and MySQL disagreed about it in a way RDS never has. The endpoint check is now on for every engine. services.rds.iam-token-endpoint-binding (FLOCI_SERVICES_RDS_IAM_TOKEN_ENDPOINT_BINDING=false) stays as the escape hatch for clients that generate tokens for a container name or DNS alias the endpoint does not publish. The compatibility workflow no longer needs to turn the check on. * chore(ci): rerun after a Docker Hub rate limit failed shard 1 |
||
|
|
8e6faffcaf | fix(kinesis): paginate ListShards with an opaque NextToken (#4098) | ||
|
|
cde8f48084 |
fix(cloudwatchlogs): return creationTime in DescribeLogGroups and DescribeLogStreams (#4137)
The LogGroup and LogStream API shapes carry the creation timestamp as creationTime, but both responses wrote it as createdTime, so SDK clients and the CLI saw it as unset. Only the response key changes; the persisted model field keeps its name so existing data is unaffected. Closes #4084 Signed-off-by: Matheus André <matheusandr2@gmail.com> |
||
|
|
0524d156d4 |
feat(codeartifact): serve the maven format through a real Reposilite-backed proxy (#4059)
GetRepositoryEndpoint for format=maven now returns a URL real Maven clients (mvn deploy, mvn dependency:get, Gradle) can publish to and resolve from directly, backed by a shared Reposilite sidecar container started lazily on first use. A CodeArtifact repository maps to its own Reposilite repository, provisioned automatically and never reused even across delete/recreate of a same-named repository, so a fresh repository can never inherit a previous one's artifacts. Adds GetAuthorizationToken (a token scoped to a domain, with the 900-43200s custom range; 0 falls back to 12 hours) and requires it on every Maven proxy request, either as the password of HTTP Basic credentials, the form AWS's Maven guide configures with username aws, or as a Bearer token. Maven requests are not SigV4-signed, so the region and account come from the token. Also enforces AWS's 5 GB asset size quota on the Maven endpoint, matching the existing PublishPackageVersion check. Artifacts do not survive a Floci restart; the service page documents this as a known limitation. |
||
|
|
06007deea8 |
fix(cognito): default ExplicitAuthFlows to refresh, SRP and custom auth (#4081)
A user pool client created without ExplicitAuthFlows was treated as allowing every auth flow, where AWS defaults such a client to ALLOW_REFRESH_TOKEN_AUTH, ALLOW_USER_SRP_AUTH and ALLOW_CUSTOM_AUTH. USER_PASSWORD_AUTH against a no-list client succeeded on Floci and is refused on AWS. Apply that default at auth time, in the existing gate added by #3974. CreateUserPoolClient, UpdateUserPoolClient and DescribeUserPoolClient keep storing and returning exactly what was normalized, empty when unset, matching AWS: Terraform's Cognito acceptance tests confirm the empty read-back for both an omitted list and an explicit empty one, and materialising the default into storage would fail Terraform apply with an inconsistent-result error. Tests and compatibility fixtures that created a no-list client and then signed in with a flow outside the default now enable that flow on their client. |
||
|
|
2f5aa99701 |
feat(iam): add ListInstanceProfileTags (#4140)
TagInstanceProfile and UntagInstanceProfile already existed; the read side was missing. Mirrors ListUserTags's response shape, and sorts the result by tag key to match the documented AWS behavior. Also adds the instance-profile tag actions to AwsQueryController's IAM_ACTIONS fallback set, completing the Tag/Untag/List triple already present there for users, roles and policies. Covers the trio in the SDK compatibility suite (compatibility-tests), which previously had no instance-profile tagging coverage. |
||
|
|
d272cd3ceb |
fix(ses): publish a Bounce for suppressionlist@simulator and split events by cause (#4073)
* fix(ses): publish a Bounce for suppressionlist@simulator and split events by cause suppressionlist@simulator.amazonses.com published a Reject event. Real SES publishes a hard Bounce for it: bounceType Permanent, bounceSubType General, and a diagnostic that names the suppression. Reject is the outcome of the content scan, which the simulator has no address for. Verified against SES in us-east-1 on 2026-09-21 through an SNS event destination. The same probe confirmed that a recipient on the account-level suppression list bounces with bounceSubType OnAccountSuppressionList, or is complained about with complaintSubType OnAccountSuppressionList, and that SES publishes one event per cause: a message reaching both bounce@simulator and a suppressed address produces two Bounce events, each listing only its own recipients. Floci merged them into one General bounce. One classifier, SesRecipientEvents, now decides the events a send produces per recipient, and the publisher and identity notifications consume its output, so the simulator and suppression semantics have a single home. complaint@simulator now publishes Delivery before Complaint, as the simulator documents, a list-management opt-out bounces under its own cause, every bounce and complaint block carries its own feedbackId, and complaints carry arrivalDate. Reject stays reachable the way AWS documents it: a Simple send carrying the EICAR test file in its subject, a header or a text body is accepted and then rejected with reason "Bad content" and not relayed. The signature is assembled from fragments at runtime and never appears in source. Scanning raw MIME and keeping the signature out of the mailbox store follow separately. * fix(ses): drop the content of a rejected record A send the content scan rejected was still recorded in full, so its subject, body and headers reached the sent-email store, the inspection endpoint and, with persistence on, the disk. The record now keeps only its source, its envelope and RejectReason, and the inspection endpoint shows the reason. * fix(ses): keep the scanned content out of a rejected message's events The Send and Reject events of a rejected message carried the subject and the additional headers in their mail block, so with headers enabled a subject carrying the test string reached every event destination and, with persistence on, the disk. Both events now carry the envelope but no subject and no headers, a small deviation from SES that keeps the string off disk entirely; the docs say so. |
||
|
|
532bae5525 |
feat(dms): add replication subnet group lifecycle and tagging (#3630)
* feat(dms): add replication subnet group lifecycle AWS DMS was entirely absent, so every terraform-aws-data-storage example using aws_dms_replication_subnet_group failed at plan with UnknownOperationException. Adds a minimal dms service on AWS JSON 1.1 (X-Amz-Target prefix AmazonDMSv20160101.) implementing CreateReplicationSubnetGroup, DescribeReplicationSubnetGroups and DeleteReplicationSubnetGroup. Subnets are resolved against the emulated EC2 service, so the VpcId and Availability Zones a group reports are the ones its subnets actually have, and AWS's own rules are enforced: the identifier is stored lowercase, "default" is reserved, subnets must share a VPC, and a group must cover at least two Availability Zones. Tagging actions and replication instances, endpoints and tasks are out of scope and still report UnknownOperationException. * feat(dms): add resource tagging for replication subnet groups Terraform's aws_dms_replication_subnet_group reads tags back through ListTagsForResource, so without the tagging trio the resource could be created but never read cleanly. Adds ListTagsForResource, AddTagsToResource and RemoveTagsFromResource, and stores the Tags member of CreateReplicationSubnetGroup with the group. DMS does not return a subnet group ARN from describe, so the provider builds arn:aws:dms:<region>:<account>:subgrp:<id> client side; Floci parses that form back to the stored group and rejects anything else, including another account's ARN, with ResourceNotFoundFault. * fix(dms): address review findings Emit IsReadOnly on ReplicationSubnetGroup, the one member of the model's seven the response was missing. It is always false: a read-only group is one DMS manages for a zero-ETL integration, which Floci does not emulate. Fault a cross-Region ARN the way a cross-account one already faulted. Storage is keyed by the caller's Region, so honouring an eu-west-1 ARN from a us-east-1 caller silently reached the caller's own group of that name rather than the one named. Reject a subnet with no Availability Zone as InvalidSubnet. Set.copyOf rejects nulls, so such a subnet raised a NullPointerException and surfaced as a 500 instead of a client error. Adds the user-realistic minimum-AZ case: two subnets sharing one AZ, which the previous tests did not cover because they passed one subnet. * fix(dms): reject wrongly-typed tag, filter and arn-list members A present member of the wrong JSON type was coerced rather than rejected. asText() on an object yields the empty string, so a tag whose Value was an object stored an empty value and reported success; a Filters or ResourceArnList member that was not a list was ignored outright, which turned a filtered describe into an unfiltered one. Every string member now answers SerializationException when it is present with another JSON type, matching what AWS returns when a json-1.1 member will not deserialize, and matching how Kinesis, Cognito and KMS already report the same class of error here. An absent member stays a parameter error: missing and mistyped are different faults. * fix(dms): paginate DescribeReplicationSubnetGroups and validate the description DescribeReplicationSubnetGroups returned every matching group in one response and ignored both MaxRecords and Marker, so an SDK or Terraform paginator diverged from a live account as soon as more than one page of groups existed. Page through the shared opaque-cursor helper, keyed on the group identifier, so a Marker stays resumable across groups created or deleted between requests. MaxRecords defaults to 100 and is rejected outside the documented 20 to 100 range rather than clamped, with the InvalidParameterValueException a live account answers. Marker is emitted only while a further page remains: an SDK paginator treats any Marker as "ask again", so one on the final page loops forever. ReplicationSubnetGroupDescription now also enforces the model's printable-character constraint, so a value carrying a control character such as 0x01 is rejected instead of persisted. * docs(dms): describe the Marker as the opaque cursor it is * fix(test): DmsTest must compile at the sdk-test-java module's Java 17 target List.getFirst() is a Java 21 SequencedCollection method. The main project compiles at 21, but compatibility-tests/sdk-test-java pins source/target 17, and DmsTest was the only file in that module using getFirst() -- so the native arm64 sdk-test-java image failed to build and every test in it was skipped. This was not caught earlier because the previous head of this PR had no CI rollup at all; the merge that made the branch mergeable is what first ran the job. Replaced with get(0), which is what the rest of the module uses. * style(test): import Objects and Collectors instead of naming them inline AGENTS.md asks for imports rather than inline fully-qualified names. DmsServiceTest had two: java.util.Objects::nonNull and java.util.stream.Collectors.toMap. Neither was imported; both now are. |
||
|
|
ecdc9ccfdd |
feat(rds): DB cluster snapshots (#4097)
* feat(rds): DB cluster snapshots Add CreateDBClusterSnapshot, DeleteDBClusterSnapshot, CopyDBClusterSnapshot, RestoreDBClusterFromSnapshot, DescribeDBClusterSnapshotAttributes and ModifyDBClusterSnapshotAttribute, and make DescribeDBClusterSnapshots list real snapshots with its three filters instead of an empty list. A cluster snapshot records the cluster's description and a dump of its database; a restore creates a new cluster from the snapshot's settings and loads the dump into it. Copies carry the data, CopyTags and Tags and record SourceDBClusterSnapshotArn; the restore attribute is shared the way instance snapshots share it. Closes #4042 * feat(rds): restore a cluster from a snapshot named by ARN, simplify the cluster snapshot handlers RestoreDBClusterFromSnapshot resolves SnapshotIdentifier by name or ARN through the helper CopyDBClusterSnapshot already uses, as the API reference allows and aws_rds_cluster commonly sends. The six handlers use the shared firstMissingParam helper and the central AwsException handling; the new service lines import InMemoryStorage and Predicate instead of qualifying them inline, and the tests import DbClusterSnapshot. |
||
|
|
2af7ed71a7 |
feat(redshift): implement snapshot copy grant lifecycle (#3628)
* feat(redshift): implement snapshot copy grant lifecycle Terraform's aws_redshift_snapshot_copy_grant needs the full CRUD, and all three actions returned InvalidAction. Add CreateSnapshotCopyGrant, DescribeSnapshotCopyGrants and DeleteSnapshotCopyGrant to the Query handler, backed by a new storage map on RedshiftService. The grant name is the key: a duplicate create raises SnapshotCopyGrantAlreadyExistsFault, and describe-by-name or delete of a missing grant raises SnapshotCopyGrantNotFoundFault. Describe without a name returns every grant. KmsKeyId is optional and defaults to the account's AWS-managed Redshift key alias ARN, mirroring how Ec2EbsEncryptionService stands in for a default key. Tags ride along on create, since the CLI sends them inline as Tags.Tag.N.Key/.Value on this action rather than via CreateTags, and snapshotcopygrant ARNs now resolve in the tagging operations alongside the other Redshift resource types. * test(redshift): cover snapshot copy grants through the real SDK * fix(redshift): paginate DescribeSnapshotCopyGrants The action returned every grant in one page and ignored MaxRecords and Marker, so a client with more grants than fit in a page had no way to walk them. Page through the shared Pagination helper, which sorts by the grant name and encodes the last returned name as an opaque base64 cursor, so ordering is stable and a marker stays resumable when grants are created or deleted between pages. Marker is emitted only while further pages remain, which is what tells a paginating client to stop. MaxRecords follows the Redshift model: default 100, and a value outside 20 to 100 is rejected with InvalidParameterValue rather than clamped. The model documents SnapshotCopyGrantName and Marker as mutually exclusive but declares no error for sending both, so this filters by name and then paginates instead of rejecting the pair. A name matches at most one grant, which fits in any page. * fix(redshift): enforce the SnapshotCopyGrantName contract AWS validates SnapshotCopyGrantName as 1-63 characters, first a lowercase letter, then lowercase letters, digits or single hyphens with no trailing or doubled hyphen. Create accepted anything non-blank, so names Redshift rejects (1grant, Grant, grant--copy, grant-, 64 characters) persisted locally and diverged from AWS. Validate in RedshiftService before persistence, matching the existing snapshot identifier check, and answer InvalidParameterValue as the rest of the handler does. * fix(redshift): return 400 for SnapshotCopyGrantNotFoundFault on Describe and Delete AWS documents SnapshotCopyGrantNotFoundFault as HTTP 400 in the error tables for both DescribeSnapshotCopyGrants and DeleteSnapshotCopyGrant; we returned 404. Two existing wire-level assertions in RedshiftOperationsTest pinned the wrong status, so they move with the code, and the unit tests now assert the status alongside the error code. The third throw site, in the tagging helper, deliberately stays 404: the status belongs to the action rather than the fault code, and that path is reached only from CreateTags/DeleteTags/DescribeTags, whose documented missing-resource error is ResourceNotFoundFault at 404. A regression pins that, and a comment says why the two differ. Refs: https://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeSnapshotCopyGrants.html https://docs.aws.amazon.com/redshift/latest/APIReference/API_DeleteSnapshotCopyGrant.html https://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateTags.html * fix(redshift): serialize grant create/delete, and use ResourceNotFoundFault on the tag path Two findings from the latest review round. createSnapshotCopyGrant checked the name was free and then wrote, with nothing between the two steps, so two concurrent creates of one name could both succeed and the second would overwrite the first. create and delete are now synchronized, as createCluster and modifyCluster already are. The new wire-level test holds two threads on a latch and releases them into the same name: it fails on every run without the keyword (3/3 locally) and passes with it, so it pins the lock rather than describing it. The tagging path threw SnapshotCopyGrantNotFoundFault with HTTP 404. Both halves of that pairing cannot be right at once: botocore's Redshift model gives that shape httpStatusCode 400, and an error shape's status is a property of the shape, not of the calling action. But 404 is the correct status here, because CreateTags/DeleteTags/DescribeTags do not list that fault at all -- they document ResourceNotFoundFault, modelled at 404, for any missing resource. So the status stays and the code changes. That also explains why the three sibling cases in the same switch are already consistent: ClusterNotFound, ClusterSnapshotNotFound and ClusterParameterGroupNotFound are each modelled at 404 themselves. Describe and Delete still return SnapshotCopyGrantNotFoundFault at 400, which is what those two actions document. Docs gain a short section on the grant surface: the alias-ARN KmsKeyId default, the unvalidated tag limits, and why a missing grant reports two different faults depending on which action you reach it through. * style(test): name the new snapshot copy grant tests without the testX prefix AGENTS.md: "Name test methods either as a camelCase sentence or as method_scenario_expectation. Both are established. testX names are common in older tests and are not the pattern to copy." The 31 tests this PR adds to src/test all used testX because the three Redshift files they landed in are unusually full of it -- 7/7, 30/50 and 69/104 -- but that is the local exception, not the repo convention, and the rule is explicit about not copying it. Renames only; no test body changes. The two new tests in compatibility-tests/sdk-test-java keep testX: that module has the opposite idiom and AGENTS.md says to follow the module you are in, and all five methods in that file, three of them pre-existing, are named that way. |
||
|
|
98ffdc2af4 |
test(rds): cover the snapshot lifecycle end to end (#4096)
* test(rds): cover the snapshot lifecycle end to end Add a Docker-backed integration test for the snapshot lifecycle of #4066: a row written before the snapshot comes back from an instance restored from a copy of it, deleting the source leaves the copy and its data, and each refusal carries the AWS error; and an AWS SDK for Java v2 compat case for copy, modify and delete through the SDK's typed exceptions. Refs #4083 * test(rds): stop asserting SourceDBSnapshotIdentifier on a same-region copy The DBSnapshot reference says the field only has a value for a cross-account or cross-Region copy; both tests copy within one account and region, so asserting it would pin a difference from AWS. |
||
|
|
1542c641a6 |
feat(rds): stop, start and reboot DB instances and clusters (#4071)
* feat(rds): stop, start and reboot DB instances and clusters Add StopDBInstance, StartDBInstance, StopDBCluster, StartDBCluster and RebootDBCluster. A stop reports "stopping", takes the optional snapshot, removes the container and proxy and settles the record to "stopped" while its identifier, endpoint, groups and Docker volume stay; a start reports "starting" and brings the container back on the kept volume and port. Cluster stop, start and reboot carry the member instances along. StopDBInstance refuses cluster members, read replicas and their sources, and anything not available; ModifyDBInstance refuses a stopped instance; a stopped resource stays stopped across an emulator restart. Closes #4043 * feat(rds): refuse starting a stopped cluster's member alone, serialize cluster lifecycle calls StartDBInstance now refuses a cluster member as StopDBInstance does, and both answer InvalidDBClusterStateFault, the fault the model lists for a member on either call; a member started alone would have got a standalone container on its own volume while the cluster stayed stopped. stopDbCluster, startDbCluster and rebootDbCluster are synchronized like the instance calls, so two concurrent starts cannot both see STOPPED. The five handler arms use the shared required-parameter helper and the central AwsException handling. * test(rds): import DbInstanceStatus instead of qualifying it inline AGENTS.md asks for imports over inline fully-qualified names; the file already imports DbInstanceStatus. |
||
|
|
7b29fdcf83 |
feat(ecs): complete the operations outside the launch path (#4019)
The operations that are not part of launching a task were the ones ECS answered least like AWS: a listing returned everything at once, a describe dropped what it could not resolve, and several stored less than the request carried. Clusters. CreateCluster and UpdateCluster carry configuration and serviceConnectDefaults, UpdateCluster replaces only the members the request named, and DescribeClusters gates settings, tags, statistics, attachments and configuration on include, reporting the eight documented statistics split by launch type. DeleteCluster refuses a cluster that still has services, container instances or running tasks, with the exception AWS reports for each. Pagination. Every listing pages with maxResults and nextToken behind one shared helper: a hundred per page, ten for ListServices, ten for ListAccountSettings. ListTaskDefinitions lists only ACTIVE revisions by default and orders by family then numeric revision; ListTasks defaults to the running tasks and filters by launch type, container instance and startedBy, which has to be the only filter alongside the cluster scope. Container instances. RegisterContainerInstance keeps what the agent sent, deregistration leaves the instance describable as INACTIVE, UpdateContainerInstancesState moves only between ACTIVE and DRAINING, and DescribeContainerInstances gates tags and health on include. Account settings and attributes. A setting is validated per name, carries its principal and type, and falls back from the principal's own value to the account default to the built-in default under effectiveSettings. An attribute belongs to a cluster and must name a container instance it has. Task sets. A task set needs an EXTERNAL or CODE_DEPLOY service, computes its desired count from the service's, round-trips its networking and load balancers, and needs force to delete before it is scaled to zero. CodeDeploy's call site reports the CODE_DEPLOY startedBy ECS reports. Service deployments and revisions. A deployment is recorded with the revision it targets, the two point at each other, and the service reports the deployment and revision it is currently on. Verified against the AWS SDK for Java v2 and the AWS ECS API reference. |
||
|
|
8ccc89df41 | fix(cloudwatch): honor Unit filter in JSON GetMetricStatistics (#3932) | ||
|
|
d227ef9195 |
feat(redshift): add ModifyClusterIamRoles, DescribeClusterVersions and DescribeOrderableClusterOptions (#3990)
ModifyClusterIamRoles adds and removes the IAM roles associated with a cluster. The change is pushed to the running auth proxy, so COPY and UNLOAD on new connections authorize against the updated role list. Cluster IamRoles now report ApplyStatus in-sync. DescribeClusterVersions and DescribeOrderableClusterOptions return static data so IaC providers can validate node types before creating a cluster. |
||
|
|
0108b9653a | fix(cloudwatchlogs): add logGroupArn to DescribeLogGroups (#3868) | ||
|
|
bf1152e144 |
feat(ecs): complete the fargate launch surface (#4017)
Floci accepted a Fargate task definition and ran it, but most of the launch surface was dropped on the way through: members that AWS echoes back went missing from responses, launch type resolution never validated what it resolved, and the runtime ignored the sizing the task asked for. Task definitions. A definition round-trips whole. Members that change behaviour are typed (ephemeralStorage, dependsOn, environmentFiles, port mapping name / appProtocol / containerPortRange, pidMode, ipcMode and the container-level members the parser used to drop); members Floci does not act on go through EcsJsonPassthrough, so an unimplemented volume configuration comes back as it was sent rather than vanishing. compatibilities is derived from the definition rather than echoed from requiresCompatibilities, requiresAttributes names the capabilities the definition needs, and a revision carries its registeredAt, deregisteredAt and deleteRequestedAt through the ACTIVE / INACTIVE / DELETE_IN_PROGRESS lifecycle. Validation. Fargate task sizes are validated per CPU architecture and operating system family, ephemeral storage against its 21-200 GiB range, container dependencies for unknown names and cycles, and the parameters Fargate does not support are rejected at registration with the exception type AWS documents for them, ClientException; the message text is Floci's, since AWS does not document the wording. Enum-typed members are validated at parse time and raise InvalidParameterException instead of being treated as absent, and tag cardinality and character limits are enforced across the operations that take tags. Launch. capacityProviderStrategy is distributed across its providers the way ECS distributes it, base first and the remainder by weight, with the cluster's default strategy applying when a request carries neither it nor a launch type. The strategy is validated against the bounds the ECS model gives it: at most 20 providers, weight 0 to 1,000, base 0 to 100,000, one base per strategy, and at least one provider of non-zero weight when a strategy names more than one, since a provider of weight 0 places nothing beyond its base. A task's CPU and memory reach the container, an awsvpc task gets an ENI per task and releases it when it stops, container dependencies are ordered with cycle detection, and mock mode reports per-container detail so a client running without Docker sees the same shape. The ENI allocation reaches into EC2, whose InvalidSubnetID.NotFound and InvalidGroup.NotFound are not in RunTask's error list, so an unknown subnet or security group is reported as the InvalidParameterException AWS returns. Verified against the AWS SDK for Java v2 and the AWS ECS API reference. Adds EcsFargateTaskIntegrationTest, EcsFargateTaskDefinitionIntegrationTest and EcsFargateEdgeCaseIntegrationTest, plus an SDK-based EcsFargateTest in the compatibility suite. |
||
|
|
a12bf8c96c |
feat(cognito): enforce app client ExplicitAuthFlows in InitiateAuth and AdminInitiateAuth (#3974)
ExplicitAuthFlows was stored but never checked, so a client that only allowed SRP still accepted USER_PASSWORD_AUTH. When a client lists flows, reject any flow it does not enable with InvalidParameterException. Legacy values (USER_PASSWORD_AUTH, ADMIN_NO_SRP_AUTH, CUSTOM_AUTH_FLOW_ONLY) are honored, and clients created without a list stay ungated. The Java compatibility test signed in with ADMIN_USER_PASSWORD_AUTH on a client that never enabled it; add ALLOW_ADMIN_USER_PASSWORD_AUTH to that client. |
||
|
|
628952ecf0 |
feat(glue): catalog resource policy and Data Catalog encryption settings (#4027)
* feat(glue): catalog resource policy and Data Catalog encryption settings Add PutResourcePolicy, GetResourcePolicy, GetResourcePolicies and DeleteResourcePolicy with the PolicyExistsCondition and PolicyHashCondition checks Terraform relies on, and Get/Put DataCatalogEncryptionSettings with the documented defaults. ConnectionPasswordEncryption is applied rather than stored: while it is on, CreateConnection and UpdateConnection encrypt PASSWORD and the four Kafka passwords with the configured KMS key and keep them under their documented ENCRYPTED_* names, so reads return the ciphertext and a missing key is GlueEncryptionException. Closes #4023 * docs(glue): cite the source for connection password encryption timing and drop an unsourced claim The developer guide states that whether a password is encrypted was decided when the connection was created or updated, which is the source for connections keeping their plaintext; the missing-key error is described as the error CreateConnection and UpdateConnection list rather than as AWS behaviour. Also replaces a var in the compat test with the explicit type. |
||
|
|
a793776c1a |
feat(glue): Data Catalog connections (#3939)
* feat(glue): Data Catalog connections Add CreateConnection, GetConnection, GetConnections, UpdateConnection, DeleteConnection, BatchDeleteConnection and TestConnection. A connection precedes every job and crawler in a Glue stack and Terraform reads it on each plan, so without it a stack with an aws_glue_connection could not get past its first plan. Behaviour follows the Glue API reference: HidePassword omits PASSWORD and ENCRYPTED_PASSWORD, UpdateConnection redefines the connection rather than merging into it, ConnectionInput is validated against the documented limits and enumerations, credentials are accepted and never returned, and TestConnection accepts a well-formed request with an empty body without opening a socket. Closes #3938 * feat(glue): cap BatchDeleteConnection at 25 names and document HidePassword's scope The API reference caps ConnectionNameList at 25 entries; a longer list is now InvalidInputException. HidePassword's coverage of the Kafka credential keys is not documented by AWS, so the docs page states that Floci removes PASSWORD and ENCRYPTED_PASSWORD only. |
||
|
|
2697868e86 |
fix(codeartifact): populate resourceId/resourceType on error responses (#3977)
Every ConflictException, ResourceNotFoundException, and ServiceQuotaExceededException the service threw carried a message only, but the wire model declares resourceId/resourceType on all three, and the AWS SDK exposes them as typed accessors. Populate them consistently using the resource's locally-unique name (domain name, repository name, package version, or asset name) as resourceId. Populating resourceId this way exposed a real crash: Map.of() rejects null values, so any request missing a required identifier (domain, repository, package, packageVersion, asset) turned what used to be a wrong-status ResourceNotFoundException into a raw NullPointerException / HTTP 500. Fixed by validating required identifiers up front (returning ValidationException, matching AWS) and by making the extendedData-building helper itself null-safe against a missing resourceId, so no single overlooked call site can reintroduce a 500. |
||
|
|
8af15a71c4 |
fix(cloudformation): remove the login profile when deleting an IAM user (#3975)
Since login profiles became real state, DeleteUser returns DeleteConflict while one exists, so deleting a stack whose AWS::IAM::User was given a password out of band ended in DELETE_FAILED. The provisioner now deletes the login profile before the user, tolerating a user that has none. The resource-type table notes that the template LoginProfile and PermissionsBoundary properties are ignored. |
||
|
|
c5de8331b7 |
fix(ec2): remove tags on the default resources deleted with the VPC (#3917)
DeleteVpc already removes the default security group, its rules, the main route table and the default network ACL, but their tags stayed in DescribeTags. Delete them with the resources. |
||
|
|
68425d942a |
fix(kms): match the AWS error codes, messages and check order (#3968)
* fix(kms): reject Sign and Verify on keys that are not SIGN_VERIFY * fix(kms): validate SigningAlgorithm and key spec * refactor(kms): keep only comments the code cannot show * fix(kms): check the DIGEST length for every signing algorithm * fix(kms): refuse disabled and pending deletion keys * fix(kms): answer a failed Verify with KMSInvalidSignatureException * fix(kms): fix MAC key usage and invalid MAC errors * fix(kms): validate MacAlgorithm * fix(kms): use the key spec error for an unsupported MAC algorithm * fix(kms): only treat a malformed signature as invalid in Verify * fix(kms): answer a key pending import with its ARN and state * fix(kms): name the key ARN when it is pending deletion * fix(kms): refuse a key pending deletion in key management operations * fix(kms): check the key state in GetPublicKey * test(kms): drop the real AWS notes from test comments * fix(kms): send no message when GetPublicKey gets a symmetric key * fix(kms): check the key state before changing key rotation * fix(kms): send no message when the key spec does not rotate * fix(kms): accept DisableKeyRotation on a key spec that does not rotate * fix(kms): name the key ARN and origin when the origin is not valid * fix(kms): ask for new key material when rotating an EXTERNAL key on demand * fix(kms): validate RotationPeriodInDays * fix(kms): use the AWS wording for IncorrectKeyException * fix(kms): send no message with InvalidCiphertextException * fix(kms): list EncryptionAlgorithm values in the AWS order * fix(kms): validate the data key KeySpec and NumberOfBytes * fix(kms): require either KeySpec or NumberOfBytes for a data key * fix(kms): make an AES_128 data key 16 bytes long * fix(kms): use the AWS error for a data key under an asymmetric key * fix(kms): name GenerateDataKeyWithoutPlaintext in its key usage error * fix(kms): report the GenerateRandom bound that NumberOfBytes breaks * fix(kms): say NumberOfBytes is required in GenerateRandom * fix(kms): list the MessageType values in its validation error * fix(kms): answer NotFoundException with status 400 * fix(kms): use the AWS wording when a key does not exist * fix(kms): use the AWS wording when an alias does not exist * fix(kms): reject a key or alias ARN from another region * fix(kms): validate a missing, empty or non-ASCII KeyId * fix(kms): validate blob members before looking up the key * fix(kms): reject an alias in operations that need a key * test(compat): stop scheduling a KMS key for deletion twice |
||
|
|
eef69445cc |
feat(iam): enforce DeleteUser prerequisites and carry access keys and group membership through a rename (#3918)
DeleteUser now returns DeleteConflict while the user still has inline policies or access keys, matching AWS. UpdateUser rename moves the user's access keys and group membership to the new name, so a renamed user keeps them and a user recreated under the old name does not inherit them. |
||
|
|
5a11e7f6fb |
fix(ec2): return DependencyViolation from DeleteVpc while dependents remain (#3916)
DeleteVpc now refuses while the VPC still has a subnet, a security group, route table or network ACL other than the defaults, or an attached internet gateway, as AWS does. Creating a subnet, group, route table or network ACL, or attaching an internet gateway, re-checks the VPC under the region topology lock, so a concurrent DeleteVpc can no longer leave one pointing at a VPC that is gone. AttachInternetGateway now rejects a VPC that does not exist. |
||
|
|
1e8485830c |
fix(cognito): refuse DeleteUserPool while deletion protection is active (#3961)
DeletionProtection was stored and round-tripped but never read on the delete path, so a protected pool was deleted like any other and a CloudFormation DeleteStack owning one succeeded. AWS refuses with InvalidParameterException until UpdateUserPool switches the flag to INACTIVE, and the stack reports DELETE_FAILED with that reason. The check reads the pool store directly: describeUserPool would turn a delete of a missing id into ResourceNotFoundException (a separate divergence) and generate signing keys as a side effect. Closes #3948 |
||
|
|
8ca748355d |
feat(ses): add v2 import jobs for the suppression list and contact lists (#3892)
* feat(ses): add v2 import jobs for the suppression list and contact lists
Implements CreateImportJob, GetImportJob and ListImportJobs. A job reads a
CSV or newline-delimited JSON object from the local S3 emulation and applies
each record through the existing suppression-list and contact services, so
the imported rows land in their stores and only the job record is new.
The job is returned as CREATED and runs on a virtual thread under the request
account, moving to PROCESSING and then COMPLETED or FAILED, as on AWS. Records
that fail validation are counted in FailedRecordsCount while the job still
completes; a missing bucket or object, a contact-list CSV without an
emailAddress header, or a contact list deleted before the worker runs fail
the job with FailureInfo.ErrorMessage. At most 20 jobs per region may be in
progress, and jobs interrupted by a restart are marked FAILED on startup.
* fix(ses): accept the guide's unquoted contact row and match AWS's import not-found message
A quote that does not open a CSV field is data rather than an error: the SES
list-management guide writes attributesData unquoted as {"Name": "John"}, so
rejecting it refused the documented format. Garbage after a closing quote is
still a failed record, since that row cannot be read back unambiguously.
An import job for an unknown contact list answers NotFoundException with its
own wording, "ContactList <name> doesn't exist", which differs from the
contact-list APIs. Probed against real SES: the check is synchronous and the
error is NotFoundException, even though the service model lists only
BadRequestException, LimitExceededException and TooManyRequestsException for
CreateImportJob. The contact service keeps its own message.
Also drops five unused imports and a dead stripBom that held the only literal
BOM character in the reader sources.
|
||
|
|
a154470172 |
feat(ec2): validate DescribeVpnGateways and add DescribeEgressOnlyInternetGateways (#3879)
* feat(ec2): validate DescribeVpnGateways and add DescribeEgressOnlyInternetGateways * refactor(ec2): drop unused region parameter from empty gateway discovery * fix(ec2): return an empty set for an unknown egress-only gateway ID --------- Co-authored-by: Jason van Zyl <jason@vanzyl.ca> |
||
|
|
1370dc02fa |
fix(appconfig): return feature flags in retrieval format (#3890)
Co-authored-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com> |
||
|
|
bbaf3568c5 |
feat(codeartifact): support publishing and reading generic-format package versions (#3839)
Adds PublishPackageVersion, DescribePackageVersion, and GetPackageVersionAsset for CodeArtifact's generic package format, matching AWS's own wire restriction that PublishPackageVersion accepts only the generic format. Includes real asset hashing (MD5, SHA-1, SHA-256, SHA-512), SHA-256 integrity verification against the caller's x-amz-content-sha256 header, correct Unfinished/Published status transitions, and the documented AWS quotas for this action (350 assets per version, 5 GB max asset size), all returning ServiceQuotaExceededException when exceeded. Asset bytes are kept out of the JSON/WAL-backed package-version store (@JsonIgnore on PackageAsset.content) and instead go through a dedicated asset store, a disk file in persistent/hybrid/wal mode or a side map in memory mode, the same split S3Object/S3Service already uses for object bytes. Without this, a publish rewrote every asset of every package version on disk each time, growing quadratically under this action's own 350-asset/5GB quotas. The asset name is also validated against the wire model's AssetName pattern (no control characters), not just its length, since it is echoed back verbatim in the X-AssetName response header on GetPackageVersionAsset. Verified against the real botocore service-2.json wire model and the AWS CodeArtifact User Guide (including its PDF for the quotas table, since the HTML quotas page is JS-rendered). Live-verified with the real AWS CLI and the AWS SDK for Java v2 against a running Floci instance, including an exact byte-for-byte asset round-trip and the real ConflictException when republishing an already-Published version. |
||
|
|
e190f7d340 |
feat(iam): implement CreateLoginProfile, UpdateLoginProfile, DeleteLoginProfile (#3865)
* feat(iam): implement CreateLoginProfile, UpdateLoginProfile, DeleteLoginProfile GetLoginProfile previously existed as a permanent stub always returning NoSuchEntity, and the docs claimed the other three actions were supported even though the query handler had no case for them at all. Adds a LoginProfile model and the full lifecycle on IamService: a user holds at most one login profile, Create/Get/Delete default UserName to the caller's resolved identity (matching AWS), Update requires it explicitly, and Update leaves an omitted field (Password or PasswordResetRequired) unchanged rather than resetting it. The password is validated against AWS's wire character-class/length rule and, when the account has one, against the existing account password policy (PasswordPolicyViolation). Verified against the real AWS IAM API reference for all four actions' request/response shapes and error lists. * fix(iam): block DeleteUser on a login profile and carry it through UpdateUser rename Login profiles now persist, so deleteUser left an orphaned profile that a recreated user of the same name would inherit, and a rename dropped the profile. DeleteUser now returns DeleteConflict while a login profile exists, as AWS does, and UpdateUser moves the profile to the new name. |
||
|
|
052da93515 |
fix(ec2): store omitted tag values as empty strings (#3880)
* fix(ec2): store omitted inline tag values as empty strings * fix(ec2): normalize omitted tag values on CreateTags and every tag-spec path --------- Co-authored-by: Jason van Zyl <jason@vanzyl.ca> |
||
|
|
75fee00adc |
fix(ec2): delete VPC default security group, route table and network ACL with the VPC (#3878)
* fix(ec2): delete VPC default security group, route table and network ACL with the VPC * test(ec2): check deleted VPC defaults by VPC scope instead of by ID --------- Co-authored-by: Jason van Zyl <jason@vanzyl.ca> |
||
|
|
0142d443ac |
feat(cloudformation): provision CloudWatch log streams (#3869)
* feat(cloudformation): provision CloudWatch log streams * fix(cloudformation): preserve conditional log stream name omission --------- Co-authored-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com> |
||
|
|
eb787672b8 |
feat(timestream-influxdb): add Timestream for InfluxDB backed by InfluxDB 2.x containers (#3683)
* feat(timestream-influxdb): add Timestream for InfluxDB backed by InfluxDB 2.x containers Implements all 24 AmazonTimestreamInfluxDB operations; DB instances and read replica clusters run real influxdb:2.7 containers. * Fix #2566 Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> * fix(timestream-influxdb): reject unsupported RestoreFromDbBackup parameters Point-in-time restore needs a continuous backup, and REPLACE_EXISTING accepts no configuration overrides, so both are rejected instead of silently restoring on-demand data or dropping the overrides. * Fix #2566 Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> * style(timestream-influxdb): import the classes used instead of naming them inline Replaces the inline fully-qualified LinkedHashMap, Comparator, Predicate and TimestreamInfluxDbService references with imports. * Fix #2566 Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> --------- Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> |
||
|
|
5ec3fb67a8 | fix(ec2): resolve instance profile names through IAM (#3856) | ||
|
|
ad20699a6b |
fix(apigateway): complete API Gateway API key responses (#3817)
Return timestamps, stage keys, tags, and customer ID across create, get, list, and update operations to prevent Terraform provider crashes and state drift. Generate opaque IDs by default while preserving legacy generateDistinctId=false behavior. Keep API key values hidden unless explicitly requested. Add REST, SDK, and CloudFormation regression coverage. |
||
|
|
22b0627245 |
test(compat): assert recorded metric filter publishing through the SDK modules (#3809)
* feat(logs): add metric filters with per-event metric publication Implements PutMetricFilter, DescribeMetricFilters, DeleteMetricFilter and TestMetricFilter on the CloudWatch Logs JSON 1.1 handler, backed by a filter pattern engine for term, space-delimited and JSON patterns. The grammar is checked against 148 TestMetricFilter cases recorded from AWS, kept as fixtures under src/test/resources/cloudwatchlogs and recaptured with the opt-in script under tools/aws-capture/cloudwatchlogs. Validation follows the observed AWS wire behavior: the five regex-bearing filters per log group quota is shared with subscription filters through one canonical backend monitor, a filter pattern may hold at most two regular expressions, defaultValue must be a JSON number, DescribeMetricFilters requires metricName and metricNamespace together in both directions, and TestMetricFilter reports one-based event numbers with an empty public extractedValues map for JSON patterns. Ingested events publish samples into CloudWatch Metrics per event at the event timestamp: matching events contribute the extracted or literal value, non-matching events contribute defaultValue, dimensions are all-or-none, and system dimensions only attach to matching events. Failed publications are retried from a bounded queue of 10,000 samples with stable publication ids. Resettable gains beforeReset and afterReset default hooks so the metric filter publisher can pause and drain before a state reset wipes storage and resume afterwards. EmulatorInfoController.performReset is serialized and calls the hooks around the existing container teardown and storage wipe, running afterReset in a finally block so a failed wipe cannot leave a publisher paused. The GetMetricStatistics and GetMetricData Query responses now carry the CloudWatch namespace so both read paths return the same samples. * feat(cloudformation): provision AWS::Logs::MetricFilter Adds LogsMetricFilterCfnProvisioner for creates, in-place updates, name changes and deletes. Ref and PhysicalResourceId are the filter name alone, as observed on AWS; the log group is kept as private resource metadata. A replacement deletes the old filter before creating the new one, matching the DELETE then CREATE event order AWS emits, and a failed replacement recreates the previous definition on rollback. Every mutation records an APPLIED, NOT_APPLIED or UNKNOWN outcome under the service lock so a failed or ambiguous call can never authorize deleting or overwriting a filter the stack does not own. Ownership that cannot be proven is resolved conservatively before the next mutation. The engine gains three small provisioner hooks that this type needs and others may reuse: - ProvisionContext carries a progress consumer so a provisioner can emit the intermediate DELETE_IN_PROGRESS and DELETE_COMPLETE events of a delete-first replacement while provision is still running. - rollbackUpdate(resource, progress) lets a provisioner restore its own previous state during UPDATE_ROLLBACK and report the steps as events. - hasPendingRollbackCleanup and retainsFailedUpdateState let a provisioner tell the engine that an UPDATE_FAILED resource still holds its own rollback snapshot, so the engine neither restores the previous resource over it nor refuses a later DeleteStack. Both default to false; only this provisioner overrides them. The type is listed in supported-resource-types.tsv, the generated resource table and CfnProvisionerFixture, with unit, integration, storage reload and SDK coverage. * docs(logs): document metric filters and the AWS verification record Describes the metric filter operations, publication semantics and CloudFormation support in docs/services/cloudwatch.md and adds cloudwatch-metric-filters-verification.md, the record of what was observed on AWS in eu-west-1, with which tools, and where each recorded fixture came from. Registers the handler and the verification page with the docs tooling and teaches the service inventory test to count facet pages. * feat(logs): publish metric filter samples off the PutLogEvents thread PutLogEvents evaluated each filter and wrote one CloudWatch Metrics sample per filter and event on the request thread while holding the filter-store monitor, up to a million writes for a maximal request, so ingestion latency depended on the Metrics sink and every PutMetricFilter waited behind the whole batch. The request thread now only evaluates the group's filters as they are at ingestion and hands the resulting immutable samples, with their stable publication ids, to a bounded queue of 100,000 samples. The existing single worker drains it and writes one sample per monitor acquisition, so a PutMetricFilter or a reset waits for at most one write. A batch that does not fit the queue is written inline on the request thread rather than dropped. Failed writes still land in the 10,000 sample retry map with the same ids and cadence as before. Reset pauses the worker, discards queued and failed samples and bumps a generation counter so a batch taken before the reset is never written into the wiped store. Shutdown drains the queue before storage shuts down and clears the retry map only after the worker has terminated. Samples ingested while Metrics is disabled are discarded at startup. Integration and SDK tests poll for the sample, as they would against AWS. * test(compat): assert recorded metric filter publishing through the SDK modules Extends the Java compatibility module with the publishing scenarios recorded from AWS: mixed defaults and quiet traffic, extraction and ordinary dimension series, system dimensions on matches only, and a Sum alarm driven by quiet defaults. Each series is read through the SDK's CloudWatch JSON protocol and again as a signed legacy Query request, so GetMetricStatistics and GetMetricData agree on every sample, timestamp, unit and dimension set. Expected values come from module-local copies of the root fixture metric-filter-publishing-aws.json. MetricFilterFixturePackagingTest checks the Java copy loads from the classpath and the root CloudWatchLogsMetricFilterFixturePackagingTest fails when either SDK module copy drifts from the root file. The Python module gains tests/metric_filter_replay.py, an opt-in replay of the same scenarios against a Floci endpoint or, with explicit profile, region and write acknowledgement, against AWS. Its logic is covered offline by tests/test_metric_filter_replay.py with the network blocked. Both module Dockerfiles are unchanged: the Java image already runs the whole suite and the Python image already copies tests/. * test(compat): assert every recorded statistic and poll for published samples The SDK publishing assertions compared only Sum and SampleCount although the AWS fixture also records Minimum and Maximum for the default-value scenarios. Both the SDK JSON reads and the signed legacy Query reads now assert every statistic the fixture carries, on GetMetricStatistics and GetMetricData. Publication now happens shortly after PutLogEvents returns, so present series are polled and absent series are asserted only after a later positive control of the same filter is visible, which the publisher's ordering guarantees. The read window ends at second 59 so a sample stamped on the following minute is never in scope. The live replay's Region check names the commercial partition explicitly. botocore already defaults get_available_regions to partition_name="aws", so GovCloud and China Regions were rejected before; the offline test now pins it. * test(compat): keep the metric filter SDK test on the Java 17 API of the compat image List.getLast() is Java 21; the sdk-test-java image compiles with Temurin 17. |
||
|
|
459e2bbe7a |
test(ses): cover the three identity endpoints missing from the SDK compat suite (#3802)
DeleteEmailIdentityPolicy, PutEmailIdentityDkimAttributes and PutEmailIdentityFeedbackAttributes were exercised only by the local integration tests. SesIdentityPolicyTest now deletes a policy it created and checks it is gone, and SesIdentityAttributesTest toggles DKIM signing and feedback forwarding on a dedicated identity so the ordered DKIM tests keep their state. |
||
|
|
66bcdaf675 |
feat(codeartifact): add CodeArtifact control-plane support (#3713)
Floci had zero CodeArtifact support: no service package, no docs, nothing. Any terraform apply touching aws_codeartifact_domain, aws_codeartifact_repository, or either permissions-policy resource failed outright. This adds the full CodeArtifact control plane: domain and repository CRUD, resource policies with optimistic-locking revisions, tags, and the fixed set of real AWS-hosted external (upstream) connections (public:npmjs, public:pypi, public:maven-central, etc.). Package publish/fetch endpoints per format (npm, PyPI, Maven, NuGet, generic) are intentionally out of scope here: this closes the terraform apply gap, not real package serving. ListTagsForResource (POST /v1/tags?resourceArn=) is CodeArtifact's one tag operation that addresses the resource with a query parameter on the bare path rather than a path segment, unlike every other V1TagsController/SharedTagsController handler. That method lives on V1TagsController itself rather than the shared AbstractTagsController base: SharedTagsController (mounted at /tags) already declares its own bare POST (tagResourceByBody, for TagResource), so a bare POST on the shared base collides with it and Quarkus refuses to start. CodeArtifact's handler is @V1Tags-qualified and only ever registered against V1TagsController, so the method belongs there. core/common stays service-free: CodeArtifactTagHandler registers itself as a bean the same way MskTagHandler does, and TagHandler gained a default for the lowercase key/value entry names CodeArtifact uses instead of AWS's usual capitalized Key/Value. Known, documented limitations (see docs/services/codeartifact.md): no cycle detection across upstream chains, no referential-integrity check when deleting a repository other repositories reference as an upstream, and no authorization check on cross-account domainOwner addressing (consistent with Floci's opt-in IAM enforcement elsewhere). Verified against the real botocore codeartifact service-2.json (protocol, exact querystring vs. body placement per operation, exact ARN format, epoch-seconds timestamps, real error shapes) and the live AWS API docs for behavioral rules not in the wire model (DeleteDomain blocked while repositories exist, the real fixed external-connection name/format list, PutDomainPermissionsPolicy's all-body field placement vs. the sibling repository operation's querystring placement). Live-verified three ways: - Unit tests including a concurrent-create race test proving the synchronized guard actually holds under contention, plus full-stack QuarkusTest/RestAssured integration tests. - A real terraform init/apply/plan/destroy cycle against a running Floci instance, independently confirming destroy actually tore the domain down via a follow-up describe-domain call. - A live AWS SDK v2 Java test exercising the real CodeartifactClient against a live instance. |
||
|
|
996a680cdc |
fix(ec2): reject key pair requests without KeyName (#3727)
* fix(ec2): reject key pair requests without KeyName CreateKeyPair accepted a request with no KeyName and stored a nameless key pair; the duplicate check then dereferenced that name on every later CreateKeyPair, and the Query catch-all reported it as "Unexpected error: null". CreateKeyPair and ImportKeyPair now answer MissingParameter, ImportKeyPair answers InvalidKeyPair.Format instead of an InternalFailure for material that is not base64, DeleteKeyPair requires a name or an id and returns the deleted keyPairId, and the name comparisons tolerate a nameless record already sitting in a persistent store. The EC2 docs still described the placeholder key material that #3307 replaced. Closes #3356 * fix(ec2): return InvalidKey.Format for malformed key material on ImportKeyPair The EC2 API error reference lists InvalidKey.Format as the key pair not being in a valid OpenSSH public key format, which is the message this branch sends. InvalidKeyPair.Format is a separate documented code for a different failure. |
||
|
|
98c47c4347 |
feat(eks): implement access-entry management (#3745)
* feat(eks): implement access-entry management * test(eks): wait for cluster activation in access-entry compatibility test * fix(eks): validate access-entry maxResults with shared parser |