mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 06:00:46 -05:00
46f9c23c8be8cd7f7e742bb7d5daf2426778adb4
538
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
46f9c23c8b |
fix(iam): refuse inactive keys and unreadable credentials in enforcement (#5346)
With enforcement on, three kinds of request got past the filter's
credential checks, and an expired session was answered as a key that
exists nowhere.
A deactivated access key could still be used. Account routing skips an
inactive key, so its requests landed in the default account. A key of a
user there kept that user's permissions, since resolveCallerContext
reads the user's policies whatever the key's status. A key of another
account matched no user in the default account, and isKnownAccessKey,
which counts every key in every account, let the request through as a
credential the filter could not map, with no policy check at all.
Deactivating a key of a user allowed nothing let it create IAM users
and mint session tokens. The IAM User Guide ("Manage access keys for
IAM users") says that once deactivated a key "can no longer be used by
API calls" until it is activated again.
An Authorization header the filter could not read a credential from made
it return before any check. That covered a header naming no access key
at all (a Bearer token, SigV2, a Credential without the SigV4 scheme or
with the key left out) and a SigV4 scope missing a part, such as its
aws4_request terminator. Any caller could make any call that way,
including the management calls an unsigned request is refused. Such a
request is now refused as AWS refuses a header it cannot read:
IncompleteSignature for Query services and IncompleteSignatureException
for JSON and CBOR ones (the common errors, and the IAM User Guide's
SigV4 troubleshooting section), and S3's AuthorizationHeaderMalformed
with the wording S3HeaderSignatureFilter already uses, all 400. A
presigned S3 URL sends no header, and S3 answers a mal-formed
X-Amz-Credential with AuthorizationQueryParametersError, so that is
what it gets. Otherwise the request is treated as an unsigned one is: an
operation AWS serves without credentials is left alone, and a REST
request is refused only when the header claims SigV4 and its route maps
to an action, since AppSync, CodeArtifact's package endpoints, Identity
Store's SCIM endpoint and API Gateway's authorizers take Bearer and
Basic tokens of their own. An empty header with nothing else to read is
refused the same way, not as a missing one; next to a presigned URL's
X-Amz-Credential it still defers to that credential. Where the guide
gives the message, the refusal uses it: "Authorization header cannot be
empty." and, for a SigV4 header with no Credential, "Authorization
header requires 'Credential' parameter.". The other shapes get the
common errors' "The request signature does not conform to AWS
standards.".
sts:GetCallerIdentity answered a key that exists nowhere, as the
default account's root, because its exemption ran before the
unknown-key check. The exemption is about permissions only, so the key
checks now run first.
An expired session was refused with InvalidClientTokenId or
UnrecognizedClientException, because resolveCallerContext deletes it and
the known-key check then finds nothing. The common errors of the IAM,
STS, EC2, SNS, CloudFormation, Lambda and Step Functions API references
give ExpiredTokenException, 403, "The security token included in the
request has expired", and S3's error list gives ExpiredToken, 400. The
filter now asks isExpiredSession before resolving the caller, so it no
longer deletes the session, and later uses get the same answer. Both
lookups are asked about one moment: read apart, a session expiring
between them would be deleted and answered as unknown, or on the
presigned POST path below allowed with no policy check. Once Floci's own
sweep has removed the session (the first presigned URL it generates in a
process runs one), the key reads as unknown again, as
docs/services/iam.md says.
The inactive-key, expired-session and unknown-key checks run before the
action is used, on every Query, JSON and CBOR call and on every REST
request whose route maps to an action. A REST request no rule maps is
left alone, as an unsigned one already is: the filter cannot tell it
from the API Gateway execute path, Lambda function URLs and the other
paths it sees that are unsigned by design, and the execute path answers
a bad AWS_IAM signature in its own shape. Every refusal to a CBOR call,
AccessDenied included, now arrives CBOR-encoded, where only the
unsigned-call refusal did before; the others were JSON bodies the client
could not read. AccessDenied keeps its 403, the status the Kinesis and
CloudWatch common errors give it. The filter's JSON errors are now
written from AwsErrorResponse, as AwsExceptionMapper writes every other
JSON error, rather than built as strings. That gives a REST JSON
refusal, such as Lambda's, the X-Amzn-Errortype header the rest of
Floci's REST JSON errors carry.
A presigned POST carries its credential in the form body, which the
filter never sees, so authorizeAdditionalResource is the only IAM check
it gets. That evaluated an inactive key with its user's policies, and
resolved an expired session, which deleted it. Both are now refused
there as the filter refuses them, before the caller is resolved:
InvalidAccessKeyId, 403, and ExpiredToken, 400. A key that exists
nowhere, or a credential that cannot be read, is still left to S3's own
presigned-POST check, and uploads as an unsigned request would when that
check is off. docs/services/iam.md now says so.
isKnownAccessKey keeps counting inactive keys: GetSessionToken relies
on it, so a session minted with an inactive key has no issuer rather
than acting as the account root. resolveCallerContext keeps returning
an inactive key's user policies rather than null, which AppSync and RDS
read as allowed; both verify the signature first, which an inactive key
fails. isInactiveAccessKey looks in the request's account before
scanning the others, since routing sends an active key to its own
account.
Integration tests cover a same-account and another account's inactive
key (including GetCallerIdentity, GetSessionToken, S3, a JSON service,
a presigned POST, and reactivation); an expired session on Query (asked
twice), JSON (with its X-Amzn-Errortype header), S3 and presigned POST
calls; an unreadable credential on Query (eight header shapes, none of
which creates the user), JSON, CBOR and S3 calls, on a presigned S3 URL,
and with the guide's two messages; the cases left alone (a Cognito flow
AWS serves without credentials, a Bearer token on S3, a REST route no
rule maps); an unknown key on GetCallerIdentity and on a CBOR call; and
AccessDenied on a CBOR call. Every refusal fails without this change.
IamServiceTest and IamEnforcementFilterTest check that the expiry check
and the caller lookup are asked about one moment. The SDK compatibility
suite's IamEnforcementTest adds a deactivated key, refused by STS and S3
with the codes the SDK reads and accepted again once activated.
docs/services/iam.md lists the cases in both enforcement tables and
under unsigned requests.
|
||
|
|
f413a667d0 |
feat(iot): indexing configuration (#4896)
AWS IoT fleet indexing had no routes in Floci, so a stack or script
calling UpdateIndexingConfiguration or GetIndexingConfiguration failed
with "Unknown operation: POST /indexing/config", and there was no
stored configuration for a later SearchIndex to consult.
A new IotFleetIndexingService and IotFleetIndexingController, wired
into the iot descriptor beside the domain configuration controller,
serve UpdateIndexingConfiguration and GetIndexingConfiguration on
/indexing/config and DescribeIndex on /indices/{indexName}. There is
one configuration per account and region, kept through StorageFactory;
a region never updated reports the OFF shape AWS returns.
The behaviour follows what real AWS returned when measured: an update
that carries only one of the thing and thing group configurations
keeps the other, turning thing indexing OFF clears the whole thing
configuration, and managedFields are derived from the modes rather
than stored. Client sent managedFields are only checked against the
fields AWS manages and their types. Validation uses AWS's messages for
a missing configuration, null and out of set enum values (the modes,
field types, filter socket information and geolocation order),
secondary modes without thing indexing, named shadow indexing without
shadow names, unknown managed fields, and a thing custom field named
after a managed field. A geolocation sent without an order is stored
with LatLon, the default AWS returns. DescribeIndex returns the
schema the modes select and is ACTIVE at once, a disabled index is
ResourceNotFoundException and an unknown name InvalidRequestException.
Thing group managedFields are checked the same way, also while group
indexing is OFF, and neither group managedFields nor customFields are
stored. A member of the wrong JSON type is a SerializationException,
as on AWS. The fleet indexing, domain configuration and authorizer
controllers now share one strict body reader, so a malformed body or
content after it is a SerializationException on all three, which is
what AWS returns there.
ListIndices, SearchIndex and the statistics APIs are not modeled.
|
||
|
|
4f34a903fc |
feat(ssm): support UnlabelParameterVersion (#5339)
* feat(ssm): support UnlabelParameterVersion
Remove one or more labels from a parameter version. Labels attached to
the version are returned in RemovedLabels; labels that are not on that
version, including ones attached to a different version, are returned in
InvalidLabels and left in place. A missing parameter is ParameterNotFound,
a missing version ParameterVersionNotFound, and an omitted ParameterVersion
or an empty or oversized label list a ValidationException.
* fix(ssm): match AWS errors and ordering in UnlabelParameterVersion
Verified against real AWS (us-east-1):
- Report every missing or invalid member in one ValidationException, in
the order name, parameterVersion, labels, and render the label list
the way AWS does ('[prod, ]').
- Reject a string or boolean ParameterVersion and a non-string Name or
label with SerializationException; truncate a fractional version and
clamp one outside the range of a long, as AWS does.
- Reject an ARN, a malformed or ssm-prefixed name, and deny an
aws-prefixed one before the lookup; ignore surrounding whitespace in
the lookup but echo the name as sent in error messages.
- Word ParameterVersionNotFound as AWS does.
- Return RemovedLabels in the order the labels are stored on the
version, and InvalidLabels in request order.
LabelParameterVersion shares the label-list parsing, so its label
validation messages and non-string labels now match AWS too.
* fix(ssm): take the service monitor when deleting parameters
PutParameter, LabelParameterVersion and UnlabelParameterVersion already
run under the SsmService monitor, but DeleteParameter and
DeleteParameters did not. A delete landing between a label or unlabel
call's lookup and its history write left orphaned history that a later
PutParameter of the same name appended to.
Also pin LabelParameterVersion's AWS-verified label validation messages
and its SerializationException for a non-string label in its own
integration test, and share the parameter-name format rule between the
two reserved-name messages.
|
||
|
|
0ec64add2d |
fix(cloudformation): wait for a stable ECS service (#4880)
AWS CloudFormation reports an AWS::ECS::Service CREATE_COMPLETE or UPDATE_COMPLETE only once the service is stable: it polls DescribeServices until the desired number of tasks of the current task definition are running. Floci reported the resource complete as soon as CreateService or UpdateService returned. The tasks were started later by the ECS reconciler, every five seconds, and the service's runningCount only caught up a tick after that, so a client reading the service right after the stack operation saw runningCount 0. EcsService.awaitServiceStable now waits, like Ec2Service.awaitContainerLaunch, for runningCount to equal desiredCount, for the current deployment to run that many tasks, and for no task of an earlier deployment to be running. Instead of idling until the next tick it submits up to three reconcile passes to the single reconciler thread, so they never overlap a scheduled tick. After five minutes it fails with "Service <arn> did not stabilize.". The wait ends at once when the service's tasks cannot start. The reconciler now keeps, in memory, why its last attempt to launch a task for a service failed, for example an unknown subnet, and the deployment it was launching for. Only a failure of the deployment being awaited ends the wait, so a pass that began before an update cannot fail the update. The record is cleared on a successful launch, on DeleteService and on a state reset. A task that stops with TaskFailedToStart during the wait ends it too. A task the reconciler launches is stamped with the deployment read before its task definition, not after the launch, so a launch that an update overtakes counts as the earlier deployment's and is replaced. The ECS provisioner calls the wait after an in-place update and after a create. A created service stays marked as owned by the stack while it waits, so the create rollback deletes it. A replacement created by a stack update is deleted when it does not stabilize. A service updated in place that does not stabilize is put back on the task definition, desired count and network configuration it had, and the provisioner waits for that to stabilize too, as CloudFormation's rollback does. A restore that fails or does not stabilize is reported as a rollback failure, so a rolled-back stack does not claim the prior configuration is running when it is not. The ECS service test in CloudFormationIntegrationTest used subnets and a security group that do not exist, so its tasks could never start. It now uses the default VPC's. |
||
|
|
d22b4f107c |
fix(iam): enforce inline role policy quota (#5327)
* fix(iam): enforce inline role policy quota Reject role policy updates that exceed the aggregate non-whitespace quota without changing previously accepted policies, including concurrent writes and policies restored after a restart. * fix(cloudformation): rename role policies within quota * test(iam): share inline policy fixtures --------- Co-authored-by: Jason van Zyl <jason@vanzyl.ca> |
||
|
|
da6a7dd085 |
build: enforce Java import order with Checkstyle (#5326)
* style: align Java imports with project guidelines * build: enforce consistent Java import order * style: follow IntelliJ import order |
||
|
|
dc41417e79 |
fix(ec2): avoid Docker waits on the first CreateVpc (#5179)
* fix: avoid Docker waits on first EC2 CreateVpc * fix(ec2): reseed default VPC resources after a state reset Ec2Service now implements Resettable: clear() forgets the seeded account scopes and seeds the default region again, so a reset followed by DescribeVpcs still returns the default VPC and subnets. Also run Ec2CreateVpcLatencyTest in the non-mock EC2 compatibility job, where VPC planning is active and a regression of the first-call Docker wait would be caught. * refactor(ec2): share one default-region seeding method between startup and reset Ec2Startup and Ec2Service.clear() repeated the same enabled check and seed call. Both now go through Ec2Service.seedDefaultRegionIfEnabled() so they cannot drift apart. Also reorder the Resettable import. |
||
|
|
0848fa6a48 |
feat(elasticache): add user groups and associate them with replication groups (#4435)
CreateUserGroup, DescribeUserGroups, ModifyUserGroup and DeleteUserGroup returned UnsupportedOperation, and ModifyReplicationGroup read UserGroupIdsToAdd as user ids, so RBAC could not be set up the way AWS and Terraform (aws_elasticache_user_group, user_group_ids) do it. User groups are now stored resources. CreateReplicationGroup takes UserGroupIds and ModifyReplicationGroup adds and removes user groups; the proxy authenticates the members of a replication group's user groups, read at AUTH time so a ModifyUserGroup applies at once, each by its own authentication mode. A replication group with a user group associated admits only its members, even while the group is empty. An id in UserGroupIdsToAdd that names no user group but names a user still associates that user directly, so existing setups keep working. A cache uses either its AUTH token or user groups, as on AWS: while a user group is attached the token is not accepted and AuthTokenEnabled reads false. ModifyReplicationGroup takes AuthTokenUpdateStrategy DELETE, which removes the token and is only allowed together with a user group, and RemoveUserGroups. Removing the last user group leaves the cache without access control, still encrypted in transit; a token that was never deleted applies again. The proxy reads the cache's auth mode per connection, so these changes take effect without a restart. Validation follows the RBAC rules: a redis user group needs a user named default (DefaultUserRequired), members cannot share a user name (DuplicateUserName), valkey users only join valkey groups, a valkey group cannot hold a no-password user or serve a redis cache, association needs in-transit encryption, and a user group in use cannot be deleted (InvalidUserGroupState). ModifyUser refuses an engine or authentication change that a user group holding the user would reject. Deleting a user removes it from its user groups. |
||
|
|
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> |
||
|
|
13738f89de |
fix(cloudformation): reject resources that depend on each other in a cycle (#5208)
* fix(cloudformation): reject resources that depend on each other in a cycle A template whose resources form a dependency cycle was created anyway: the topological sort appended the resources it could not order and created them in template order. CloudFormation rejects such a template with a ValidationError naming the resources, before any of them is created. The sort now throws that error when resources remain unsorted, and the synchronous pre-check that runs before CreateStack, UpdateStack and CreateChangeSet calls the sort instead of repeating its dependency checks, so the request fails before any stack state is created. * fix(cloudformation): keep dependency order when deleting a stack saved with a cyclic template A stack saved before circular templates were rejected can still carry one. Deleting it hit the new circular-dependency error while ordering its resources, so the delete fell back to insertion order for every resource and could remove a resource before one still using it. The delete now orders what it can and places the circular resources after it, as before. * fix(cloudformation): order resources that depend on a cycle when deleting a saved stack A resource that depends on a dependency cycle cannot be ordered either, so the delete of a stack saved with a cyclic template ranked such resources in template order and could remove a target group before the listener using it. When the sort stalls it now releases a resource on the cycle itself and goes on, so everything that depends on the cycle keeps its dependency order. * fix(cloudformation): delete linked dependency cycles in dependency order When a saved stack's template has a cycle that depends on another cycle, the sort could release a resource of the dependent cycle before the cycle it uses was placed, so the delete removed that cycle's resources first. When the sort stalls it now releases a resource from the first strongly connected component Tarjan's algorithm completes over the resources left, which depends on no other cycle. * fix(cloudformation): order a saved cyclic stack in one pass and name only the cycle Breaking one cycle at a time searched again at every stall and recursed, so a long dependency chain could exhaust the thread's stack and stop the delete of a stack saved with a cyclic template. The resources left at a stall are now ordered in one pass by their strongly connected components, dependencies first, with an iterative Tarjan search. The circular-dependency error names only the components that are cycles, not resources that merely depend on one. * test(cloudformation): cover circular dependency rejection with the AWS SDK * test(cloudformation): assert only the cycle's resources in the SDK test's message |
||
|
|
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. |
||
|
|
efd9512578 |
fix(cloudformation): accept the stack ID in UpdateStack and CreateChangeSet (#4846)
* test(cloudformation): cover UpdateStack and CreateChangeSet by stack ID against AWS * fix(cloudformation): accept the stack ID in UpdateStack and CreateChangeSet StackName is "the name or the unique stack ID" for both actions, but an UPDATE change set looked the stack up by the raw value, so a stack ARN missed the name-keyed map and failed with "Stack with id ... does not exist". Resolve the canonical stack name first, as ExecuteChangeSet already does, and record it on the change set. CREATE change sets are unchanged. Closes #4842 * fix(cloudformation): refuse updating a stack that has finished deleting A delete marks the stack DELETE_COMPLETE before it leaves the live map, so an update in that window was accepted and its persist could revive the stack. An update of a DELETE_COMPLETE stack now reports that the stack does not exist. * test(cloudformation): delete each stack once after the stack ID tests * test(cloudformation): wait until a deleted stack's name is free before reusing it Floci reports DELETE_COMPLETE just before it drops the stack, so a same-name CreateStack could hit AlreadyExistsException; wait until DescribeStacks no longer finds the name. * test(cloudformation): name the stale stack ID test plainly * fix(cloudformation): refuse a deleted stack's ID with AWS's DELETE_COMPLETE message UpdateStack and UPDATE change sets given the stack ID of a deleted stack now fail with "Stack:<id> is in DELETE_COMPLETE state and can not be updated.", as measured on AWS. A stack name, or a stack ID that never existed, still gets "does not exist". |
||
|
|
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
|
||
|
|
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 |
||
|
|
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. |
||
|
|
e9f2463103 |
fix(cloudformation): replace Cognito user pool groups like CloudFormation (#4841)
* test(cloudformation): cover AWS::Cognito::UserPoolGroup replacement against AWS * fix(cloudformation): replace Cognito user pool groups on create-only changes AWS::Cognito::UserPoolGroup left the old group behind on a rename, kept the explicit name when GroupName was dropped, and tried to update a group that did not exist when UserPoolId changed. The provisioner now creates the group whenever a create-only property changes and hands the displaced group to ReplacementCleanup, which deletes it once the update commits or deletes the replacement and restores the prior name and pool when the update rolls back. A pool move that keeps an explicit name keeps the physical id, so, as on AWS, nothing is deleted and the old-pool group stays. A generated name is kept only for an in-place update; a pool move or a dropped explicit name generates a fresh one. Each provisioned name is recorded with its pool so a displaced group is deleted from the pool it lives in. Closes #4836 * test(cloudformation): cover a failed update after moving a named Cognito group against AWS * fix(cloudformation): roll back named Cognito group pool moves and read legacy name modes A named pool move keeps the physical id, so it now records a replacement that displaces nothing. A failed update points the group back at the old pool and, as measured on AWS, leaves the new pool's group, and the stack delete reads the pool from UserPoolId. A resource persisted without FlociGroupNameMode reads its name as generated only when it has the generated shape, so dropping an explicit GroupName replaces it. * test(cloudformation): cover declaring a Cognito group's generated name explicitly against AWS Measured on AWS (eu-west-1): updating an unnamed group to declare GroupName equal to its generated name, same pool, fails the Group with UPDATE_FAILED "CloudFormation cannot update a stack when a custom-named resource requires replacing. Rename <name> and update the stack again." before anything is created. The stack ends UPDATE_ROLLBACK_COMPLETE, Ref and the physical id stay the generated name, and the group keeps its pool, description, precedence and creation date. * fix(cloudformation): refuse declaring a Cognito group's generated name explicitly GroupName is create-only, so declaring an unnamed group's generated name explicitly in the same pool requires a replacement that keeps both the pool and the name. Measured on AWS, CloudFormation refuses it before creating anything: the Group goes UPDATE_FAILED with "CloudFormation cannot update a stack when a custom-named resource requires replacing. Rename <name> and update the stack again.", the stack ends UPDATE_ROLLBACK_COMPLETE, and Ref and the group stay unchanged. Floci updated the group in place and reported UPDATE_COMPLETE; it now raises the same ValidationError. * fix(cloudformation): keep only owed and current Cognito groups in the pool record The group pool record added the prior and current name on every provision and never dropped one, so it grew with every name the resource ever had. It is now rebuilt after the replacement record, keeping only the names still owed a delete, with their recorded pools, plus the current name. * fix(cloudformation): refuse a declared generated Cognito group name only when the mode was recorded The refusal of a declared generated name read the prior mode from the name's shape when no mode was recorded, so a legacy group explicitly named in the generated shape had a valid in-place update refused. Only a recorded generated mode refuses now; a legacy record updates in place, as before the mode existed. * test(cloudformation): read stack outputs with XmlParser The Cognito group integration test read stack outputs by splitting the DescribeStacks XML on tag strings. It now uses XmlParser.extractPairs, as the other CloudFormation integration tests do. |
||
|
|
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.
|
||
|
|
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 |
||
|
|
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 |
||
|
|
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> |
||
|
|
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
|
||
|
|
a6df1dbb12 |
fix(cloudformation): apply stack tags during updates (#5031)
* fix(cloudformation): apply stack tags during updates * test(cloudformation): cover tags-only and failed stack updates * fix(cloudformation): distinguish empty tags from omitted tags * fix(cloudformation): reject implicit CREATE with previous template * test(cloudformation): validate stack tag updates with AWS SDK * test(cloudformation): fail on SDK cleanup errors * fix(cloudformation): allow previous template with omitted type |
||
|
|
b988a061b4 |
fix(apigateway): preserve and update method response parameters (#5030)
* fix(apigateway): preserve and update method response parameters * fix(apigateway): serialize method response patches and decode header paths * fix(apigateway): return created for method response updates |
||
|
|
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. |
||
|
|
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.
|
||
|
|
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> |
||
|
|
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 |
||
|
|
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. |
||
|
|
fe296fda69 |
feat(iam): model SSH public keys (#5051)
UploadSSHPublicKey, GetSSHPublicKey, ListSSHPublicKeys, UpdateSSHPublicKey and DeleteSSHPublicKey, stored per user with the documented quota of five. AWS accepts the body in ssh-rsa form or as PEM, so both are read, and the body is kept exactly as it arrived: a caller that uploaded PEM gets that PEM back rather than a re-encoding. GetSSHPublicKey converts, because Encoding is required and decides the form of the response. Fingerprint is the MD5 of the OpenSSH blob, confirmed by reproducing the worked example in the IAM API Reference rather than assumed. It is not the digest EC2 reports for the same key, which is taken over the DER: both are sixteen bytes of colon hex, so the wrong one would look right. The two rejection errors are kept apart the way the model separates them. A body in neither accepted encoding is UnrecognizedPublicKeyEncoding; one in a recognised encoding that will not parse, or that carries a key type other than ssh-rsa, is InvalidPublicKey. An OpenSSH line is recognised by its key-type token rather than by whether part of it base64-decodes, since a short word often does. DuplicateSSHPublicKey is per user, unlike the account-wide rule for signing certificates, and compares fingerprints so the same key in the other encoding still counts. A key blocks DeleteUser until removed and follows the user across an UpdateUser rename, both under a lock taken in the same order DeleteUser takes it. |
||
|
|
ace5cbfc63 |
chore(style): replace var in more files no open PR touches (#5071)
* chore: replace var with explicit types in src/main files no open PR touches * chore: replace var with explicit types in src/test files no open PR touches * chore: replace var with explicit types in sdk-test-java files no open PR touches |
||
|
|
82977a7f03 | feat(emr): resize instance groups and fleets, list bootstrap actions (#4900) | ||
|
|
06ceec2aee |
feat(redshift): materialize Glue external tables into PostgreSQL (#4996)
* feat(redshift): materialize Glue external tables into PostgreSQL Add ExternalTableMaterializer, which loads a Glue-backed external table into the cluster's PostgreSQL through a staging table, plus SpectrumCatalogResolver (Glue binding first, phase-one catalog as a fallback) and SpectrumGlueCsvAdapter (simple CSV tables keep the streaming path and need no floci-duck sidecar). The bound IAM role is enforced for every S3 object read, including Iceberg metadata, manifests and data files, before DuckDB sees them. SpectrumS3Reader now reads through the role as well, so a phase-one external schema needs a real role associated with the cluster. Spectrum semantics: hidden files and folder markers are ignored, a partitioned table without registered partitions returns no rows, and a sized string value wider than its column in bytes becomes NULL. Also: PartitionProjection accepts IN lists for injected columns and checks each table alias, S3Service hides the Spectrum scratch bucket from ListBuckets, S3TransferException becomes public, and FLOCI_SERVICES_REDSHIFT_SPECTRUM_MAX_ROWS is added. * fix(redshift): harden external table loads against review findings - A session outside a transaction waits for a slow load instead of failing after 30 seconds; only a session in a transaction keeps the timeout, since it can hold a PostgreSQL lock the Java lock cannot see. - A missing S3 bucket is reported as XX000, not as access denied. - A load failure goes to the log with its cause and returns a generic message, because the cause can carry DuckDB request text. - The partition fingerprint includes input format and SerDe, so a format change at the same location reloads the table. - A partition value wider than its sized string key becomes NULL, as a data column does, instead of failing the whole load. - The first load of an account removes scratch objects left by a JVM that died mid-load, keeping those younger than an hour. - Document why the phase-one reader enforces the role without the cluster association check. * fix(redshift): use a real IAM role in the Spectrum compat test The external schema now enforces its IAM role, so the compat test needs a role that exists, trusts redshift.amazonaws.com and is associated with the cluster. Create it through the IAM SDK client, pass it to CreateCluster and delete it in the cleanup. * fix(redshift): address review findings on the external table materializer - PartitionProjection: a table name must end at an identifier boundary, comma separated sources are checked like FROM and JOIN sources, an unqualified injected column is accepted when exactly one source declares it, and a constant may be wrapped in parentheses. - The partition fingerprint covers the whole descriptor (columns, formats, SerDe and parameters), and an Iceberg table is read on every query because its snapshot can change without any visible change to the Glue table. - A transactional load that keeps the committed columns keeps the schema signature, so a view that depends on the table can still be refilled. - Files under a hidden folder such as _temporary are ignored, not only hidden file names. - The scratch bucket is told apart from a user bucket of the same name by a tag: a user bucket is listed, never written to, and never swept. - Drop the SPECTRUM_MAX_ROWS row from the docs until routing makes the cap reachable. * fix(redshift): verify slow-load wait with timeout |
||
|
|
fde5170335 |
test(compat): take the partition and region from TestFixtures in the last 33 suites (#5052)
Third and last batch of the cn-north-1 allowlist burn-down (#4272). The 41 remaining entries all pinned commercial values: ARNs built as arn:aws:<svc>:us-east-1:..., arn:aws: prefix assertions, us-east-1 zones, hosts and filter strings, and clients or signers created for us-east-1 next to the cn-north-1 fixture clients. Among them, the RDS IAM-token tests signed their tokens for us-east-1, OrganizationsTest built its invited account's client for us-east-1, Route53Test associated VPCs as us-east-1 that live in the fixture region, and SesEventPublishingTest failed in setup on a us-east-1 event bus ARN. All 33 classes now derive those values from TestFixtures, so the allowlist is empty: any failure in the China nightly fails the run. |
||
|
|
7ff3363899 |
test(compat): run the Marketplace Entitlement and Agreement tests in every region Floci serves (#5050)
Since #5028 Floci serves Entitlement in us-east-1, cn-northwest-1 and eusc-de-east-1, and Agreement in us-east-1, the three ISO regions and eusc-de-east-1. The compat guards still skipped both tests outside us-east-1; they now take the same region sets, so a run in those regions exercises the wider support. |
||
|
|
ae3adfe992 |
fix(apigateway): validate and cache REST Lambda authorizers (#5002)
* fix: evaluate and cache REST Lambda authorizer policies * fix: share REST request context and complete parameter mappings * fix: prevent stale REST authorizer caching after stage flush * fix: use valid authorizer policies in REST import tests * chore: align API Gateway imports with repository style * fix(apigateway): isolate authorizer contracts and validate cached identities * chore(apigateway): align restored context code with style guide * chore: order API Gateway SDK test imports |
||
|
|
6deb0d4d2b |
test(compat): run the China-absent tests per partition instead of allowlisting them (#5027)
* test(compat): run the China-absent tests per partition instead of allowlisting them Third batch of the cn-north-1 allowlist burn-down (#4272): the 13 tests that exercised something AWS does not offer in China. Seven keep running there with the China shape: - S3Test: only the us-east-1 endpoint creates a bucket in another region, so elsewhere the location-constraint round trip names the client's own region. - StsTest: the SAML assertion's Recipient is the partition's console sign-on URL (the CDK region facts), signin.amazonaws.cn in China. - Ec2Tests: China names its interface endpoint services cn.com.amazonaws, so the S3 gateway and interface offerings are two services there. - IamTest: GetAccountSummary reports GlobalEndpointTokenVersion only in the commercial partition, the one with a global STS endpoint. Six skip where the service has no endpoint: the five Marketplace tests (the regions botocore publishes for each) and Lightsail (commercial only). The allowlist's China-absent section is gone, 13 entries, 73 to 60. * test(compat): derive VPC endpoint names from the DNS suffix and keep Marketplace guards to us-east-1 The ECR interface service is named under the partition's DNS suffix reversed in every China, EUSC and ISO region (eu.amazonaws, gov.ic.c2s, ...), not only in China, so describeVpcEndpointServices now takes that prefix from the SDK's partition metadata. S3 keeps the China-only split, the only regions where AWS lists it. Floci serves Marketplace Agreement and Entitlement only in us-east-1, so their guards no longer admit the other regions AWS runs them in; widening both is a separate change. |
||
|
|
290f952cb1 |
feat(iam): model signing certificates (#5024)
UploadSigningCertificate, ListSigningCertificates, UpdateSigningCertificate and DeleteSigningCertificate, stored per user with the documented quota of two and account-wide duplicate detection compared on the encoded form. The body is parsed on upload, because MalformedCertificate cannot be answered without reading it. Status accepts Active, Inactive and Expired: the API Reference gives all three as valid values even though the parameter's prose explains only the first two. UserName is optional on every operation and resolves from the access key that signed the request. A certificate blocks DeleteUser until it is removed, which AWS lists as a prerequisite, and follows the user across an UpdateUser rename rather than being stranded on a name that no longer exists. The credential report's cert_1 and cert_2 columns are backed by the store instead of always reporting FALSE, reporting N/A for the rotation date unless the certificate is Active, as the User Guide defines them. |
||
|
|
ae0a591bb1 |
feat(cognito): provision user pool users (#4805)
* feat(cognito): provision user pool users Add a CloudFormation provisioner for AWS::Cognito::UserPoolUser. Ref is the username Cognito reports (the sub in an email-as-username pool). Every property is createOnly: a changed custom-named user is refused as on AWS, any other change replaces the user, and each delete targets the pool the user was created in. * fix(cognito): refuse a RESEND user pool user that already exists * fix(cognito): keep the user's pool out of Fn::GetAtt * fix(cognito): keep only owed users in the pool record |
||
|
|
bdab4448d6 |
perf(kms): drop unused BouncyCastle curves from the native image (#4868)
* perf(kms): build the KMS curves directly so unused BouncyCastle curves leave the native image Any BouncyCastle named curve lookup reaches every curve the tables know, including the binary SecT curves. BcEcKeys now builds the five curves KMS uses from their own BouncyCastle classes and encodes keys itself, in the same DER layout as before. RsaKeyType builds the PSS signer's key parameters from the JDK key instead of going through BouncyCastle's key factories. * test(compat): cover the KMS key paths that call BouncyCastle directly secp256k1 signing, EC key import for every curve, and RSA PSS digest signing had no test in the suite that runs against the native image. * chore(kms): note where each curve generator comes from |
||
|
|
9e178d77a0 |
feat(wafv2): provision web ACL associations (#4804)
* feat(wafv2): provision web ACL associations WafV2CfnProvisioner now serves AWS::WAFv2::WebACLAssociation with Ref ResourceArn|WebACLArn, as measured on AWS. Any property change replaces the pair through ReplacementCleanup. Delete disassociates only while the resource still uses that ACL, so cleanup of an old pair keeps the new one. Rollback re-associates the restored pair. * test(wafv2): cover ResourceArn replacement and read stack outputs with XmlPath |
||
|
|
dfe2117fed |
test(compat): take the partition and region from TestFixtures in five more suites (#5025)
Second batch of the cn-north-1 allowlist burn-down (#4272). These tests pinned the commercial partition, so they failed against a China deployment for the test's own reasons, not Floci's: - AppSyncTest asserted the arn:aws:appsync: prefix on four ARNs. - Ec2DescribeSpotPriceHistoryTest filtered on us-east-1a and us-east-1b. - PipesTest built its role, SQS and Kinesis ARNs in arn:aws and us-east-1. - IamTest looked its user up by an arn:aws ARN; its AWS managed-policy prefix and the SimulatePrincipalPolicy source now follow the partition too. - CloudWatchLogsMetricFilterTest replaced the recorded @aws.region dimension with us-east-1, and MetricFilterQueryAssertions signed its Query request for us-east-1, so it read another region's metrics. All now derive the partition and region from TestFixtures. The allowlist drops 19 entries, from 73 to 54. |
||
|
|
9c49ecf255 |
feat(rds): restore DB instances and clusters to a point in time (#4963)
Serve RestoreDBInstanceToPointInTime and RestoreDBClusterToPointInTime, and report the restorable window: LatestRestorableTime on DescribeDBInstances, EarliestRestorableTime and LatestRestorableTime on DescribeDBClusters. Requests are checked as the API reference describes: exactly one of RestoreTime (RestoreToTime) and UseLatestRestorableTime, a time inside the window or InvalidRestoreFault, PointInTimeRestoreNotEnabled for an instance with backups off, and exactly one source. An instance source is named by identifier or DbiResourceId, a cluster source by identifier, ARN or DbClusterResourceId; automated backups ARNs answer DBInstanceAutomatedBackupNotFound since no automated backups are kept. Floci keeps no transaction log, so the target is seeded from a pg_dumpall of the source taken when the request arrives, as read replicas are. The restored data is the source's latest state for any time in the window, and LatestRestorableTime is the current time. Only PostgreSQL sources are accepted, as for CreateDBSnapshot. Closes #4952 |
||
|
|
823f8751de |
feat(lambda): store DurableConfig on functions (execution later) (#5007)
* feat(lambda): accept and echo DurableConfig on functions CreateFunction and UpdateFunctionConfiguration take DurableConfig, PublishVersion snapshots it, and every read echoes it. ExecutionTimeout is required on create, RetentionPeriodInDays defaults to 14, a durable function's Timeout defaults to min(ExecutionTimeout, 900) and its logging to JSON. Update merges the members, and a function created without DurableConfig cannot gain one. KMSKeyArn is validated against its pattern and stored, the key itself is not looked up. * chore(lambda): trim the DurableConfig tests to one case per rule * feat(lambda): durable functions log in JSON format only A durable function rejects LogFormat Text on create and update, and a LoggingConfig without LogFormat reads back as JSON. An empty KMSKeyArn means no key. * chore(lambda): let the logging helpers own the durable JSON rule validateLoggingConfig and applyLoggingConfig take the durable flag, so a durable function's default format and the Text rejection live in one place and a LoggingConfig without LogFormat keeps its log levels. applyDurableConfig sets the retention default and merges, and the test uses chainable helpers. * chore(lambda): say why the durable compat test ignores a failed cleanup |
||
|
|
ba944df922 |
fix(cloudformation): resolve change sets by ARN without stack name (#4885)
* fix(cloudformation): resolve change sets by ARN without stack name * test(cloudformation): verify change set ARN execution with SDK * test(cloudformation): wait for change set execution status * fix(cloudformation): tighten change set ARN validation tests |