Under IAM enforcement, Amazon Data Firehose, Cognito identity pools,
Cloud Map, ACM and CodePipeline requests were checked on `*`, so a
grant scoped to a delivery stream, an identity pool, a namespace or a
service, a certificate, a pipeline or a webhook was refused, and a deny
scoped to one never applied.
The generated table of the resources requests name now reads them, 149
operations, from AWS's Service Reference and botocore as it reads the
first batch: their namespaces move from the generator's NOT_COVERED to
NAMESPACES, and the table is regenerated, nothing in it edited by hand.
Each resource type's ARN format is the one Floci's handler mints, which
the tests check against the ARN each create returns:
- `deliverystream/<name>`, `identitypool/<id>`, `namespace/<id>`,
`service/<id>`, `certificate/<id>` and a pipeline's bare name.
- A CodePipeline webhook: AWS's is `webhook:<name>` (the Service
Reference's format, and the CodePipeline User Guide's
"arn:aws:codepipeline:eu-central-1:ACCOUNT_ID:webhook:my-webhook"),
where Floci minted `webhook/<name>`; it now mints AWS's.
Corrections, each with its reason:
- StartPipelineExecution and GetPipelineState name their pipeline by a
bare `name` ("The name of the pipeline to start"), which the rule
reads only for an operation named after the type, as Step Functions'
StartExecution names its execution, not its state machine, by `name`.
- CreatePipeline and UpdatePipeline name it by `pipeline.name`, and
PutWebhook the webhook by `webhook.name` and the pipeline it connects
to by `webhook.targetPipeline`. `pipeline.roleArn` holds the role
CodePipeline assumes, an IAM role's ARN by botocore's pattern, and
names no pipeline: read as one, a pipeline-shaped value there was the
only resource an UpdatePipeline was checked on, so a grant on one
pipeline let a request change another.
- CreateCustomActionType and DeleteCustomActionType are checked on
`actiontype:Custom/<category>/<provider>/<version>`: a custom action
type's owner is Custom, which the request does not give, and AWS's
CreateCustomActionType example answers "owner": "Custom".
- Cloud Map's CreateService names its namespace by NamespaceId or,
when it gives none or a JSON null, by DnsConfig.NamespaceId, which
botocore keeps ("Use NamespaceId in Service instead") and the handler
reads then; read by NamespaceId alone, a deny on the namespace did
not hold for a request giving it in DnsConfig. A member given a JSON
null now counts as absent in a resource's `when` and `unless`, as a
handler reading it with asText(null) takes it, unless the table reads
it as a value through `absent` (EventBridge's bus, `default`).
For those, the table may fill a variable from a structure's field
(`pipeline.name`), and give a variable no member gives the one value
its handler uses (`fixed`), in the generator, the loader and the
reader.
A create that names another resource beside the one it makes has its
tags checked on the one it makes alone, which the table marks `made`:
the resource of the type, or with an ARN format's leading resource
word, related to the operation's name past its verb. PutWebhook's tags
go on the webhook, not the pipeline it connects to, and CreateService's
on `service/*`, not the namespace; no other operation in the table is
marked.
Application Auto Scaling stays unread, its reason in NOT_COVERED: a
scalable target's ARN ends in an id the service mints, while requests
name the target by ServiceNamespace, ResourceId and ScalableDimension,
and read as a member ResourceId would fill that id.
RequestResourceMembersTest's test of every resource in the table now
expects, with the resource a request names, the resources of its
operation that every request names: Cloud Map's CreateService names
the service it creates with every variable open.
* fix(ec2): honor DryRun when creating VPCs, subnets and security groups
CreateVpc, CreateSubnet and CreateSecurityGroup never read DryRun, so a
dry run created the resource it asked about. A real CreateVpc that
followed left a second VPC, and the real create of a subnet or group
failed: InvalidSubnet.Conflict for the subnet's CIDR block,
InvalidGroup.Duplicate for the group name.
Each handler now answers DryRunOperation (HTTP 412) and creates
nothing. It answers after parsing the tag specifications and, for
CreateSecurityGroup, reading the required GroupName and
GroupDescription. Ec2Service makes every other check, so a dry run is
answered before the VPC id, the VPC, the CIDR block, the tenancy,
overlap with other subnets or a taken group name are checked. AWS
documents no order for those checks.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(ec2): look up the VPC before answering a subnet or group dry run
A DryRun CreateSubnet or CreateSecurityGroup naming a VPC that does not
exist answered DryRunOperation, "would have succeeded", while the real
create fails with InvalidVpcID.NotFound. CreateSubnet without a VpcId
answered DryRunOperation too, where the real create gives
MissingParameter.
The handlers now require the VpcId and look up the VPC, the default one
for a security group without a VpcId, before they answer the dry run.
A RunInstances dry run already keeps the error of a missing subnet or
group, and the Service Authorization Reference lists the VPC, with its
tags and tenancy, in both actions' permissions.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(ec2): share the security group VPC lookup with its dry run
The CreateSecurityGroup handler and Ec2Service each picked the group's
VPC, the named one or the region's default, so the two copies could
drift. Ec2Service.requireSecurityGroupVpc now does it for both, and the
CreateSubnet handler looks up the VpcId it has just required.
New tests cover a group dry run with an absent or empty VpcId, which is
answered for the default VPC, and a group dry run in a missing VPC
through the SDK. The comments and docs now name every check a dry run
skips, the zone and the IPv6 block included, and link the Service
Authorization Reference.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* docs(ec2): list the errors a create dry run still returns
The CreateVpc, CreateSubnet and CreateSecurityGroup rows said which
checks a dry run skips but not which errors it keeps. They now say that
a tag specification error, and a missing VpcId, GroupName,
GroupDescription or VPC, comes back on a dry run too, and that an empty
VpcId also puts a security group in the default VPC.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(ec2): keep tag errors ahead of the create dry-run answer
CreateVpc, CreateSubnet and CreateSecurityGroup read their tag
specifications before they answer DryRun, so a reserved aws: key is
still rejected on a dry run, as the EC2 docs page says. A handler test
now pins that for all three actions; it fails if the dry-run answer is
moved ahead of the tag parsing.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(ec2): use the shared EC2 request helper in the dry-run test
Ec2CreateDryRunIntegrationTest now calls Ec2Requests.ec2 with "test"
and "us-east-1" instead of its own copy of that helper. The comments
in the CreateSubnet and CreateSecurityGroup handlers shrink to one
line each; docs/services/ec2.md already explains the order.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
---------
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
ListTagsForResource, TagResource and UntagResource compared the ARN's
account with the configured default account, while the create calls mint
ARNs with the request's account. Any caller outside the default account
was answered ResourceNotFoundException for its own resources.
Compare with the request account instead. An ARN naming another account
or region is still answered ResourceNotFoundException.
Closes#6008
* feat(redshift): publish CloudWatch cluster metrics
* fix(redshift): skip duplicate CloudWatch publication minutes
* test(redshift): isolate metrics publisher between integration tests
* fix(test): use Java 17 list access in Redshift metrics compatibility test
* fix(metrics): share minute publishing and prevent duplicate SQS samples
Centralize daemon scheduling, minute claims, per-target failures, retention and shutdown for SQS and Redshift. Carry the Redshift proxy key in metric targets and use the shared compatibility await fixture.
* docs(metrics): restore publisher class docs after the shared publisher move
Keep the SQS sample shape on SqsMetricsPublisher and document minute stamping, 15-day retention and the nothing-may-escape rule on MinuteMetricsPublisher.
A PutEvents entry naming an event bus that does not exist failed with
InvalidArgument "EventBus not found" and counted in FailedEntryCount.
The EventBridge User Guide, on handling PutEvents failures: "If you use
PutEvents to publish an event to an event bus that does not exist,
EventBridge event matching will not find a corresponding rule and will
drop the event. Although EventBridge will send a 200 response, it will
not fail the request or include the event in the FailedEntryCount value
of the request response." botocore models no not-found error for
PutEvents, only InternalException, and the API Reference lists none.
Such an entry is now answered as published, with an event id and not
counted as failed, and dropped: it reaches no rule and no archive.
Floci logs the drop at INFO. An entry that is not valid, missing a
required field or with a Detail that is no JSON object, still fails as
before, whichever bus it names.
Only the PutEvents action changes. Floci's own deliveries to a bus, for
a rule's event bus target, a pipe, a schedule, a Lambda destination or
a replay, still fail an entry for a bus that does not exist: the
guide's sentence is about the action, and no document says how AWS
answers those deliveries.
Step Functions' optimized events:putEvents integration calls the
action, so a task publishing to a missing bus no longer fails with
EventBridge.FailedEntry; step-functions.md listed that as a deviation,
which is gone. Its two tests that used a missing bus to have an entry
rejected now leave out the entry's Source instead, and a third checks
that a task publishing to a missing bus succeeds.
ListDeployments built each deployment's summary from the deployment
strategy as it is now: once a strategy that one of an environment's
deployments used was deleted, ListDeployments on that environment
answered 404 "Deployment strategy not found", while GetDeployment
still returned the deployment. The summary also took the profile's
current name over the one the deployment recorded. AWS documents these
values as the deployment's own (GetDeployment's
DeploymentDurationInMinutes is "Total amount of time the deployment
lasted"), and DeleteDeploymentStrategy, unlike DeleteEnvironment and
DeleteConfigurationProfile, has no ConflictException for a resource
in use.
- StartDeployment records the strategy's DeploymentDurationInMinutes,
FinalBakeTimeInMinutes, GrowthFactor and GrowthType on the
deployment, and StartDeployment and GetDeployment return them, as
AWS documents for both.
- ListDeployments reports the recorded profile name and strategy
settings, so deleting the strategy leaves earlier deployments as
they started. Floci serves no UpdateDeploymentStrategy or
UpdateConfigurationProfile yet; the recorded values also keep
earlier deployments as they were once anything changes a strategy
or renames a profile in place.
- Deployments stored by earlier builds load unchanged: GetDeployment
still omits the settings they never recorded, and ListDeployments
reads them from the strategy while it exists and reports them as
null once it is gone, instead of failing.
Type is unchanged: it is still read from the profile.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(ec2): create the EBS volumes a launch's block device mappings describe
RunInstances gave every instance one 8 GiB root at /dev/xvda and took
only the root's VolumeType from its block device mappings. Launches now
plan their volumes before anything is stored: the AMI's mappings, or an
8 GiB root when it maps none, with the launch's own entries merged over
them field by field, under either spelling of a device. The instance is
rooted at the AMI's RootDeviceName. NoDevice removes an AMI device and a
VirtualName entry takes one over, never the root. Snapshot sizes apply,
a smaller size, a missing snapshot, a missing or invalid device name and
a device named twice are refused with nothing stored, and IOPS and
throughput are kept only for the types that take them.
DescribeInstances lists every attached volume with its own state and
DeleteOnTermination, and termination treats the root like any other
volume. Volume reads settle attachments to an instance that ended
terminated without TerminateInstances, as a failed container launch does.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(ec2): delete every volume of a launch that is rolled back
A launch undone after its instances were stored, an instant CreateFleet
whose later launch fails or a RunInstances whose capacity reservation
was taken in the meantime, terminated its instances. Termination keeps
the volumes whose DeleteOnTermination is false, so the refused launch
left them behind as available.
Each launch now records the volumes it creates on its reservation, and
the rollback deletes those termination left unattached. The ids do not
depend on attachments, which a read can end first when a failed
container's volumes are settled. DeleteOnTermination is never changed,
so an instance whose termination fails keeps its volumes as they were,
and a volume attached to another instance since stays.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(ec2): size a snapshot-only root from its snapshot
For an AMI that maps no root device, the launch gave the root a fallback
8 GiB size before merging the launch's own entries, so a root entry
naming only Ebs.SnapshotId kept that size and a larger snapshot was
refused with InvalidBlockDeviceMapping. The fallback size now applies
only after the merge, when the root names neither a size nor a
snapshot.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* perf(ec2): read volume attachments once per DescribeInstances
Listing an instance's block device mapping scanned the whole volume
store, once for every instance in a RunInstances or DescribeInstances
response. The attachments of all the response's instances are now
gathered in one scan per region and looked up per instance.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
---------
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
SendBulkTemplatedEmail rejected the whole call for an entry with more
than 50 recipients, for template data that is not a JSON object, and
for a tag with an empty name. AWS answers each of these with a 200 and
that entry's InvalidParameterValue ("Recipient count exceeds 50.",
"The template data is invalid", "The tag name must be specified."),
while the other entries still send. DefaultTemplateData that is not a
JSON object, or a DefaultTags tag with an empty name, fails every
entry. Within one entry an address syntax error wins over an empty tag
name, which wins over invalid template data, which wins over the
recipient count.
A DefaultTags or ReplacementTags tag without a Name or a Value is a
model violation, and a skipped tag index is a tag with neither, listed
in the 400 ValidationError after the top-level members. A missing or
empty DefaultTemplateData is a 400 InvalidParameterValue, "The default
template data does not exist".
The handler marks such an entry with its message, and the send answers
it in the per-entry loop after the address syntax. The recipient limit
stays in the service: per entry for v1, whole call for v2 SendBulkEmail,
which was not probed.
* chore(style): remove var and inline qualified names from files no open PR touches
Each var now names the type javac inferred for it, and each fully qualified type name is
imported instead. The suppression list keeps only the files that open pull requests edit.
* chore(style): catch qualified names before a member, a nested type or .class, and on annotations
UnnecessaryFullyQualifiedType does not report those. A MatchXpath rule under the same id now
does, with the same exemption for a simple name that another type in the file uses. The files
no open PR touches import them instead.
* feat(redshift): add event subscriptions with SNS delivery
Add Create, Modify, Delete and DescribeEventSubscriptions, subscription tagging, and publication of matching events to the subscription's SNS topic, honouring the topic policy.
* fix(redshift): deliver events from a consistent subscription snapshot and reject nameless subscription ARNs
Delivery copied no state under the lock modifySubscription holds, so a concurrent
update could change the topic between matching and publishing. Match and publish
from a snapshot taken under that lock.
A tag ARN ending in eventsubscription: passed an empty name to
describeSubscriptions, which lists all subscriptions. Reject it up front.
Return a terminal iterator and direct child metadata from coherent shard snapshots. Preserve final-batch delivery and prevent replay in Pipes and Firehose without changing checkpoint commit boundaries.
* test(rds): connect to Aurora PostgreSQL through the AWS Advanced JDBC Wrapper
* test(rds): fail on wrapper setup errors and share the JDBC retry loop
Gate RdsAwsAdvancedJdbcWrapperTest on TestFixtures.isRealAws() and let other
setup errors fail the class instead of skipping it.
Move the 60-second JDBC connection retry into TestFixtures.awaitJdbcConnection
and use it from RdsAwsAdvancedJdbcWrapperTest, RdsJdbcCompatTest and
RdsIamTokenCompatTest.
Use JBoss Logging with parameterized warnv calls for cleanup warnings.
Under IAM enforcement a refused SNS request answered `AccessDenied`, the
code Floci gives every Query service. SNS models no such error. Every
one of its 42 operations lists `AuthorizationError`, HTTP 403, a sender
fault ("Indicates that the user has been denied access to the requested
resource"), which SDKs raise as `AuthorizationErrorException`; the SNS
Developer Guide's own sample reads that code as an IAM permission
failure ("Authorization error listing topics - check IAM permissions").
An SDK caller catching `AuthorizationErrorException` therefore missed
Floci's refusal, which surfaced as a bare `SnsException`.
A Query denial now takes its code from the service that serves the
request: `AuthorizationError` for SNS, whichever action is denied (a
role it is passed as much as its own action), and `AccessDenied` for
every other Query service, as before. The status, the `Sender` type and
the message are unchanged.
Not in this change: Floci's SNS JSON surface (`SNS_20100331.*`
targets), which botocore does not model, keeps `AccessDeniedException`.
* feat(ecr): repository creation templates
CreateRepositoryCreationTemplate, DescribeRepositoryCreationTemplates,
UpdateRepositoryCreationTemplate and DeleteRepositoryCreationTemplate store
templates per account and Region, keyed by prefix, with each field checked
against the service model. An update replaces the fields it sets, and an
empty string or list clears one. Templates are recorded, not applied, as
nothing in Floci creates repositories through replication, pull through
cache or create-on-push.
Closes#5804
* refactor(ecr): check repository creation templates against the vendored model
The four template actions join the registry settings in
ecr-request-shapes.json, so the handler checks their requests against the ECR
model's types, lengths, patterns and enums and answers in ECR's
"failed to satisfy constraint" form. The handwritten copies of those rules
go. What the model can't state stays in the service: appliedFor naming at
least one value, and policy text being a JSON object.
The model gives imageTagMutabilityExclusionFilters at least one entry, so an
update sending an empty list is now refused rather than clearing the filters.
Terraform omits the member when the filters are removed and moves to a mode
without exclusions, so an update that leaves the template in such a mode now
drops the filters. Before, they stayed, and every plan showed them again.
* fix(ecr): lock creation template writes, share one JSON object check and fold a trailing slash
Create, update and delete each read a template and then wrote it without a
lock, so two creates of one prefix could both succeed and an update racing a
delete wrote the deleted template back. They now take the registry lock the
registry settings use. The template policies and the registry policy share one
JSON object check that also refuses text after the object, such as {}{}.
ECR assumes a / after every prefix, so prod and prod/ are now one template.
The test helper imports Executable.
* fix(ecr): describe each template once when prefixes differ only by a slash
Describe removed duplicate prefixes before folding the trailing slash, so
prefixes prod and prod/ returned the template twice, and with maxResults 1 a
token followed by an empty page. It now removes duplicates by template key.
The lock tests use the shared testing ParkingStore instead of their own copy.
* fix(iot): honour attributePayload.merge, thingTypeName and expectedVersion on things
UpdateThing replaced the attributes with whatever the request carried, so a
merge update dropped the stored attributes and a type-only update wiped them.
It now merges when attributePayload.merge is true, removes an attribute given
an empty value, leaves the attributes alone when the request has none, sets or
removes the thing type, and rejects a missing or deprecated type and a
removeThingType that also names a type. DeleteThing now honours
expectedVersion, and a stale version reports AWS's message.
Closesfloci-io/floci#6655
* fix(iot): serialize UpdateThing and DeleteThing, reject a malformed thingTypeName
A merge is a read-modify-write and expectedVersion is a compare-and-set,
so both now run under one thing write lock. An empty or malformed
thingTypeName on UpdateThing is an InvalidRequestException, as in AWS,
instead of being treated as absent.
* test(iot): race versioned thing updates and deletes, rerun the SDK test on AWS
A race test holds the thing write lock to one winner per expected
version. On AWS the SDK test borrows an active test thing type, as
fleetIndexSearch does, since a deprecated type cannot be deleted for
five minutes and a rerun would fail.
* fix(iot): answer a malformed thingTypeName with AWS's validation message
UpdateThing now builds the refusal with SmithyValidationErrors, listing
the length violation before the pattern one, as measured on AWS.
CreateEnvironment dropped the Monitors it was sent, and StartDeployment
and GetDeployment never reported the deployed profile's name or
location. AWS documents all three on these operations.
- CreateEnvironment stores Monitors and environment reads return them.
They are checked against AWS's limits (at most five; AlarmArn of 1 to
2048 characters; AlarmRoleArn an IAM role ARN in any partition) and
refused with BadRequestException before anything is stored. An
environment created without monitors returns no Monitors member, as
AWS's own example shows.
- StartDeployment records the profile's ConfigurationName and
ConfigurationLocationUri, and GetDeployment returns them.
- Records stored by earlier builds load unchanged: the new members are
omitted when absent, so their responses stay byte-identical.
A configuration profile created without Type still reports none: AWS
documents no default, and its CreateConfigurationProfile example returns
a null Type.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(bedrock): list guardrails in the tagging api and route its writes
guardrails were not a ResourceProvider, so GetResources with bedrock:guardrail came back empty, and TagResources had no bedrock handler to forward to. list the draft of each guardrail with its own tags and add a tagging-api-only handler that calls the existing tag methods.
* test(bedrock): cover guardrail discovery and tagging writes with the sdk
* fix(ec2): keep key pair names unique under concurrent requests
CreateKeyPair and ImportKeyPair checked that a name was free and stored
the new key pair as two separate steps, so two requests for one name at
the same moment could both pass the check and both store a key pair.
Both got a key pair back, DescribeKeyPairs listed the name twice, and
RunInstances injected whichever record it found first, so the other
caller's private key did not open the instance. CreateKeyPair generates
its key between the two steps, which keeps that window open for as long
as key generation takes.
Both actions now store through one method that checks the name again
and writes under the EC2 service's striped lock for the region and
name, so the second request is refused with InvalidKeyPair.Duplicate
and the same message as before. The first check stays where it was, so
a single request is answered as before, and a taken name is still
refused before a key is generated for it.
Follow-up to the review of #6112.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(ec2): keep a tag write from restoring a deleted key pair
A CreateTags on a key pair reads the record and writes it back with its
new tags while holding the key pair's lock, but DeleteKeyPair deleted
without that lock. A delete landing between the read and the write was
undone: the key pair came back, and if a CreateKeyPair had taken the
freed name in between, the name then had two key pairs.
DeleteKeyPair now deletes each matching key pair under the lock tag
writes take on it, as DeleteEgressOnlyInternetGateway does, so a tag
write either finishes before the delete or finds the key pair gone.
The EC2 docs now say what CreateKeyPair and ImportKeyPair do with a
taken name rather than promising one key pair per name outright.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(ec2): pin where the key pair race tests wait, and clean up the SDK test
The race tests now let the held write go early only when the waiting
request is blocked in storeNewKeyPair or deleteKeyPair on a monitor the
held request owns, and otherwise wait for that request to finish, so a
change that made it wait anywhere else fails the test instead of
quietly skipping the check under the lock.
The SDK test waits up to 60 s for its requests to finish before it
deletes the name, so a slow request is not left to store a key pair
after the cleanup, and it checks the refused requests' error code and
status but not their message, which AWS words differently from Floci.
The storeNewKeyPair Javadoc also says that the store's own locks, taken
inside the name lock, never lead back to an EC2 lock.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(ec2): name what the key pair race tests wait for
A race test whose request comes to wait anywhere other than the named
Ec2Service method now fails with a timeout that says what it waited
for, and the helper says why the method is named. The DeleteKeyPair
comment says that scan returns a new list rather than copies, and the
SDK test's cleanup comment says it waits up to 60 s.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(ec2): say what pinning the waiting method guards against
The race tests' helper Javadoc no longer says that a wait elsewhere
always skips the code under the lock: such a wait may not be at the
lock under test, so the tests time out rather than pass without
exercising it, and moving that lock into another method means updating
the name the tests give.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(ec2): park the key pair race tests' writes with ParkingStore
Both race tests held a write on a latch in an anonymous store of their
own. They now wrap the shared testing ParkingStore in
AccountAwareStorageBackend, as the Config tagging tests do, and arm its
next write: before the first request in the name race test, and after
the key pair is created in the delete test, so the write it parks is
the tag write's. The name race test creates ED25519 keys so that key
generation stays well inside ParkingStore's two-second wait. Main code
is unchanged.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
---------
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* feat(rds): DescribeCertificates, ModifyCertificates and an instance's CA certificate
DescribeCertificates lists the Region's RDS certificate authorities with the
thumbprint and validity AWS reports, vendored from the certificate bundles AWS
publishes by tools/aws/regen_rds_ca_certificates.py, and pages them.
ModifyCertificates sets or removes the account's default for new instances.
CreateDBInstance, ModifyDBInstance, the two instance restores and
CreateDBInstanceReadReplica take CACertificateIdentifier, and instances report
it with CertificateDetails. AWS::RDS::DBInstance takes the property and
resolves the two CertificateDetails attributes. The identifier is metadata:
the auth proxy keeps presenting Floci's own CA.
Closes#5806
* fix(rds): follow the user guide on CAs and leave a blank CA alone
- An instance stored without a CA reports rds-ca-rsa2048-g1, since an
override applies only to instances created after it.
- ap-south-1, ap-southeast-4, ca-west-1, eu-central-2, eu-south-2 and
il-central-1 offer only rds-ca-rsa2048-g1, as the user guide says.
- A blank CACertificateIdentifier on modify leaves the instance's CA.
- --download skips a Region only on 403 or 404 and exits 1 on other
failures.
- Reuse regionFromArn, add a createDbInstance stub helper and import
Executable in the tests.
AssociateAccessPolicy, ListAssociatedAccessPolicies and
DisassociateAccessPolicy had no route, so their requests fell through to
S3's path-style catch-all and came back as an S3 XML error. Terraform's
aws_eks_access_policy_association could not be created.
The three operations follow access entries: they are management
metadata, stored and returned but not enforced in Kubernetes. Each
association is kept on its access entry, so deleting the entry or the
cluster removes it, and entries persisted before this change load with
no policies. ListAccessEntries now honours associatedPolicyArn.
Validation follows the EKS user guide: only STANDARD entries take access
policies, the scope is cluster (no namespaces) or namespace (one or more
names, wildcards kept, a repeated name stored once), and associating a
policy again replaces its scope and keeps its associatedAt. policyArn
must be an EKS cluster access policy ARN in the cluster's partition; the
name is not checked against AWS's list. Listing pages from 1 to 100,
with tokens bound to the entry they came from. Disassociating a policy
the entry does not hold succeeds, since EKS documents no error for it;
a missing entry is still ResourceNotFoundException, and an ARN that
associate would refuse is InvalidParameterException. ListAccessEntries
now pages through the shared Pagination helper too, so a token issued
before this change is refused.
Under IAM enforcement the list and disassociate routes were checked as
DescribeAccessEntry and DeleteAccessEntry, and all three against a
principal ending in /access-policies, so a grant scoped to the entry
never matched. They are now checked as their own actions, against the
entry's ARN.
A DELETE is a disassociate only when a cluster access policy ARN
follows access-policies, in the route, the IAM rule and the resource,
so an entry whose IAM path holds an access-policies segment can still
be deleted. The router matches the encoded path, so a principal sent
URL-encoded, as the SDKs send it, is never split.
Co-authored-by: Robin Baeckman <27041454+RobinBaeckman@users.noreply.github.com>
* fix(stepfunctions): page GetExecutionHistory and honor reverseOrder
GetExecutionHistory read only executionArn and includeExecutionData.
Every call returned the whole history, oldest event first: maxResults
and nextToken were ignored, and reverseOrder=true still listed
ExecutionStarted first, so a caller asking for the newest event with
reverseOrder and maxResults=1 got the oldest one instead. The API
reference pages the history by 100 events unless maxResults says
otherwise, allows at most 1,000, returns a nextToken while events
remain, and lists the newest event first under reverseOrder.
Page the history by event id. Ids rise in the order events are
recorded, so a page starts after the last event the previous page
returned, even while the execution is still recording events. An
omitted or zero maxResults uses 100; a maxResults outside 0 to 1,000
or a nextToken outside 1 to 1,024 characters is a ValidationException,
as for ListActivities. A token names its execution and its
reverseOrder, so it is refused with InvalidToken for any other, while
maxResults and includeExecutionData may change from one page to the
next.
Tokens are signed with SignedMarkers and carry their issue time. An
edited token, one issued before a restart, or one issued more than 24
hours earlier is refused with InvalidToken; the 24-hour expiry is the
one the API reference documents. The execution is named in the token
by the SHA-256 of its ARN, so a token stays under 200 characters
however long the state machine and execution names are.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(stepfunctions): page execution history with the SDK paginator
Run a 60-state execution, whose history of 122 events is longer than
one default page, and read it with the AWS SDK for Java: a plain call
returns 100 events and a nextToken, the paginator at 25 events a page
returns every event once, oldest first or with reverseOrder newest
first, and reverseOrder with maxResults=1 returns ExecutionSucceeded
with a token for the rest.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(stepfunctions): give the ListExecutions filter test a clock
StepFunctionsListExecutionsFilterTest, merged from upstream main, built
the handler with the two-argument constructor. On this branch the
handler takes the application Clock for the lifetime of execution
history tokens, so the merged tree did not compile. Pass the system
clock, which ListExecutions does not read.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(stepfunctions): pin the page-size checks of ListActivities and history
ListActivities and GetExecutionHistory each check maxResults and
nextToken on their own, with the same bounds and messages, and page by
100 when maxResults is omitted or 0. Pin the messages of both and the
ListActivities default before the two move onto one helper.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* refactor(stepfunctions): share the page-size checks of ListActivities and history
ListActivities and GetExecutionHistory each checked that maxResults is
0 to 1,000 and nextToken 1 to 1,024 characters, with the same messages,
and turned an omitted or zero maxResults into 100. Move that into
StepFunctionsPaging.pageSize, which validates the pair and returns the
page size, so the other Step Functions list operations can use it
later. Behaviour, messages and the order of the checks are unchanged.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(stepfunctions): say why the paginator test ignores cleanup failures
The SDK paginator test deleted its state machine in a catch-all that
neither logged nor explained the failure it ignored. Say why it is
safe: the state machine has a unique name, and a cleanup failure must
not hide the test's own result.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(stepfunctions): pin the page-size bounds and the order of the checks
Pin that ListActivities and GetExecutionHistory accept the bounds
themselves (a 1- or 1,024-character nextToken reaches the token
lookup, and ListActivities takes maxResults=1000), and that both read
maxResults and nextToken before bounding either. The test's cleanup
deletes its activities without asserting, so a failed delete can no
longer hide the test's own failure.
The last check is the one place where the shared helper changed
behaviour, which the commit that added it wrongly said it did not. A
history request with maxResults=1001 and a non-string nextToken used
to report the maxResults bound; it now reports "nextToken must be a
string.", as ListActivities always has. The new test fails that way
on the commit before the helper and passes after it.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* docs(stepfunctions): describe StepFunctionsPaging by its two callers
The class comment said every Step Functions list operation shares this
page request. Only ListActivities and GetExecutionHistory do;
ListStateMachineAliases still checks its own bounds. Name the two
callers and say that both fields are read before either is bounded.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(stepfunctions): share one request helper between the paging tests
StepFunctionsPageSizeIntegrationTest and
StepFunctionsExecutionHistoryPaginationIntegrationTest each carried
the same private call() and content type. Add StepFunctionsRequests in
the testing package, as CfnRequests and EmrRequests serve their
services, and move both tests onto its sfn(action, body). The requests
they send are unchanged.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(stepfunctions): take the request body of sfn() as a map
sfn() took any Object and said it serializes the body as JSON, which
holds for a map but not for a string, which RestAssured sends as is.
Both callers pass maps, as the private helpers it replaced took, so
type the parameter as Map<String, ?>.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
---------
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(s3): report the owner and ACL grantees as a canonical user id
S3 reported the 12-digit account id where AWS reports the account's
canonical user id: the bucket owner in ListBuckets, the owner and the
multipart initiator in ListParts, and every CanonicalUser grantee and
Owner the ACL responses name. All of them now answer the canonical id,
a 64-character lowercase hex string Floci derives as the SHA-256 of the
account id, so the same account answers the same id across calls,
restarts and storage modes and two accounts never share one. The
account id stays the internal identity; only the emitted value changes,
and ACLs persisted by an older Floci keep serving the form they store.
Owner evaluations, the public-access checks and bucket-policy
CanonicalUser principals accept the canonical id and the account id
alike, so stored policies and scripts written against the old form keep
working.
Closes#6242
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* test(s3): say why the cleanup catches stay silent
The two new compatibility cleanup catches swallowed without a word,
which the guide allows only for a named, explained tolerance. Both now
name the reason: cleanup must not mask the assertion.
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* test(s3): expect the canonical owner in the namespace ACL assertions
The cross-account object metadata test still expected the raw account id
in the ACLs, which the canonical owner id broke, and its ACCOUNT_B
assertFalse checks passed whatever the ACL held. All four assertions now
name the accounts the way the ACLs do, through AwsCanonicalUserId.
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* test(s3): share the compatibility cleanup between the two tests
The explained cleanup catches landed on the wrong method, a helper that
was already on main, leaving the new canonical owner test with bare
catches. One deleteObjectAndBucketQuietly helper now holds the commented
catches and serves both tests.
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
---------
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* feat(ses): add SES v2 GetEmailAddressInsights
Answer GetEmailAddressInsights offline with verdicts derived from the
address alone. Malformed and over-long addresses answer 200 with every
verdict LOW, the operation is not gated on Virtual Deliverability
Manager, and only suppressionlist@simulator.amazonses.com reports a
missing mailbox, as real SES does. Domains reserved by RFC 2606 and
RFC 6761 have no valid DNS records; every other domain is taken to
have them.
* docs(ses): scope the non-ASCII insights deviation to unquoted parts
A send does not inspect a quoted local part, so GetEmailAddressInsights
rates "é"@gmail.com like any other address. Say so in the deviation
note and pin it, with the unquoted and domain cases, in unit tests.
* feat(ram): support GetResourceShareAssociations
* test(ram): cover association listing through Java SDK
* refactor(ram): share association visibility filter
* fix(elasticache): honor SecurityGroupIds on ModifyReplicationGroup
A modify that names SecurityGroupIds now replaces the whole stored list
on the replication group, so DescribeCacheClusters reports the new
groups on every member with Status=active; a modify that names none
leaves the memberships untouched, which the Query protocol cannot
distinguish from an empty list anyway.
Closes#6463
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* fix(elasticache): read the modify security groups through the shared parse
optionalSecurityGroupIds walked the two Query spellings a second time;
it now reuses parseSecurityGroupIds with the same isEmpty-to-null check
the user group lists use, and the new compatibility test declares its
responses with explicit types.
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
---------
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* feat(dynamodb): export the changes of a period as an incremental export
* fix(dynamodb): write characters above U+FFFF in export lines as UTF-8
* feat(dynamodb): refuse incremental export periods over 24 hours
* fix(dynamodb): wait for unfinished writes when an incremental export reads items
* fix(dynamodb): write no incremental export record when only the order of set members changes
* fix(organizations): preconfigure the account access role in a new account
CreateAccount was returning a member account with no OrganizationAccountAccessRole, so sts:AssumeRole into it failed on a role that does not exist. The role AWS preconfigures is now created through IAM's own creation, in the new account's namespace: it trusts the management account and carries AdministratorAccess. CreateAccount's RoleName is honored, defaulted to OrganizationAccountAccessRole, and validated with the pattern the reference publishes, including the AWSServiceRoleFor refusal. Invited accounts do not get the role, which is AWS behavior. IAM owns the how behind an interface, the way ScpProvider already decouples IAM's reads of organization policy.
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* fix(organizations): answer RoleName errors with their reasons and provision the role as the new account
CreateAccount's InvalidInputException for a bad RoleName now carries the
reference's Reason, INVALID_PATTERN for a pattern violation and
INVALID_ROLE_NAME for the reserved prefix, asserted at the service, the
wire and the SDK levels. The provisioner itself now runs createRole and
attachRolePolicy inside RequestScopes.callAs(memberAccountId), so
validation, ARN minting and storage stay IAM's own and the hand-built
role with its account-aware storage branch is gone. EntityAlreadyExists
is the one error caught, falling back to the role that is there, and
the integration test builds its requests and auth through the
OrganizationsRequests and EnforcementFixtures helpers.
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
---------
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* fix(autoscaling): tag member instances with aws:autoscaling:groupName
Auto Scaling adds the aws:autoscaling:groupName tag, valued with the
group's name, to every instance it launches or attaches, and removes it
when the instance is detached. Floci never set it, so filtering EC2
instances on tag:aws:autoscaling:groupName found none of a group's
members.
- Launches add the tag after the launch template's instance tags and the
group's PropagateAtLaunch tags, so the group's actual name wins over
any stored tag with that key.
- AttachInstances applies the group's PropagateAtLaunch tags and the
group-name tag to the instances EC2 holds. It refuses the whole batch
with ValidationError when an instance already belongs to a group, so
one group cannot overwrite another group's tag, and an instance named
twice in one request joins once. An ID EC2 has no instance for still
joins, as before, but gets no tags, which would otherwise outlive it
in EC2's DescribeTags.
- DetachInstances removes only the group-name tag, and only where it
still names that group. It goes through a new service-owned EC2 tag
delete, because the public DeleteTags refuses aws: keys.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(compat): cover the Auto Scaling group-name tag through the SDK
Drives launch, attach, a refused second attach and detach with the AWS
SDK for Java and checks the instance tags EC2 reports after each step.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
---------
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
- Store and return QueryParameters in DescribeStatement and ListStatements
- Extract putQueryParameters helper to deduplicate JSON response building
- Add unit tests for statement store serialization and service response
- Add SDK compatibility test for parameterized statement binding
* chore: expand Redshift Data API SDK compatibility tests
* fix(redshift-data): support QueryParameters in DescribeStatement and fix SDK compat tests
- Store and return QueryParameters in DescribeStatement and ListStatements
- Fix property extractor SubStatementData::statusAsString in batchResultsExposeChildStatements
- Use waitTimeSeconds(30) instead of awaitStatus polling loop in RedshiftDataOperationsTest
* test(redshift-data): pass waitTimeSeconds in SDK compat tests and drop service changes
* fix(cloudformation): leave root security out of SAM REST auth defaults
AWS::Serverless::Api Auth (DefaultAuthorizer: AWS_IAM, ApiKeyRequired)
gave each operation without security of its own a copy of the
document's root security before adding the defaults. SAM reads only
the operation's own security and leaves the root security as written,
and API Gateway does not apply root-level security. As a result:
- a root requirement naming a SigV4 scheme or an authorizer, beside
the generated AWS_IAM default, failed the import with "Only one
Authorizer or IAM authorization is allowed per operation", where SAM
gives the operation the one AWS_IAM requirement;
- other root requirements, such as an API key scheme, were copied into
every operation and enforced, where AWS does not enforce them.
The defaults now start from the operation's own security. An Auth
that selects no default, such as ApiKeyRequired: false alone, now
leaves the body as written, as SAM does; it used to copy the root
security into every operation.
The docs also say that floci's REST importer still applies root-level
security to an operation that has none of its own, which API Gateway
does not.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(cloudformation): add SAM REST auth defaults inside Fn::If branches
An Fn::If written around a path item or an operation in the
DefinitionBody of an AWS::Serverless::Api kept the Auth defaults from
reaching the operation. A conditional path item was skipped, because
its only key is not a method, and a conditional operation got the
default beside the Fn::If, which the template engine drops when it
keeps the chosen branch. Either way the method was imported with
authorizationType NONE and answered unsigned calls, where SAM adds the
default inside each branch.
The defaults are now added inside each branch, skipping an
AWS::NoValue one, as SAM's get_conditional_contents does. When a
default applies, a nested Fn::If, or one whose value is not a list, is
refused with a ValidationError instead of being left without the
defaults.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(cloudformation): refuse SAM REST bodies that would lose the defaults
Some DefinitionBody shapes lost the generated AWS_IAM and api_key
schemes or requirements on their way to the REST importer, which then
imported the methods with authorizationType NONE:
- a securityDefinitions, components or securitySchemes map written as
an intrinsic function such as Fn::If. The generated schemes were
written beside the function, and the template engine keeps only its
result;
- a body with an Fn::If key beside its own keys, which the engine
replaces with the chosen branch;
- an existing AWS_IAM or api_key scheme with the expected fields and
an Fn::If key, which the engine replaces with a branch that need not
be that scheme;
- a body declaring both swagger: "2.0" and an openapi version. The
transform wrote the schemes into securityDefinitions, which the
importer, reading the body as OpenAPI 3, ignores.
When a default applies, these are now refused with a ValidationError,
as a path item written as a $ref already is.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(cloudformation): cover SAM REST root security through the SDK
The SDK suite creates a stack whose AWS::Serverless::Api root security
names its own SigV4 scheme, with DefaultAuthorizer: AWS_IAM, in Swagger
2.0 and OpenAPI 3.0. It checks that the stack deploys, that the
processed template keeps the root security and gives the operation the
one AWS_IAM requirement, and that the method is imported as AWS_IAM
without an API key.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(cloudformation): pin false Fn::If routes and conditional bodies
An Fn::If around a path item or an operation whose condition is false
resolves to AWS::NoValue. The transform adds no default to that
branch, and the REST importer creates no resource or method for it, so
the API has no such route, as on AWS, while the other routes keep the
AWS_IAM default.
A DefinitionBody written as an Fn::If is refused for any non-empty
Auth, ApiKeyRequired: false included. SAM refuses it too: for every
non-empty Auth, _add_auth checks SwaggerEditor.is_valid, which needs a
literal paths object. The docs now say so.
Neither behavior changes here; the tests keep both in place.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* docs(cloudformation): say a SAM REST Auth needs a paths object
The sentence added in the previous commit said any non-empty Auth
needs a literal paths object. The transform, like SAM, accepts any
object there, a paths map written as Fn::If included when no default
is selected. What it refuses is a DefinitionBody without one, such as
a body written as Fn::If.
The previous commit's message also said a false Fn::If around an
operation leaves no route. That holds for get, post and the other HTTP
methods. For x-amazon-apigateway-any-method the REST importer fails
the stack instead, with "expected an Operation object", on main too
and without Auth.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(cloudformation): check no-default SAM REST bodies as SAM does
An Auth that selects no default, such as ApiKeyRequired: false alone,
returned once the DefinitionBody had a paths object. SAM checks more
for any non-empty Auth before it applies a default:
SwaggerEditor.is_valid wants a truthy swagger or an openapi version
3.x, and the SwaggerEditor constructor wants every paths entry, and
each branch of an Fn::If around one, to be an object. floci therefore
accepted a body without a version, a paths map written as Fn::If, or
a path item that is not an object, all of which SAM refuses. The
previous commit's message said SAM accepts such a paths map; it does
not.
These are now refused with a ValidationError when no default is
selected too. Nothing else is checked in that case, as in SAM: an
OpenAPI 3.1 body, a $ref path item, a nested Fn::If or a malformed
security requirement is left as written. SamTransformProcessor's
isTruthy helper, which already models SAM's truthiness, becomes
package-private so the check can share it.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(cloudformation): leave nested Fn::If operations as SAM does
With a default selected, an Fn::If around an operation whose branch
was itself an Fn::If failed the transform with "Auth does not support
a nested Fn::If in paths". SAM does not fail there. Its
iter_on_all_methods_for_path reads one level of Fn::If around an
operation and skips a method definition without an
x-amazon-apigateway-integration. It therefore leaves the nested
branch as written, adds the defaults only to the plain one, and the
template deploys on AWS.
Such a branch is now left as written, without the defaults, and the
plain branches still get them. A nested Fn::If around a path item is
still refused: SAM fails there too, once it reads the methods of the
inner Fn::If.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(cloudformation): share the SAM REST stack deploy in one helper
Three SamRestApiAuthIntegrationTest cases each created the stack,
waited for it, read its ApiId output and deleted it in a finally
block. withDeployedApi now does that once: it adds the ApiId output,
deploys the template, hands the API id to the assertions once the
stack is CREATE_COMPLETE, and deletes the stack in its finally. The
assertions are unchanged; a failed deploy now reports the stack's own
status reason in all three cases.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(cloudformation): keep the failed resource's reason in deploy failures
withDeployedApi reported only the stack's status reason when a stack
did not reach CREATE_COMPLETE. For a resource failure that is the
generic "The following resource(s) failed to create", where two of
its callers used to report the failed resource's own reason, such as
the importer's refusal. The helper now appends that reason when the
stack rolled back, and keeps the stack's reason alone for a transform
failure, which has no failed resource. Only failure messages change.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
---------
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com>
* fix(elbv2): validate and normalize target ports
Normalize default target ports and validate complete target batches before lookup or mutation. Preserve Lambda explicit-port rejection and shared Smithy error aggregation.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* fix(elbv2): preserve portless Lambda target round trips
Restrict default-port normalization to non-Lambda target groups and cover supplied group ports in service and SDK round trips. Use switch expressions for test operation dispatch.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
---------
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
The partition nightly has failed every night since 2026-10-20. Every failure is
on the test side:
- ApiGatewayV2WebSocketDataPlaneTest hard-coded arn:aws:lambda:us-east-1
integration and authorizer URIs. Since #6001 Floci invokes the function in
the region the ARN names, so $connect answered 500 in any other region.
- RedshiftOperationsTest tagged a us-east-1 literal ARN, which #6026 rejects.
- EmrServerlessJobRunTest expected createdBy to start with arn:aws:.
- Ec2TagRegionTest failed in a partition with one region; it now skips there.
ResourceGroupsTest#capacityPoolLifecycle is allowlisted for eusc-de-east-1:
the Resource Groups model's GroupStringV2 and ResourceArn patterns cannot
match any eusc-de-east-1 ARN, and Floci enforces the model as published.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* feat(dynamodb): export tables in the ION format
* chore(dynamodb): check the ION export file without polling
* chore(dynamodb): share the export file reader in the compatibility test
* fix(ssm): page GetParametersByPath and GetParameterHistory with MaxResults and NextToken
Both actions ignored MaxResults and NextToken and returned every item.
Page them with Pagination.paginate, as DescribeParameters already does.
MaxResults is validated against the SSM model: 1-10 for
GetParametersByPath and 1-50 for GetParameterHistory, rejected with
ValidationException like DescribeParameters. A bad NextToken is
InvalidNextToken. Omitting MaxResults still returns everything, so
callers that never follow NextToken keep working.
History is paged by a zero-padded version cursor so version 10 sorts
after version 9.
Closes#6254
* fix(ssm): reject wrongly typed MaxResults and NextToken when paging parameters
A string MaxResults or a numeric NextToken was coerced instead of failing
to deserialize. Read both through the SSM deserialization helpers so they
fail with SerializationException, as other SSM fields do.
* fix(ssm): refuse a parameter page token minted for another listing
GetParametersByPath and GetParameterHistory tokens were bare cursors, so a
token from another operation, path or parameter was read as a position
in this listing and could skip results or return an empty page. Bind
each token to its operation, region and selection (path and Recursive,
or parameter name) and answer a mismatch with InvalidNextToken.
* test(ssm): follow GetParametersByPath and GetParameterHistory pages with SDK paginators
* fix(ssm): read pagination fields before listing parameters or their history
GetParameterHistory looked the parameter up before reading MaxResults and
NextToken, so a missing parameter answered ParameterNotFound for a request
whose pagination fields failed to deserialize or validate. Read and
validate both fields first in GetParameterHistory and GetParametersByPath.
* fix(ssm): refuse path and history page tokens in DescribeParameters
DescribeParameters decodes its token as a bare name cursor, so a
GetParametersByPath or GetParameterHistory token was read as a name and
could return a truncated or empty page. Refuse a token that decodes to
either namespace with InvalidNextToken. Its own tokens are unaffected:
the namespaces contain a colon, which AWS does not allow in a name.
* fix(ssm): bind parameter page tokens to the requesting account
Parameter storage is partitioned by account, but GetParametersByPath and
GetParameterHistory tokens named only the region and selection, so a token
minted in one account was accepted in another and skipped its entries.
Add the request account to both token namespaces.
* style(ssm): keep each javadoc on the method it describes
* fix(ssm): page DescribeParameters through the shared paging helpers
DescribeParameters repeated the MaxResults range check word for word and
decoded its token a second time to refuse GetParametersByPath and
GetParameterHistory tokens. Route it through pageRequest and page under a
namespace of its own, keeping its default page of 50. Its tokens are now
bound to the account and region like the other two listings, and a
wrongly typed MaxResults or NextToken fails to deserialize as theirs do.
Also cover resuming GetParametersByPath after the parameter that ended
the previous page is deleted.
---------
Co-authored-by: Priamo <pgermosen@gmail.com>
* fix(s3): expose bucket policy status
* fix(s3): align bucket policy status response
* test(s3): verify policy status through SDK and IAM
* refactor(s3): reuse bucket policy lookup for status
* fix(kinesis): stop routing records to closed shards
Repeated resharding can leave a selected shard and both of its direct children closed. `selectShard` currently falls back to that closed parent, so a successful write can append after the shard's ending sequence number.
- Follow both parent links through closed intermediate shards to an open descendant, with deterministic breadth-first order and visited shard IDs.
- Reject an unreachable open destination before appending. Keep the producer lock, ordinary-key hash selection, ExplicitHashKey routing, and actual returned ShardId.
- Cover repeated splits, split/merge lineage, malformed graphs, handler success/failure results, and Java SDK writes after resharding.
* test(kinesis): protect breadth-first descendant preference
Add a mixed-depth split topology so routing to the still-open direct child is distinguished from depth-first traversal through its closed sibling.
* test(kinesis): cover both mixed-depth shard layouts
Parameterize the split child so the direct-child preference regression rejects depth-first traversal under either child ordering.
* fix(kinesis): preserve the open-shard routing fast path
Delay the lineage snapshot until the selected shard is closed, avoiding a shard-list copy on ordinary open-shard writes. Name expected descendant destinations in routing fixtures and cover an unrelated open shard preceding the reachable child.