A public Route 53 alias resolves only when a DNS record source claims
its target, and API Gateway had none, so an alias to a regional custom
domain's regionalDomainName returned REFUSED. ApiGatewayDnsRecordSource
now answers such an alias with the receiving listener's address, as
ElbV2DnsRecordSource does for an Application Load Balancer. The target
must name exactly one stored domain, in any account or Region, and the
alias's hosted zone ID must be that domain's regionalHostedZoneId; a
mismatch or an ambiguous name is REFUSED, and AAAA gets NOERROR with no
addresses.
Closes#9978
GetThingConnectivityData now answers for a registered thing from the
MQTT broker's account- and Region-scoped session history: whether it is
connected, the last event's timestamp in epoch seconds and the
disconnect reason, with no session details for a thing that has never
connected. With connectivity indexing off it answers
InvalidRequestException with AWS's message, and includeSocketInformation
is accepted without the socket fields Floci doesn't track.
Closes#9933
The ELB guide now gives the 5 to 300 second range CreateTargetGroup and
ModifyTargetGroup accept for HealthCheckIntervalSeconds, and says a
ModifyTargetGroup that omits it keeps the target group's current
interval.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Part 1 of #7030. GetSeries (/api/v1/series) and GetLabels (/api/v1/labels,
/api/v1/label/<name>/values) answer over the metrics the OTLP endpoint
ingests, with the labels, selector syntax, limits and Prometheus envelope
the CloudWatch user guide's PromQL pages give. Regular expressions are
RE2's, as Prometheus's are.
The guide's "IAM permissions for PromQL" table is vendored by a new fetcher
and read by the authorized-actions generator, so the operations are checked
as cloudwatch:ListMetrics, and QueryMetrics carries cloudwatch:ListMetrics
as a companion every request needs, which the enforcement filter checks.
@IamOperation can name a method's operation.
The OTLP 40 KB metadata limit counts the resource and scope schema URLs,
which PromQL reads as labels of the series.
CloudFormation dropped an S3 lifecycle rule's deprecated
NoncurrentVersionExpirationInDays, so the stack succeeded but S3 held no
noncurrent expiration. The resolved days are now sent as NoncurrentDays
when the structured NoncurrentVersionExpiration property is absent.
Parameter updates and moves between the legacy and structured forms keep
the bucket and replace its retention settings.
EKS runs no pod on a cluster's control plane, but Floci's k3s node is
both the control plane and the stand-in for the nodes Floci doesn't run,
so an Auto Mode cluster whose image catalog gives its nodes a real
kubelet still ran its workloads on the control plane. The node now
carries node-role.kubernetes.io/control-plane:NoSchedule, which
cluster-critical pods tolerate, where real nodes run user pods: an Auto
Mode cluster whose user-pod NodePools launch only architectures with a
self-registering image. A cluster with an active managed node group, or
with neither node groups nor Auto Mode, runs user pods on the node as
before, unless control-plane-runs-pods-without-nodes is false, which
leaves them Pending as on EKS. The taint is decided and written under
one lock per cluster, and Auto Mode's pass moves it with the NodePools.
regen_iam_passed_roles.py left Access Analyzer, Bedrock, CloudFront, FIS, GuardDuty and Macie out as "REST routes no
rule maps yet", and regen_iam_tag_on_create.py Inspector2 the same, but the request-resources table has read their
vendored REST routes since Floci began routing their requests by operation, so the reason no longer held: a request
passing a role to one of them needed no iam:PassRole, and an Inspector2 create's tags needed no inspector2:TagResource.
They move into each generator's NAMESPACES, and the generic rules read them with no correction: 23 role-passing
operations (Bedrock's model customization, evaluation, import and invocation jobs, agents, flows and knowledge bases;
FIS's experiment templates; GuardDuty's malware protection plans and scans; CloudFront's realtime log configs, from the
RoleARN of each endpoint in the XML body; Access Analyzer's policy generation and Macie's reveal configuration) and five
Inspector2 creates. Each operation is read whether or not Floci serves it, so one Floci adds is checked from the start.
No entry moves.
Floci's CloudFront parser took the first EndPoints anywhere in a realtime log config's body, and every child of it as an
endpoint, while the role is read from the request's own EndPoints, at the <member> botocore serializes each as, so an
<EndPoint>, or an EndPoints nested in another element ahead of the request's own, passed a role unchecked; the parser
now reads the <member> elements of the request's own EndPoints alone, as AWS's deserializer reads no other. IAM reads
the role of every KinesisStreamConfig's every RoleARN and none from a body where one holds elements, so an endpoint
holding more than one KinesisStreamConfig, or a config more than one RoleARN or StreamARN, or an ARN holding elements,
is refused with InvalidArgument rather than saved from one the check did not read. The request-resources table, which
leaves a passed role's member out of the resources a request names, is regenerated with the new passed roles: Bedrock's
evaluation, customization and invocation jobs, agents, flows and knowledge bases and FIS's experiment templates no
longer take their role's ARN as one of their resources.
OpenSearch stays out: AssociatePackage's role is AssociationConfiguration.KeyStoreAccessOption.KeyAccessRoleArn of the
opensearch client's request, while the Service Reference lists only the es client for it, so the generic rule finds no
role member; its reason now says so.
The Service Reference now also lists operations pinned botocore 1.44.14 does not model yet (SageMaker's model monitor
configs, IAM's workload identity creates); both tables are synced with them unread, as the generators record such an
operation.
IamPassRoleEnforcementIntegrationTest checks that creating and updating an FIS experiment template, a GuardDuty malware
protection plan and a CloudFront realtime log config each needs iam:PassRole on its role for the service it is passed
to, and that a realtime log endpoint under another element than <member>, or in an EndPoints nested ahead of the
request's own, saves no role, that a RoleARN holding an element, or doubled ahead of one, is refused, and that a body in
another charset than the UTF-8 both the check and the handler read saves no role.
AWS Config had no configuration aggregator operations, so Terraform's
aws_config_configuration_aggregator failed on create.
PutConfigurationAggregator, DescribeConfigurationAggregators and
DeleteConfigurationAggregator are now served, with aggregators stored
per account and Region. A second Put with the same name updates in
place, keeping the ARN and CreationTime. The source and region rules
refuse with AWS's messages, Describe pages 100 at a time, and an
unknown name is NoSuchConfigurationAggregatorException. Tags given on
the first Put work with the tagging operations, and IAM checks an
aggregator against its stored ARN and tags.
Closes#7019
The last step of #7887. A request a policy refused was answered with
"User is not authorized to perform: <action>" for every service but S3,
and the services that did name the policy type (S3, Athena's statements,
Lambda's network connectors) asked a second path, firstRefusal, which
re-ran the evaluation one policy type at a time.
The evaluator's DecisionRecord now carries the refusal an access denied
message names, worked out in the same decide() pass: the first policy
type that refuses, by its explicit deny or the allow it lacks, in the
order AWS was recorded naming them for lambda:PassNetworkConnector
(#6699): organization levels, identity policies, permissions boundary,
session policy. A resource policy's explicit deny comes first and its
missing allow across accounts last, as S3 names them (#9281). The SCP walk
keeps the first level that refuses.
AccessDeniedMessages.reason builds the phrase from that refusal, naming
the managed policy that holds the denying statement, or the boundary, by
its ARN. firstRefusal is gone. The enforcement filter explains each
decision instead of only evaluating it, and every policy refusal now
answers in the IAM User Guide's format, "User: <caller> is not
authorized to perform: <action> on resource: <resource> because no
identity-based policy allows the <action> action", in each protocol's
envelope. Refusals no policy made keep the old sentence.
Closes#7887
FLOCI_SERVICES_ELBV2_MAX_HEALTH_CHECK_INTERVAL_MILLIS caps the interval
Floci schedules target health probes at, for faster local health
transitions. The default 0 keeps each target group's requested interval;
a positive value lowers only the scheduled interval, leaving the API
settings, probe timeouts and healthy and unhealthy thresholds as the
target group has them. A negative value is refused at startup when
ELBv2 is enabled, before any runtime is restored.
An http or https notification was posted once and dropped on any
failure. It is now retried, as SNS does, when the endpoint answers 5xx
or 429 or cannot be reached, following the effective delivery policy:
the subscription's healthyRetryPolicy, the topic's
defaultHealthyRetryPolicy when overrides are disabled or the
subscription sets none, and otherwise the default of 3 retries 20
seconds apart. The no-delay, pre-backoff, backoff and post-backoff
phases, the delay targets and the backoff function are honoured, and
retries are scheduled rather than slept on a thread.
Any other answer is a permanent failure. A notification that fails
permanently or runs out of retries goes to the subscription's
RedrivePolicy dead-letter queue when one is set. Pending retries are
bounded per message by the policy, as on AWS, and a reset, shutdown,
Unsubscribe or DeleteTopic cancels them.
A subscriber with a Lambda target now applies its RetryPolicy and
OnFailureConfiguration. A failed invocation, a function error or a
function that does not exist, is retried after about 0.5 s and then four
times longer each time, until MaxRetryAttempts is used up or the next
retry would start after MaxEventAgeInSeconds from the event's ingestion;
a FIFO subscriber's later batches wait meanwhile. The batch then goes to
the OnFailureConfiguration queue as one record. Pending retries are kept
in memory, and a reset or deleting the subscriber drops them.
CreateSubscriber and UpdateSubscriber refuse an OnFailureConfiguration
queue of another Region or account, or an ARN outside the model's queue
pattern. A FIFO dead-letter queue gets the first event's group id and
event id as its message group and deduplication ids.
EKS Auto Mode ignored pods' zone topology spread constraints: withoutRoom
counted a node in any zone as room for a pod the scheduler then refused
for its skew, and a new node went to the first zone that fit, so pods
that must spread kept getting nodes in one zone.
Auto Mode now reads each DoNotSchedule zone constraint and checks the
skew as the scheduler does, counting only pods on nodes the pod's node
selector and required affinity accept, over the zones the pool can
launch in. Room counts only in a zone the spread allows, and a spreading
pod's node goes to the allowed zone with the fewest matching pods, a
group sharing one node of the type that holds it. Pods without a spread
are placed as before.
Part of #8914
The master user joined rds_superuser without ADMIN OPTION. From
PostgreSQL 16, CREATEROLE no longer lets a role add members to a role
it holds no ADMIN OPTION on, so the master could not GRANT rds_superuser
to another role, which RDS documents a member of rds_superuser can do.
The master now joins rds_superuser WITH ADMIN OPTION, on initialization
and again after a snapshot restore.
Closes#9952
AWS::RDS::DBCluster read DBSubnetGroupName only to decide whether an
update replaces the cluster, and created the cluster with no subnet
group, so it and its members always landed in the default group and the
default VPC. With FLOCI_SERVICES_RDS_ENDPOINTS_IN_VPC=true their
endpoints were then served where clients in the declared VPC could not
reach them.
The cluster is now created in the group the template names, a Ref to an
AWS::RDS::DBSubnetGroup or a group's name, as CreateDBCluster places it.
A group that does not exist fails the resource with CreateDBCluster's
DBSubnetGroupNotFoundFault message, and a change of group replaces the
cluster into the new one, as the property is create-only.
Closes#9938
POST /_floci/state/nuke, and its /_localstack/state/nuke twin, was a
second name for state/reset. Every Floci emulator now settles on one
reset path, POST /_floci/state/reset; floci-az, floci-gcp and floci-oci
drop the alias in their own changes. The removed path answers the
control plane's JSON 404 catch-all, so a caller still on it should call
/_floci/state/reset instead, which behaves the same.
With floci.services.elbv2.addresses-in-vpc on, each Application and Network
Load Balancer gets a node in each of its subnets, as Elastic Load Balancing
"creates a load balancer node in each zone that you specify" and a load
balancer "has one IP address per enabled Availability Zone". So two load
balancers can both listen on 443, a TCP listener needs no port of its own on
Floci's address, and a listener on a port Floci holds itself is served too.
- Each node is a relay container at an address EC2 leases from the subnet
(VpcAddressRelays, with one forward per listener port). It forwards each
port to a socket of that listener's own on Floci, which serves that
listener alone: HTTP needs no Host header to pick it, HTTPS terminates
with the listener's certificates and reloads them when they change, and
TCP relays as on the shared port.
- ElbV2Service serves the nodes after every change to a load balancer's
subnets or listeners and at restart, under a per-load-balancer lock, so
the last change's listeners are the ones served. A node's relay id
follows from the load balancer and subnet; only its address is kept, on
the Availability Zone entry, so a restart serves it at the same address.
SetSubnets removes the nodes of subnets left behind, and a delete removes
them all.
- Floci's DNS server answers the load balancer's name with its node
addresses, a node's own <zone>.<name> with that node's, and a Route 53
alias to the load balancer with its nodes (a Network Load Balancer's
included), with the 60 second TTL the ELB user guide gives.
- The listener ports on Floci's address keep working as before.
The setting needs Docker-backed VPC networks and does nothing in mock mode.
A Gateway Load Balancer gets no nodes.
Closes#5870
The request-resources table gives aws:ResourceTag keys to eight IAM resource types and Floci stores the tags of all
eight, but IAM's tag reader answered for roles and users alone, and regen_iam_condition_keys.py listed every resource
tag pair no RoleName or UserName names as notRead ("no member names a stored role or user whose resource tags can be
read"), which IamConditionKeys strips from the request's context. A condition on aws:ResourceTag for a customer managed
policy, an instance profile, an OpenID Connect or SAML provider, a server certificate or a virtual MFA device was
dropped.
The condition-key generator now puts such a pair in a new fromResourceTags section when iam-request-resources.json
resolves the action's request to a resource of one of the pair's types that it gives the key's prefix (resourceTagKeys):
the condition resolver reads it through its generic resource tag reading, from what IAM holds on the resource the
request names. A create the generated tag-on-create table lists (iam-tag-on-create.json) acts on a resource that does
not exist yet and stays notRead, with the reason a role's or a user's create has. 59 pairs move; none keeps the old
reason. --check re-derives the section from the two tables, and the IAM data drift gate checks the condition keys when
either changes.
IamService.heldTags reads a policy's, instance profile's, OpenID Connect provider's, server certificate's or virtual MFA
device's tags, and SAMLProviderService.heldTags a SAML provider's, each read in place in the ARN's account, a
pre-multi-account entry of the default account included; an instance profile or a server certificate, stored by its
name, only when its ARN, path included, is the one named. IamStoredResourceArns answers them.
The Service Reference now lists IAM's workload identity actions, which pinned botocore 1.44.14 does not model yet, and
the generator stopped on their tagging actions' request tags. Like classify's "no SDK operation of this name",
request_tag_context now skips an action botocore does not model, which no request Floci receives names; the table is
synced with their pairs in notRead.
IamResourceScopedPolicyEnforcementIntegrationTest checks that a caller allowed the read of each of five types only on
resources tagged team=blue reads the blue one and is refused the red one, and
ServerCertificateIamEnforcementIntegrationTest the same of certificates; IamStoredResourceArnsTest the reads and an
instance profile named by another path; test_regen_iam_condition_keys.py the new routing, the create kept unread and the
skipped tagging action.
PutParameter defaulted a missing Type to String before looking at the
stored parameter, so an overwrite without a type turned a SecureString
into a plaintext String and a StringList into a String. A missing Type
now passes through, and the overwrite keeps the stored type, as AWS
does; a create without a Type is still stored as a String, which the
docs mark as a Floci difference.
Closes#9941
The Service Reference gives S3's bucket and object s3:BucketTag/${TagKey}, which "Filters access by the tags associated
with the bucket", S3 Tables' table bucket and table s3tables:TableBucketTag/${TagKey}, S3 Vectors' vector bucket and
index s3vectors:VectorBucketTag/${TagKey}, and S3's access point s3:AccessPointTag/${TagKey}. The generator read
resource-tag keys only as <namespace>:ResourceTag/ and RDS's <namespace>:<type>-tag/, so none of them was read and a
condition on one never matched.
A key named after its own type, <namespace>:<Type>Tag/ (condition key names are not case-sensitive), now joins that
type's resourceTagKeys as RDS's do: the bucket's s3:BucketTag/. One named after another type whose resource path the
type's continues goes into a new containerTagKeys section, with that type's format in the type's variables
(parent_format, as tagParents builds a parent's): an S3 object's s3:BucketTag/ reads its bucket's tags, an S3 Tables
table's s3tables:TableBucketTag/ its table bucket's and an S3 Vectors index's s3vectors:VectorBucketTag/ its vector
bucket's, while their aws:ResourceTag/ keeps the table's and the index's own. The S3 User Guide says so of each: the S3
Tables key "acts on the tags applied to the table bucket that contains that table", the S3 Vectors key "references tags
associated with the vector bucket containing that index, while the aws:ResourceTag/tag-key will reference the tags of
the index itself", and s3:BucketTag is "applicable only after ABAC is enabled on your bucket", which S3's reader already
holds to. s3:BucketTag on an access point's object, whose ARN names no bucket, is not read. --check validates each entry
against the formats, --verify against the reference; the table changes in those entries alone.
IamConditionContextResolver.resourceTags adds the container keys, read from the stored tags of the container's ARN, and
S3's bucket policy checks read them with the bucket's ABAC tags: a request's own and a copy's of its source (CopyObject,
UploadPartCopy), which read no bucket tags before, aws:ResourceTag included. Floci does not model S3 access points, so
their s3:AccessPointTag and aws:ResourceTag read nothing, as before.
The Service Reference now gives athena:GetQueryResultStream the workgroup type, which the IAM data drift gate this
change runs reads: the table is synced, and no request member names the workgroup. docs/services/iam.md no longer lists
s3:GetBucketTagging, s3:DeleteBucket and DeleteBucketTagging as reading the bucket's tags apart, which #9920 removed.
S3BucketTagIamEnforcementIntegrationTest runs each of its checks with aws:ResourceTag/team and s3:BucketTag/team, a
cross-account copy among them; S3TablesIamIntegrationTest and S3VectorsIamIntegrationTest check that an allow on the
bucket's team reads that bucket and a table or index of it tagged otherwise, and refuses another bucket and its table or
index tagged with the team; IamConditionContextResolverTest that a table's two keys hold its bucket's and its own tags;
RequestResourceMembersTest the section's parse, lookup and refusals; test_regen_iam_request_resources.py the reading,
the vendored entries and the validation.
AWS::Lambda::Function accepted RecursiveLoop but ignored it. The
provisioner now validates the value before changing the function and
applies it through PutFunctionRecursionConfig, on create and when an
update changes it, keeping the same physical function. Removing a value
the template declared restores Terminate, and a stack that never
declared it leaves a setting made through the Lambda API in place.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Adds the parts of the EKS update surface UpdateClusterConfig left out.
ListUpdates lists a cluster's update ids, filtered by add-on or node
group and paged. UpdateClusterConfig now applies changed subnet and
security group lists as a VpcConfigUpdate (at least 2 subnets in the
cluster's VPC, at most 5 security groups), and a CloudFormation update
applies them in place. controlPlaneEgressMode is kept, reported and
updatable, and deletionProtection refuses DeleteCluster while it is set,
checked under the same lock as the delete. A request mixing update types
in one resourcesVpcConfig is refused, as EKS does.
Refs #5640
The request-resources table gives aws:ResourceTag keys to S3's bucket and object types, but S3 gave IAM no tags, so an
aws:ResourceTag condition on an S3 action never matched. The S3 User Guide says "you can control access to S3 resources
based on the bucket's tags", that S3 "evaluates this condition key only after you enable ABAC on your bucket", and its
example bucket policy conditions s3:GetObject on a bucket's objects on the bucket's tag.
tools/aws/fetch_s3_tag_inheritance.py vendors those sentences and the example's object resource and condition key into
tools/aws/sources/s3-tag-inheritance.json, refusing a reworded page. TAG_INHERITANCE_SOURCES grants it for s3, beside
API Gateway, and tag_parents gives the object type, whose path continues the bucket's past a '/', the bucket as its tag
parent.
S3StoredResourceArns reads S3Service.storedTags: the tags of the general purpose bucket the ARN names, only while its
ABAC status is Enabled, read in place with no legacy entry moved (the caller's bucket, or with the global bucket
namespace the one of that name another account owns, one get per owning account), copied under the lock its tag writes
hold, and none for an object or no bucket. Bucket names are one namespace here, a request signed for any partition
reaching the same bucket, so the ARN's partition is not matched against the bucket's. IamConditionContextResolver gives
an object its bucket's tags from tagParents, and no longer gives s3:GetBucketTagging, s3:DeleteBucket and
DeleteBucketTagging the bucket's tags itself, ABAC or not. S3's own bucket policy check reads the same tags, so a bucket
policy conditioned on aws:ResourceTag grants a caller from another account what it says. s3:BucketTag/<key> is not read:
the generator's resource-tag key reading takes ResourceTag keys alone.
The Service Reference and the IAM identifiers page changed upstream, and the IAM data drift gate this change runs reads
both: tools/aws/sources/iam-identifiers.json and the table are synced, adding IAM's workload identity provider and
template types and their operations, Bedrock's and Redshift Serverless's new types, and new Athena, Budgets and STS
operations. The generator took a type of no variables of its own for the account's one, which every request names, even
where its format lies within another type's the action acts on: Redshift Serverless's expressConfiguration,
workgroup/express/express-default, is a workgroup of a fixed name, and GetCredentials was checked on it beside the
workgroup its workgroupName names. Such a type is now named only by a request naming it, which leaves GetCredentials
checked on the named workgroup alone.
S3BucketTagIamEnforcementIntegrationTest checks that a caller allowed s3:GetObject, s3:ListBucket and the bucket's
tagging actions only on resources tagged team=blue reads and lists a blue bucket with ABAC enabled and reads its tags,
and is refused a red one and a blue one whose ABAC is off, its tagging actions included; and that a bucket policy
granting another account s3:GetObject on blue buckets lets that account read the blue one and not the red.
S3BucketStoredTagsTest checks the read and its refusals; IamConditionContextResolverTest that an object has its bucket's
tags and that a bucket action's request context leaves the bucket's tags to its stored tags;
test_fetch_s3_tag_inheritance.py the fetcher; test_regen_iam_request_resources.py the object's parent and the fixed-name
type; IamRequestResourceEnforcementIntegrationTest that a caller allowed GetCredentials on one workgroup gets its
credentials and is refused another's.
GetTableBucket, ListTableBuckets, GetNamespace, ListNamespaces, GetTable
and ListTables now return tableBucketId and namespaceId where the S3
Tables model defines them, and GetNamespace and ListNamespaces return
the required createdBy and ownerAccountId. New buckets and namespaces
get a random id their children repeat; a bucket or namespace stored by
an earlier Floci gets one derived from its bucket's ARN and its name, so
every read returns the same id.
A bulk send in which no entry names a recipient is now answered entry by
entry ahead of the checks that refused the whole call. SendBulkEmail no
longer refuses default or replacement template data that is not a JSON
object: with no recipient every entry answers "Destination cannot be
empty", and with one the entry fails on its own after the sender check.
SendBulkTemplatedEmail gives the per-entry answer ahead of an unknown or
paused configuration set too, and SendEmail answers template data that
does not parse with "Unable to parse template data (invalid JSON)."
A general purpose bucket's tags control access to it only once attribute-based access control (ABAC) is enabled on it:
"By default, ABAC is disabled for all Amazon S3 general purpose buckets", and aws:ResourceTag is evaluated "only after
you enable ABAC on your bucket". Floci served neither PutBucketAbac nor GetBucketAbac and answered both 501
NotImplemented.
The bucket now holds an ABAC status, read and written at the bucket's owner as its other configurations are.
PutBucketAbac takes a whole AbacStatus document holding one Status of text alone, sets Enabled or Disabled and refuses
anything else, a broken document, markup inside Status or a lowercase status among it, with MalformedXML "The XML you
provided was not well-formed or did not validate against our published schema", the status left as it was; GetBucketAbac
answers Disabled until it is set. While it is Enabled, PutBucketTagging and DeleteBucketTagging are refused with
BadRequest "This S3 general purpose bucket has attribute-based access control (ABAC) enabled. To add tags to this
bucket, initiate a TagResource request. To delete tags from this bucket, initiate an UntagResource request.", the tags
kept: S3 Control's TagResource and UntagResource change them, and GetBucketTagging still lists them. The statuses, codes
and sentence are AWS's recorded answers; DeleteBucketTagging's refusal, which no recording gives, takes the same answer,
whose sentence speaks to deleting too, as the API reference says the operation can no longer be used. IAM already checks
the two operations as s3:PutBucketAbac and s3:GetBucketAbac from the vendored REST routes. PutBucketAbac sets the status
under the lock the tag writes hold, so a PutBucketTagging that saw ABAC disabled finishes before it is enabled.
CreateBucket now sets the tags its CreateBucketConfiguration carries on the new bucket before storing it, and a repeated
create of a bucket the caller already owns, which the default Region answers as done, leaves that bucket's tags as they
are, so neither can change the tags of a bucket under ABAC.
S3BucketAbacIntegrationTest checks, through the SDK, the Disabled default and the roundtrip, the refused spellings and
bodies with the status kept, a repeated create leaving an ABAC bucket's tags, and, under ABAC, PutBucketTagging and
DeleteBucketTagging refused with the tags kept, TagResource tagging and PutBucketTagging working again once ABAC is
disabled; IamActionRegistryTest the two operations' IAM actions; S3UnservedBucketSubresourceIntegrationTest no longer
counts ?abac unserved.
AWS::EC2::FlowLog dropped LogGroupName, so a stack that named its log
group that way created a flow log with no group. The provisioner now
passes it to EC2, and an update compares the effective group, from
LogGroupName or the LogDestination ARN, so a tag-only update keeps the
same flow log either way while a changed group still needs replacement.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
A cluster node started before #9825 keeps its old k3s arguments when
Floci restores it, so its API server still dials kubelets through k3s's
agent tunnel, which a node whose own kubelet registers it doesn't open,
and kubectl logs, exec and port-forward to its pods fail. A new node
container now carries io.floci.eks.egress-selector=disabled, and on
restore a surviving node without it, in a cluster with Auto Mode compute
on, is replaced on its data volume, as an out-of-date node already is.
Part of #8914
The request-resources table gives resource-tag keys to Rekognition's collection type and Macie's member type, and both
services keep the tags those resources are created with, but neither gave IAM them, so an aws:ResourceTag condition on
one of their actions never matched.
RekognitionStoredResourceArns now reads RekognitionCollectionService.storedTags: the tags of the caller's collection the
ARN names, in its Region, read in place with no legacy entry moved. MacieStoredResourceArns, new, reads
MacieService.storedTags: the tags of the member the caller's administrator account holds that the ARN names. Each read
answers only an ARN equal to the stored resource's own, so another partition's ARN of the same Region and name has none.
Floci serves no Macie operation on an existing member yet (only CreateMember and ListMembers), so Macie's reader is
ready for GetMember, DeleteMember and the tag operations rather than read today.
StoredResourceTagIamIntegrationTest checks that a caller allowed rekognition:DescribeCollection only on collections
tagged team=blue describes the blue one and is refused the red one; RekognitionCollectionServiceTest and
MacieServiceTest check each read, its copy, and the ARNs that name nothing (another account, partition, Region or kind,
or a resource no longer held). Each fails without its reader.
BatchGetCustomEntityTypes reads 1 to 50 named custom entity type
definitions in the caller's account and Region, returning the ones it
holds in CustomEntityTypes and the missing names in
CustomEntityTypesNotFound. Under IAM enforcement the call is authorized
as glue:BatchGetCustomEntityTypes, as the generated tables give it.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
A v2 template send without TemplateData, or with an empty string, read
it as {}. SendBulkEmail now answers 400 BadRequestException "The default
template data does not exist" and SendEmail "Template data cannot be
empty", ahead of the configuration set lookup and the sender check.
A SendBulkEmail in which no entry names a recipient answers every entry
INVALID_PARAMETER "Destination cannot be empty" even when its
configuration set is unknown or paused. With a recipient, a bulk send
looks its configuration set up first and refuses a paused one only after
the sender check.
The request-resources table gives resource-tag keys to 66 API Gateway types, but API Gateway gave IAM no tags, so an
aws:ResourceTag condition on an apigateway action never matched. Its Developer Guide also says that in the V1 API "child
resources inherit the tags that are set on parent resources", naming RestApi, DomainName and UsagePlan as the parents,
and that a stage's own tag "takes precedence" over the one it inherits.
ApiGatewayStoredResourceArns reads ApiGatewayService.storedTags and ApiGatewayV2Service.storedTags: the tags of the
caller's REST API, stage, custom domain name, API key, usage plan or VPC link, and of an HTTP or WebSocket API and its
stages, by the first segment of the ARN's resource path, in its Region, read in place from each store with
readInAccount, no legacy entry moved. The REST API's tag writes and the V2 service's now hold the service's monitor and
replace the tag map instead of changing it in place, as the custom domain's, VPC link's, API key's and usage plan's
already did, so a read copies a map no writer changes.
tools/aws/fetch_apigateway_tag_inheritance.py vendors the guide's sentences into
tools/aws/sources/apigateway-tag-inheritance.json, refusing a reworded page. The generator gives each type whose
resource path continues a parent the page names past a '/' that parent, with the parent's format in the type's variable
names (tagParents), from the formats alone: 27 types under RestApi, the 5 under DomainName the guide lists and 4 under
UsagePlan; the V2 API's are under none. RequestResourceMembers reads it, and IamConditionContextResolver lays an ARN's
own tags over its parent's, the parent's ARN filled from the ARN.
The regeneration also takes the Service Reference's new ec2:FailoverVolumes.
test_fetch_apigateway_tag_inheritance.py checks the fetcher's copy and refusals; test_regen_iam_request_resources.py the
parent formats, the parents given and the check of them; RequestResourceMembersTest the read and refusals;
IamConditionContextResolverTest that a method has its REST API's tags under its own and a V2 route none;
ApiGatewayStoredResourceArnsTest each kind's read, a custom domain name and a VPC link of either API, a legacy usage
plan read in place, and its copy; ApiGatewayPathArnEnforcementIntegrationTest that a caller allowed apigateway:GET on
team=blue reads the blue REST API, its resources and a blue HTTP API, and is refused the red REST API, its resources and
the HTTP API's routes.
An EC2 instance's container was created through ensureImageExists, which
reuses the image id a reference named the first time it was seen, so a
worker image rebuilt under the same tag never reached a new instance
until Floci restarted. A launch now resolves the AMI's dockerImage with
resolveImageForLaunch under PREFER_CACHED, as EMR does, reading the
local tag again and pulling only when it is missing, and creates the
container from the image id it returns. An instance already running
keeps the image it started from.
Part of #8914
A $share/<share name>/<topic filter> subscription was matched literally
against each topic, so its subscriber never received anything. It now
joins the group its share name and topic filter name: each matching
publish goes to one connected member of each group, chosen at random,
at the lower of the publish and subscription QoS, as AWS IoT Core
distributes it. A share name that is missing, holds /, + or #, or is
over 128 characters, or a topic filter over 256 characters, is refused
in the SUBACK. A shared subscription gets no retained message on
subscribe, and iot:Subscribe must allow both the $share/ form and the
plain filter. A group with no connected member gets nothing, and the
shared subscription quotas are not enforced.
Closes#9889
CreateKey checked that a key's algorithm serves its KeyUsage but not the
usage itself, so a key of a usage the reference does not list was made.
A key the service creates must now carry a usage from the reference's
list, or the call fails with ValidationException; an imported key keeps
the usage its block carries. The tests that made M0 and P1 keys with
CreateKey use listed usages instead.
Closes#8982
A subscriber with a Lambda target and BatchConfiguration.MaxBatchSize 1
invoked the function with [event]; AWS sends the event object itself, as
Floci now does. The shape is fixed when the batch is built, so a batch
already waiting keeps its array if UpdateSubscriber sets MaxBatchSize to
1. Any larger MaxBatchSize still sends an array, even of one event.
CreateCustomEntityType, GetCustomEntityType, ListCustomEntityTypes and
DeleteCustomEntityType store a regular expression and optional context
words per account and Region. The list filters by tag and pages with
MaxResults and NextToken.
A definition's tags live in the shared tagging store under its
customEntityType/<name> ARN, as other Glue resources' do, so GetTags,
TagResource, UntagResource, the list filter and aws:ResourceTag
conditions all read the same tags. Create replaces the ARN's tags and
delete clears them, each rolling back if the other write fails.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
PutTableBucketMetricsConfiguration, GetTableBucketMetricsConfiguration
and DeleteTableBucketMetricsConfiguration now store the setting with the
table bucket. Get returns the bucket's ARN and the fixed id EntireBucket,
and answers NotFoundException "No such metric configuration exists"
while the configuration is off; a delete is idempotent. The bucket
record is replaced atomically, and a snapshot stores the setting only
for an enabled bucket, so older records start with metrics disabled.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
An EKS Auto Mode node from an image whose own kubelet registers it saw
the Docker host's CPUs and memory as its capacity, not its instance
type's. The instance's NodeConfig now sets the kubelet's systemReserved
to the host's size beyond the type's, less what nodeadm's CPU tiers take
from the host's extra cores, so the node offers what the type offers on
AWS. A host no bigger than the type, or one whose size can't be read,
reserves nothing.
A launch's candidate types, a node still joining and a consolidation's
replacement are sized by what a node of the type offers pods: its CPU
less the EKS AMI's kube reservation tiers, and its memory less 11 MiB
per pod plus 255 MiB and the 100 MiB eviction threshold, as Karpenter
counts it. Pool limits still count the type's capacity.
Part of #8914
TagResource, UntagResource and ListTagsForResource were unknown
operations, so changing the tags of a Network Firewall rule group,
firewall policy or firewall failed. They now edit and read the same tag
lists create and describe use, for a resource in the request's region.
TagResource overwrites an existing key and UntagResource ignores an
absent one. Tags are validated as the model defines them, on TagResource
and on the create-time Tags, with at most 50 on a resource, and a
refused request changes nothing. Every ResourceNotFoundException in the
service now says "No object with the provided name or resource
identifier was found", as AWS does. ListTagsForResource returns every
tag in one page.
Closes#6992
A DocumentDB snapshot with users, roles and custom indexes could fail to
restore into a new cluster. The archive is now restored in two passes:
documents and indexes first, then the target's users and roles, so
indexes on application collections and on user-created collections in
admin survive. A target with no MongoDB backend to receive the archive
refuses the restore with InvalidRestoreFault, and a failed restore
discards only the cluster it created, checked by resource ID, so a
same-named replacement is left alone.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
SendSSHPublicKey stored every key as the account root's, whoever signed
the request. The key is now stored under the request's caller, as
RequestCallerResolver resolves it, so the #Caller= line of the
active-keys document IMDS serves names the IAM user's ARN for an IAM
user, the assumed-role session ARN for a role session, and the account
root's ARN for the root. The instance agent logs that line as the key's
IAM principal.
Closes#9873
CreateEventBus with a name that exists, and CreateSubscriber with a name
that exists on the bus, now answer 409 ResourceAlreadyExistsException
with "Resource already exists", as AWS does and as the event source
creates already did. A CloudFormation rollback that cannot put a
subscriber back answers the same. The five sites share one helper.
The request-resources table gives resource-tag keys to SageMaker's model, endpoint configuration, endpoint and
training job types and to BCM Data Exports' export type, but neither namespace gave IAM the tags it stores, so an
aws:ResourceTag condition on one of their actions never matched.
SageMakerStoredResourceArns reads SageMakerService.storedTags: the tags of the caller's model, endpoint configuration,
endpoint or training job the ARN names, in its Region, by the resource part the ARN starts with, read in place and
copied under the monitor AddTags and DeleteTags change them under. BcmDataExportsStoredResourceArns reads
BcmDataExportsService.storedTags: the ResourceTags an export's create gave it, read in place under its ARN.
StoredResourceTagIamIntegrationTest checks a caller allowed sagemaker:DescribeModel and bcm-data-exports:GetExport
only on resources tagged team=blue reaches the blue one and is refused the red one; both fail without the readers.
SageMakerServiceTest checks the read, its copy, the ARNs that name nothing, and that a model, an endpoint
configuration, an endpoint and a training job of one name answer their own tags by their own ARNs.