mirror of
https://github.com/floci-io/floci.git
synced 2026-12-02 17:58:05 -05:00
bb5e692b8712a0cd7bb4cb30d2c9737ade58d2f0
489
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
bbe23ed550 |
fix(stepfunctions): authorize task callbacks against their resource (#7277)
* fix(stepfunctions): authorize callbacks with generated resource lookups Preserve measured callback resource authorization, token ownership and closed-token behavior. Use explicit generated member lookups, retaining ordinary name resolution and invalid-token precedence. Preserve current main Redshift session-through lookups, generator type validation and payment alias consumers. Signed-off-by: Andre Kurait <akurait@amazon.com> * test(stepfunctions): reuse the SQS callback queue fixture Create callback queues through SqsTestQueue and await token JSON with the shared in-process helper. Retain the existing callback authorization matrix, token error precedence and cleanup registration. Signed-off-by: Andre Kurait <akurait@amazon.com> --------- Signed-off-by: Andre Kurait <akurait@amazon.com> |
||
|
|
a15fb6b331 | fix(appsync): respect string normalization form (#7284) | ||
|
|
c84e9249c9 |
fix(iam): check a Redshift Data statement in a session on the target the session runs on (#7300)
Under IAM enforcement, an ExecuteStatement or BatchExecuteStatement
naming only its SessionId was checked on `*`. A policy allowing one
cluster's or workgroup's ARN let a statement open a session there and
refused the next statement in it, and a deny on that ARN under an
allow on `*` let every statement after the first through.
A session runs on the cluster or serverless workgroup it was opened
on: ListSessions filters sessions "by session status, compute target
(cluster or serverless workgroup), or database", and the SessionId
"can then be used in subsequent ExecuteStatement and
BatchExecuteStatement operations". The Service Reference gives a
session no resource type, so the generator's new THROUGH names the
members a request names a resource through, with the types that
resource may be of: redshift-data:SessionId, on a cluster or a
workgroup. Each operation whose request has the member, and whose
action acts on one of those types, gets a generated
`{"types": [...], "through": "SessionId"}` entry, so there are no hand
corrections. The generator's validation and the Java loader reject a
`through` that is not one top-level member, or that sits beside any
other reading key.
For such an entry the reader asks the namespace's StoredResourceArns
through(member, value, region) for the ARN of the caller's resource
at the other end, and keeps it when it matches one of the types. When
there is none, as for a session that is closed, expired or another
caller's, it names nothing and the request stays on `*`; the Data API
then refuses it. RedshiftDataService now implements StoredResourceArns
for redshift-data, since it owns the sessions and builds their owner
scope: through gives the target ARN of the caller's open session,
through RedshiftDataSessions.targetArn, which find now shares; find
still gives the workgroup a name or an ARN finds, through the
resolver.
ExecuteStatement and BatchExecuteStatement gain the entry (1095
operations over 27 namespaces, unchanged). ListSessions takes a
SessionId too, but the Service Reference gives it no resource type,
so it stays on `*`. iam.md's sentence on EventBridge V2, which said
Floci does not serve it, now says how its requests are read.
|
||
|
|
b4c539d009 |
fix(iam): read a status and a service principal from the model (#7265)
Two members were held back from the vendored shapes because this service was read as answering them in a wording of its own. Captures from a real account, posted on issue #6042, answer both, and neither reading holds. `statusType` is shared by `UpdateAccessKey`, `UpdateSigningCertificate`, `UpdateSSHPublicKey` and `UpdateServiceSpecificCredential`. One hand-written check answered all four, naming neither the offending value nor the permitted set, which is what a 2025 recording of one of them carries. AWS names the set, `Member must satisfy enum value set: [Expired, Active, Inactive]`, and answers an omitted status as the required member it is rather than as a value outside the set, which one check reading a null as a bad value could not tell apart. Both are the model's own wording, so all four read it through the Query front door and the check comes out. The set is listed in the order AWS lists it, which is not the order botocore declares. The values are the model's and the generator holds them to it: only their order is read from the capture. `AWSServiceName` on `CreateServiceLinkedRole` answered `InvalidInput` with a sentence about its own bounds, where AWS answers a constraint violation naming the declared pattern. A principal that satisfies the pattern and names no service AWS has is still `InvalidInput`, so the layering the capture leaves in place is the shape first and then whether the service exists. The required-member message loses the word that stood where the value would go. IAM names a member and leaves its value out everywhere, and the one message carrying `Value null at` did so for want of a capture either way; the capture answers `Value at 'status'`. The form moves in the one object that decides it, so the eight refusals this package writes by hand move with the walk, and the services that do quote their values keep the word. The message quotes the pattern AWS quotes, which is not the one the shape declares. botocore aliases that member to the shape it gives a group name, `[\w+=,.@-]+` at 1 to 128 characters, where AWS's message gives `[\w+=.@-]*`: the comma is gone and a `*` stands where the minimum is 1. Only the message is in hand rather than the shape, so the generator records AWS's text beside the model's and one object decides which text any violation quotes, the way the enum order is read from the capture while the values stay the model's. A comma is still admitted and an empty principal still refused, and an empty one now breaks the minimum and the pattern at once, as every other string member here does. The comma is what a second capture would settle, and the difference is recorded in `docs/services/iam.md`. |
||
|
|
b65755da3a | feat(rds): export DB snapshots to S3 as Parquet (#7289) | ||
|
|
6906759c9a | feat(paymentcryptography): the Payment Cryptography control plane (#7090) | ||
|
|
39a5a60edc | fix(iam): pass Cognito identity pool roles to cognito-identity and resync the PassRole table (#7273) | ||
|
|
9bd90d6580 |
fix(iam): check Redshift Data API requests on the cluster or workgroup they name (#7234)
Under IAM enforcement, Redshift Data API requests were checked on `*`,
so a grant scoped to a cluster or a serverless workgroup was refused
and a deny scoped to one never applied.
The Service Reference gives ExecuteStatement, BatchExecuteStatement,
DescribeTable, ListDatabases, ListSchemas and ListTables two resource
types: Redshift's `cluster:${ClusterName}`, which ClusterIdentifier
fills, and Redshift Serverless's `workgroup/${WorkgroupId}`. A
workgroup's ARN ends in the id Redshift Serverless gives it (its
workgroupId, "The unique identifier of the workgroup"; botocore's
WorkgroupNameString takes an ARN ending in workgroup/<uuid>), while a
request names it by WorkgroupName, "The serverless workgroup name or
Amazon Resource Name (ARN)". So the workgroup is a FOUND_BY type,
found by WorkgroupName.
FOUND_BY named a type by its members only where the rule had derived
a fill for the type to replace, as ResourceId fills a scalable target's
${ResourceId}. No member fills ${WorkgroupId}, so FOUND_BY now names
every FOUND_BY type the action acts on whose members the request has,
as its docstring already said. The Application Auto Scaling entries
are unchanged.
RedshiftDataResourceResolver, which resolves the target a request
runs on, now implements StoredResourceArns for redshift-data: it
gives the ARN of the workgroup a name or an ARN finds, through
RedshiftServerlessService.findWorkgroupByNameOrArn, which the
service's own name-or-ARN lookup now uses as well.
Redshift Data joins the table (12 operations, 1048 over 26
namespaces). The six operations above are checked on the cluster's
ARN or on the stored workgroup's, and on `workgroup/*` for a workgroup
there is none of; their SecretArn names neither. A request naming only
its SessionId stays on `*`, and so do CancelStatement,
DescribeStatement, GetStatementResult, GetStatementResultV2,
ListSessions and ListStatements, which the Service Reference gives no
resource type.
|
||
|
|
268d231690 | fix(ssm): resolve Canonical's public Ubuntu AMI parameters (#7268) | ||
|
|
dfaab8ba4c | feat(eventbridgev2): add EventBridge V2 service (#6962) | ||
|
|
b38fe7d96d | chore(deps): bump botocore to 1.43.118 and drop it from Dependabot (#7223) | ||
|
|
a74a9b0ffc |
feat(emr): run s3-dist-cp steps (#7192)
In the docker runner mode an s3-dist-cp step, the Release Guide's way of
moving data "from Amazon S3 into HDFS where it can be processed by
subsequent steps", between buckets or back to S3, was FAILED without
running, and on the default TERMINATE_CLUSTER it ended its cluster with
errors. The EMR Serverless image steps run in has neither s3-dist-cp nor
the MapReduce it runs on.
Now a command-runner.jar step whose first argument is s3-dist-cp runs
Floci's own S3DistCp: a Python program, emr/s3-dist-cp.py, which the step's
command writes into the container and runs through spark-submit, copying
through Hadoop's file systems in Spark's JVM. The command wrapper gives it
what a Spark step gets: S3 paths in Floci's S3 and hdfs:// paths, and
those without a scheme, in the cluster's HDFS. It takes the options of
the Release Guide's table, --name=value or --name value, and -D
property=value:
- --src and --dest, a source folder's files keeping their folders;
- --srcPattern and --groupBy matched against the whole path; --groupBy
concatenates the files whose groups give the same name into one file
named by them, and refuses an expression with no group, as the guide
says S3DistCp does; --targetSize breaks a larger group into parts
numbered before the extension ("myfile0.gz, myfile1.gz"); without
--outputCodec a group keeps the compression its files share, named
with that codec's extension, or has none when they differ, each file
decompressed so the group is one stream;
- --outputCodec (gzip, gz, lzo, lzop, snappy, none) through Hadoop's
codecs, each source decompressed by its own extension;
- --deleteOnSuccess, deleting the files but not their folders, as AWS's
"Seven tips for using S3DistCp" says;
- --outputManifest, --previousManifest, --requirePreviousManifest and
--copyFromManifest, the manifest gzipped JSON lines of path, baseName,
srcDir and size, as that post shows them;
- --s3ServerSideEncryption, --storageClass, --disableMultipartUpload and
--multipartUploadChunkSize as S3A's settings; --numberFiles,
--startingIndex, --srcPrefixesFile and --appendToLastFile, the last
through a copy renamed over the file, as neither S3 nor the cluster's
HDFS appends in place. The copy has a name of its own and goes if the
writing fails, and the file steps aside, under a name of its own too,
until the copy has taken its place, coming back if it cannot, so a
failed append leaves it as it was. --s3Endpoint is ignored, S3 being
Floci's.
--requirePreviousManifest takes true or false, after = or as the next
argument, and alone is true, its default. A --srcPrefixesFile line ending
in / names that folder alone, its slash kept though Hadoop's Path drops
it; any other is a prefix as S3 lists one, logs/day taking in
logs/day-old/.
A bucket name with an underscore fails the step, as S3DistCp "does not
support" one, and so does a copy Hadoop fails, leaving what was copied.
A copy that would write two files to the same path, the manifest
included (a.log and a.log.gz with --outputCodec=gzip), a file over one
of its own sources, as with the same --src and --dest, or a file outside
--dest, through a .. in a manifest's baseName or in --outputManifest
(Hadoop's paths resolve it), or a file with no name, from a --groupBy
whose groups matched nothing say, fails before it writes anything. emr.md
says what is Floci's own reading: the grouped file's folder,
--numberFiles' naming, a group's compression without --outputCodec and
that refusal.
|
||
|
|
beef71e8eb |
fix(iam): check Application Auto Scaling requests on the scalable target they name (#7193)
Under IAM enforcement, Application Auto Scaling requests were checked on
`*`, so a grant scoped to a scalable target was refused and a deny
scoped to one never applied.
A scalable target's ARN ends in a unique id the service assigns,
`scalable-target/<id>` ("The unique ID ... is a value assigned by
Application Auto Scaling to the scalable target"), which the Service
Reference names ${ResourceId}, while requests name the target by
ServiceNamespace, ResourceId and ScalableDimension. Read as the table
reads other services, ResourceId (`service/<cluster>/<service>`) would
have filled that id, so the namespace was left out until the table could
look the ARN up.
The generator's new FOUND_BY gives a type whose ARN is all an id its
service mints, with the members a request names it by. An operation
whose request has them all names the type by them (`find`), generated
rather than corrected, and the reader asks the service for the ARN they
find through StoredResourceArns, the lookup EventBridge's connections
already use, or else checks the ARN with its id open, as for a create.
StoredResourceArns.find now takes the values a request names the
resource by, in the table's order: one name for EventBridge, the three
members for Application Auto Scaling, whose service now implements it
from the store its handlers read. A member left out or given a JSON
null names none, as the handler reads it.
Application Auto Scaling joins the table (14 operations, 1036 over 25
namespaces): RegisterScalableTarget, DeregisterScalableTarget,
PutScalingPolicy, DeleteScalingPolicy, PutScheduledAction and
DeleteScheduledAction are checked on the target's stored ARN, and a
RegisterScalableTarget registering a new one, its tags included, on
`scalable-target/*`; TagResource, UntagResource and
ListTagsForResource on the ARN their ResourceARN gives; the Describe
operations and GetPredictiveScalingForecast on `*`, as AWS checks them.
|
||
|
|
b987e822be | feat(bedrock): add PutResourcePolicy, GetResourcePolicy and DeleteResourcePolicy for guardrails (#7188) | ||
|
|
2b1d91b7ca |
fix(docker): start the Windows binary with or without Docker running (#7166)
* fix(docker): start the Windows binary with or without Docker running The 2.4.0 Windows standalone binary exited at startup with an UnsatisfiedLinkError for Java_com_sun_jna_Native_open. docker-java's named-pipe socket calls JNA when the pipe does not open at once, and JNA was initialized at image build time, so its native dispatch library was loaded into the builder and never into the binary. JNA is now initialized at run time, its JNI metadata (from oracle/graalvm-reachability-metadata, CC0) and a proxy registration for NamedPipeSocket$Kernel32 are bundled, and FlociDockerHttpClient turns a LinkageError from the transport into an exception, so a JNA that still cannot load fails that one Docker call instead of the whole emulator. With JNA working, a Windows host without Docker never answered its health check: docker-java retries a missing pipe for the whole 30 s connect timeout, and DockerRetry retried the NoSuchFileException six times. The pipe is now opened once first and a missing or denied pipe fails at once, keeping docker-java's wait loop for a busy pipe, and DockerRetry no longer retries either error. The release smoke script prints both ends of a long log on failure. Signed-off-by: Hector Ventura <hectorvent@gmail.com> * test(docker): skip the named-pipe client tests on Windows and name the tolerated exception Both tests stand a temporary directory in for a pipe, which only behaves that way off Windows: there a directory opens as access-denied and Kernel32 loads. The busy-pipe catch now names its exception expected, as AGENTS.md asks for a tolerated one. Signed-off-by: Hector Ventura <hectorvent@gmail.com> --------- Signed-off-by: Hector Ventura <hectorvent@gmail.com> |
||
|
|
f77d032818 |
fix(ec2): include r5.large in the instance type catalog (#7146)
* fix(ec2): include r5.large in the instance type catalog Promote the complete retained fork #234 catalog entry and SDK regression on current main. Keep catalog metadata and offerings consistent. Signed-off-by: Andre Kurait <AndreKurait@gmail.com> * test(ec2): use JUnit and Hamcrest for R5 catalog assertions Preserve all 18 metadata and offering assertions while following the src/test assertion conventions requested in review. Signed-off-by: Andre Kurait <AndreKurait@gmail.com> --------- Signed-off-by: Andre Kurait <AndreKurait@gmail.com> |
||
|
|
be315bf160 |
feat(cloudformation): provision AWS::EC2::KeyPair with its private key in Parameter Store (#7128)
* feat(cloudformation): provision AWS::EC2::KeyPair with its private key in Parameter Store AWS::EC2::KeyPair had no provisioner, so a stack stubbed it: the stack reached CREATE_COMPLETE without creating a key, Ref returned a made-up id and Fn::GetAtt returned the literal "Key.KeyPairId". A template that creates a key pair for an instance, as the AWS::EC2::KeyPair reference shows, got nothing to log in with. The new provisioner does what that reference describes: - Without PublicKeyMaterial it calls CreateKeyPair with the template's KeyType and KeyFormat, so rsa and ed25519 keys and pem and ppk files all work, and stores the private key in the SecureString parameter /ec2/keypair/<KeyPairId>. With PublicKeyMaterial it imports the key, takes the key's type from the material (KeyType is ignored, as documented) and writes no parameter. - Ref is the key name; Fn::GetAtt KeyPairId and KeyFingerprint are the key's own. - Tags are applied once the key exists and the parameter is written last, so a step that fails leaves only the key to undo. Deleting a created key deletes its parameter first, on stack delete, rollback and replacement cleanup alike; a key or parameter already gone counts as deleted. A key is deleted by its name, as Cloud Control's DeleteResource names it; a key deleted outside the stack still has its parameter deleted with the stack. - Only AWS::NoValue leaves a property out; an empty string a parameter supplies is a value, as the same string written literally is. An empty PublicKeyMaterial fails with the MissingParameter error ImportKeyPair gives for it. - Every property is create-only (the registry schema has no update handler) and KeyName is required. An update that changes another property under the same name is refused with CloudFormation's custom-named replacement error. A rename creates the new key, then deletes the old one with its parameter once the update commits, or deletes the new one if the update rolls back. The create-only list is added to create-only-properties.json, so a change set reports a changed name or type as a replacement, and the generated resource-type table lists KeyPair. Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> * fix(cloudformation): delete orphaned key pair parameters on cleanup Replacement cleanup and rollback delete a displaced or rolled-back AWS::EC2::KeyPair by name only. When that key had already been deleted outside the stack, its /ec2/keypair/<KeyPairId> SecureString parameter was left behind. Record the id of each created key the resource still owes a delete, keyed by name, so the cleanup, the rollback and a rollback retry also delete that key's parameter. Imported keys have no parameter and are not recorded. Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> * fix(cloudformation): end a key pair's rollback retry when an update starts A rollback that could not delete a renamed key pair's replacement leaves it owed for ContinueUpdateRollback. Once that skipped the resource, a later update that failed before creating anything rolled back by retrying that old delete instead of undoing itself, and could end in UPDATE_ROLLBACK_FAILED. Call ReplacementCleanup.endRollbackRetry as an update starts, as the other replacing provisioners do. The replacement stays listed, so the next committed update or the stack delete still removes it. Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> * test(cloudformation): say the rollback retry test pins a helper contract The test added with the endRollbackRetry call rolls back the same resource whose update failed. The engine does not do that for a key pair today: it restores the previous resource and skips its rollback, so the earlier commit's UPDATE_ROLLBACK_FAILED scenario is not reachable yet. Say that the test pins the ReplacementCleanup contract instead. Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> * fix(cloudformation): clean up partial KeyPair parameter writes * refactor(cloudformation): share KeyPair create-only tracking --------- Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> |
||
|
|
dd423ee161 |
feat(redshift): copy cluster snapshots into the configured destination region (#7058)
* feat(redshift): copy cluster snapshots into the configured destination region EnableSnapshotCopy used to only record the destination on the cluster. A background sweep now copies each available snapshot taken after copy was enabled into a per-Region copy store, with its own dump file, retention and KMS key from the copy grant. Describe, delete, restore and tagging use the copy when the request's Region has one. * fix(redshift): harden snapshot copy expiry, rollback and same-region enable Expiry re-reads the copy under the lock so a replaced copy is not deleted. A failed flush undoes the copy record and the source mark before the dump is removed. A sweep re-checks that copy is still enabled to the destination. EnableSnapshotCopy refuses the cluster's own Region, and CreateClusterSnapshot refuses an identifier a copy already holds in that Region. * fix(redshift): harden snapshot copy and share the sweep scheduler base and dump copier Snapshot copy: keep a retained copy when a source snapshot is recreated under the same name, flush the copy before marking the source, only apply the cluster's copy retention to copies of the same cluster generation, recheck the copy settings under the snapshot lock before each copy, and leave shadowed sources out of DescribeTags. Refactor: the five SweepWorker scheduler wrappers now extend SweepScheduler, and both services copy dumps through SnapshotDumpCopier. * docs(redshift): note the hybrid storage limit of snapshot copy Hybrid storage does not report a failed flush, so a crash can leave a source snapshot marked as copied without its copy. Persistent and WAL storage report the failure before the source is marked. |
||
|
|
bfd3bcbbce |
fix(athena): read and check a request naming no catalog as AwsDataCatalog (#7061)
Athena's GetDataCatalog, ListDatabases, ListTableMetadata and GetTableMetadata handlers read the catalog name with has() and asText(), so a JSON null became a catalog named `null`: GetDataCatalog then answered InvalidRequestException rather than the AwsDataCatalog it answers for a request naming none. They now read it through the handler's text(), as GetWorkGroup and StartQueryExecution read WorkGroup, so a JSON null names no catalog. Under IAM enforcement, a GetDataCatalog naming no catalog was checked on `*` though Floci answers AwsDataCatalog, so a grant on that catalog was refused and a deny on it did not apply, and the three catalog reads given a JSON null CatalogName were checked on `datacatalog/null` as well as on AwsDataCatalog. The request-resources table now reads a request naming none, or a JSON null, as naming AwsDataCatalog for all four, as it reads Athena's primary workgroup. The table's regeneration also takes up drift in AWS's Service Reference since the last sync, which the online check of both IAM tables fails on: AWS now lists cognito-idp:DescribeTermsByClient among the actions it authorizes DescribeTermsByClient as, so the authorized-actions map no longer maps it to DescribeTerms and the request-resources table checks it as its own action, and the map gains MediaConnect's new BatchGetDestinationEndpoint and BatchGetSourceEndpoint. Floci serves none of these operations. |
||
|
|
9b69b3dac3 |
feat(redshift-serverless): copy snapshots into the configured destination region (#7024)
* feat(redshift-serverless): copy snapshots into the configured destination region A SnapshotCopyConfiguration used to be stored and echoed, with nothing copied. A background sweep now carries each AVAILABLE snapshot of the namespace, taken at or after the configuration was created, into the destination Region with its dump and metadata. The copy is an ordinary snapshot there, so describe, restore, delete and expiration work on it unchanged. - The source records the Regions it has been copied to, so a deleted or expired copy is not made again and a retry or restart after a crash makes no second copy. A copy made for an earlier snapshot of the same name is replaced. - Retention and KMS key come from the configuration. A name already taken by an unrelated snapshot in the destination is kept and logged. - Rules carry the account and namespace id, so accounts never collide and a recreated namespace does not inherit its predecessor's configuration. - The destination must be a known Region in the namespace's partition. - ResetAll now removes every snapshot dump, which it used to leak. - New switches: snapshot-copy-enabled and snapshot-copy-sweep-interval-seconds. * fix(redshift-serverless): keep the earlier snapshot copy restorable when a replacement fails Each copy now gets its own dump file and the replaced copy's dump is removed only after the new record is saved. Drop the slow, partition-bound compatibility test; the in-repo engine and integration tests cover the copy. * fix(redshift-serverless): name a snapshot copy's dump by id so long snapshot names still copy |
||
|
|
ca3599f8c9 |
fix(iam): check seven more services on the resources their requests name (#6976)
Under IAM enforcement, Athena, Data Exports, Pricing Calculator, Cost
Explorer, CloudTrail, Global Accelerator and Timestream for InfluxDB
requests were checked on `*`, so a grant scoped to a workgroup, an
export, a workload estimate, an anomaly monitor, a trail, an
accelerator or a parameter group was refused, and a deny scoped to one
never applied.
The generated table of the resources requests name now reads them, 305
operations, from AWS's Service Reference and botocore as it reads the
first four batches: their namespaces move from the generator's
NOT_COVERED to NAMESPACES and the table is regenerated, nothing in it
edited by hand; 1022 operations over 24 namespaces. Each resource
type's ARN format is the one Floci mints or reads: Athena's
`workgroup/<name>` and `datacatalog/<name>` (its tag handler parses
them), `export/<name>`, Cost Explorer's `anomalymonitor/<id>` and
Global Accelerator's `accelerator/<id>` with no Region, listeners and
endpoint groups under the accelerator's, `trail/<name>`, and Timestream
for InfluxDB's `<type>/<id>`.
Corrections, each with its reason:
- Athena's StartQueryExecution, ListQueryExecutions and ListNamedQueries
naming no workgroup are checked on the primary one, where Athena runs
and lists them ("If a workgroup is not specified, returns a list of
query execution IDs for the primary workgroup"), and so is
GetWorkGroup, which Floci answers with the primary one then. Floci's
StartQueryExecution and GetWorkGroup handlers now read a JSON null
WorkGroup as none, as ListQueryExecutions does, rather than as a
workgroup named "null", so the workgroup checked is the one acted on.
- Athena's ListDatabases, ListTableMetadata and GetTableMetadata are
checked on AwsDataCatalog, the Glue Data Catalog Floci reads
whichever catalog they name, as well as on the one their CatalogName
names.
- Cost Explorer's nine cost and usage reads are checked on `*`, not on
their BillingViewArn: Floci serves no billing views and answers the
account's costs whichever view is named, so a grant scoped to one
must not reach them.
- Data Exports' CreateExport is not checked on its Export.ExportArn,
the ARN "for this export", which the request creates; its pattern
takes a table's, so a caller could choose the table checked.
- CloudTrail's StartLogging, StopLogging and GetTrailStatus name their
trail by a bare Name, a name or an ARN, AddTags, RemoveTags and
ListTags their resources by the ARNs in ResourceId and
ResourceIdList, members whose names do not end in Arn, and the
dashboard operations their dashboard by DashboardId, a name or an
ARN.
- Cost Explorer's GetAnomalyMonitors and GetAnomalySubscriptions name
their monitors and subscriptions by the ARNs in MonitorArnList and
SubscriptionArnList; GetAnomalySubscriptions' MonitorArn, a
monitor's ARN, is not read as a subscription's.
- Timestream for InfluxDB's RebootDbCluster is checked on each member
instance its instanceIds names as well as on the cluster.
- Global Accelerator's ListCustomRoutingPortMappings is checked on its
accelerator alone: its EndpointGroupArn extends the accelerator's ARN
and so matched the accelerator's format.
Not read yet, each with its reason in NOT_COVERED: CodeDeploy, whose
on-premises instance format the Service Reference gives as
`instance:${InstanceName}` while the CodeDeploy permissions reference
gives `instance/instance-ID` and AWS's GetOnPremisesInstance example
answers `instance/<name>_<id>`; Redshift Data, whose serverless
workgroup's ARN ends in an id the service mints while its requests name
the workgroup by WorkgroupName; and Service Catalog, whose
*PortfolioShare requests give in AccountId the account a portfolio is
shared with, whose imported portfolios and products keep their owner's
account while requests name them by id, and whose AppRegistry half is
named in the path.
|
||
|
|
07f2d62c17 | feat(eks): vendor AWS's add-on version catalog for every supported Kubernetes version (#6735) | ||
|
|
628beeef85 |
fix(rds): report the RDS hosted zone id on clusters and instances (#6826)
* fix(rds): report the RDS hosted zone id on clusters and instances DescribeDBClusters omitted HostedZoneId and DB instance endpoints omitted Endpoint.HostedZoneId, so Terraform's aws_rds_cluster.hosted_zone_id was empty and Route 53 alias records pointing at RDS endpoints failed. Add a per-region rdsHostedZoneId fact to region-facts.json through the generator, with the us-east-1 value from the AWS CLI RDS documentation, and read it through AwsRegionFacts.rdsHostedZoneId. Regions without a captured value fall back to the us-east-1 zone; Floci's Route 53 resolves alias targets by DNS name, so the fallback does not affect resolution. The value is looked up when the response is built, so existing clusters and instances report it too. Closes #6778 * fix(rds): read the RDS hosted zone from the CLI example and keep the fallback in RDS AwsRegionFacts.rdsHostedZoneId now returns an Optional like every other accessor there, and RdsQueryHandler owns the fallback zone for regions with no captured value, the way API Gateway keeps its own placeholder. A missing us-east-1 entry can no longer break a describe call. The generator reads the us-east-1 zone from a snapshot of the AWS CLI describe-db-instances example under aws-docs/partition-guides, as the GovCloud API Gateway zones come from the GovCloud guide, instead of a typed-in constant. The parse is required and fails on a missing, wrong-region or ambiguous example. Adding another region is now a data change. |
||
|
|
80edd853de |
feat(redshift-serverless): expire snapshots after their retention period (#6966)
* feat(redshift-serverless): expire snapshots after their retention period * fix(redshift-serverless): stop the snapshot expiration worker before storage closes * fix(redshift-serverless): mark pending snapshot cleanup DELETED and test the sweep lock without timing * refactor(redshift-serverless): run snapshot expiration on a shared sweep worker |
||
|
|
98a3d2a346 |
feat(iam): read every modelled operation's constraints from the model (#6965)
The vendored file carried 52 of IAM's operations and carries 162 now, which is every one of the 164 that declares a required member, a length, a pattern, an enum or a range, bar the two account alias operations: those answer their single member in AWS's own wording, so there is nothing left for the walk to read on them. What takes the last of them in is a walk that reads a Query map and anything nested under one. A map arrives as entries numbered under its own name, `ReplacementValues.entry.1.key` and `.entry.1.value`, and an entry's value is named under the key that entry carried, `replacementValues.Department.values`, which is how both maps this service answered by hand already named one and how the JSON protocols name a map's value here. An entry is read off its key, so one numbered with a value and no key is not an entry the map could hold. A structure's field may be a list, a list's member may hold a list of its own and a map's value may be a structure, so `AcquireRole`, `PutAccountProperties`, `CreateDelegationRequest` and both simulators are read with the rest, and the file refuses to load only for a shape of a type the walk would pass over unread. The two hand-written map checks come off with that. `AcquireRole`'s answers do not move at all: the count of 30, each entry's required `Values` and the 20 values one entry admits read exactly as its own check read them, named by the key the entry was sent under, which is what the tests it already had pin. `PutAccountProperties` keeps the set it answered for a key, `Map keys must satisfy constraint: [...]`, with the minimum length of 1 the model declares now inside it where the hand-written set listed the maximum and the pattern alone, and a value outside its bounds is answered in the words every other member carries rather than the `must have length between 1 and 1024` that check wrote. The `Namespace/PropertyName` rule stays exactly where it was, being a rule the service applies after the format is good rather than a constraint the model declares. Two reductions keep an answer that is AWS's own rather than rewording it, both through the hook the shared driver already takes. Eight operations answer a member the request leaves out with "The request must contain the parameter CertificateBody.", the wording this emulator answers for a missing Query parameter in several services, so their shapes are vendored without the model's required list and keep that refusal while their lengths and patterns are read. Seventeen more are vendored without a member they answer in a wording of their own: a service-linked role's principal and suffix, an empty `ServiceNamespaces`, `statusType` on all four operations that take it, `Encoding` on `GetSSHPublicKey`, the simulators' empty `ActionNames`, `PolicyInputList` and `PolicySourceArn`, and `TagKeys` on the eight untag operations. Nine wordings this service wrote for itself go with the checks that wrote them: the three password-policy ranges, the name refusal that spelled out its own bounds and the group, server certificate and instance profile names beside it, the path refusal, the authentication code, the virtual MFA device name and the serial number. Each is answered by the model's own violation now, through the one writer this package already had. A member whose shape fixes one length is answered for that length rather than for a bound it sits under, `Member must have length equal to 6`. That is the wording a report's 36-character job id already answered by hand, which is why the three report readers can be read from the model at all, and it reaches STS through the same writer, whose `TokenCode` and `SigningAlgorithm` each fix one length too. Two test fixtures carried values AWS refuses and now carry values it takes. `SignedIamUsers` named a user with a prefix plus a whole UUID, which reaches 66 characters where `userNameType` declares 64, and the two sibling fixtures that named one the same way follow it onto the shorter suffix. The SDK suite registered a SAML provider with a 375-character metadata document where AWS declares 1000, so each of its two documents is padded to that bound on its own. `docs/services/iam.md` carries each reading, the maps among them. |
||
|
|
62527ebaa8 |
fix(iam): check ModifyReportDefinition on the report it names alone (#6935)
The generated table of the resources requests name checked Cost and Usage Reports' ModifyReportDefinition on the report its ReportName names and also on its ReportDefinition.BillingViewArn, read as a report definition's ARN. That member is a billing view's ARN (arn:aws:billing::<payer account>:billingview/...), never a report's, so a request carrying a report's ARN there was checked on a report it does not act on. PutReportDefinition's correction already leaves it out. A correction now reads ModifyReportDefinition's report from ReportName alone, sharing PutReportDefinition's reason, and the table is regenerated; nothing in it is edited by hand. |
||
|
|
8270cc7c41 |
feat(ecr): support pull time update exclusions (#6856)
* feat(ecr): support pull time update exclusions * refactor(ecr): remove duplicate exclusion validation |
||
|
|
981b885348 | fix(apigateway): authorize management calls against the path ARN they name (#6825) | ||
|
|
fee688bd05 | feat(cloudformation): support four AWS::AppConfig resource types (#6791) | ||
|
|
078931597e |
fix(iam): check five more services on the resources their requests name (#6927)
Under IAM enforcement, Budgets, Cost and Usage Reports, Service Quotas, Textract and Translate requests were checked on `*`, so a grant scoped to a budget, a report definition, a quota, an adapter or a terminology was refused, and a deny scoped to one never applied. The generated table of the resources requests name now reads them, 103 operations, from AWS's Service Reference and botocore as it reads the first three batches: their namespaces move from the generator's NOT_COVERED to NAMESPACES and the table is regenerated, nothing in it edited by hand; 717 operations over 17 namespaces. Each resource type's ARN format is the one Floci mints or reads: `budget/<name>` with no Region (Budgets' tag handler parses it), `definition/<name>`, and `<service code>/<quota code>` (Service Quotas' QuotaArn). Three corrections, each with its reason: CreateBudget and UpdateBudget name their budget by Budget.BudgetName and NewBudget.BudgetName, and PutReportDefinition its report by ReportDefinition.ReportName, inside a structure the rule does not read. Without them UpdateBudget and PutReportDefinition were checked only on their BillingViewArn, a billing view's ARN by botocore's pattern, so a caller allowed on one budget or report could give its ARN there and name another. Verified Permissions minted a policy store's ARN with a Region, where AWS gives none: its CreatePolicyStore example answers arn:aws:verifiedpermissions::123456789012:policy-store/PSEXAMPLEabcdefg111111, the Service Reference's format alike. It now mints it without one, in the Region's partition. Not read yet, each with its reason in NOT_COVERED: Verified Permissions, whose policyStoreId may name a store by its alias, which AWS authorizes as the action on the store the alias points to and GetPolicyStoreAlias on the alias, and whose aliasName carries the `policy-store-alias/` its format already gives; Auto Scaling, whose group and launch configuration ARNs Floci mints without AWS's id (`autoScalingGroup:<name>` for `autoScalingGroup:<id>:autoScalingGroupName/<name>`), which ECS reads back; SWF, whose domain format the Service Reference gives no Region while the SWF Developer Guide gives one; and CloudHSM, whose formats end in names while its requests give ids. |
||
|
|
34269655ba |
feat(sts): read every modelled operation's constraints from the model (#6925)
The seven operations that still answered an absent member from a check of their own are read against the vendored shapes now, which leaves every STS operation that models a member reading its constraints from the model: `AssumeRole`, `AssumeRoleWithSAML`, `AssumeRoleWithWebIdentity`, `AssumeRoot`, `DecodeAuthorizationMessage`, `GetDelegatedAccessToken` and `GetFederationToken`. `GetCallerIdentity` carries no member, so there is nothing to read for it. Two answers move, both onto the form the model and the rest of this package give. A member the request leaves out is named as a constraint message spells it, `roleSessionName` rather than `RoleSessionName`, and every absent member is reported together in the order the model lists them, where the check it replaces answered the first it found. A member sent empty is a value the request carries, so it breaks its own minimum length rather than reading as absent. That is the reading #6811 settled for the two services and what `validateRequired` was the last of in this handler. What the seven gain is every bound beside the required members, none of which was read at all: `RoleArn` at 20 to 2048 characters, `RoleSessionName` at 2 to 64, `ExternalId`, `SourceIdentity`, `SerialNumber`, `TokenCode`, `Policy`, `PolicyArns`, `Tags`, `TransitiveTagKeys` and `ProvidedContexts` on `AssumeRole`, `SAMLAssertion` at 4 to 100000, `WebIdentityToken` at 4 to 20000, `ProviderId` at 4 to 2048, `Name` at 2 to 32, `EncodedMessage` at 1 to 10240, and the `DurationSeconds` and `MinimumSessionTokenSize` ranges each operation declares. `AssumeRoot`'s own length check on `TargetPrincipal` said what the model says, so it comes off with the rest. One reading is this emulator's own, and `docs/services/sts.md` says so. `TradeInToken` is required and declares no length, so a request sending it empty carries a value: it reaches the lookup and is answered `ExpiredTradeInTokenException`, the refusal any token that cannot be redeemed gets, where the check it replaces called it absent. Nothing published says what AWS answers an empty trade-in token. Each operation keeps the refusals it answers ahead of the constraints: `GetFederationToken` and `GetSessionToken` turn away session credentials first, and `AssumeRoot` refuses the global endpoint first. Three test fixtures carried values AWS refuses and now carry values it takes. A `RoleSessionName` of `s` is one character where the model declares two, and a `WebIdentityToken` of `jwt` three where it declares four, so the fixtures that sent them are a character longer, as are the two assertions that read a session name back out of an assumed-role ARN and a condition key. The name the shared role-session fixture opens under has one writer now, `EnforcementFixtures.SESSION_NAME`, read by every test asserting on that session rather than spelled again in each: an `aws:userid` condition, a `PrincipalArn` condition, two authorization-denial messages and the ARN two trust-policy cases read back. Each of those carried the one-character name, which is a 403 where the case wants a 200, or a prefix match that no longer pins the whole ARN. |
||
|
|
e24bc36f64 |
feat(ecr): support account settings (#6855)
* feat(ecr): support account settings * fix(ecr): validate account settings against request model |
||
|
|
c9c1c0990b |
feat(sts): read a Query request's declared constraints from the model (#6891)
`GetAccessKeyInfo`, `GetSessionToken` and `GetWebIdentityToken` are held to the constraints botocore's STS model declares, which `tools/aws/regen_sts_shapes.py` vendors into `aws/sts-request-shapes.json` and `StsRequestShapes` reads through the same `QueryConstraintCheck` walk IAM reads its own file with. The two services share the protocol, the message wording and the generator, so what is new is which operations are read rather than how. What it adds is on `GetSessionToken`: `SerialNumber`, `TokenCode` and `MinimumSessionTokenSize` are declared and nothing read them, so a serial number under 9 characters, a token code that is not six digits and a size past 4096 answer `ValidationError` where they answered credentials. The size is still only validated, the token staying the length this emulator mints. `GetAccessKeyInfo` and `GetWebIdentityToken` keep the messages they already answered, from the same bounds and the same patterns, and about 130 lines of hand-written audience, tag and access-key checks come out. One answer moves: a value breaking two constraints is answered for both, where the if-else chain stopped at the first. That is the reading #6402 settled and #6580 already took for an empty role name. `jwtAlgorithmType` publishes a fixed length of 5 and no enum, the two values coming from the reference, so the walk takes a documented constraint keyed by member name and reports it in that member's place, which keeps a collected message in the model's order. It is reported only for a member the request carries that breaks nothing the model declares, which is the exclusivity the hand-written helper had. A value that is no number at all stays `InvalidParameterValue`, answered before the constraints, since the model declares a range and says nothing about what counts as a number; a digit string is a number of any width, so a `DurationSeconds` of `99999999999` breaks the maximum rather than being called no integer, as #6625 settled for an oversized `MaxItems`. Each operation asks for its violations where its own check ran rather than ahead of the switch, because `GetSessionToken` refuses session credentials before it reads anything. The whitespace around a number comes off wherever this handler reads one. The check takes a padded value and holds it to its range, so the read behind it parses the same text: parsing the value as the request spelled it threw there and fell back to the default, so a ` 3600 ` asking for an hour would have been handed the twelve hours `GetSessionToken` defaults to, or the five minutes a web identity token defaults to. IAM reads its own `MaxItems` that way already. The generator is not new code. `request_shapes.main` already drives the five generators that vendor member types, so it takes an `operations` argument now and both Query-protocol generators hand it their model, output and operations the same two-line way, which takes the hand-rolled driver out of `regen_iam_shapes.py` as well. ECR and Resource Groups still carry theirs and are a refactor of their own. The generator contract tests move with it: that a vendored file carries exactly the operations its generator lists and resolves every shape it names is one parametrized test over all four constraints generators rather than a copy per generator, and `build_constraints`'s own properties are tested once, where the shared module already tested them. The model transform the driver takes is driven through it as well, the file it writes carrying what the transform left and the staleness check calling that file current only when it prepares the model the same way, and IAM's own tests read the vendored file for each paged request reduced. Three sentences this handler wrote out by hand go the same way. The two range refusals and the length refusal on `TargetPrincipal` come from `SmithyValidationErrors`, which already wrote them word for word, and the "Must be an integer." refusal has one writer and three callers. The length comparison counts code points rather than UTF-16 units as a result, which is the reading the rest of the package uses. |
||
|
|
385ffcfdd0 | feat(lambdaweb): set the WebFunctionAuthType condition keys on endpoint routes (#6893) | ||
|
|
5a84d08383 |
fix(iam): read iam:PermissionsBoundary from the stored role or user an action names (#6897)
On the 15 actions where the Service Reference lists iam:PermissionsBoundary and the request carries no boundary, such as AttachRolePolicy, PutUserPolicy and GetRole, the key is the boundary stored on the role or user named by RoleName or UserName. The generator writes these pairs to a fromTarget section, and IamConditionContextResolver looks the boundary up through IamService. A role or user without one carries no value for the key. |
||
|
|
407ac4e210 |
fix(iam): check CodeBuild and Kinesis Data Analytics on the resources their requests name (#6884)
Under IAM enforcement, CodeBuild and Kinesis Data Analytics (Amazon Managed Service for Apache Flink) requests were checked on `*`, so a grant scoped to a project, a report group or an application was refused, and a deny scoped to one never applied. The generated table of the resources requests name now reads them, 92 operations, from AWS's Service Reference and botocore as it reads the first two batches: their namespaces move from the generator's NOT_COVERED to NAMESPACES and the table is regenerated, nothing in it edited by hand; 614 operations over 12 namespaces. Each resource type's ARN format is the one Floci's handler mints, which the tests check against the ARN each create returns: `project/<name>`, `report-group/<name>`, `build/<project>:<number>` and `application/<name>`. Kinesis Data Analytics v1, the KinesisAnalytics_20150814 target of SQL applications, is not read: Floci serves v2 only, and v1's operations share v2's names with other members. It joins EventBridge V2 in the generator's CLIENTS_NOT_READ, with its reason. CodeBuild authorizes a build on its project: the CodeBuild User Guide's permissions reference gives BatchGetBuilds, StopBuild, RetryBuild and BatchDeleteBuilds the resource project/project-name. Their requests name builds by id, which is `<project>:<id>` (its CODEBUILD_BUILD_ID example is codebuild-demo-project:b1e6661e-...), so four corrections read the project from the id up to its `:`. For them the table may read a member filling a variable up to a character `before`, as it already read an ARN member, in the generator, the loader and the reader. Without them a policy granting StartBuild and BatchGetBuilds on a project, as a pipeline's CodeBuild action role has, allowed starting a build and refused watching it. A list filling a type's one variable may mix names and ARNs: CodeBuild's BatchGetProjects takes either for each of `names`. Each value that is an ARN of the type now names that resource and the others are read as names, where the reader took ARNs as given only when every value was one, and otherwise put an ARN inside the name's format, refusing a caller granted both projects. Not in this change: a build batch, whose id the documents give no format for and which Floci does not serve, and a report, named by a report ARN where AWS checks its report group, stay on `*`. |
||
|
|
591d5f533b |
feat(emr): run a cluster's bootstrap actions in the docker runner mode (#6878)
In the docker runner mode a cluster's BootstrapActions were stored and listed but never run, so a step that needed what they install, such as a Python library a PySpark step imports, failed where on AWS it would run. Now a cluster with bootstrap actions is BOOTSTRAPPING while they run, one after the other, in one container of the release's EMR Serverless image, and that container is then kept as the image the cluster's steps run in. - Each action's script is read from Floci's S3 (s3n:// and s3a:// name the same bucket) and runs with its Args in /home/hadoop through docker exec, with the credentials of the cluster's instance profile in that exec's environment alone, so they never become part of the image. - "Bootstrap actions execute as the Hadoop user by default. You can execute a bootstrap action with root privileges by using sudo", but the image has no sudo: an action runs as root, with a sudo that runs its command as it is, and what it leaves in /home/hadoop is the hadoop user's. The kept image runs as the user of the image the container ran, as the steps do, and the steps get it by its id, which runs as it is whatever image-registry-base Floci pulls images from. - An action that exits with another code than 0 ends the cluster TERMINATED_WITH_ERRORS, with BOOTSTRAP_FAILURE and "On the master instance (<instance-id>), bootstrap action <n> returned a non-zero return code", as a real cluster gave it (hashicorp/terraform-provider-aws#4378) and the Management Guide quotes it. A script that cannot be read ends it the same way, in Floci's words; a bootstrap that cannot run, or that a restart cut short, with INTERNAL_ERROR. TerminateJobFlows stops it at once. - With a LogUri, each action's stdout.gz and stderr.gz go under <LogUri>/<cluster-id>/node/<instance-id>/bootstrap-actions/<n>/, the instance the master as ListInstances gives it. An action's output goes to Floci's log line by line as it runs, and to those files gzipped as it arrives, through a file on disk, so however much it writes, Floci keeps no more than a line of it in memory. - The image goes once the cluster has ended and its last step is done, and the cluster names it until it is gone, so a removal Docker refuses is tried again the next time the cluster is read; a reset removes them all, and the startup sweep, before any restarted cluster can move on, the ones of clusters that are gone or have ended. ContainerExec gets an overload that sets an environment for one command alone. What the bootstrap has in common with the Spark runner and the rest of Floci is shared rather than copied: - core.common.docker.ContainerLaunches: the runs in progress and their containers, which a stop, a reset or a shutdown removes; both EMR runners keep theirs in it. - ContainerLifecycleManager.commit and removeImage. - ContainerLogStreamer.consoleLines, a stream that logs each line as it arrives through the line logger its attach methods now share. - S3Uri.isS3 and parseAnyScheme, which read s3n:// and s3a:// as s3://. - EmrServerlessSparkRunner.putLogs, the runner's S3 log writing, which now reads each file from a stream. |
||
|
|
e820414f22 | feat(redshift-serverless): execute scheduled actions on cron and at schedules (#6851) | ||
|
|
096d336fab |
fix(iam): check five more services on the resources their requests name (#6810)
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.
|
||
|
|
52eb4b9a9c |
fix(iam): read condition keys a request carries in a member under another name (#6858)
BY_HAND in tools/aws/regen_iam_condition_keys.py names the member for four pairs: iam:ServiceSpecificCredentialServiceName from ServiceName and iam:ServiceSpecificCredentialAgeDays from CredentialAgeDays on CreateServiceSpecificCredential, and iam:DelegationDuration from SessionDuration and iam:TemplateArn from Permissions.PolicyTemplateArn on CreateDelegationRequest. --check fails when a BY_HAND member leaves botocore, its type no longer fits the key, or the reference stops listing the pair. The other notRead pairs now say where AWS takes the value from. |
||
|
|
3212ce3c15 |
fix(iam): page ListUsers, ListGroups and policy lists with MaxItems and Marker (#6267)
* fix(iam): page ListUsers, ListGroups and policy lists with MaxItems and Marker
ListUsers, ListGroups, ListAttached{User,Group,Role}Policies and
List{User,Group,Role}Policies read neither MaxItems nor Marker and always
answered IsTruncated=false with every entry. They now go through the same
paginate helper ListRoles and ListPolicies use: an omitted MaxItems returns
100 items as the API reference documents, a MaxItems outside 1 to 1000 is a
ValidationError, a Marker the handler did not issue is InvalidInput, and a
Marker appears only on a truncated page.
Users, groups and inline policy names are listed in name order and attached
policies in ARN order, so a Marker keeps pointing at the same place between
calls even when the entry it names is removed in between.
* fix(iam): resume the newly paged IAM lists only from their own markers
ListUsers, ListGroups and the attached and inline policy lists read a
Marker they could not verify as a list offset, so Marker=1 silently
skipped the first entry, and a marker issued for one role's list resumed
another role's list after the same policy. These lists have only ever
issued signed markers, so their cursor now carries the action and, for a
per-principal list, the principal, and any other marker is InvalidInput.
ListRoles, ListPolicies and the other readers keep their existing marker
handling.
Also covers the omitted-MaxItems default on ListUsers and ListGroups with
101 entries: 100 on the first page, IsTruncated and a Marker that fetches
the last one.
* fix(iam): bind the newly paged IAM lists' markers to the request account
IAM entities are stored per account, but the marker cursor named only the
action and principal, so a marker issued in one account resumed the same
listing in another account after the same name and skipped its earlier
entries. The cursor now carries the account the request reads from, and a
marker from another account is InvalidInput.
* feat(iam): generate the IAM paginator table from botocore
tools/aws/regen_iam_paginators.py writes src/main/resources/aws/iam-paginators.json
from botocore's iam/2010-05-08 model, as the other tools/aws generators do: every
operation whose request models Marker, with its input and output token, limit
key, truncation flag and result keys, the MaxItems bounds of maxItemsType
(1 to 1000), the default page size the limit's documentation states ("defaults
to 100"), and markerType's bounds.
The 34 operations botocore's paginators-1.json lists take their tokens and
result keys from it. The six that model Marker without a paginator
(GetServiceLastAccessedDetails, GetServiceLastAccessedDetailsWithEntities,
GetOrganizationsAccessReport, ListServiceSpecificCredentials,
ListDelegationRequests, ListPoliciesGrantingServiceAccess) are read from
their request and response shapes and marked paginator: false.
ListServiceSpecificCredentials documents no default and
ListPoliciesGrantingServiceAccess models no MaxItems; the table records
both as such rather than inventing a value.
make aws-data-sync regenerates it and make aws-data-check fails when it is
stale against the pinned botocore.
* fix(iam): page every IAM list through one path driven by the paginator table
IamQueryHandler paged eight lists by hand through paginateScoped, a few more
through paginate, and left the rest (the tag readers, ListAccessKeys,
ListInstanceProfiles, ListPolicyVersions, GetGroup, ListGroupsForUser,
ListEntitiesForPolicy, GetAccountAuthorizationDetails, the simulations and
others) ignoring MaxItems and Marker with IsTruncated=false. Every operation
the generated aws/iam-paginators.json lists now pages through one paginate
path that reads its entry: the limit's bounds and default, the members that
resume and continue it, and the result keys pagedList and pagedLists write
under. paginateScoped, paginateByMarker and the hardcoded 100/1000 are gone.
ListEntitiesForPolicy and GetAccountAuthorizationDetails page their several
lists as one, in the paginator's order.
Marker semantics, chosen deliberately: a Marker is opaque and resumes only the
listing that issued it, on every paged operation. AWS documents it as "the
value of the Marker element in the response that you received", so a value
Floci did not issue, a bare number included, is InvalidInput; ListRoles,
ListPolicies and the report readers no longer read one as an index. The
marker names the last item of its page, so a deletion or creation ahead of
it skips nothing and repeats nothing, and it is signed (not prefixed) over
the account, the operation and every request member except Marker and
MaxItems, so a marker from another operation, principal, filter or account
is refused while the page size may change between calls. Signing the scope
instead of carrying it keeps issued markers short. markerType's 320-character
bound is not checked separately: every other value is refused as unissued,
and a long ARN key could otherwise push an issued marker past it.
MaxItems is now checked before Marker, as a malformed request is rejected
before anything is read from it. An omitted MaxItems is the documented 100;
ListServiceSpecificCredentials, which documents no default, returns its whole
list.
IamListPaginationIntegrationTest.everyPaginatedOperationHonoursMaxItemsAndMarker
iterates the table's 34 paginated operations, each with a fixture listing two
items, and checks the MaxItems bounds, a one-item page, resumption without
loss or repetition, the default page, and refusal of an unissued, bare-index
or other operation's marker. Its fixture map must name exactly the table's
operations, so one AWS starts paging later fails until it has one.
ListAccountAliases can hold one alias, so it is checked for everything but a
cut page. The tests the table test subsumes are removed; the ordering, anchor,
cross-listing and cross-account tests stay. Two ServiceLastAccessed tests
that walked by bare index now use issued markers.
* fix(iam): hold paged requests to the model through IamRequestShapes
MaxItems and Marker are request constraints, and main now checks a
request against the model before it runs. Every operation the paginator
table pages joins that wave in regen_iam_shapes.py, and the bounds leave
iam-paginators.json (which keeps only defaultItems, the documented page
size) and limit(), which now only parses the number and applies the
default. A pytest pins that every operation the paginator table carries
is in the wave, so a list AWS starts paging later cannot slip past the
bounds.
Six paged operations join with Marker and MaxItems alone: the three
report readers, whose JobId is answered by hand as "length equal to 36"
and whose SortKey enum is checked by hand; ListPoliciesGrantingServiceAccess,
whose empty ServiceNamespaces is answered InvalidInput; and the two
Simulate operations, whose ContextEntries nest a list inside a list of
structures, which the walk refuses. Vendoring their whole request would
reword answers main already settled; vendoring nothing would leave their
paging unbounded (SimulateCustomPolicy with MaxItems=0 was a 500).
Markers fit markerType's 320 characters. A marker embeds the key of the
item its page ended on, so a policy ARN with a long path produced one
of 610 characters, which the model check would now refuse on the way
back. SignedMarkers takes a maximum length: a cursor that would exceed
it is carried as a SHA-256 digest (119 characters once signed and
encoded), and the instance keeps the digest -> key mapping. That keeps
the existing resume semantics exactly: the marker still resolves to the
full key, so a deleted anchor resumes at the first key after it, and
the signature still binds account, operation and filter. Two stateless
alternatives were rejected: a truncated key prefix plus digest cannot
order a deleted anchor against items sharing the prefix, and a position
index skips or repeats when items ahead of it are deleted. The cost is
one map entry per distinct long key a page has ended on, never evicted
(marked ponytail in the code); markers already do not survive a
restart, as the signing key is per instance. Keys short enough to embed
are carried as before.
Checkstyle (./mvnw checkstyle:check) reported six errors in files this
PR touches: javax import order and two inline org.w3c.dom.Node in the
pagination test, and an inline java.util.Base64 in SignedMarkersTest.
The test now parses through XmlParser.parseDocument instead of its own
DocumentBuilderFactory. The switch statements in ListEntitiesForPolicy
and the test's holder fixture are switch expressions.
Tests: aMarkerEndingOnALongPolicyArnFitsTheModelAndResumesPastItsDeletion
attaches three policies under a 391-character path, pages with
MaxItems=1, deletes the anchor and resumes through the model check.
Constructing SignedMarkers without the limit fails it (610 characters);
restoring the pre-wave iam-request-shapes.json fails the table-driven
test (MaxItems=0 answered 500, MaxItems=1001 answered 200).
* fix(iam): bind a caller-resolved list's marker to the resolved user
ListAccessKeys, ListMFADevices, ListSSHPublicKeys, ListSigningCertificates
and ListServiceSpecificCredentials default an omitted UserName to the
caller. The marker was signed over the raw request members, so two users
in one account who both omitted UserName shared a scope and one's marker
resumed the other's listing. These handlers now page over the request
with UserName set to the resolved user, so the marker is bound to the
user the list was read for, named or implicit.
* fix(iam): bound the SignedMarkers digest map and trim the pagination test
SignedMarkers held every long cursor it had issued a digest for, in a map
that never shrank. It is now an access-ordered LinkedHashMap capped at
10,000 entries, the idiom CloudWatch Logs uses for its Insights queries. A
marker whose digest was evicted resolves to null, the same as an unknown
digest, so callers refuse it as an invalid marker.
IamListPaginationIntegrationTest spent most of its time in RestAssured's
per-request overhead on the hundred-item fixtures. Those creates and
deletes now go concurrently through java.net.http. The users and groups
default test keeps its first-page checks of the default of 100 and drops
the second page, which the roles default test and the every-operation test
already cover. The SSH public key fixture is generated once per run.
|
||
|
|
f926968167 |
fix(s3control): take TagResource and UntagResource tag condition keys from generated data (#6677)
The Service Authorization Reference lists aws:RequestTag/${TagKey} and
aws:TagKeys as condition keys for s3:TagResource, and aws:TagKeys for
s3:UntagResource. botocore's s3control model says where the request
carries them: TagResource's Tags list in the body, UntagResource's
TagKeys in the tagKeys query parameters.
With IAM enforcement on, Floci checked both S3 Control actions with no
request tag keys. A policy that allows TagResource only for certain tag
values, or UntagResource only for certain keys, matched no request, so
a request it allows was denied, and a ForAllValues condition on
aws:TagKeys allowed UntagResource whatever keys it named.
tools/aws/regen_s3control_tag_condition_keys.py now generates
s3control-tag-condition-keys.json from the two sources, as the DynamoDB
condition key table is generated: every s3 action the reference gives
either key, and every S3 Control operation's request members that feed
them, found as the tag-on-create table finds tag members.
IamConditionContextResolver reads it for a request on an S3 Control
route. The make targets check the members offline against the pinned
botocore in CI and the actions online against AWS in the IAM data drift
workflow. S3's own bucket and object tag keys stay as written, since
they were measured against AWS and do not all match the reference.
|
||
|
|
967e87d7f7 | fix(iam): set iam: condition keys from a table generated from the Service Reference (#6762) | ||
|
|
4f9dcf049c |
chore(iam): regenerate the request resources table from AWS (#6776)
The upstream drift check reported the table of the resources requests name as incomplete: AWS's Service Reference has published operations it does not list. Regenerated with `make iam-request-resources-sync`, no entry edited by hand: - ECR's DescribeReplicationBackfillResults, ListReplicationBackfills, StartReplicationBackfill and StopReplicationBackfill, published since the table was generated on 2026-10-26, come in. The Service Reference gives none of them a resource type, so each is checked on `*`, as it was while the table did not list it. Floci does not serve them. - `codestar` leaves the namespaces the table does not read, as it left the IAM service namespace list in #6706: the Service Reference no longer publishes it. Nothing a request is checked on changes: 373 operations over the same 5 namespaces, the 369 already listed unchanged. |
||
|
|
a46a2b32fd |
fix(lambda): honor platform-specific runtime image overrides (#6786)
Select runtime images with the effective Docker platform while preserving runtime-wide defaults, explicit platform precedence and code-volume helper platform. Signed-off-by: Andre Kurait <akurait@amazon.com> Signed-off-by: Andre Kurait <AndreKurait@gmail.com> |
||
|
|
5bd4bd481a |
feat(redshift): publish CloudWatch cluster metrics (#6740)
* 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. |
||
|
|
52c9c51a7b |
fix(dynamodb): enforce the default Select for IAM (#6702)
* fix(dynamodb): enforce effective read selection in IAM policies Preserve generated action and request-member coverage, effective read projections, PartiQL attributes and independent BatchGetItem contexts. Rebase on current main and scope condition data verification to its vendored file, generator, tests and imported modules, retaining all existing IAM data gates. Signed-off-by: Andre Kurait <akurait@amazon.com> * fix(dynamodb): derive transaction read conditions from modeled members Use the generated transaction Get member paths before GetItem IAM extraction, so ignored legacy projection members cannot authorize whole-item reads. Signed-off-by: Andre Kurait <akurait@amazon.com> --------- Signed-off-by: Andre Kurait <akurait@amazon.com> |
||
|
|
b0cd70401b |
feat(iam): check lambda:PassNetworkConnector from a table generated from the Service Reference (#6699)
* feat(lambdaweb): check lambda:PassNetworkConnector as AWS does A revision that sets egressNetworkConnectorArn needs lambda:PassNetworkConnector on the connector version ARN as given. Lambda checks it after the connector ARN checks and before it looks the connector up. A refusal names the first policy type that refuses, in the order identity policies, permissions boundary, session policy. An explicit deny in a managed policy or a boundary also names that policy's ARN. * fix(lambdaweb): apply service control policies to the account root when passing a connector * fix(lambdaweb): name the managed policy that denies a session token caller * feat(iam): check lambda:PassNetworkConnector from a generated table Move the check out of Lambda Web into the IAM enforcement filter, where iam:PassRole is checked. tools/aws/regen_iam_passed_network_connectors.py joins AWS's Service Reference and botocore's models into src/main/resources/aws/iam-passed-network-connectors.json, and the filter reads it for Web Functions, MicroVM images and MicroVMs. A MicroVM request that names no egress connector, or an empty list, passes the Lambda-managed INTERNET_EGRESS connector, and RunMicrovm with no ingress connector passes HTTP_INGRESS, as AWS checks them. AppSync's data source operations are listed too, but botocore's model has no member for their connector, so they are not read. The refusal text now comes from AccessDeniedMessages, which LambdaTaskAuthorizer and GetStackOutputRoleAuthorizer use as well. |
||
|
|
0410a2b4ea |
fix(iam): check PutEvents on each entry's event bus (#6704)
PutEvents was checked on `*`: the request-resources table gave it no resources, as its bus is a field of each entry, which no rule read. A policy allowing or denying events:PutEvents on one event bus therefore did not hold for publishing. Each entry's EventBusName is "the name or ARN of the event bus to receive the event", and "if you omit this, the default event bus is used". Bus policies grant events:PutEvents on `event-bus/<name>`. The EventBridge User Guide checks events:PutEvents against "the bus, once per entry in the request", and says "Publishing is authorized against the bus ARN for every entry in the request. If one entry fails an authorization condition, EventBridge denies the whole request." It says so in its section on the Custom Event Bus, which keeps the events: IAM namespace of the Classic one; nothing in the guide says otherwise for a Classic bus, whose API model lists AccessDeniedException among the error codes of an entry without saying when. The table now reads PutEvents' `Entries[].EventBusName`, a field of each of a list's structures, one resource for each entry: - The generator takes a correction filling a variable from such a field, and finds a field whose pattern takes an ARN before a name inside a list's structures, as it does a top-level member, so the field gets `arnOf` from botocore. - The loader reads `Name[].Field` in `fill`, and in `absent` and `arnOf` when it fills a variable. - The reader gives one value for each entry, the `absent` value for an entry that names no bus, gives a null or a blank, as the handler's `asText(null)` does, and none for no entries, which stay on `*`. Each value that is an ARN puts its own entry's bus in that ARN's account and Region, checked as given and as the caller's, which the handler publishes to; until now the first ARN a request gave set the account and Region of every value. The filter checks every resource, so one entry for a bus the caller may not publish to refuses the whole request, as the guide gives it. Not in this change: the events:source and events:detail-type condition keys (Floci supplies neither), EndpointId (the handler ignores it), and PutPartnerEvents, which stays on `*`. The upstream drift check on a pull request now verifies only the vendored IAM files the pull request changes, each with its generator, its tests and the modules that generator imports. It verified all six files whichever one a pull request touched, so this change, which touches only the table of the resources requests name, failed on the service namespace list, which AWS's index stopped matching when it dropped `codestar`: drift in a file the change leaves alone. The pull request's job passes the paths its merge commit changes to `make iam-data-verify CHANGED=...`, which names each check it skips; the weekly and manual runs, and a diff that cannot be read, still check every file, so the namespace list's drift is reported there. |
||
|
|
1520e436ae |
fix(iam): drop the codestar namespace AWS no longer publishes (#6706)
The vendored IAM service namespace list, generated from AWS's Service Reference index, names `codestar`, which the index no longer lists; it still lists `codestar-connections` and `codestar-notifications`. The upstream drift check therefore fails, on the weekly run and on every pull request it checks the list for: the file claims a namespace AWS does not publish. Regenerated with `make iam-namespaces-sync`, no entry edited by hand. `codestar` goes, and `assurance` and `continuum`, which AWS has published since the file was last generated on 2026-10-10, come in: 456 namespaces to 457. The list is what GetServiceLastAccessedDetails expands a grant naming no namespace against, `"Action": "*"`, a globbed prefix or a NotAction. Such a grant is no longer reported as reaching `codestar`, and is reported as reaching the two new namespaces. A policy naming `codestar:` outright still reports it, as a namespace written out is kept whether or not the list knows it. |