mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 14:10:49 -05:00
673c809effe3ad6e93e5d3cdacdcdb07caa4971f
1110
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
985921c3db |
fix(core): fail a Docker call after 30 seconds when its connection pool is full (#5285)
* fix(core): fail a Docker call after 30 seconds when its connection pool is full With no connection-request timeout set, a call that could not lease a pooled connection waited httpclient5's default three minutes before failing. A full pool means the emulator is saturated, so the wait is now configurable through floci.docker.connection-request-timeout-seconds (default 30), applied to both pools. The transport retry already treats a lease timeout as pool exhaustion and never replays it, so the call fails once, after the timeout. * fix(core): reject a Docker lease timeout below one second httpclient5 reads a zero connection-request timeout as no timeout, so floci.docker.connection-request-timeout-seconds=0 let a call on a full pool wait forever, and a negative value reached the client unchecked. It now has to be at least 1, checked the way the two pool sizes are, through one helper that names the setting and its environment variable. The two producer tests that build the beans from a mocked config now stub the timeout; they ran with zero before. The lease test's socket list is shared with the acceptor thread, so it is a concurrent list. |
||
|
|
1f1d4f94dd |
fix(cloudfront): stream origin responses and viewer request bodies (#5278)
A distribution read every origin response whole before answering the viewer: an S3 origin's object through getObject, a custom origin's body through the HTTP client into a byte array. A viewer's POST, PUT, PATCH or DELETE body was likewise read whole before it was forwarded. So an object or upload of about 2 GiB or more failed, and a smaller one could run the heap out of memory. S3 origins now open the object as a stream, the snapshot GetObject serves, and custom origins return their response before its body is read; either body is written to the viewer as it arrives, with its Content-Length, or chunked as the origin sent it. A viewer's body is streamed to the custom origin with its Content-Length, or chunked when the viewer sent it chunked or, as HTTP/2 allows, with no length. An origin response closed before its end, as when the viewer goes away or a custom error page replaces it, cancels its request instead of reading the rest of the body to reuse the connection. Since a streamed response holds its connection for the whole transfer, one origin may now use the whole connection pool, as CloudFront sets no per-origin limit. |
||
|
|
d1fc2654a9 |
ci: cap open PRs at 4 with drafts and 2 ready for review (#5283)
Describe the new open-PR limits (floci-loft decision 0021) in CONTRIBUTING.md and the PR template, and grant the caller contents: write, which the shared workflow needs to convert a PR back to a draft. Signed-off-by: Hector Ventura <hectorvent@gmail.com> |
||
|
|
9934b39a42 |
feat(redshiftserverless): add snapshot and restore operations (#5184)
* feat(redshiftserverless): add snapshot and restore operations Adds CreateSnapshot, GetSnapshot (by name or ARN), ListSnapshots (filterable by namespace), DeleteSnapshot and RestoreFromSnapshot on top of the existing workgroup support. A snapshot is AVAILABLE as soon as it is created, so a snapshot created in a standby region stands in for a cross-region copy. RestoreFromSnapshot restores into an existing namespace and workgroup and never creates either. * docs(redshiftserverless): document snapshot and restore actions * docs(redshiftserverless): update service matrix operation count * fix(redshiftserverless): validate snapshot restore and ARN lookup Reject a RestoreFromSnapshot workgroup that belongs to another namespace, resolve snapshotArn only for this account and Region, and register the snapshot model for reflection so persisted snapshots survive a native restart. * fix(redshiftserverless): harden snapshot restore and add lifecycle tests Validate namespaceName and snapshot names, accept snapshotArn on RestoreFromSnapshot, read the snapshot once during restore, and cover the handler with an integration lifecycle test and a Java SDK compatibility test. * feat(redshiftserverless): dump and restore snapshot data and model retention, tags and filters CreateSnapshot dumps a running workgroup with pg_dump and RestoreFromSnapshot empties the public schema and replays the dump, reusing the provisioned Redshift container manager. Snapshots now report adminUsername, kmsKeyId and retention, accept tags (taggable by ARN), ListSnapshots filters by namespaceArn, ownerAccount and a time window, and RestoreFromSnapshot rejects snapshotName and snapshotArn together. * fix(redshiftserverless): make snapshot restore atomic and strict Dump the current contents before a restore and put them back when the replay fails, drop every user schema rather than only public, run psql with ON_ERROR_STOP so a failing statement fails the restore, and fail a restore whose recorded dump file is missing. * fix(redshiftserverless): keep the catalog bootstrap schema out of snapshot restore The reset dropped floci_internal and with it the pg_catalog svv_external_* views, so the strict replay failed. Leave that schema out of the reset and out of the dump. * fix(redshiftserverless): drop large objects when resetting before a restore * refactor(redshift): share container lookup and defaults in the container manager * docs(redshiftserverless): document the bootstrap schema left out of snapshots * style(redshiftserverless): order imports in the runtime test --------- Co-authored-by: yarammanasa2001-max <271440416+yarammanasa2001-max@users.noreply.github.com> |
||
|
|
f661923faf |
feat(codepipeline): roll back a single stage from a successful target execution (#4618)
* feat(codepipeline): roll back a single stage from a successful target execution RollbackStage now validates the stage and target, then re-runs only the source stages and the target stage as a ROLLBACK execution. * fix(codepipeline): keep a rollback's stage filter across restart and retry Persist the rolled-back stage name and derive the include-stages filter from it on start, resume and retry. * fix(codepipeline): tighten RollbackStage eligibility, trigger type, events and source pinning * fix(codepipeline): report a busy pipeline from RollbackStage as ConflictException * fix(codepipeline): refuse rollbacks of source stages, rollback targets and running stages RollbackStage now answers UnableToRollbackStageException when the stage is a source stage, when the target execution is itself a ROLLBACK execution, or when another execution is still running the stage, per the CodePipeline User Guide considerations for rollbacks. * fix(codepipeline): reject RollbackStage on PARALLEL pipelines and close the concurrent rollback window RollbackStage now answers ValidationException for PARALLEL pipelines, checks for a running stage (including a rollback still fetching sources) under the pipeline start lock, records the manual-start triggerDetail instead of the target id, and shares one source-action helper. |
||
|
|
86371d86cb |
fix(ses): match AWS tag ARN parsing and configuration set name errors (#5235)
* fix(ses): match AWS tag ARN parsing and configuration set name errors The SES v2 tag endpoints rejected malformed ARNs with messages that were never checked against AWS, refused ARNs whose service was not "ses", and compared the region before checking the resource exists. Configuration set names were rejected with an invented message on both APIs. Probed against AWS in us-west-2: - Every malformed ARN (missing partition, service, account or resource name, unknown type, ":" or "/" in the name) is BadRequestException "ResourceArn is not the expected format", including an unknown type, which was a 404. - The partition and service are required but never compared. - An invalid configuration-set name in the ARN is a message-less ValidationException after the account check. - TagResource and UntagResource check existence before the region. - An omitted ResourceArn on Tag/Untag is a message-less ValidationException. ListTagsForResource keeps a 400 where AWS answers 500. - "ResourceArn=" is read raw, since @QueryParam binds an empty value as null. - Configuration set names use AWS's three messages on every v1 and v2 operation, including sends: must be specified, cannot exceed 64 characters, and invalid characters. * refactor(ses): share the configuration set name check and map tag domains by type The v1 helper and the v2 CreateConfigurationSet handler now call the service's validateName instead of repeating the empty-name check, and the name pattern no longer restates the 64-character limit the length check owns. The seven taggable domain services implement SesTaggable, and SesService keys them by ARN type in one map. That map replaces the type set and the three dispatch switches, whose default arms could no longer be reached. |
||
|
|
74b3cecf78 |
feat(ses): support Content.Simple.Attachments in SESv2 SendEmail (#5190)
* feat(ses): support Content.Simple.Attachments in SESv2 SendEmail Parse and validate Simple attachments, assemble them into one MIME message with the relay's encoder, run the content scan over it as for raw sends, relay them over SMTP, and expose them in the /_aws/ses mailbox as an Attachments summary plus the base64 MIME message in RawData. * fix(ses): sort SesService imports and document attachment encoding and RawData recipients RawData keeps the To and Cc recipients the request named, including any suppression later kept from delivery, and ContentTransferEncoding is validated but every attachment part is base64-encoded. Both are now stated in the SES docs. * fix(ses): reject line breaks in attachment MIME header members ContentType, ContentDescription and ContentId are written verbatim into the attachment part's MIME headers, so a CR or LF in any of them added header lines to that part. They are now refused with BadRequestException by the same rule MessageHeader.isSafe applies to custom headers. missingHeaderMember now builds its message through constraintViolation. * fix(ses): refuse attachments with unsupported file extensions SES does not accept attachments whose file names end in one of the extensions listed under "SES unsupported attachment types" in the developer guide. The content scan now walks the parsed MIME for attachment file names, from Content-Disposition or the Content-Type name parameter, and both the Simple-with-attachments and raw send paths refuse such a message with MessageRejected before anything is recorded. * refactor(ses): share one MIME part walk between the content scans hasBlockedAttachment repeated the worklist entityContains already used. Both now go through anyPart, which walks every part, forwarded messages and multiparts included, and runs the given check on each. |
||
|
|
ee2d1a68a6 |
feat(cloudformation): pass Lambda DurableConfig through (#5218)
* feat(cloudformation): pass Lambda DurableConfig through AWS::Lambda::Function.DurableConfig reaches CreateFunction and UpdateFunctionConfiguration. As on AWS, a RetentionPeriodInDays the template leaves out is 14 on update too, a durable function created without Timeout gets min(ExecutionTimeout, 900), and adding or removing DurableConfig replaces the function. * test(terraform): cover aws_lambda_function durable_config The provider creates a durable function, reads it back without a diff, updates execution_timeout in place, and before destroy stops a RUNNING durable execution through ListDurableExecutionsByFunction, StopDurableExecution and GetDurableExecution. * fix(cloudformation): honor AWS::NoValue, cleared keys and large numbers in DurableConfig A DurableConfig that Fn::If removes with AWS::NoValue leaves the function plain. A KMSKeyArn the template leaves out or sets to "" clears the key, as CloudFormation does on AWS, since Lambda keeps a stored key when the update omits the member. A number beyond an integer reaches Lambda unchanged, so its range check rejects it. * fix(cloudformation): reject a DurableConfig that is not an object Only an intrinsic that resolves to AWS::NoValue removes DurableConfig. CloudFormation rejects a string, number or list in its schema check before the function is touched, so an update with one no longer replaces and deletes a durable function. * test(cloudformation): cover Lambda DurableConfig with the AWS SDK The CloudFormation and Lambda SDK clients create a durable function, update DurableConfig in place, and remove it by replacing the function. * fix(cloudformation): require ExecutionTimeout and known members in DurableConfig CloudFormation checks DurableConfig against the schema on update too: an update without ExecutionTimeout, or with a member the schema does not list, fails before the function is touched. Floci let such an update through and kept the old timeout. * refactor(cloudformation): look up a Lambda function once per deploy The name choice and the replacement decision now share one lookup and one durable check, so they cannot disagree. |
||
|
|
1199f3a790 |
fix(rds): forward PostgreSQL startup parameters through the proxy (#5151)
* fix(rds): forward PostgreSQL startup parameters through the proxy The RDS proxy parsed the client's StartupMessage but opened the backend session with only user and database, so options, application_name and every other run-time parameter were silently dropped. Forward them in the order the client sent them. The proxy keeps setting user and database itself, and drops _pq_. protocol extension requests, which it does not negotiate with the backend. An IAM login for a role other than the master still sends only user and database: its backend session is the master's until the handover, and a startup "-c role=<master>" would outlive SET SESSION AUTHORIZATION, so RESET ROLE would regain the master. Redshift keeps today's behaviour, as its drivers send parameters PostgreSQL rejects. * fix(rds): relay PostgreSQL's refusal of the backend login to the client Forwarding startup parameters makes new backend refusals possible, such as replication=true with no pg_hba.conf entry allowing it. PostgreSQL answers those with an ErrorResponse where the proxy expected an Authentication message, and the proxy reported only "Backend database authentication failed". Every read that expects an Authentication message now reads a refusal whole and the proxy sends it to the client unchanged, so the client sees PostgreSQL's SQLSTATE and reason. This covers a refusal before the password exchange and one after it. Other unexpected replies keep the generic error. * test(rds): reuse the IAM auth harness and the handler's startup parser Fold the IAM startup-parameter check into iamSessionRunsAsTheRoleNamedInTheToken, let backendStartupFor start its auth thread through startIamAuth, and make PostgresProtocolHandler.parseStartupParams package-private so the test no longer keeps its own copy. |
||
|
|
73133b472a |
fix(mq): return CreateBroker members from DescribeBroker (#5211)
* fix(mq): return CreateBroker members from DescribeBroker CreateBroker accepted securityGroups, subnetIds, logs, maintenanceWindowStartTime, storageType, authenticationStrategy, encryptionOptions and configuration, but discarded them, so DescribeBroker never returned them. Carry them through CreateBrokerParams to the persisted Broker and into the DescribeBroker response, with configuration reported as configurations.current as in the AWS shape. Absent members are omitted, and brokers persisted before this change still load. RabbitMQ users stay out of DescribeBroker (#1951). * fix(mq): report DescribeBroker logs as a LogsSummary general and generalLogGroup are required in LogsSummary; general defaults to false and the log group is /aws/amazonmq/broker/<broker-id>/general. audit/auditLogGroup are reported only when audit logging was requested. * fix(mq): report only the general log group in LogsSummary Audit logs are ActiveMQ-only, and Floci emulates RabbitMQ brokers. Document DescribeBroker's logs as a LogsSummary rather than an echo. * fix(mq): stream broker logs to the general log group DescribeBroker reports RabbitMqManager streamed container logs to /aws/amazonmq/broker/<id> while DescribeBroker named /aws/amazonmq/broker/<id>/general. Both now take the name from Broker.generalLogGroup(). |
||
|
|
5fc8b0418c |
fix(iam): separate a constraint failure from an invalid value in PutAccountProperties (#5240)
The key pattern and length checks answered InvalidInput while carrying the "failed to satisfy constraint" wording that every other constraint check in IamService pairs with ValidationError. The model declares InvalidInputException on the operation and says nothing about which code a pattern miss produces, so the two had drifted apart with nothing to settle them. The API Reference settles it in Common Error Types rather than the operation's own error table. ValidationError is a common error for every action, defined as "The input doesn't meet the required format or constraints", 400. InvalidInput, the one the operation declares, is "an invalid or out-of-range value was supplied for an input parameter". PutAccountProperties publishes a Key Pattern of ^[A-Za-z][A-Za-z0-9/_-]*$, a key length of 1 to 50 and a value length of 1 to 1024, and the model declares all three on accountPropertyKeyType and accountPropertyValueType. Violating a published pattern or length is a format failure; a value that satisfies them and is still wrong is not. So it is a split rather than a rename. The key pattern and length, and the value length, are now ValidationError and keep the constraint wording, which was already right for them. The Namespace/PropertyName rule stays InvalidInput: the published pattern admits a key with no slash, with several, and with a trailing one, so that rule only applies once the format is already good. Its message drops the constraint wording and reads as prose, since that wording is what made the pair look inconsistent. The same-namespace rule is unchanged. aMalformedKeyIsRejected asserted one code for seven keys that fall on both sides of that line, so it splits in two, each asserting its own code and the absence of the other. As written it could not tell a pattern failure from the slash rule. Not touched, though the same reading would question it: createServiceLinkedRole answers InvalidInput for a check that is exactly the declared constraint on AWSServiceName. Its message is prose rather than the front-end format, there is no recording either way, and CreateServiceLinkedRole's error table is structured identically to this one, so it proves nothing. Left alone rather than changed on inference. Refs #5177 |
||
|
|
3a8f974554 |
fix(iam): answer AWS's own errors for a malformed service-credential id, and for DeleteUser (#5239)
Three answers on the service-specific credential operations did not match what AWS sends. All three are recorded against real AWS in LocalStack's IAM snapshots, under @markers.aws.validated. A ServiceSpecificCredentialId that does not match the model's [\w]+ was looked up regardless, so it came back NoSuchEntity 404. AWS checks the format first and answers ValidationError 400 quoting the pattern, on UpdateServiceSpecificCredential, ResetServiceSpecificCredential and DeleteServiceSpecificCredential alike. A malformed id and an unknown one are different mistakes, and they now get different answers. An id that does satisfy the pattern and names no credential of that user was "The Service Specific Credential with id <id> cannot be found." AWS says "No such credential <id> exists", still NoSuchEntity 404. DeleteUser named the credential in its refusal: "must delete service-specific credentials first." This case gets no message of its own on AWS, unlike the access-key and policy cases beside it, and falls back to the generic "Cannot delete entity, must remove referenced objects first.", DeleteConflict 409. The API Reference publishes a length of 20 to 128 on the id as well as the pattern, so both are now enforced, and an id breaking both is reported as two validation errors rather than one, which is what the counted prefix is for. Only the pattern message is recorded; the length wording is the form AWS uses for a member carrying both bounds, which validateLoginProfilePassword already spells the same way. The same snapshots show an invalid Status answered with "1 validation error detected: Value at 'status' failed to satisfy constraint: Member must satisfy enum value set", naming neither the offending value nor the permitted set, where the code named both. statusType is one shape, validated by one front end, and UpdateSigningCertificate, UpdateSSHPublicKey and UpdateServiceSpecificCredential all take it, so the recording of one is the rendering of all three. They had the same message copied three times and now share a helper, placed ahead of all three rather than inside one family's section. Elsewhere in the tree this message does carry the permitted set, and those are other services with their own renderings, so they are left alone. UpdateSSHPublicKey had no test for a status outside the enum at all, and the two that did have one asserted only the code, so the message none of them pinned could have been reverted with the suite still green. All three now assert the counted prefix and the absence of both the value and the set. UpdateAccessKey takes the same shape and is further off: "Status must be Active or Inactive." is not AWS's format at all, it refuses the Expired that statusType allows, and it validates the status only after looking the key up, so a bad key and a bad status answer NoSuchEntity where the front end would answer ValidationError first. That is a behavioural change with its own tests to write, so it is not folded in here. Refs #5084 |
||
|
|
bcfb9c786c |
fix(cognito): surface sign-in denials with the exception classes Cognito uses (#5223)
* fix(cognito): surface sign-in denials with the exception classes Cognito uses
A disabled user was rejected with UserNotConfirmedException ("User is disabled");
Cognito returns NotAuthorizedException with "User is disabled.". A PreAuthentication
trigger that returned an error payload surfaced as NotAuthorizedException; Cognito
returns UserLambdaValidationException with "PreAuthentication failed with error
<errorMessage>.", the same mapping floci already applied to PreSignUp on
AdminCreateUser. PreSignUp on SignUp is aligned the same way (it reported
NotAuthorizedException "PreSignUp trigger denied signup: ...").
The five duplicated eligibility checks now share requireSignInEligible /
requireEnabled, and the three blocking triggers share blockingTriggerFailure.
Integration tests that pass against AWS failed on these two codes.
* test(cognito): cover trigger invocation failures and assert the SDK exception classes
PreAuthentication and PreSignUp now get cases for an uninvokable function
(UnexpectedLambdaException) and a malformed response
(InvalidLambdaResponseException). A new sdk-test-java compat test asserts
NotAuthorizedException for a disabled user and UserLambdaValidationException
for a PreAuthentication trigger that raises, through the AWS SDK v2 client.
* test(cognito): drop the em-dash from the compat test display name
|
||
|
|
8a1d1ddcd3 |
fix(partition): read strict-mode service availability from endpoint rulesets too (#5231)
* fix(partition): read strict-mode service availability from endpoint rulesets too Strict partition mode refused services AWS serves. The per-partition service list came from botocore's endpoints.json alone, which leaves out IAM, Route 53, Budgets and Cost Explorer in aws-eusc and IAM and Cost Explorer in aws-iso-e, although each service's endpoint ruleset has an explicit branch for the partition (iam.eusc-de-east-1.amazonaws.eu). The generator now adds those partitions, for services endpoints.json lists somewhere, and records them under servicesFromRulesets. The execute-api signing name was mapped to Connect Participant only, so IAM-authorized API Gateway invokes were refused in China, EUSC and the ISO partitions. A signing name is now left out of the alias map when a service whose own endpoint prefix is that name is listed nowhere, so strict mode no longer judges execute-api. The docs and config comments no longer say IAM is absent from aws-eusc. * test(partition): assert API Gateway answers the strict-mode execute-api probe The execute-api strict-mode test accepted any response but a 200 that lacked the strict-mode error, so a 500 or an unrelated rejection would also pass. It now requires API Gateway's own answer for a missing API: a 404 NotFoundException with "Invalid API id specified". |
||
|
|
e1cd6fe6d4 |
fix(partition): serve a pseudo signing region as its partition's global region (#5233)
A request whose SigV4 scope named a <partition>-global pseudo-region (aws-cn-global) kept the label as its region, so regional services stored state under it and minted ARNs such as arn:aws-cn:sqs:aws-cn-global:... for a region that does not exist. AWS never signs with a pseudo-region: endpoints.json maps each to a real credential scope region. RegionResolver now serves such a scope as the partition's implicit global region (aws-cn-global becomes cn-northwest-1) wherever it reads the region from a request. With floci.partitions.allow-unknown-regions in a non-commercial deployment, an unknown label was scoped to the deployment's partition but RegionResolver.buildArn minted it as aws. buildArn now uses the same partition as the request. ARNs built directly with Arn.of keep the commercial fallback, which partitions.md now states. |
||
|
|
c0b2b299b0 |
feat(sns): sign deliveries with a served RSA certificate like AWS (#5189)
* feat(sns): sign deliveries with a served RSA certificate like AWS Replace the EXAMPLE Signature and SigningCertURL placeholders with real signatures over the documented canonical string. Notifications and subscription confirmations delivered to HTTP/HTTPS endpoints, Lambda records and non-raw SQS envelopes are signed with SHA1withRSA, or SHA256withRSA when the topic sets SignatureVersion to 2. The RSA 2048 key and its self-signed certificate are kept in SNS storage and the certificate is served at /_aws/sns/SimpleNotificationService-<fingerprint>.pem, so a new key always gets a new URL. The SQS envelope now carries UnsubscribeURL and the Lambda record a real UnsubscribeUrl, as on AWS. * fix(sns): drop a delivery when signing fails and regenerate the key on reset A signing failure in the Lambda, SQS and HTTP builders was caught with the JSON fallback and delivered an empty placeholder as if it had succeeded. Only a JSON serialization error falls back now; a signing failure fails that delivery. SnsMessageSigner is now Resettable: a reset drops the cached key instead of writing it back to the cleared store, so the next delivery generates a new one. * style(sns): sort SnsService imports * refactor(sns): build the SQS envelope with the builder Firehose uses buildSnsSqsEnvelope duplicated buildSnsEnvelope apart from the signature and UnsubscribeURL. buildSnsEnvelope now takes the subscription ARN and signature version and adds both only when a subscription is given, so SQS and Firehose share one builder again. |
||
|
|
a0a2a5f0d6 |
fix(s3): run S3 Select over CSV and JSON a record at a time (#5178)
SelectObjectContent loaded the whole object into a byte array and built the whole response before sending it, so an object over about 2 GiB failed with an internal error, and a large object or result could run the heap out of memory. The object is now opened as a stream, the snapshot GetObject uses. The Java evaluator parses the statement before reading anything, then reads CSV a line at a time and JSON a line or an array element at a time, stops once a LIMIT is reached, and writes the result as it goes, in Records events of whole records, then Stats and End. Queries floci-duck runs read the object themselves and no longer load it just to count BytesScanned. |
||
|
|
04a3b97346 |
feat(iam): model account properties and outbound web identity federation (#5177)
Adds GetAccountProperties, PutAccountProperties, SetSecurityTokenServicePreferences, EnableOutboundWebIdentityFederation, DisableOutboundWebIdentityFederation and GetOutboundWebIdentityFederationInfo, which completes step 9f of the IAM gap plan. A property key is Namespace/PropertyName with exactly one forward slash and neither a leading nor a trailing one, and every key in one request must share a namespace, which AWS states directly. A request mixing namespaces is rejected whole rather than partly applied. Enabling federation twice is FeatureEnabled 409 and disabling it twice is FeatureDisabled 404, an asymmetry AWS documents. The getter answers FeatureDisabled too when the feature is off, reusing the disable operation's own wording, which is matched rather than improved. The issuer URL is derived from the request's partition rather than the literal in the API Reference's example: api.aws is only the commercial partition's dual-stack suffix. It is minted once per account and survives a disable, since a relying party verifying tokens will have pinned it. AWS documents neither that nor JwtVendingEnabled's source, so both are recorded in the docs as choices. The OIDC discovery endpoints the issuer is documented to host, and the GetWebIdentityToken API the feature references, are not modelled: these six are the management operations only. |
||
|
|
a5db3975c4 |
feat(cognito): support TOTP MFA when MFA is optional (#5101)
* feat(cognito): store software-token MFA preferences and report MFA settings * feat(cognito): challenge users with TOTP turned on when MFA is optional * docs(cognito): document optional TOTP MFA and MFA preferences * fix(cognito): report required TOTP and keep email-code sign-in for email MFA users * docs(cognito): describe required TOTP reporting and the USER_AUTH choice |
||
|
|
950b6fe774 |
feat(redshift): add relational queries for Redshift Spectrum (#5095)
* feat: add relational queries for Redshift Spectrum * fix(redshift): harden Spectrum relational query preparation Catch RuntimeException during preparation so the client gets an ErrorResponse instead of a dropped connection, skip preparation while the backend discards until Sync, defer schema binding until the transaction commits, make the catalog functions SECURITY DEFINER, and track COMMIT and ROLLBACK from the command tag. * fix(redshift): address review findings on transaction handling in Spectrum relational queries - Undo Glue tables created inside a rolled back transaction (Data API batch and wire proxy) - Keep bindings and Glue tables on ROLLBACK TO SAVEPOINT; only a closed transaction discards them - Report the real transaction status for locally handled simple queries instead of idle - Use a switch expression in BackendResponseCoordinator - Map host.docker.internal into the floci-duck container on Linux * fix(redshift): undo Glue tables across sessions and on rollback to savepoint - Scope staged Glue tables by the backend socket so the proxy rollback finds tables created by another session - Track SAVEPOINT, ROLLBACK TO and RELEASE so a Data API batch undoes only the tables created after the savepoint * fix(redshift): defer Glue undo on rollback to savepoint until the backend confirms and bundle bootstrap catalog in native image * fix(redshift): reject CREATE EXTERNAL TABLE inside a transaction like AWS AWS does not allow CREATE EXTERNAL TABLE inside a transaction block, and a Data API batch runs as one transaction. Return SQLSTATE 25001 instead of staging Glue tables and undoing them on rollback, which removes the savepoint tracking and cross-session undo code. Reuse ExternalTableMaterializer.quote. * fix(redshift): reject CREATE EXTERNAL TABLE in a transaction for legacy schemas too |
||
|
|
45f45e590e |
fix(cognito): send email from the pool's EmailConfiguration sender (#5150)
* fix(cognito): send email from the pool's EmailConfiguration sender Cognito email always came from no-reply@verificationemail.com. It now follows EmailConfigurationType: with DEVELOPER, From when set, otherwise the SourceArn identity's address; with COGNITO_DEFAULT, the SourceArn address. A domain identity takes its address from From. Without a SourceArn, the default address is kept. * test(cognito): read captured mail without the ?email= filter * fix(cognito): send from the configured sender only when SES has verified it A pool's EmailConfiguration sender is now used only when its SourceArn names an SES identity in the pool's account that SES has verified in the SourceArn Region (the pool's Region for a wildcard Region), and a From that supplies the sender is one mailbox at that address or in that domain. Anything else sends from no-reply@verificationemail.com and logs a warning, so a pool can no longer send as an address its account has not verified. When From has a sender name, the bare address now goes in ReturnPath. SES takes Source as the default return path, so the captured message's ReturnPath, and the envelope sender handed to the SMTP relay, was "Name <address>". The relay's mail client happened to strip the name from MAIL FROM; the envelope no longer depends on that. * style(cognito): use one parameterised message in the sender fallback log * fix(cognito): accept subdomains of a domain identity and match email identities exactly A verified SES domain covers its subdomains, so a From in one of them now sends instead of falling back. Email address identities are case sensitive, domain part included, so the From must equal the identity. The SourceArn must also be in the user pool's partition, not only its account. * refactor(ses): keep one definition of a verified identity SesService.isVerifiedIdentity now delegates to SesIdentityService.isIdentityVerified, made package-private, instead of repeating its check. |
||
|
|
a33eea05cd |
feat(iot): enforce custom authorizer decisions on MQTT connections (#4835)
* test(iot): cover custom authorizer invocation and enforcement against AWS * feat(iot): enforce custom authorizer decisions on MQTT connections Serve TestInvokeAuthorizer and invoke an authorizer's function on an MQTT CONNECT that names it, on the plaintext listener and the /mqtt WebSocket bridge. The event, the request and answer checks, signed-token verification and the refusal per MQTT version follow what was measured against AWS IoT Core. The bridge hands the upgrade's headers, query and server name to the broker keyed by its connection's local address. Closes #4823 * fix(iot): evaluate WebSocket custom authorizer policies against the client's address * docs(iot): note that a non-UTF-8 MQTT password reaches the authorizer altered * test(iot): cover custom authorizer CONNECTs on the plain MQTT listener * fix(iot): refuse TestInvokeAuthorizer tokens and signatures outside their length bounds * fix(iot): refuse authorizer JSON with trailing content TestInvokeAuthorizer, CreateAuthorizer and UpdateAuthorizer bodies, a custom authorizer's answer and each policy document it returns are now read with FAIL_ON_TRAILING_TOKENS, as the shared JSON controllers do, so a valid prefix followed by junk is refused instead of half-read. * fix(iot): keep address literals out of the WebSocket server name Over WSS without SNI the bridge fell back to the Host header unfiltered, so a client dialing an IP got that IP as tls.serverName in the authorizer event and as iot:DomainName in policy evaluation. Apply the same address literal filter SNI already uses. Also name the context validation ceiling in TestInvokeAuthorizer's ponytail note. |
||
|
|
69b4d17c67 |
fix(cognito): run the PreSignUp trigger on AdminCreateUser (#5149)
* fix(cognito): run the PreSignUp trigger on AdminCreateUser AWS invokes the pre sign-up trigger when AdminCreateUser creates a user, with triggerSource PreSignUp_AdminCreateUser, the request's ValidationData and ClientMetadata, and ignores the response's autoConfirmUser, autoVerifyEmail and autoVerifyPhone. A trigger error refuses the user. The trigger runs before anything is stored, so a refused ForceAliasCreation request no longer moves the alias off the existing user. * fix(cognito): invoke PreSignUp outside the user lock on AdminCreateUser AdminCreateUser held the lock stripe of the requested username while the pre sign-up trigger ran. A function that called back into the pool for an identifier on the same stripe, such as AdminCreateUser for the same username, waited for that lock until the invocation timed out. The trigger now runs with no lock held. A taken username or alias is still refused before the trigger is invoked, and the checks run again under the lock once it accepts, so a user created while the trigger ran still fails the request with UsernameExistsException. With ForceAliasCreation, the alias holder was read before the trigger and written back after it, which could undo a change made to the holder in the meantime or restore a deleted holder. The holder is now looked up under the lock after the trigger, just before its alias is moved. * fix(cognito): run PreSignUp once per in-flight AdminCreateUser username With the pre sign-up trigger running outside the user lock, two overlapping AdminCreateUser requests for the same free username could both pass the existence check and both invoke the trigger. The later one was then refused under the lock after its function had already run, or failed with the function's own error instead of UsernameExistsException. AdminCreateUser now claims the username before checking it and gives the claim up once the user is stored or the request fails. An overlapping request for the same username, including one the function makes for the username it was given, is refused with UsernameExistsException before it invokes the trigger. |
||
|
|
6e6ce61eea |
feat(lambda): durable function chained invokes (#5164)
* feat(lambda): durable function chained invokes
A CHAINED_INVOKE operation runs another function. A durable target
needs a version or alias and runs as its own durable execution with a
random name; its close completes the operation as SUCCEEDED, FAILED,
TIMED_OUT ("CHAINED_INVOKE timed out after N seconds.") or STOPPED. Any
other function is invoked once, and an output over 1 MB fails the
operation. A missing function or an unqualified durable one fails the
operation at once. Stopping the parent leaves the child running.
A plain chained invoke lost with the process runs again after a restart,
and a durable child that closed before its report reaches the parent
reports then.
* fix(lambda): close the gaps in durable chained invokes
A durable child that closes during a restart reports to its parent
under its own lock, and recovery triggers an execution once. A durable
target invoked without Payload starts its child with no input, while a
plain target gets {}. A target started in the batch that closes the
execution still runs and its result is ignored, as on AWS.
* fix(lambda): reject a chained invoke of another account or region
AWS rejects the checkpoint with InvalidParameterValueException "Cannot
start a CHAINED_INVOKE on a function in another account." or "... in
another region." Cross-account chained invocations are not supported.
* fix(lambda): keep durable chained invokes across a crash
The parent is saved before the child it starts, so a crash in between
leaves no child the parent does not know. On restart a child the parent
recorded but the store lost is started again under the same ARN, and a
plain target started by the checkpoint that closed the execution runs
again until its result is recorded. A child reports only to the
operation that started it.
* fix(lambda): recreate a lost durable child on the version its ARN names
An alias the chained invoke named may point to another version after a
restart, and a child recreated there would not match the ARN the parent
saved.
|
||
|
|
8fee66ae61 |
fix(s3): stream UploadPartCopy ranges into the part (#5162)
UploadPartCopy read the copied range into a byte array and stored it through the byte-array UploadPart path, so one copied part was capped near 2 GiB with EntityTooLarge, while S3 allows a part of up to 5 GiB. The range is now read from the source stream as it is needed, by a new CopyRangeInputStream that skips to the range on its first read and ends after its last byte, and written straight into the part through the streaming UploadPart path, so neither the source nor the part has to fit in memory in the disk-backed modes. A range over S3's 5 GiB part limit is rejected with EntityTooLarge, as the S3 API Reference error table words it, before anything is copied. Memory mode keeps its limit of about 2 GiB. |
||
|
|
9c0102559d |
feat(iam): model service-specific credentials (#5084)
Adds CreateServiceSpecificCredential, ListServiceSpecificCredentials, UpdateServiceSpecificCredential, ResetServiceSpecificCredential and DeleteServiceSpecificCredential, the five the wire model defines. A credential takes one of two shapes, decided by the service: CodeCommit and Keyspaces get a ServiceUserName and a ServicePassword, while the long-term API key services get a ServiceCredentialAlias and a ServiceCredentialSecret and accept CredentialAgeDays. The quota is two per service rather than two per user, and the version behind a service user name's +n suffix is the lowest one free rather than a count, so deleting out of order cannot mint a name already in use. A credential blocks DeleteUser until it is removed, the last item on AWS's list of what to delete first, and follows the user across an UpdateUser rename. |
||
|
|
3f6fb371d1 |
feat(ses): add the S/MIME identity certificate operations (#5111)
* feat(ses): add the S/MIME identity certificate operations Implement AssociateEmailIdentityCertificate, DisassociateEmailIdentityCertificate and ListEmailIdentityCertificates as a control plane only: associations are stored per region and Floci never signs mail. Request validation, messages and precedence follow real SES: a domain identity needs a FromAddress in the domain or a subdomain, one certificate per address regardless of case, the request members are checked before the identity, and the certificate is not inspected on association. The reported status is Floci's own rule: ACTIVE while the ARN names an issued, unexpired ACM certificate (with its expiry as CertificateExpiryTime), FAILED otherwise. Disassociation is immediate and idempotent, and the list pages through SesListPaging. DeleteEmailIdentity now refuses an identity that still has a certificate associated, as SES does. The v1 DeleteIdentity and DeleteVerifiedEmailAddress share the identities and refuse it too. * fix(ses): apply the documented S/MIME certificate requirements ListEmailIdentityCertificates now reports ACTIVE only when the association meets the SES Developer Guide's S/MIME certificate considerations: the identity is verified, and the certificate is currently valid, has an allowed key (RSA 2048/3072/4096 or EC P-256, P-384, P-521, read from the certificate itself since ACM's stored key algorithm folds other sizes into those) and an RFC822Name SAN equal to the From address, case-sensitively. The docs link that section instead of calling the criteria undocumented. * fix(ses): require an email-signing end-entity S/MIME certificate A probe against SES found requirements beyond the Developer Guide's list: a CA certificate fails even with the right usages, and the certificate needs both a key usage including digitalSignature and an extended key usage including emailProtection, while other usages may sit alongside them. ListEmailIdentityCertificates now applies them, and the docs list them next to the guide's link. * refactor(ses): reuse SesIdentityService's verified-identity check |
||
|
|
a3118eb42b |
fix(sts): evaluate GetSessionToken and GetFederationToken sessions as the user that minted them (#5081)
Under IAM enforcement, credentials from the two STS operations that mint a session from a long-term key were evaluated as the wrong identity: - A GetSessionToken session was stored with no role ARN, which resolveCallerContext answered with null, and the enforcement filter lets a known credential it cannot map to policies through. A user allowed only sts:GetSessionToken got credentials that passed every check, IAM calls included, and since the session had no caller ARN, AssumeRole took it for the account root and let it assume any role whose trust policy names the account. AppSync's IAM authorization and RDS IAM database authentication also read a null context as allowed, so they let these sessions through too. - A GetFederationToken session was stored with the federated user's ARN where a role session keeps its role's, and its permissions were read from the role whose name followed the last slash. A user allowed only sts:GetFederationToken that federated under an existing role's name got that role's permissions; any other name got none, even with a session policy. The STS API Reference says GetSessionToken credentials "have the same permissions as the IAM user", and that a GetFederationToken session with no session policy "has no permissions", and otherwise the intersection of "the IAM user policies and the session policies". Both handlers now record the identity whose key signed the request. An active key of a user in the request's account names that user, by ARN and unique ID. A key no account holds, the legacy test key or the account id among them, names the account root, which is how Floci already treats such a key. A GetSessionToken session is evaluated as that user, policies and boundary included, or as the root, whose context the filter still bounds by the account's service control policies. A federated session is evaluated as that user intersected with its session policy. Without one it has no permissions of its own, but keeps the Deny statements of its user's policies and boundary: a resource policy naming the federated user grants to the session past implicit denies, not past explicit ones (IAM User Guide, "Resource-based policies for AWS STS federated user principal sessions"). Whatever its policies allow, a federated session cannot call any IAM operation, nor any STS operation except GetCallerIdentity (STS API Reference, GetFederationToken), so its context always carries an explicit Deny for iam:* and sts:*; the filter answers GetCallerIdentity before reading any policy. A session whose issuer is gone is no credential at all, refused like an unknown access key, so neither a resource policy nor S3's fallback to the account root acts on its behalf. That covers a session minted with any other key IAM holds (another session's, which AWS does not accept here, or an inactive key or another account's, which account routing can land in the default account), a session whose user was deleted and recreated under the same name, and one stored before the issuer was recorded. The caller identity follows: a GetSessionToken session's caller and principal ARN are its user's, and a federated session's are its federated-user ARN, with account:name as its user ID, as GetCallerIdentity reports for a federated user. The unit test that pinned the GetSessionToken bypass now checks that a session stored without an issuer is no credential; unit tests cover each kind of issuer, the deny-only context of a federated session without a policy, and that the issuer survives persistence. Integration tests (IAM and S3 enforcement, real SigV4) cover the role-name federation, the intersection, the no-policy session, the GetSessionToken session and its AssumeRole, a bucket-policy Deny keyed on the user's aws:PrincipalArn, both kinds of session staying within the user's permissions boundary, a session of a recreated user under a bucket policy granting everyone, and a bucket policy naming a federated user against its user's explicit Deny, and a federated session refused IAM and AssumeRole although both its user and session policy allow them; the SCP integration test now also checks a root-minted session. All of them fail on main. Tests that built an STS session credential as a role-less session with no issuer, a shape Floci no longer creates, now build one the account root minted, or a presigned-URL session, as production does. |
||
|
|
583de3010c |
fix(s3): stream PutObject and UploadPart bodies to disk (#5106)
The object PUT endpoint took its body as a byte array, so a single PutObject or UploadPart was held whole in the heap and capped near 2 GiB. The body is now read as a stream. A streaming aws-chunked payload is decoded as it arrives, and Content-MD5 and x-amz-checksum-* are checked on the way through. In the disk-backed modes the body is staged under .multipart/.incoming with no lock held, then a part is moved into its upload under the upload's lock and an object is stored like an assembled multipart object. Checks the request alone decides (bucket, SSE-C headers, checksum algorithm, write preconditions, a malformed Content-MD5) run before any of the body is read. Memory mode reads the body into a capped array and fails past about 2 GiB with EntityTooLarge. |
||
|
|
f157d354f2 |
feat(rds): Aurora custom cluster endpoints (#5090)
Serve CreateDBClusterEndpoint, DescribeDBClusterEndpoints, ModifyDBClusterEndpoint and DeleteDBClusterEndpoint. A custom endpoint is stored per Region with the rules from the API reference and the Aurora user guide: type READER or ANY, a static or an exclusion member list but not both, members that are instances of the cluster, no writer in a READER endpoint, an RDS identifier stored lower case and unique in the Region, and at most five per cluster. Its ARN (cluster-endpoint:<id>) works with the tagging actions. DescribeDBClusterEndpoints lists each cluster's built-in WRITER and READER endpoints with its custom ones, and supports the cluster and endpoint identifiers, the four documented filters and paging. Deleting a cluster deletes its custom endpoints, and a deleted instance drops out of the member lists. Custom endpoints are modelled, not routed: one reports the cluster's own endpoint host, so connections through it go where the cluster endpoint sends them. Closes #5072 |
||
|
|
4be8309e8d |
feat(cloudformation): provision AWS::IoT::Authorizer (#4830)
* test(cloudformation): cover AWS::IoT::Authorizer against AWS * feat(cloudformation): provision AWS::IoT::Authorizer CloudFormation stubbed AWS::IoT::Authorizer with a fake ARN and created nothing. IotAuthorizerCfnProvisioner now creates a real authorizer through IotAuthorizerService. Ref is the authorizer name and Fn::GetAtt Arn the ARN. A missing AuthorizerFunctionArn fails with the registry's model validation error before any call. Status, EnableCachingForHttp, AuthorizerFunctionArn and the token settings update in place, sending only the declared properties, tags are reconciled, and a failed stack update restores them from a snapshot. Changing AuthorizerName or SigningDisabled replaces the authorizer and deletes the old one once the update commits; a replacement that keeps an explicit name is refused. Delete deactivates the authorizer first and tolerates one already gone. Closes #4822 * chore(cloudformation): move the IoT authorizer snapshot constant It sat at the same insertion point as other pull requests' snapshot constants, so they could not be merged together. * fix(cloudformation): treat only an empty intrinsic result as AWS::NoValue for IoT authorizers * fix(cloudformation): undo an IoT authorizer update whose tag reconcile fails * fix(cloudformation): report a SigningDisabled change on an IoT authorizer as a replacement * fix(cloudformation): create an IoT authorizer over a dispatcher stub and refuse declaring its generated name * fix(cloudformation): refuse an IoT authorizer boolean that is neither true nor false * fix(cloudformation): never delete a dispatcher stub's id in replacement cleanup * fix(cloudformation): tell a stub from a migrated resource and roll back a stub migration that kept its id * fix(cloudformation): name an unnamed IoT authorizer <LogicalId>_<12 chars> as CloudFormation does |
||
|
|
e7ca2ece22 |
feat(dms): add endpoint, replication instance and replication task lifecycles (#5001)
* feat(dms): add endpoint, replication instance and replication task lifecycles DMS dispatched only replication subnet groups and tagging, so CreateEndpoint, CreateReplicationInstance, CreateReplicationTask and their siblings answered UnknownOperationException and no aws_dms_endpoint, aws_dms_s3_endpoint, aws_dms_replication_instance or aws_dms_replication_task could be applied. Adds Create/Describe/Modify/Delete for endpoints, replication instances and replication tasks, plus Start/StopReplicationTask, which the provider calls for start_replication_task and before modifying or deleting a running task. - Resources are ARN-addressed (endpoint:, rep:, task:) with a 26-character generated id or the caller's ResourceIdentifier, and tagged through the existing tagging operations. - Instances are available and tasks ready from creation, the states the provider's waiters target; describe filters follow the API reference and a filter that matches nothing is ResourceNotFoundFault. - Endpoint settings structures round-trip, minus every SecretString member; ModifyEndpoint merges them unless ExactSettings is true. - Deleting an endpoint or instance a task uses, a subnet group an instance uses, or a running task is InvalidResourceStateFault. The unsupported-operation test now uses CreateReplicationConfig, which is still unimplemented. * style(dms): order DmsService imports alphabetically * docs(dms): list CdcStartTime and the missing describe actions as unimplemented * test(dms): cover tag add and remove on endpoint, instance and task ARNs * fix(dms): runtime-init DmsService, resolve the default subnet group, reject reversed task endpoints - Register DmsService under --initialize-at-run-time: its static SecureRandom otherwise lands in the native image heap (guard test and native builds). - Store only the three members KerberosAuthenticationSettings models instead of a deep copy of whatever the caller sent. - An instance created without a subnet group now describes the "default" group in full (VPC, subnets, status) from the region's default-VPC subnets. - CreateReplicationTask rejects a source ARN that is not a SOURCE endpoint and a target ARN that is not a TARGET endpoint. * fix(dms): name the swallowed default-subnet exception, sync the DMS matrix count The default-subnet fallback deliberately swallows AwsException; name it `ignored` and say why that is safe, per AGENTS.md. docs/services/index.md listed DMS at 6 operations; the handler dispatches 20. Add the reverse of the reversed-endpoints test: a source endpoint passed as TargetEndpointArn, which is the only test reaching the TARGET type check. |
||
|
|
d508a4e197 |
fix(apigateway): return embedded resource methods (#5109)
* fix(apigateway): return embedded resource methods * fix(apigateway): guard method maps during concurrent reads --------- Co-authored-by: Vamsi Akavarapu <16164447+vamsiak@users.noreply.github.com> |
||
|
|
840d1bb6c1 |
fix(sqs): set SenderId from caller principal instead of queue owner (#5066)
* feat(sqs): thread accessKeyId through RequestContext and AccountContextFilter * fix(iam): resolve caller user id and align assumed role id with role id * feat(sqs): stamp senderId on Message model and in SqsService * feat(sqs): return message-specific senderId in SQS query and JSON handlers * test(sqs): add integration tests for SenderId caller principal (#4829) * fix(sqs): guard against unsatisfied CDI instance in resolveCurrentSenderId * fix(sqs): address review findings and fix CI for caller principal SenderId - Catch RuntimeException in SqsService to prevent compiler incompatibility - Fallback SenderId to queue owner account when outside request context - Deliver SNS fanout messages with SNS service principal SenderId - Support presigned requests without X-Amz-Algorithm in AccountContextFilter - Populate assumedRoleId and roleSessionName for ECS, EKS and Lambda sessions * fix(sqs): validate session token for temporary credentials and fix CI regressions - Validate session token matching when resolving caller principal for temporary credentials - Generate unique session names for EKS Pod Identity to avoid sender ID collision - Restore default floci-session session name for Lambda execution role sessions - Align SqsService mock in SnsServiceTest with 9-parameter sendMessage signature * fix(sts,lambda): pass sessionToken to resolveCallerUserId and scope Lambda assumed role IDs * fix(lambda): align execution role session name and assumed role ID with function name * fix(sqs): resolve SenderId caller in SQS handlers, not in sendMessage Internal producers (S3 notifications, EventBridge, SNS) call sendMessage on the thread of the request that triggered them, so SenderId picked up that caller's role session. Resolve the caller in the SQS Query/JSON handlers where a real SendMessage call is known, and pass it down. sendMessage without an explicit senderId now defaults to the queue owner. |
||
|
|
a1ed65c51d |
feat(lambda): durable function callbacks (#5100)
* feat(lambda): durable function callbacks
A CALLBACK operation started at checkpoint gets a callback id that
SendDurableExecutionCallbackSuccess, Failure and Heartbeat complete or
keep alive, after which the function is invoked again to see it.
TimeoutSeconds and HeartbeatTimeoutSeconds time it out with
Callback.Timeout or Callback.Heartbeat. A completed, timed out or
stopped callback answers CallbackTimeoutException, an unreadable id
"Invalid callback id". The callback id carries the execution ARN, which
IAM authorizes the callback actions against.
Option range errors now name the update, as AWS does
("updates.1.member.waitOptions.waitSeconds").
* fix(lambda): name a repeated durable update as AWS does
AWS rejects two updates of one operation in a batch, other than a START
closed by its STEP or CONTEXT action, with "Cannot update the same
operation twice in a single request."
* fix(lambda): leave a durable execution waiting after a body-less callback failure
AWS marks a callback failed with an empty request body as FAILED but does
not invoke the function again, so the execution keeps waiting. The SDKs
send {} when Error is omitted, which does invoke it.
* fix(lambda): bound a durable callback failure's error at 1 MB
AWS rejects an Error over 1048576 bytes, measured as compact JSON, with
InvalidParameterValueException "Error object size must be less than or
equal to 1048576 bytes."
* test(lambda): keep a pending durable callback across a restart
* fix(lambda): reject a durable callback failure body that is not a JSON object
AWS treats only an empty body as a failure with no Error. Whitespace,
null or broken JSON get 400 SerializationException and leave the
callback open.
* docs(lambda): note the durable callback result limit AWS enforces
|
||
|
|
1d44b5fc7c |
feat(ses): add UpdateConfigurationSet and MessageSecurityOptions (#5092)
The SES v2 model release of 2026-09-01 (botocore 1.43.86) added UpdateConfigurationSet, a partial update whose only member is MessageSecurityOptions, the S/MIME signing scheme of a configuration set. CreateConfigurationSet accepts the same member and GetConfigurationSet returns it. Floci stores and returns the setting but never signs a message. Where the API reference is silent, the request handling follows what SES answered in us-west-2: an absent SigningScheme leaves the stored value alone, an empty one resets it to DefaultScheme, both union members store SmimeScheme, and a missing SignatureFormat stores DETACHED. |
||
|
|
d97b21ae62 |
fix(s3): copy objects over 2 GiB without reading them into memory (#5080)
CopyObject read the whole source into a byte array with getObject and wrote it back out for the copy, so a source of 2 GiB or more failed as an internal error, even though S3 copies objects up to 5 GiB in one call. In the disk-backed modes the source is now pinned with a temporary hard link to the file generation its metadata describes, taken through the same optimistic snapshot GetObject uses, and that link is moved into place as the copy's file. The copy's ETag and checksum are prepared before any bucket monitor is taken, and the pinned file is read, once and streamed, only for what cannot carry over: a single-part source's ETag is the MD5 of its bytes and is kept, while a multipart source needs the MD5 computed, and a requested or composite checksum becomes a full-object one through a new incremental S3Checksum.Calculator. A failed copy removes its pinned link. Memory mode still copies the byte array. As on S3, a CopyObject source larger than 5 GiB (5368709120 bytes) is now rejected with InvalidRequest, "The specified copy source is larger than the maximum allowable size for a copy source: 5368709120"; such an object is copied with UploadPartCopy. |
||
|
|
1320995d70 |
fix(apigatewayv2): evaluate HTTP and WebSocket authorizer policies (#5020)
* fix(apigateway): evaluate Lambda authorizer policies with one evaluator HTTP API (payload 1.0 and 2.0) and WebSocket $connect authorizers now evaluate every policy statement against the execute-api ARN, instead of reading only the first statement's Effect. REST, HTTP and WebSocket APIs share AuthorizerPolicyEvaluator: one validator and one set of condition keys (aws:SourceIp from the transport address, aws:SecureTransport, aws:CurrentTime). IAM CIDR conditions now match IPv6 ranges. * fix(apigateway): reject malformed authorizer policy conditions A Condition operator IAM does not know, an operator without keys, or a key without values evaluated as a non-match or an unconditional match, so a malformed Deny could be skipped and a malformed Allow could grant access. Validate each operator and its values and return 500 instead. Numeric and boolean condition values are now compared rather than dropped. * fix(iam): leave scalar condition values to #5086 The numeric and boolean condition-value parsing moves to its own pull request, together with the numeric and date comparison fixes it needs. * docs: update the IAM operation count in the Service Matrix |
||
|
|
b2e3870c06 | feat(logs): deliver log events through subscription filters (#5021) | ||
|
|
8ea033d9fd | feat(cognito): implement DeleteUser self-service API action (#4493) | ||
|
|
6a3bc12769 |
feat(lambda): run durable functions with checkpoints, waits and step retries (#5047)
* feat(lambda): run durable functions with checkpoints, waits and step retries
Invoking a durable function starts a durable execution, through Invoke or through an ARN (EventBridge, Scheduler, function URLs, destinations). The function checkpoints through CheckpointDurableExecution and GetDurableExecutionState, and Floci re-invokes it when a wait or a step retry comes due. GetDurableExecution, GetDurableExecutionHistory, ListDurableExecutionsByFunction and StopDurableExecution read and stop executions. Timers are persisted deadlines fired by a background sweep, so an execution survives a restart. Callbacks and chained invokes are rejected at checkpoint time.
* fix(iam): authorize durable execution actions against the owning function
A durable execution route has no /functions/ segment, so its resource fell back to *. The function name now comes from the execution ARN in the path.
* fix(lambda): keep durable executions inside their account
The execution APIs took the account from the ARN in the path, so another account could read or stop an execution. An ARN of another account is now ResourceNotFoundException.
* fix(lambda): limit the error size of an EXECUTION checkpoint too
* fix(lambda): reject an EXECUTION close that carries the other result kind
AWS rejects SUCCEED with an Error and FAIL with a Payload on the EXECUTION operation, as it does for steps.
* fix(lambda): spend a durable wake-up when a failed invocation schedules its retry
* fix(lambda): keep a durable crash retry's backoff across a restart
* fix(lambda): bound the durable execution locks
A lock per execution ARN was kept forever, even for an ARN that did not exist. A fixed set of striped locks replaces it. Locks are never nested, so a shared stripe cannot deadlock.
* fix(lambda): accept PAUSED, PAUSING and DELETING as durable status filters
AWS accepts them and answers an empty list, since Floci never puts an execution in those states.
* fix(lambda): reject a non-finite durable list timestamp
* test(lambda): resume a durable execution from its JSON file after a restart
* fix(lambda): keep durable executions inside their region
An execution ARN of another region now answers ResourceNotFoundException "Function not found", as AWS does, instead of reaching the execution past the IAM check of the request region.
* fix(lambda): validate durable list parameters before an empty status filter answers
Statuses of only PAUSED, PAUSING or DELETING still checks MaxItems and Marker, as AWS does. The bad Marker message is "Invalid Marker".
* perf(lambda): skip the execution scan for a status filter that matches nothing
Statuses of only PAUSED, PAUSING or DELETING now checks MaxItems and Marker without listing the account's executions.
* test(lambda): drop durable tests that repeat other coverage
The in-memory restart test repeats the persistence test, and the Docker success case repeats the compat suite's checkpoint loop. The Docker test keeps the failure case.
* fix(lambda): re-attach a durable execution name only on the same version
AWS keeps execution names unique per function across versions. A sync Invoke of another version with the same name and payload is DurableExecutionAlreadyStartedException, not the existing execution.
* chore(lambda): simplify the durable execution engine
Drop stored fields nothing reads, share the unseen-operations and
page-cursor helpers, skip the name scan for a generated name, and save
an execution once per invocation instead of twice.
* fix(lambda): reject a non-integer durable MaxItems as AWS does
AWS answers MaxItems=x on the durable execution APIs with
SerializationException "'x' can not be converted to Integer".
* docs(lambda): list the durable execution size limits as not emulated
* fix(iam): authorize durable execution actions against the execution ARN
The durable execution actions take the durable execution resource,
function:name:version/durable-execution/name/id. A role allowed on
function:name:* may checkpoint, one allowed only on the unqualified
function ARN is denied.
* fix(lambda): answer an unknown durable execution on checkpoint as a bad token
CheckpointDurableExecution and GetDurableExecutionState do not model
ResourceNotFoundException. AWS answers InvalidParameterValueException:
"Checkpoint token is not valid for the durable execution ARN" for a
token minted for another execution, "Invalid checkpoint token" otherwise.
* fix(lambda): replay a durable checkpoint retried with the same ClientToken
AWS answers a retry of the last checkpoint with the same ClientToken
with the same state and a usable next token, even though the request
token is spent. A different ClientToken, a retry after the next
checkpoint, or a retry of the checkpoint that closed the execution is
still an invalid checkpoint token.
* fix(lambda): validate durable list filters as AWS does
ListDurableExecutionsByFunction takes one status at most and answers
more with InvalidParameterValueException "Cannot filter by more than one
status". An unreadable StartedAfter or StartedBefore is
SerializationException "'<value>' can not be converted to Date", and a
plain date is accepted. Type errors come first, then MaxItems and status
values, then the single-status rule, then the function lookup.
* docs(lambda): note the history IncludeExecutionData default
* fix(lambda): report durable MaxItems and Statuses errors as AWS does
AWS puts an invalid MaxItems and an invalid Statuses into one
ValidationException ("2 validation errors detected: ...; ..."), MaxItems
first. A negative MaxItems must be greater than or equal to 0. MaxItems
is checked before the execution or function is looked up.
* refactor(lambda): share one durable execution ARN pattern with IAM
IAM and the durable execution service now recognize an execution ARN
with the same pattern, the one AWS validates it with.
* fix(lambda): replay a durable checkpoint answer as it was sent
On AWS a retry with the same ClientToken returns the operations as the
first answer had them: a WAIT stays STARTED in the retry even after it
has elapsed, while a fresh checkpoint reports it SUCCEEDED.
|
||
|
|
383c32443d |
feat(eks): apply nodegroup labels, taints and capacity type to the node (#5063)
* feat(eks): apply nodegroup labels, taints and capacity type to the node * fix(eks): address review feedback on nodegroup metadata injection * fix(docs): sync IAM operation count in service matrix * fix(eks): use single string literals without concatenation in log messages * chore(eks): resolve phantom nodegroup review finding * docs(eks): document CAPACITY_BLOCK capacity type for nodegroups |
||
|
|
c6304a26c8 |
feat(cloudformation): provision AWS::Transfer::User (#5076)
* feat(cloudformation): provision AWS::Transfer::User Adds the user type to TransferCfnProvisioner with in-place update and replacement. * Fix #4655 Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> * docs: count the IAM SSH public key operations in the service matrix Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> --------- Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> |
||
|
|
108f2b54bf |
feat(eventbridge): add ApiDestination target support (#4702) (#5009)
* feat(eventbridge): add ApiDestination target support (#4702) - Add ApiDestination, ApiDestinationState, and HttpParameters models - Implement CRUD operations for API destinations in EventBridgeService - Add CreateApiDestination, DescribeApiDestination, UpdateApiDestination, DeleteApiDestination, ListApiDestinations actions in EventBridgeHandler - Support HttpParameters on targets in PutTargets and ListTargetsByRule - Implement HTTP delivery to API destinations in EventBridgeInvoker with connection auth and SSRF protection - Add CloudFormation provisioning for AWS::Events::ApiDestination in EventsCfnProvisioner - Update docs and tests * fix(eventbridge): harden ApiDestination delivery and CloudFormation lifecycle - Throw on delivery failure so TargetDispatcher retries 429/5xx and connection errors and dead-letters permanent failures - Enforce InvocationRateLimitPerSecond per destination - Run the OAuth client-credentials exchange for OAUTH_CLIENT_CREDENTIALS connections - Reject non-http(s) endpoints and wildcard hosts, encode path parameter values, keep the query before any fragment, and stop logging URLs that may carry secrets - Resolve destination and connection ARNs only when they match the stored ARN - Validate every UpdateApiDestination field before applying any of them - Paginate ListApiDestinations with Limit and NextToken - Keep HttpParameters on AWS::Events::Rule targets and roll back AWS::Events::ApiDestination updates from a snapshot * fix(eventbridge): keep connection credentials authoritative and require a valid endpoint host - Apply target headers and query parameters before the connection's so a target cannot override its credentials, and replace header names that differ only by case - Reject endpoints without a parsed host (for example https://:8080/path) - Sweep stale rate-limit windows once the map grows * fix(eventbridge): make the ApiDestination rate limit check atomic Count permits inside ConcurrentHashMap.compute on an immutable window so the stale-window sweep can no longer remove a window another delivery is using, which let concurrent deliveries exceed InvocationRateLimitPerSecond. * refactor(eventbridge): drop the in-service InMemoryStorage constructor and tidy tests - Remove the compatibility constructor that instantiated InMemoryStorage inside EventBridgeService; tests pass the ApiDestination store explicitly - Import classes instead of qualifying them inline in the ApiDestination integration test - Surface worker failures in the concurrent rate limit test by checking each Future * docs: correct the EventBridge and IAM operation counts in the service matrix |
||
|
|
fabcd6baf8 |
feat(iot): manage custom authorizers (#4826)
* test(iot): cover custom authorizer management against AWS * feat(iot): manage custom authorizers Serve CreateAuthorizer, DescribeAuthorizer, UpdateAuthorizer, DeleteAuthorizer, ListAuthorizers, SetDefaultAuthorizer, DescribeDefaultAuthorizer and ClearDefaultAuthorizer on the AWS REST-JSON paths, with the validation, messages, defaults, key merge, delete rules, ordering and paging measured against AWS. Authorizer ARNs are tagged through the existing IoT tag routes. Authorizers are stored, not evaluated. Closes #4821 * fix(iot): read authorizer public key PEM line by line like AWS A key without its PEM header line, or with an indented or inline header, is not a valid RSA key, a header without its end line cannot convert, and text before the header is skipped, as measured on AWS. * fix(iot): validate authorizer names like AWS, SetDefaultAuthorizer included A name member reports every violated constraint in one message, the pattern first, and a missing one must not be null. SetDefaultAuthorizer validates authorizerName before the lookup, as measured on AWS. * fix(iot): validate the authorizer name on describe, update and delete like AWS DescribeAuthorizer, UpdateAuthorizer and DeleteAuthorizer now reject a malformed or overlong authorizerName path member with AWS's 400 InvalidRequestException messages instead of a 404, measured on eu-west-1. * fix(iot): route tag calls to the authorizer service on the ARN resource IotTagHandler matched ":authorizer/" anywhere in the ARN, so an ARN with that text outside the resource field reached the authorizer service and failed with a 500. It now routes on the parsed resource prefix, and any other IoT ARN goes through IotService as before. |
||
|
|
2749cd6fcd |
feat(cognito): provision user group attachments (#4806)
* feat(cognito): provision user group attachments Serve AWS::Cognito::UserPoolUserToGroupAttachment through a new per-service provisioner. Ref is <UserPoolId>|<GroupName>|<Username>, as measured on AWS. Every property is createOnly, so a change replaces the membership and the old one is removed in cleanup; delete tolerates a membership that is already gone. * test(cognito): read stack outputs with XmlPath * fix(cognito): attach users to groups from their recorded parts, as AWS does * test(cognito): cover pipe group names and alias updates, delete seeded pools * fix(cognito): remove an unrecorded attachment named unambiguously by its id * test(cognito): pin that a failed rollback keeps the replacement's recorded parts * fix(docker): finish a failed tar copy's writer before retrying * test(docker): wait for each attempt's tar writer instead of racing it Restores RetryingTarCopier.copyStreamed to its state on main: joining a failed attempt's writer could block on a writer stalled outside the pipe. * docs(cloudformation): note the no-op delete of a short membership id The class Javadoc said an unrecorded id that does not split into exactly three parts is refused. An id of fewer parts names no membership and its delete does nothing; only more parts is refused. * fix(cloudformation): keep __Floci attributes out of Fn::GetAtt Provisioners keep private state under __Floci attribute keys. Fn::GetAtt and Fn::Sub resolved them like any attribute, so a template could read, for example, an attachment's recorded pool, group and username, while AWS resolves no such attribute. They now resolve as unresolved, like any attribute a type does not have. * docs(cloudformation): note that custom resource Data keys under __Floci are reserved |
||
|
|
99a6b4050c |
feat(redshift-serverless): add running workgroups and Data API WorkgroupName support (#5012)
* feat(redshift-serverless): add running workgroups and Data API WorkgroupName support Redshift Serverless workgroups get full CRUD (Create/Get/List/Update/Delete), tagging by ARN, and the AWS::RedshiftServerless::Namespace and ::Workgroup CloudFormation types with dotted Fn::GetAtt keys taken from the registry schema. A namespace has at most one workgroup, and DeleteNamespace is refused while one is attached. Each workgroup runs a PostgreSQL container behind an authenticating proxy, sharing the managers and the proxy port pool with provisioned Redshift. Add GetCredentials, accept WorkgroupName (name or ARN) in the Redshift Data API, and push a changed namespace adminUserPassword down to the running backend. The runtime is re-attached when Floci restarts. Not covered: snapshots, usage limits, endpoint access, and COPY/UNLOAD/Spectrum on workgroups. * fix(redshift-serverless): stop the runtime when workgroup creation fails after it started If persisting the workgroup record failed after the container and proxy were already running, the runtime was left behind with no record. createWorkgroup now stops it (best effort) and releases the endpoint on the failure path. Fix the CloudFormation error for a NamespaceName change: suggesting a new WorkgroupName can never succeed because a namespace holds only one workgroup. * fix(redshift-serverless): reset omitted CloudFormation properties and order startup observers When UpdateStack drops a property from the template, the provisioner now sends its default (BaseCapacity, EnhancedVpcRouting, PubliclyAccessible, Port, TrackName, PricePerformanceTarget) instead of keeping the stored value, which matches CloudFormation semantics. MaxCapacity has no default and keeps its stored value. Give the workgroup StartupEvent observer a @Priority after RedshiftService so every persisted cluster has reserved its proxy port before workgroups restore theirs. Also remove an unused import and move DEFAULT_DATABASE to the top of RedshiftContainerManager. * fix(redshift-serverless): address review findings on password rotation and namespace updates - Roll the backend password back when a rotation cannot be completed or stored, and apply it last so validation failures never leave the backend ahead of the stored namespace. - Keep a workgroup endpoint reserved when its runtime cannot be stopped during clear(). - Reject an in-place DbName change in CloudFormation, since it is fixed at creation. - Reset an omitted KmsKeyId and DefaultIamRoleArn on CloudFormation updates. * fix(redshift-serverless): keep rollback failures from masking errors and drop stale GetAtt role - Do not reset the proxy password when the role restore fails, and attach restore failures to the original exception instead of replacing it. - Remove Namespace.DefaultIamRoleArn from the stack resource when an update no longer declares a default role. * docs: correct the Redshift Serverless operation count in the service matrix * fix(redshift-serverless): expose Workgroup.ConfigParameters through Fn::GetAtt * fix(redshift-serverless): parse ConfigParameters resolved from a GetAtt attribute * docs(redshift-serverless): list every unsupported operation group |
||
|
|
a84a8a0435 |
fix(iam): resolve server certificate references in ELB and CloudFront (#5075)
Resolve certificate ids on the way in and refuse deleting one in use. * Fix #4875 Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> |
||
|
|
66f04cde25 |
feat(eventbridge): provision AWS::Events::Archive (#4818)
* fix(eventbridge): make UpdateArchive a partial update UpdateArchive reset the event pattern to null and the retention to 0 whenever a request omitted them. On AWS an omitted Description, EventPattern or RetentionDays keeps the stored value, an empty Description or EventPattern clears it, and RetentionDays 0 sets 0. * feat(eventbridge): provision AWS::Events::Archive CloudFormation stubbed AWS::Events::Archive with a fake ARN and created nothing. EventsArchiveCfnProvisioner now creates a real archive through EventBridgeService. Ref is the archive name and Fn::GetAtt Arn the archive ARN. ArchiveName is generated when omitted and kept across updates. Description, EventPattern and RetentionDays update in place, sending only the properties the template declares, and a failed stack update restores them from a snapshot. Changing SourceArn or ArchiveName, or dropping an explicit name, replaces the archive and deletes the displaced one once the update commits. A replacement that keeps an explicit name is refused with CloudFormation's custom-named resource error before any change. KmsKeyIdentifier is ignored. Closes #4815 * fix(eventbridge): reject an archive source that is not an existing bus of the account and region CreateArchive now checks EventSourceArn as AWS does, before the archive name: a bus in another account fails with AccessDeniedException, one in another region with ValidationException, and a bus that does not exist with ResourceNotFoundException. The AWS::Events::Archive provisioner goes through the same service call, so a stack can no longer reach CREATE_COMPLETE with an archive that could never capture an event. * test(eventbridge): roll back an in-place archive update when a later resource fails A stack update changes an archive's description and retention in place, then fails on a second archive whose source bus does not exist. The stack ends UPDATE_ROLLBACK_COMPLETE, DescribeArchive shows the original values and the second archive was never created. The golden case passes on AWS and is mirrored in the Floci integration test. * fix(cloudformation): refuse declaring a generated archive name explicitly Adding ArchiveName with the name CloudFormation generated for an unnamed archive asks AWS to replace the archive under the same custom name, which it refuses with the custom-named resource error and rolls the stack back. Floci took the in-place path and reached UPDATE_COMPLETE; the existing refusal now also fires when the previous name was generated. * fix(cloudformation): provision a real archive when updating a stack whose archive was stubbed A stack created before AWS::Events::Archive had a provisioner holds the dispatcher's stub, whose physical id names no archive. Its next update now creates the archive instead of failing to describe that id, and the stub id is left to the replacement cleanup. * fix(eventbridge): validate archive description, pattern and retention as CreateArchive and UpdateArchive do CreateArchive and UpdateArchive now reject a description over 512 characters, an event pattern over 4096 characters and a negative retention with the ValidationException AWS returns, all violations reported together. The check runs before the source, existence and duplicate checks, so it also fails the AWS::Events::Archive resource in a stack. |
||
|
|
dc3e9cacec |
feat(eks): stop shipping a default storage class in clusters (#5061)
* feat(eks): stop shipping a default storage class in clusters * test(eks): verify coredns rollout status and preserve cluster storage on restore * test(eks): assert storage class absence after coredns rollout completes * docs(eks): clarify stock storage class and provisioner behavior |