EKS was built by hand: ResourceArnBuilder walked an EKS path, looked
each resource up through EksService, and checked a tagging route on the
caller's cluster named after the ARN's last segment; the request
resources table held no EKS operation, and nothing gave a policy
condition an EKS resource's tags. eks moves from HAND_BUILT to
NAMESPACES, so the table gives each operation the cluster its path
names, the node group, add-on or Fargate profile EksStoredResourceArns
finds by its cluster and name, the ARN a tagging route carries, and
parts of an ARN the request does not give open. CreateCluster, for which
the Service Reference lists no resource type, is checked on the cluster
its body names from a MEASURED entry quoting the EKS user guide's
example policy for creating a cluster. ResourceArnBuilder's EKS section
and its EksService dependency go. EksStoredResourceArns answers the
stored tags of a cluster, node group, Fargate profile, add-on, Pod
Identity association or access entry; EKS's tag changes take one lock
and give a cluster, node group or Fargate profile a new map, whose tags
field is now volatile, and a cluster is tagged only when its ARN is the
whole ARN the request names. Tag changes and tag reads find a cluster,
node group or Fargate profile through one lookup, and an ARN with a part
left open is not looked up. Read from its model, EKS tags only on
/tags/{resourceArn} with the ARN encoded, as the SDKs send it, so the
tagging tests that sent it unencoded now encode it. Only EKS's
operations change in the table.
S3 Vectors buckets and indexes now support TagResource, UntagResource and
ListTagsForResource through the shared tag routes. A tag call reads the
resource ARN in the request's Region, partition and account as the other
ARN operations do, merges tags by key, and holds the 50-tag limit under
the bucket lock. Create, replace and TagResource validate tags the same
way, with the service's not-found wording and modeled constraint errors.
Strict tag handlers reject trailing JSON before calling their service.
Adapted from AndreKurait/floci#815.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
STS was built by hand: ResourceArnBuilder checked AssumeRole on the role
its RoleArn named and every other operation on *, IamEnforcementFilter
sent STS requests there by action, and the request resources table held
no STS operation. sts moves from HAND_BUILT to NAMESPACES, so the table
gives each operation what the Service Reference and botocore give it:
AssumeRole the role its RoleArn names, as before, GetFederationToken the
federated user its Name names and AssumeRoot the root user, where the
hand builder checked both on *, and the operations that act on no
resource type * as before. StsStoredResourceArns answers that a role IAM
holds in the account its ARN names is assumed there, as the handler
finds it, so a cross-account AssumeRole is checked on that role alone
and not also on the caller's role of that name. ResourceArnBuilder's STS
section and the filter's STS case go. Only STS's operations change in
the table.
RestoreDBClusterFromSnapshot and RestoreDBClusterToPointInTime now read
DeletionProtection and set it on the new cluster before it is stored.
The AWS::RDS::DBCluster provisioner reads DeletionProtection, creates the
cluster with it, and applies a changed value on stack update. A stack
delete of a protected cluster is refused by DeleteDBCluster and reported
as the resource's DELETE_FAILED, as on AWS.
A restore, or a CloudFormation role attach, that fails after creating the
cluster goes through one cleanup that clears the flag and always attempts
the delete, adding any failure to the original error.
Closes#9056
An ENI could have IPv6 addresses assigned while its top-level
ipv6Address was missing from CreateNetworkInterface and
DescribeNetworkInterfaces. The shared serializer now reports the first
assigned address there, keeps the ipv6AddressesSet list, and omits the
field when the interface has none.
Ported from Emanuel Aseghehey's AndreKurait/floci#1239.
* feat(iot): support SetV2LoggingOptions and GetV2LoggingOptions
* fix(iot): keep omitted V2 logging options and require role and level on first set
* fix(iot): validate SetV2LoggingOptions log level and member types
* fix(iot): answer SetV2LoggingOptions with an empty body
* test(iot): cover V2 logging setup, updates, errors and account scoping in the SDK suite
* test(iot): sign V2 logging requests with the shared EnforcementFixtures.auth helper
* test(iot): cover V2 logging persistence and document eventConfigurations and verbose limits
* docs(iot): count the V2 logging routes in the service matrix
* fix(iot): reject a SetV2LoggingOptions body that is not a JSON object
* fix(iot): reject a blank roleArn in SetV2LoggingOptions
* fix(iot): serialize the SetV2LoggingOptions read-merge-write
* test(iot): share one IoT client builder in the SDK fixtures
* fix(iot): stop refusing a blank roleArn in SetV2LoggingOptions
* fix(iot): build the V2 log level refusal with SmithyValidationErrors
* refactor(iot): share IoT request body readers between logging and fleet indexing
A role's trust policy now reaches IAM enforcement through a
ResourcePolicyProvider, the path every other resource-based policy
takes, instead of a branch on sts:AssumeRole in the enforcement filter.
RoleTrustPolicyProvider answers an STS action on a role ARN with the
role's stored trust policy, each statement that names no Resource given
the role's ARN, and with the account in the role's ARN as its owner.
IAM actions on the role, such as iam:GetRole and iam:PassRole, get
nothing from it.
evaluateResourcePolicyFor already returns ALLOW_DIRECT_IAM_USER for an
Allow naming the caller's user ARN, so a same-account grant to a user
is unchanged, and AssumeRolePolicyEvaluator.grantsToIamUser and its
request-key helper are removed. Within the role's account, an Allow
naming a role session's role, or "*", now grants the call too, as any
same-account resource-based policy does. Across accounts the filter
needs the trust policy's Allow beside the caller's identity policy, so
it refuses an IAM user or a role session the trust policy does not
allow before STS does, with its own AccessDenied message;
AssumeRoleTrustConditionsIntegrationTest checks that message for those
callers.
The STS guide's sentence that the caller's identity policy must allow
sts:AssumeRole now names the same-account exception.
Each MicroVM image version now keeps its own updatedAt instead of
reporting the parent image's. Building another version leaves older
versions' timestamps alone, and a status update advances only the
version it changes. A stored version without the field reports its own
createdAt, including after a restart, and reading it does not rewrite
storage.
Closes#8616
Derive INFERENCE_PROFILE support from existing system profile routes
while preserving regional ON_DEMAND support and request-filter
validation. Cover Get and List metadata through raw SDK strings,
including profile-only and unavailable regions.
Closes#8450
With IAM enforcement on, the caller's identity-based policy, permissions boundary, session
policy and SCPs were evaluated for sts:AssumeRole without the request's sts:RoleSessionName
and sts:ExternalId, which the role's trust policy already sees, so a condition on either never
matched. The Service Authorization Reference lists both among the condition keys of
AssumeRole. STS now joins the generated request condition key table, which reads them from the
AssumeRole form; an AssumeRole without ExternalId names no sts:ExternalId. AssumeRoleWithSAML
carries no session name member, so it is listed as not reading it from the request.
sts:SourceIdentity, sts:TransitiveTagKeys and the session tag keys are not read: Floci does not
model source identity or session tags, as the STS page already says.
Closes#8921
Aurora DSQL was built by hand: ResourceArnBuilder read a cluster or
stream from its path, or a tagging route's ARN, IamEnforcementFilter
sent DSQL requests there without their operation, the request resources
table held no DSQL operation, and nothing gave a policy condition a
cluster's tags. dsql moves from HAND_BUILT to NAMESPACES, so the table
gives each operation the cluster or stream its path names, or the ARN
its modeled /tags/{resourceArn} carries, from botocore's REST model;
ListClusters, for which the Service Reference lists no resource type, is
checked on cluster/* from a MEASURED entry citing the AccessDenied
message AWS returned in #6328. ResourceArnBuilder's DSQL branch, with
the path and tagged-ARN helpers only it still used, and the filter's
DSQL case go, and the shared tags controller now serves DSQL's
tagging on its modeled route only, refusing the bare /tags. Only DSQL's
operations change in the table. DsqlStoredResourceArns answers a
cluster's stored tags; TagResource and UntagResource give the cluster a
new map under its lock, and its tags field is volatile.
CreateDBInstance and ModifyDBInstance accepted Iops and StorageThroughput but dropped them, and DescribeDBInstances returned neither, so a Terraform aws_db_instance that set iops or storage_throughput never converged. Both are now stored from Create and Modify. Describe reports Iops on io1, io2 and gp3 and StorageThroughput on gp3, with the RDS User Guide's gp3 baseline when an instance named neither (12,000 IOPS and 500 MiB/s from 400 GiB, 200 GiB for Oracle, never for SQL Server; 3,000 and 125 otherwise), and StorageThroughput 0 on every other type. Iops on a type without provisioned IOPS, Iops=0 aside, and StorageThroughput off gp3 are refused with InvalidParameterCombination, a create naming Iops and no type defaults to io1, and a type switch drops values the new type does not carry.
Pipes was built by hand: ResourceArnBuilder read a pipe's name from its
path or a tagging route's ARN, IamEnforcementFilter sent Pipes requests
there without their operation, the request resources table held no Pipes
operation, and nothing gave a policy condition a pipe's tags. pipes
moves from HAND_BUILT to NAMESPACES, so the table gives each operation
the pipe its path's Name names, or the ARN a tagging route carries, from
botocore's REST model, and ResourceArnBuilder's Pipes branch and the
filter's Pipes case go. Only Pipes' operations change in the table.
PipesStoredResourceArns answers a pipe's stored tags; TagResource and
UntagResource give the pipe a new map one call at a time, and its tags
field is volatile.
* fix(cloudwatch): preserve weighted samples on public metric APIs
* fix(cloudwatch): index Query fields before weighted parsing
* fix(cloudwatch): include datum paths in weighted length errors
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
The Kubernetes Lambda executor built every pod without a nodeSelector or tolerations, so on a cluster whose node groups are all tainted the pods stayed Pending until the cold-start timeout. FLOCI_SERVICES_LAMBDA_KUBERNETES_NODE_SELECTOR takes key=value entries with label syntax for spec.nodeSelector, and an invalid entry fails the cold start rather than letting the pod land on nodes it was meant to avoid. FLOCI_SERVICES_LAMBDA_KUBERNETES_TOLERATIONS takes the tolerated taints in kubectl taint syntax (key=value:Effect, key:Effect, or a key alone for every effect), and an invalid entry is dropped with a warning, as an invalid label is. A repeated key now logs which value replaced which. The Helm chart, now 0.2.0, renders both from floci.lambda.kubernetes.nodeSelector and tolerations.
Closes#8992
Floci now implements UpdateClusterConfig for endpoint public and private access, publicAccessCidrs, logging and authentication mode, each stored as an update DescribeUpdate returns. As on EKS, one request names one family, the authentication mode moves one step forward (CONFIG_MAP, API_AND_CONFIG_MAP, API), turning both endpoints off or sending an endpoint or logging update that changes nothing is refused with EKS's messages, and a repeated clientRequestToken returns the first update. A different subnet or security group list, and any other member, the Auto Mode ones included, are refused. DescribeUpdate with an addonName no longer answers a cluster update.
* feat(lambda): add InvokeWithResponseStream
* feat(lambda): report a streaming handler's error in InvokeComplete
* fix(lambda): send response stream chunks while the function runs
* fix(lambda): build Invoke qualifier violations with the shared helpers
* test(lambda): exit the streaming handler from the write callback
An AWS::ApiGateway::Stage was created again on every stack update, dropping stage variables set outside the stack. It is now patched in place for DeploymentId and Description and restored on rollback. A StageName change replaces it, and a RestApiId change moves it: the stage left on the old API is deleted through the lifecycle records once the update commits, with its delete events, unless UpdateReplacePolicy: Retain keeps it. A new stage whose name is already taken on the API is refused with "Stage already exists", and the stage is deleted with the stack.
Kinesis was built by hand: ResourceArnBuilder read a request's
StreamARN, StreamName or ResourceARN into one ARN and checked everything
else on stream/*, the request resources table held no Kinesis operation,
and nothing gave a policy condition a stream's tags. kinesis moves from
HAND_BUILT to NAMESPACES, so the table gives each operation the
resources botocore's members name as the Service Reference types them:
the stream by StreamARN or StreamName, a consumer by ConsumerARN, a
tagged resource by ResourceARN, and the KMS key StartStreamEncryption
and StopStreamEncryption name. Its ResourceArnBuilder branch goes. Only
Kinesis's operations change in the table. KinesisStoredResourceArns
answers a stream's or a consumer's stored tags; the tag calls give the
resource a new map under their lock, and the tags fields are volatile.
SNS was built by hand: ResourceArnBuilder read a request's TopicArn and
checked everything else on the account's open topic ARN, the request
resources table held no SNS operation, and nothing gave a policy
condition a topic's tags. sns moves from HAND_BUILT to NAMESPACES, so
the table gives each operation the topics botocore's members name
(TopicArn, ResourceArn, TargetArn, and CreateTopic's Name), and its
ResourceArnBuilder branch goes. Only SNS's operations change in the
table. SnsStoredResourceArns answers a topic's stored tags; TagResource
and UntagResource give the topic a new map one call at a time, and its
tags field is volatile.
With rds.force_ssl set to 1 in a PostgreSQL instance's DB parameter group, or in an Aurora PostgreSQL cluster's DB cluster parameter group, the RDS auth proxy refuses a startup that did not negotiate TLS with FATAL "no pg_hba.conf entry for host ..., no encryption" (SQLSTATE 28000), before the password exchange and without opening a backend connection. The value is read from the current parameter group on every new connection, as the parameter is dynamic on AWS. On Aurora it comes from the cluster parameter group only, looked up in the account and Region the relay ARN names, for the cluster endpoint and member endpoints. RdsRequests.createPostgresInstance takes an optional DB parameter group, and the docs give the RDS and Aurora PostgreSQL versions whose default groups force SSL.
Closes#8641
* feat(eks): accept EKS Auto Mode's cluster configuration
* fix(eks): create Auto Mode clusters from CloudFormation, refuse a lone node role
* fix(eks): leave EKS Auto Mode out of AWS::EKS::Cluster until step 2
SQS was built by hand: ResourceArnBuilder read a request's QueueUrl or
QueueName into a queue ARN, the request resources table held no SQS
operation, and nothing gave a policy condition a queue's tags. botocore
documents every QueueUrl as "The URL of the Amazon SQS queue ...", which
the generator's documentation rule did not read: it took only a name, an
id or an identifier as what a member names, and the service's own name
stood between "the" and the type's word. It now reads a URL as one more
such kind, and a member's lead drops its model's own service name as
botocore's metadata spells it before the word it qualifies, and a
hyphenated word before the type's word qualifies it ("The URL of a
dead-letter queue"), so QueueUrl names the queue; being neither the
queue's name nor its id, SQS finds it (find). Only SQS's operations
change in the table. sqs moves from HAND_BUILT to NAMESPACES and its
ResourceArnBuilder branch goes. SqsStoredResourceArns finds the queue a
URL reaches as the handlers do, in the account the URL names, and
answers a queue's stored tags; TagQueue and UntagQueue give the queue a
new map one call at a time, and its tags field is volatile.
* feat(paymentcryptography): the material of a key may be translated
* test(paymentcryptography): the sample's key agreement in the compatibility test
* test(paymentcryptography): the wrapped key's format is the model's enum
* fix(paymentcryptography): a verification reads the formats the reference verifies
* docs(paymentcryptography): the deviations the reference's documentation shows
* test(compatibility-tests): a verification of a format the reference does not read
* fix(paymentcryptography): a translation holds to the rules the export and the import hold to
* fix(paymentcryptography): a translation refuses a key whose usage its algorithm does not serve
* fix(cloudfront): store and return a distribution's ConnectionMode
* test(cloudfront): deploy the ConnectionMode stack with CfnRequests and check refusals store nothing
The generated request resources give Elastic Load Balancing's load
balancer, target group, listener and rule types, and the Classic Load
Balancer's, the aws:ResourceTag/ and elasticloadbalancing:ResourceTag/
keys, but no service answered the elasticloadbalancing namespace's
stored tags, so a condition on their tags saw none.
ElbStoredResourceArns now answers it for both versions: a version 2 ARN
reads the tags version 2 keeps under it, in the request's account, in
place; a Classic Load Balancer's ARN, the one Floci gives it, reads the
load balancer of its name in its Region. Both versions' AddTags and
RemoveTags changed the tag map in place with no lock; they now give the
resource a new map one call at a time, and the Classic Load Balancer's
tags field is volatile.
DescribeManagedPrefixLists and GetManagedPrefixListEntries now include the AWS-managed com.amazonaws.global.cloudfront.origin-facing list (pl-3b927c52) with the 49 CLOUDFRONT_ORIGIN_FACING IPv4 ranges of ip-ranges.json, in commercial-partition regions only; China, GovCloud and the other partitions keep only the S3 and DynamoDB lists, and an accepted unknown region takes the deployment's partition. Like those lists, its MaxEntries is its entry count; the security-group rule quota is tracked in #8790. A prefix-list catalog that already declares the list keeps loading, the built-in list serving it.
Closes#8634
With persistence on, schedules survived a restart but the dispatcher's record of when each last fired lived in memory, so a one-time at() schedule fired again and every rate and cron schedule fired an immediate catch-up. The last fire is now stored with the schedule and never returned by the API. The dispatcher records it under the same lock as UpdateSchedule, DeleteSchedule and DeleteScheduleGroup, skipping a schedule deleted or recreated meanwhile, and UpdateSchedule keeps it. A one-time schedule fires once its time is due unless it has fired since, so an update to a later time re-arms it; rate and cron schedules count from the stored fire.
CREATE MATERIALIZED VIEW [AUTO REFRESH NO] AS SELECT over a stream of a Kinesis external schema creates a streaming materialized view, REFRESH MATERIALIZED VIEW loads the stream into it, and DROP MATERIALIZED VIEW [IF EXISTS] [CASCADE] removes it. The view is a PostgreSQL table built from the SELECT over a staging table with the six documented metadata columns. A refresh checks the schema role's Kinesis permissions and its trust of redshift.amazonaws.com, reads each shard from TRIM_HORIZON the first time and after its checkpoint afterwards, and loads each batch in one implicit transaction; Floci keeps the checkpoints per shard, so truncating the view does not rewind the stream. AUTO REFRESH YES, a JOIN, and grouping or aggregation are refused with 0A000, and a view query holding a second statement with 42601.
Closes#7813