Implements InitiateAuth/AdminInitiateAuth AuthFlow=USER_AUTH (#3926):
USERNAME plus optional PREFERRED_CHALLENGE, offering PASSWORD,
PASSWORD_SRP, EMAIL_OTP and SMS_OTP depending on what the user has
(password hash, SRP verifier, verified email, verified phone). With
no PREFERRED_CHALLENGE, the response carries AvailableChallenges and
ChallengeName=SELECT_CHALLENGE; with one, it goes straight to that
challenge. RespondToAuthChallenge handles SELECT_CHALLENGE (ANSWER
names the chosen factor, and may already carry that factor's own
answer to complete in one round trip), PASSWORD, PASSWORD_SRP, and
EMAIL_OTP/SMS_OTP.
PASSWORD and PASSWORD_SRP reuse authenticateWithPassword and
handleUserSrpAuth unchanged rather than reimplementing verification:
a USER_AUTH client responding with PASSWORD/SRP_A needs exactly the
same checks those flows already perform, so PASSWORD_SRP hands off to
the existing PASSWORD_VERIFIER challenge with zero new SRP logic.
EMAIL_OTP/SMS_OTP reuse the existing VerificationCodeService/
CognitoMessageDispatcher pair already used for SignUp/ForgotPassword
codes, adding EMAIL_OTP/SMS_OTP as new VerificationCode.Purpose
values distinct from SMS_MFA so a sign-in code can't be replayed
against another purpose's consume() call.
Also gates USER_AUTH on the pool's tier: AWS requires Essentials or
higher, and UserPool.userPoolTier already models this (defaulting to
ESSENTIALS), so a LITE-tier pool is rejected. SMS_OTP uses
SmsAuthenticationMessage, the template AWS documents for "SMS OTP and
MFA authentication" (CreateUserPool docs), not the signup/
verification template.
Security and correctness fixes found in review:
- handleUserAuth now validates SECRET_HASH before looking up the user
or issuing a challenge, closing a hole where a caller with no
secret could trigger a real OTP send and read the masked
destination without proving it holds the client secret.
- issueSignInOtp now maps VerificationCodeException through
mapVerificationCodeException (so a rate-limited retry surfaces as
LimitExceededException, not a generic CodeDeliveryFailureException
that hid the real cause), and invalidates the just-issued code
before reporting a real dispatch failure, so the rate limiter
doesn't lock out a retry for a code the user never received,
matching signUp's existing rollback pattern.
Deliberately not implemented, tracked as follow-ups:
- WEB_AUTHN (passkeys): a much bigger piece per the issue's own
scoping note, no credential storage/ceremony exists in floci yet.
- The Session from ConfirmSignUp accepted as a first-factor shortcut:
needs ConfirmSignUp to start minting a redeemable session, a
separate mechanism from the challenge flow this PR adds.
- Pool-level sign-in policy (AllowedFirstAuthFactors): floci does not
model per-pool factor restrictions at all today; availability here
is purely per-user (does the user have this factor configured).
- Session is not looked up on RespondToAuthChallenge: each handler
independently reverifies its own factor from the request body, the
same shape the existing NEW_PASSWORD_REQUIRED handler already uses,
so there is no bypass, just an opaque correlation token rather than
server-held state.
Verified against botocore's cognito-idp service-2.json (AuthFlowType,
ChallengeNameType, AvailableChallengeListType, the AuthParameters
documentation for USER_AUTH) and the real InitiateAuth/CreateUserPool
API reference pages, including InitiateAuth's worked examples and
CreateUserPool's SmsAuthenticationMessage description.
* fix(eks): populate clusterSecurityGroupId on cluster responses
Real AWS EKS automatically provisions a cluster security group and
returns its identifier in resourcesVpcConfig.clusterSecurityGroupId
on CreateCluster and DescribeCluster responses.
- Create a security group in Ec2Service with the pattern
eks-cluster-sg-<cluster-name>-<suffix> using 8 hex characters.
- Set standard AWS description and tags (Name, kubernetes.io/cluster/<cluster-name>,
and aws:eks:cluster-name).
- Set clusterSecurityGroupId to empty string when cluster has no VPC.
- Delete the cluster security group on DeleteCluster, tolerating
InvalidGroup.NotFound for idempotency.
- Backfill cluster security groups for pre-existing clusters on startup.
* fix(eks): address cluster security group review feedback
* fix(eks): add self-referencing egress rule and cleanup on SG setup failure
* feat(redshift): support S3 COPY FORMAT AS JSON 'auto' and MANIFEST
* fix(redshift): resolve column discovery via pg_catalog and guard against empty columns
* feat(redshift): track zero-ETL backfill progress and syncing status
* feat(redshift): backfill existing DynamoDB items into zero-ETL landing table
* test(redshift): prove zero-ETL backfill and syncing-to-active status
* fix(redshift): reject JSON 'auto' COPY without columns over Extended Query clearly
Catalog-based column discovery only runs over the Simple Query protocol, so
a column-less COPY ... FORMAT AS JSON 'auto' sent over Extended Query failed
with an obscure error. Name the cause and remedy in the error, document the
limitation, and run the discovery tests over Simple Query.
* docs(redshift): document zero-ETL DynamoDB backfill and syncing status
* fix(redshift): address review feedback on COPY JSON, manifest and zero-ETL backfill
* fix(redshift): pass user column list as written and clarify syncing status in docs
* fix(redshift): wrap long condition in identifier unquoting
* fix(redshift): keep user columns as written in runCopyFrom and verify backfill account scope
* test(redshift): use assertNotNull for last evaluated key assertion
DeleteVpc already removes the default security group, its rules, the main
route table and the default network ACL, but their tags stayed in
DescribeTags. Delete them with the resources.
* fix(kms): reject Sign and Verify on keys that are not SIGN_VERIFY
* fix(kms): validate SigningAlgorithm and key spec
* refactor(kms): keep only comments the code cannot show
* fix(kms): check the DIGEST length for every signing algorithm
* fix(kms): refuse disabled and pending deletion keys
* fix(kms): answer a failed Verify with KMSInvalidSignatureException
* fix(kms): fix MAC key usage and invalid MAC errors
* fix(kms): validate MacAlgorithm
* fix(kms): use the key spec error for an unsupported MAC algorithm
* fix(kms): only treat a malformed signature as invalid in Verify
* fix(kms): answer a key pending import with its ARN and state
* fix(kms): name the key ARN when it is pending deletion
* fix(kms): refuse a key pending deletion in key management operations
* fix(kms): check the key state in GetPublicKey
* test(kms): drop the real AWS notes from test comments
* fix(kms): send no message when GetPublicKey gets a symmetric key
* fix(kms): check the key state before changing key rotation
* fix(kms): send no message when the key spec does not rotate
* fix(kms): accept DisableKeyRotation on a key spec that does not rotate
* fix(kms): name the key ARN and origin when the origin is not valid
* fix(kms): ask for new key material when rotating an EXTERNAL key on demand
* fix(kms): validate RotationPeriodInDays
* fix(kms): use the AWS wording for IncorrectKeyException
* fix(kms): send no message with InvalidCiphertextException
* fix(kms): list EncryptionAlgorithm values in the AWS order
* fix(kms): validate the data key KeySpec and NumberOfBytes
* fix(kms): require either KeySpec or NumberOfBytes for a data key
* fix(kms): make an AES_128 data key 16 bytes long
* fix(kms): use the AWS error for a data key under an asymmetric key
* fix(kms): name GenerateDataKeyWithoutPlaintext in its key usage error
* fix(kms): report the GenerateRandom bound that NumberOfBytes breaks
* fix(kms): say NumberOfBytes is required in GenerateRandom
* fix(kms): list the MessageType values in its validation error
* fix(kms): answer NotFoundException with status 400
* fix(kms): use the AWS wording when a key does not exist
* fix(kms): use the AWS wording when an alias does not exist
* fix(kms): reject a key or alias ARN from another region
* fix(kms): validate a missing, empty or non-ASCII KeyId
* fix(kms): validate blob members before looking up the key
* fix(kms): reject an alias in operations that need a key
* test(compat): stop scheduling a KMS key for deletion twice
Move AWS::IAM::Policy out of the CloudFormationResourceProvisioner monolith into a new IamPolicyCfnProvisioner over IamService. AWS::IAM::Policy is an inline policy embedded in the named roles, users and groups, so Ref is the policy name with no ARN, the name is stable across updates unless the template changes it, and a failed update rolls back the partially applied puts and records anything it could not undo for the next provision to drain. A physical id that is a managed policy ARN is the pre-inline upgrade path, migrated and deleted here as before.
The shared PolicyDocument resolver is hoisted onto ProvisionContext so the managed-policy provisioner can reuse it when it moves. Leaving LEGACY_SWITCH subjects the type to CfnSchemaCoverageTest: its only readOnly attribute, Id, is recorded as a gap row because Floci uses the policy name for Ref where AWS returns an opaque identifier it does not model. ManagedPolicy stays in the monolith for the following PR, so its delete and the legacy-managed helpers are duplicated between the two until then.
ECS expresses CPU as units where 1024 units is one vCPU, and a task
definition can ask for a container's own filesystem to be read only.
Neither reached the Docker host config.
ContainerSpec gains nanoCpus, cpuShares and readonlyRootfs, the builder
gains withCpuUnits, withCpuShares and withReadonlyRootfs, and
ContainerLifecycleManager maps them onto withNanoCPUs, withCpuShares and
withReadonlyRootfs. Existing convenience constructors keep their old
shapes and default the three new components, so no current caller
changes behaviour.
Docker refuses a NanoCpus above the host's CPU count, while ECS accepts a
task cpu of up to 196608 units, so a 16 vCPU task asked for verbatim
would fail to start on a smaller machine. The quota is held to the
daemon's reported NCPU, read once and left alone when the daemon does not
report one.
ContainerLifecycleManagerCpuLimitTest builds a spec through the builder,
captures the HostConfig on create and pins the unit conversion, the
zero/negative guards, the cpuShares passthrough, readonlyRootfs and both
sides of the clamp.
* refactor(elasticache): move library usages to imports
* refactor(elasticache): move library usages to imports and eliminate var declarations
* refactor(elasticache): extract entity variable in query handler test
Follow-up to #3913 addressing pgermosen's review of the IAM leaf provisioners.
AWS::IAM::AccessKey: UserName and Serial are both createOnly, so an update that changes neither reuses the existing key (a user is capped at two keys, so recreating on every update failed with LimitExceeded and orphaned the earlier keys), and a change to either rotates the key by replacement, creating a new one and deleting the displaced one after the update commits through ReplacementCleanup, matching how AWS rotates a key by incrementing Serial. A missing UserName is rejected. Delete recovers the owning user from the key id (findUserNameByAccessKeyId), so both the stack-delete and the replacement-cleanup paths delete by physical id alone.
AWS::IAM::InstanceProfile: Roles is a no-interruption update, so the declared roles are reconciled in place (undeclared roles removed, then declared roles added) instead of only ever added, which had made a role swap fail with LimitExceeded. A missing Roles is rejected (AWS requires it), and a Path change on an existing profile is rejected as an unsupported replacement rather than silently ignored, since Path is createOnly and a same-named profile cannot be replaced in place. Roles are detached before delete because IAM refuses to delete a profile that still holds one.
Known edge: ReplacementCleanup.rollback restores only non-internal attributes, so after a rolled-back key rotation the stored Serial can lag by one; the next update re-evaluates. Full InstanceProfile name-plus-path replacement and AccessKey Status handling remain follow-ups.
* fix(cloudformation): provision Cognito user pool groups
Create and reconcile user pool groups, and namespace custom schema attributes while preserving standard attributes.
* fix(cloudformation): keep a generated Cognito group name across updates
GroupName is optional, and provision generated a fresh stand-in on every call. Because
provision is also the update path, the second UpdateStack derived a different name, took
the create branch and left the group the stack already owned orphaned behind it.
Use ProvisionContext.stablePhysicalName so the prior physical id is reused when the
template does not name the group, and reusesPriorEntity for the create-or-update choice,
which is the pairing that keeps a stable name from turning an update into a duplicate
create.
DeleteUser now returns DeleteConflict while the user still has inline policies or access keys, matching AWS. UpdateUser rename moves the user's access keys and group membership to the new name, so a renamed user keeps them and a user recreated under the old name does not inherit them.
Resolve the integration target before connecting and reject link-local and cloud instance-metadata addresses on both the HttpClient path and the Host-override socket path. Loopback and private ranges stay reachable so local backends keep working.
DeleteVpc now refuses while the VPC still has a subnet, a security group,
route table or network ACL other than the defaults, or an attached
internet gateway, as AWS does. Creating a subnet, group, route table or
network ACL, or attaching an internet gateway, re-checks the VPC under the
region topology lock, so a concurrent DeleteVpc can no longer leave one
pointing at a VPC that is gone. AttachInternetGateway now rejects a VPC
that does not exist.
The default arm of InitiateAuth and AdminInitiateAuth looked the user up by name and issued signed tokens for any AuthFlow value it did not recognize, with no credential check. Reject those values with InvalidParameterException. ADMIN_NO_SRP_AUTH is a valid AdminInitiateAuth flow that previously only worked through that arm, so it now goes through password authentication.
CreateDomain and CreateRepository accepted an unlimited number of domains and
repositories, but AWS caps an account at 10 domains per Region and a domain at
1,000 repositories, returning ServiceQuotaExceededException once reached.
DeletionProtection was stored and round-tripped but never read on the
delete path, so a protected pool was deleted like any other and a
CloudFormation DeleteStack owning one succeeded. AWS refuses with
InvalidParameterException until UpdateUserPool switches the flag to
INACTIVE, and the stack reports DELETE_FAILED with that reason.
The check reads the pool store directly: describeUserPool would turn a
delete of a missing id into ResourceNotFoundException (a separate
divergence) and generate signing keys as a side effect.
Closes#3948
* feat(sns): add the MaximumMessageSize topic attribute for 1 MiB payloads
AWS raised the SNS payload ceiling from 256 KiB to 1 MiB behind a new
per-topic MaximumMessageSize attribute. The default stays 262144, so an
unconfigured topic is unchanged.
CreateTopic and SetTopicAttributes validate the 1024-1048576 range, Publish
and PublishBatch size against the topic's value, and a topic above 262144 is
held to its subscription constraints: sqs, firehose or lambda only, and at
most 100 subscriptions. AWS::SNS::Topic forwards the property too.
Two things the same code path had wrong, both checked against the live API:
Subject was counted towards the publish limit when AWS does not count it, and
PublishBatch returned the SQS wording rather than the SNS one.
* fix(sns): ignore an out-of-range persisted MaximumMessageSize
Validation only guards new writes. A topic stored before the attribute was
known carries whatever the old generic setter accepted, so the read path
could hand back a value above 1 MiB and wave a publish past the AWS ceiling,
or one at zero and reject every publish. Out of range now falls back to the
default, exactly as a nonnumeric value already did.
Also covers the attribute end to end on both wire protocols -- create, set,
get, and the oversized Publish and PublishBatch errors on Query and JSON 1.1
-- since the existing suite drives SnsService directly and cannot catch a
regression in parameter extraction or error serialization.
* chore(iam): report enforcement state at startup and cover IAM management actions
Issue #3931 reported that an IAM user with an S3-only policy could call
CreateUser, CreateGroup, AttachUserPolicy and DeleteUser. The reporter had
set FLOCI_IAM_STRICT_VALIDATION, which is not a Floci flag, so enforcement
was never on; with FLOCI_SERVICES_IAM_ENFORCEMENT_ENABLED=true those calls
already return AccessDenied, including under an explicit Deny on iam:*.
Make that state visible: the startup banner now prints whether IAM policy
enforcement is enabled and names the correct variable when it is off. The
IAM docs state that management actions are enforced too and that any other
flag spelling is silently ignored. A regression test pins the issue's
scenario (group-attached S3-only policy, plus a direct explicit-deny
policy) against the four actions over HTTP with enforcement enabled.
* chore(iam): use explicit types and imports in the enforcement regression test
* chore(iam): stub the IAM config in EmulatorLifecycleTest and cover the enforcement banner line
* fix(sagemaker): restore the worker pools in afterReset, not clear()
A state reset runs every container teardown, and the SageMaker training
runner and endpoint manager shut their worker pools down there. Since
#3797 they create a new pool in clear(), but the reset controller skips
clear() as soon as the storage wipe or an earlier service's clear()
throws, so one failed reset still left both pools terminated and every
later CreateTrainingJob, CreateEndpoint and UpdateEndpoint returned 500
with RejectedExecutionException until Floci restarted.
Both beans now recreate the pool in afterReset(), which the controller
runs from a finally block for every service it prepared, whether or not
the wipe or a clear() succeeded. Shutdown still never runs it, so the
pools stay down there. clear() keeps only its stopRequested wipe, and
the ContainerTeardown Javadoc names afterReset() as the hook to use.
Refs #3796
* fix(ecs): restart the reconciler in afterReset, not clear()
EcsService restarted the reconciler its reset teardown had stopped in
clear(), the same one-way path the SageMaker pools had: a reset whose
storage wipe or earlier clear() threw skipped it and left ECS without a
reconciler until the emulator restarted. The restart now lives in
afterReset(), which the reset controller runs for every prepared service
regardless of that failure, matching the rule the ContainerTeardown
Javadoc states and what the SageMaker beans now do.
Refs #3796
S3VirtualHostFilter rewrites a bucket-level virtual-hosted request (GET /)
to the path /bucket/, and ResourceArnBuilder.buildS3Arn turned that into
arn:aws:s3:::bucket/ with a trailing slash. A policy naming the bucket as
arn:aws:s3:::bucket then failed to match, so an allowed ListBucket was
denied for every SDK that defaults to virtual-hosted addressing while the
identical path-style call was allowed.
Drop the separator when nothing follows it. A key that itself ends in a
slash (a folder marker such as folder/) keeps it, because there the slash
is key data rather than a separator.
Refs lex00/floci#213
(cherry picked from commit 8624701021f2c6374b6e5d627218eeaa961ce751)
* fix(dynamodb): honor MICROSECOND ApproximateCreationDateTimePrecision for Kinesis destinations
Store the precision requested in EnableKinesisStreamingConfiguration, echo it in the
enable response, and return it from DescribeKinesisStreamingDestination, so Terraform
no longer destroys and recreates the destination on every apply.
Stamp ApproximateCreationDateTime in epoch microseconds for MICROSECOND destinations,
with a shared eventID per change across destinations.
Reject precisions other than MILLISECOND and MICROSECOND with ValidationException.
Add forwarder unit and end-to-end integration coverage, and document the behavior.
* fix(dynamodb): stop enabling DynamoDB Streams with a Kinesis destination
EnableKinesisStreamingDestination turned on DynamoDB Streams for the table.
Kinesis forwarding does not need it, and Terraform saw stream_enabled drift
on aws_dynamodb_table on every run.
Leave the table's stream setting as the caller configured it.
* test(dynamodb): add Terraform compat test for Kinesis destination precision
Apply a Kinesis streaming destination with MICROSECOND precision and check that
it reads back, that a second plan is clean, and that a precision change
replaces the destination once and then settles.
* feat(ec2): report DnsEntries for interface VPC endpoints
CreateVpcEndpoint and DescribeVpcEndpoints answered without a dnsEntrySet, so an
interface endpoint reported no DNS entries at all. A caller that follows the
endpoint to the name it should point a Route 53 alias at has nothing to read:
Terraform's aws_vpc_endpoint exposes the list positionally as dns_entry, so
dns_entry[0].dns_name fails outright.
An interface endpoint now reports the regional name, one name per availability
zone it has a subnet in, and the service's own public name when private DNS is
on. The names and their hosted zones are derived from the endpoint and its
region rather than stored, so repeated describes and a restart keep answering
with what the caller first saw, the same approach the endpoint's network
interfaces already use.
The service segment follows AWS's rule rather than the last dot-separated
segment: com.amazonaws.us-east-1.ecr.api is reached at
api.ecr.us-east-1.vpce.amazonaws.com. CloudFormation publishes the matching
DnsEntries attribute, which closes its row in getatt-attribute-gaps.tsv.
* fix(ec2): build endpoint DNS names from the region's partition suffix
The names hard-coded amazonaws.com, so an endpoint in cn-north-1 reported
...vpce.amazonaws.com where AWS serves ...vpce.amazonaws.com.cn, and the same
for the private DNS name. AwsRegions.dnsSuffixFor already carries the suffix
per partition, as EksTokenMinter uses when it builds an STS hostname.
Also covers the CloudFormation attribute end to end: a CreateStack whose
Outputs take Fn::GetAtt on DnsEntries now asserts the pairing and the entry
order, which the schema-coverage ratchet cannot check because it only matches
provisioner source.
* fix(ec2): answer the private DNS name AWS serves, not the service token
Deriving the private name from the endpoint service token is wrong for the
services whose two differ. com.amazonaws.<region>.kinesis-streams answers on
kinesis.<region>.amazonaws.com and kinesis-firehose on firehose, the ECR
registry name is the wildcard *.dkr.ecr.<region>.amazonaws.com, and the IoT
data plane has no private name at all: AWS leaves private DNS off for it.
Those four are the exceptions among the services DescribeVpcEndpointServices
advertises, so the map covers that list rather than standing in for AWS's DNS
catalogue. Everything else keeps deriving from the token, which is what AWS
serves for it.
* fix(ec2): answer the wildcard private DNS name for API Gateway
A private REST API is invoked at {restapi-id}.execute-api.<region>.amazonaws.com,
so the endpoint's private name is the wildcard *.execute-api.<region>.amazonaws.com
rather than the bare regional name the service token produces.
* fix(ec2): answer the private DNS names AWS serves for the ECS endpoints
An ecs-agent or ecs-telemetry endpoint answered on its own service token, but
AWS serves them at ecs-a and ecs-t. Cover every advertised service in the
matrix test, and fail when one is advertised without a private DNS name
decided for it.
* refactor(sqs): move library usages to imports
* refactor(sqs): replace inline FQCNs and var declarations across sqs package
* refactor(sqs): eliminate test var usages and revert attribute order in json handler
* fix(proxy): preserve half-closed relay connections
* fix(proxy): bound both relay shutdown waits
Ensure Redis and Neptune relays close both directions when one peer half-closes,
and cover backends that send a response but remain connected.
* fix(proxy): keep healthy relays open
Removing stripBom and the unused imports in the review follow-up left a blank
line before the closing brace of CsvRecordReader and a doubled blank line in
SesImportJobService and InvalidRecordException.
* feat(route53): implement UpdateHostedZoneComment
The path carried GET and DELETE but no POST, so the action answered 405 and a
caller that renames or re-comments a zone could not proceed. Terraform's
aws_route53_zone sends it whenever the comment changes, which includes importing
an existing zone under a new configuration.
A request with no Comment clears the existing one, as AWS documents, rather than
leaving the previous value in place.
* fix(route53): reject a body that is not an UpdateHostedZoneCommentRequest
A missing Comment means "clear the comment", and XmlParser returns the default
for a body it cannot parse, so a truncated or wrong-root document cleared the
zone's comment and answered 200. Validate the root element first.
* fix(route53): resolve the zone through the caller-ownership lookup
UpdateHostedZoneComment resolved the zone with getHostedZone, which reads
pre-account-isolation data written before the store was account-scoped and
migrates it into whichever partition asked for it first. Use the same lookup
the VPC association actions use, so only the owning account can rewrite the
comment.
taggable() erased the resolved resource behind a private Tagged
lambda, so applyTagged()'s instanceof checks never matched and the
tag mutation/store.put were dead code. Dispatch on the resource's
concrete type directly instead.
* Fix#3910
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* feat(ses): add v2 import jobs for the suppression list and contact lists
Implements CreateImportJob, GetImportJob and ListImportJobs. A job reads a
CSV or newline-delimited JSON object from the local S3 emulation and applies
each record through the existing suppression-list and contact services, so
the imported rows land in their stores and only the job record is new.
The job is returned as CREATED and runs on a virtual thread under the request
account, moving to PROCESSING and then COMPLETED or FAILED, as on AWS. Records
that fail validation are counted in FailedRecordsCount while the job still
completes; a missing bucket or object, a contact-list CSV without an
emailAddress header, or a contact list deleted before the worker runs fail
the job with FailureInfo.ErrorMessage. At most 20 jobs per region may be in
progress, and jobs interrupted by a restart are marked FAILED on startup.
* fix(ses): accept the guide's unquoted contact row and match AWS's import not-found message
A quote that does not open a CSV field is data rather than an error: the SES
list-management guide writes attributesData unquoted as {"Name": "John"}, so
rejecting it refused the documented format. Garbage after a closing quote is
still a failed record, since that row cannot be read back unambiguously.
An import job for an unknown contact list answers NotFoundException with its
own wording, "ContactList <name> doesn't exist", which differs from the
contact-list APIs. Probed against real SES: the check is synchronous and the
error is NotFoundException, even though the service model lists only
BadRequestException, LimitExceededException and TooManyRequestsException for
CreateImportJob. The contact service keeps its own message.
Also drops five unused imports and a dead stripBom that held the only literal
BOM character in the reader sources.
Move AWS::IAM::AccessKey and AWS::IAM::InstanceProfile out of the CloudFormationResourceProvisioner monolith into IamAccessKeyCfnProvisioner and IamInstanceProfileCfnProvisioner, each over IamService, matching the existing one-type-per-class IAM provisioners (IamRole, IamUser). The monolith keeps iamService, still used by the Policy and ManagedPolicy arms that migrate in a later PR.
Ref is preserved: the access key id for AccessKey, the profile name for InstanceProfile. The move also publishes AccessKey Id as an Fn::GetAtt key the monolith left unresolved, because leaving LEGACY_SWITCH subjects a type to CfnSchemaCoverageTest, which requires every readOnly attribute to be set; SecretAccessKey and InstanceProfile Arn were already set, so no gap rows are needed. InstanceProfile delete tolerates an already-gone profile via CfnDeletes.safeDelete on NoSuchEntity while letting DeleteConflict propagate. AccessKey keeps the legacy no-op delete (removing a key needs the owning user name the id-only path lacks); deleting it properly is a follow-up.
* feat(ec2): validate DescribeVpnGateways and add DescribeEgressOnlyInternetGateways
* refactor(ec2): drop unused region parameter from empty gateway discovery
* fix(ec2): return an empty set for an unknown egress-only gateway ID
---------
Co-authored-by: Jason van Zyl <jason@vanzyl.ca>
Move AWS::EKS::Cluster and AWS::EKS::Nodegroup out of the CloudFormationResourceProvisioner monolith into a new EksCfnProvisioner over EksService. A nodegroup belongs to a cluster and its delete needs the cluster name, stored as a create-time attribute, so the two share one provisioner. Ref returns the cluster name for a Cluster and the nodegroup name for a Nodegroup, as the legacy switch did. With the arms gone, the monolith no longer needs its eksService dependency, which is dropped.
The move preserves Ref, but it is not a pure move for Fn::GetAtt. Leaving LEGACY_SWITCH subjects these types to CfnSchemaCoverageTest, which requires every readOnly attribute to be published or recorded as a gap. The Cluster arm previously set only Arn and Endpoint, so it now also publishes CertificateAuthorityData and OpenIdConnectIssuerUrl (both available from the model), and four attributes Floci does not model (Cluster ClusterSecurityGroupId, EncryptionConfigKeyArn and Id, and Nodegroup Id) are recorded as gap rows. Both deletes tolerate an already-gone resource through CfnDeletes.safeDelete on ResourceNotFoundException.
Adds PublishPackageVersion, DescribePackageVersion, and GetPackageVersionAsset
for CodeArtifact's generic package format, matching AWS's own wire restriction
that PublishPackageVersion accepts only the generic format. Includes real
asset hashing (MD5, SHA-1, SHA-256, SHA-512), SHA-256 integrity verification
against the caller's x-amz-content-sha256 header, correct Unfinished/Published
status transitions, and the documented AWS quotas for this action (350 assets
per version, 5 GB max asset size), all returning ServiceQuotaExceededException
when exceeded.
Asset bytes are kept out of the JSON/WAL-backed package-version store
(@JsonIgnore on PackageAsset.content) and instead go through a dedicated
asset store, a disk file in persistent/hybrid/wal mode or a side map in
memory mode, the same split S3Object/S3Service already uses for object
bytes. Without this, a publish rewrote every asset of every package version
on disk each time, growing quadratically under this action's own
350-asset/5GB quotas. The asset name is also validated against the wire
model's AssetName pattern (no control characters), not just its length,
since it is echoed back verbatim in the X-AssetName response header on
GetPackageVersionAsset.
Verified against the real botocore service-2.json wire model and the AWS
CodeArtifact User Guide (including its PDF for the quotas table, since the
HTML quotas page is JS-rendered). Live-verified with the real AWS CLI and
the AWS SDK for Java v2 against a running Floci instance, including an exact
byte-for-byte asset round-trip and the real ConflictException when
republishing an already-Published version.
* feat(iam): implement CreateLoginProfile, UpdateLoginProfile, DeleteLoginProfile
GetLoginProfile previously existed as a permanent stub always returning
NoSuchEntity, and the docs claimed the other three actions were supported
even though the query handler had no case for them at all.
Adds a LoginProfile model and the full lifecycle on IamService: a user
holds at most one login profile, Create/Get/Delete default UserName to
the caller's resolved identity (matching AWS), Update requires it
explicitly, and Update leaves an omitted field (Password or
PasswordResetRequired) unchanged rather than resetting it. The password
is validated against AWS's wire character-class/length rule and, when
the account has one, against the existing account password policy
(PasswordPolicyViolation).
Verified against the real AWS IAM API reference for all four actions'
request/response shapes and error lists.
* fix(iam): block DeleteUser on a login profile and carry it through UpdateUser rename
Login profiles now persist, so deleteUser left an orphaned profile that a
recreated user of the same name would inherit, and a rename dropped the
profile. DeleteUser now returns DeleteConflict while a login profile
exists, as AWS does, and UpdateUser moves the profile to the new name.
* fix(ec2): store omitted inline tag values as empty strings
* fix(ec2): normalize omitted tag values on CreateTags and every tag-spec path
---------
Co-authored-by: Jason van Zyl <jason@vanzyl.ca>