Under enforcement a PutRule scoped by events:source was refused for every event pattern, and a PutTargets scoped by events:TargetArn for every target, as #8320 reports: the request condition key table never filled either key, so a Null or ForAllValues condition on them never saw a value. The table's reader is generic, but which member carries a key comes from SERVICES in regen_request_condition_keys.py, and EventBridge was not there. Neither botocore nor the Service Reference says where a request carries these keys: botocore models EventPattern as a string ("The event pattern").
EventBridge's user guide says it, in its table of condition keys: events:source is "the literal string for the source field of the event", with events:detail-type, events:detail.service, events:detail.eventTypeCode and events:detail.userIdentity.principalId the same for their fields, which a rule's event pattern gives ("EventPattern is a mandatory argument to PutRule"), and events:TargetArn is "the ARN of the target for the rule". A vendored source, tools/aws/sources/eventbridge-condition-keys.json, written by tools/aws/fetch_eventbridge_conditions.py from that page, gives each key its member, and the generator reads it for events (CONDITION_SOURCES), each key in the one operation the page names: PutEvents, CreateEventSource and UpdateEventSource take events:source too, which the page does not describe, so they are not read there. --verify checks the file against the page.
The table writes a field of a JSON document a string member holds after #: EventPattern#source.* is each literal string of the pattern's source, read by one generic step of the JSON reader. A pattern leaving a field out names nothing, so ForAllValues allows it and a Null check refuses it, as the page's examples show. The fields are read at the pattern's top level, where every example on the page gives them, so a $or branch's names nothing, and a matcher such as {"prefix": "aws."} is no literal string and names nothing. events:TargetArn reads each target's own Arn, not its dead-letter queue's.
Closes#8320.
Under enforcement a REST route no vendored model names runs unchecked, and AWS Backup was among them: a caller could start a backup job or assign resources to a backup plan with any role and no iam:PassRole, and a grant scoped to one backup vault or plan covered every one, as #6255 reports. Backup's model routes are vendored, so each request is checked as its operation's action, and Backup joins the tables of request resources, passed roles and tags on create.
The Service Reference passes most of Backup's roles to one service, which the passed-roles generator reads alone: IamRoleArn to backup.amazonaws.com, a backup plan's scan settings' ScannerRoleArn to malware-protection.guardduty.amazonaws.com, and a restore testing selection's to restore-testing.backup.amazonaws.com. It passes StartScanJob's IamRoleArn and ScannerRoleArn to both of the first two without saying which goes where, so a vendored source, tools/aws/sources/backup-roles.json, written by tools/aws/fetch_backup_roles.py from the developer guide's malware protection page, gives each: the scanner role "trusts malware-protection.guardduty.amazonaws.com", and the backup role is "the same role found in ... the BackupSelection API", linking CreateBackupSelection, whose role the Service Reference passes to backup alone. The generator reads such a role as going where the reference passes that operation's roles, when that is one service.
A backup vault is checked by its name and a backup plan by its id; BackupStoredResourceArns answers the tags Backup holds on either, which an aws:ResourceTag condition reads. A recovery point's format the Service Reference gives with a literal * account, which the reader matches as written, so a request naming a recovery point by its ARN is checked on *, as one naming a DMS endpoint is.
A namespace the table reads is served on the shared tag routes only with a method its model gives on the path, as it already was only on the paths its model gives: Backup removes tags with POST /untag/{resourceArn}, so a DELETE on its /tags/{resourceArn}, which no Backup operation is and no action checks, was let through and removed tags an aws:ResourceTag deny relies on. It is now refused with MethodNotAllowedException (405), as a tag call sent with the other verb is.
Closes#6255.
Under enforcement a REST route no vendored model names runs unchecked, and AWS AppSync was among them: a caller could give a data source any service role and a GraphQL API any CloudWatch Logs or merged API execution role with no iam:PassRole, and a grant scoped to one GraphQL API covered every API, as #6255 reports. AppSync's model routes are vendored, so each request is checked as its operation's action, and AppSync joins the tables of request resources, passed roles and tags on create.
The Service Reference passes every AppSync role to appsync, so the passed-roles generator reads each member alone: a data source's serviceRoleArn, a GraphQL API's logConfig.cloudWatchLogsRoleArn and mergedApiExecutionRoleArn, and an Event API's eventConfig.logConfig.cloudWatchLogsRoleArn, each passed to appsync.amazonaws.com.
The request-resources generator now also fills a variable whose stem no member's matches with the one path label a REST route puts after the literal segment the type's format puts before that variable, or after that segment qualified by the variable's first word: AppSync's apiId in /v1/apis/{apiId} fills apis/${GraphQLAPIId}, and sourceApiIdentifier in /v1/sourceApis/{sourceApiIdentifier} a merged API association's apis/${SourceGraphQLAPIId}. No other namespace's reading changes. An operation on an API's data sources, resolvers, functions, types, API keys or schema, which the Service Reference gives no resource type, stays on *, as AWS checks it. AppSyncStoredResourceArns answers the tags AppSync holds on a GraphQL API or a custom domain name, which an aws:ResourceTag condition reads.
AppSync now mints a channel namespace's ARN as apis/<apiId>/channelNamespace/<name> and an association's as apis/<mergedApiId>/sourceApiAssociations/<associationId>, from the association's own id, as AWS returns them, so a policy naming the ARN AppSync returns names the resource the request is checked on. Floci minted channelNamespaces/<name>, and an association ARN under sourceApis/ or mergedApis/ ending in a second id.
AppSync's tag routes are served, as every namespace's the table reads, on the route its model gives, /v1/tags/{resourceArn} with the ARN encoded as an SDK sends it.
Part of #6255.
Under enforcement a REST route no vendored model names runs unchecked, and AWS Batch was among them: a caller could create a compute environment with any service, instance or Spot Fleet role and register a job definition with any job or execution role, as #6255 reports. Batch's model routes are vendored, so each request is checked as its operation's action, and Batch joins the table of request resources and the passed-roles table.
The passed-roles generator reads RegisterJobDefinition's roles, each passed to ecs-tasks.amazonaws.com, alone. The Service Reference passes CreateComputeEnvironment's and UpdateComputeEnvironment's roles to batch, ec2, ecs and spotfleet without saying which member's goes where, so a vendored source, tools/aws/sources/batch-roles.json, written by tools/aws/fetch_batch_roles.py from the Batch API reference and user guide, gives each: serviceRole is trusted by batch.amazonaws.com, a compute resource's instanceRole is an instance profile whose role is trusted by ec2.amazonaws.com, spotIamFleetRole by spotfleet.amazonaws.com, and a managed instances provider's infrastructureRoleArn needs "iam:PassedToService: ecs.amazonaws.com", the update's naming the same role in the same words. SubmitServiceJob, which Floci does not serve, names its role inside the SageMaker request it queues, a string the table does not read.
The request-resources generator reads a type of two variables from a member whose documentation spells it, as it does ECS's "(family:revision)", now also where a variable shares only some of its words with the type's name, so DeregisterJobDefinition's "(name:revision)" names a job definition revision whole, not only its name, and where a member lists the form among those it takes, as SubmitJob's "definition-name, definition-name:revision, or the ARN" does, naming the revision rather than the job definition its name alone fills: "the request ARN includes the revision". BatchStoredResourceArns resolves it as Batch does, a name alone being the latest active revision a job runs, and answers the tags of what Batch stores. A member of a structure documented as "The Amazon Resource Name (ARN) of the" resource is read as one, so a job queue's computeEnvironmentOrder[].computeEnvironment is checked. No other namespace's reading changes.
A role name a path prefixes, which Batch documents ("if a role with the name bar has a path of /foo/, specify /foo/bar as the role name"), is checked on the role IAM holds under that name and path.
Batch's tag routes are served, as every namespace's the table reads, on the route its model gives, /v1/tags/{resourceArn} with the ARN encoded as an SDK sends it. Its tag-on-create reading waits: CreateComputeEnvironment is checked as batch:TagResource or batch:SetCapacityTags, and nothing says which of its tag members each is for.
Part of #6255.
#9321 stored a webhook event source's KmsKeyIdentifier without using it. The source's secret is now created with that key, an UpdateEventSource that changes it re-encrypts the secret, and one that leaves it out or sets "" returns the secret to the AWS managed key aws/secretsmanager. A key that does not exist answers AccessDeniedException with KMS_KEY_NOT_FOUND, and an AWS managed key, or a key ARN of another Region or account, answers InvalidInputException, each at the point AWS checks it.
IAM's wording for missing and duplicate entities now matches what AWS answers. A duplicate CreatePolicy is "A policy called <name> already exists. Duplicate names are not allowed.", and a permissions boundary that names no policy, on CreateUser, CreateRole, PutUserPermissionsBoundary or PutRolePermissionsBoundary, answers "Scope ARN: <arn> does not exist or is not attachable.". A version id that names nothing on a policy that exists is named inside the attach sentence on GetPolicyVersion, DeletePolicyVersion and SetDefaultPolicyVersion, inline policies read "The user|group|role policy with name <name> cannot be found.", and instance profiles read "Instance Profile <name> ...". The wording tests share IamWordingRequests, which registers every create with PartitionCleanup.
SimulatePrincipalPolicy ignored ResourcePolicy, so a simulation answered from the identity policies alone. For an IAM user source the supplied resource policy is now evaluated through the same decide the enforcement path uses, with CallerArn, which defaults to the source user, as its principal, and its condition keys counted in MissingContextValues. Each resource's owner is the account its ARN names, otherwise ResourceOwner, otherwise the caller's account, and RoleResourceAccessAuthorizer.relationship picks the same- or cross-account rules. A role source still ignores it, as the reference says resource-based policy simulation isn't supported for roles, and CallerArn is held to its declared length.
An EKS Auto Mode node was named by its instance's private DNS name, as
managed node groups' nodes are, where AWS names Auto Mode's nodes by
their instance ID. The Ready node Floci registers for an Auto Mode
instance now takes the instance ID as its name and its
kubernetes.io/hostname label, and keeps the private DNS name as its
InternalDNS and Hostname addresses, as on AWS. Node DNS answers and
forwarding rules still use the private DNS name.
A cluster kept from before this change has its Auto Mode nodes under
their private DNS names. Once such a node registers again under its
instance ID, Auto Mode's stray-node sweep deletes the DNS-named node,
only when its provider ID is that instance's, whether the instance is
live or terminated.
CreateDistribution, GetDistribution and GetDistributionConfig dropped a
distribution's TenantConfig.ParameterDefinitions. They are now parsed,
stored and returned, with DefaultValue and Comment kept as sent and a
numeric Required (1 or 0) read as an XML boolean. The TenantConfig
subtree is read as a bounded stream: more than five definitions,
CloudFront's quota for parameters per multi-tenant distribution, or
nesting deeper than 32 levels is refused with InvalidArgument.
Closes#9580
EventBridge's storedTags answered only event-bus and rule ARNs, so aws:ResourceTag conditions on EventBridge V2 buses, subscribers and event sources saw no tags, and a Deny keyed on a tag never matched. EventBridgeService now hands an event-busv2, subscriber or event-sourcev2 ARN to EventBridgeV2Service, which reads the tags through findEventBus, findSubscriber and EventBridgeV2EventSources.lookup in the account and Region the ARN names. With V2 disabled or absent the answer stays empty.
SES v2 SendEmail accepted any additional header on a simple message,
but SES refuses the ones it sets itself. A Content.Simple.Headers entry
named From, To, Cc, Bcc, Subject, Date, Message-ID, Reply-To,
Return-Path, MIME-Version, Content-Type or Content-Disposition, in any
case, now answers 400 BadRequestException "Header <Name> is not
supported" with the name as sent, ahead of the configuration set lookup
and the sender verification. Other headers are accepted as before.
CreateDBInstance waited for the Docker backend before answering, so a
client with the SDK's default timeouts could retry a create that had
already succeeded and get DBInstanceAlreadyExists. It now stores the
instance and answers creating, as AWS does. DescribeDBInstances sees the
record while a background worker starts the container and proxy outside
the instance lock, and the worker publishes the backend only if the same
instance is still creating.
ModifyDBInstance and RebootDBInstance refuse a creating instance with
InvalidDBInstanceState and AWS's messages. A delete accepted during
startup keeps the record and the caller's backup choice until the worker
has torn down what it started, and after a restart Floci reopens the
PostgreSQL volume to save a retained backup before removing it. A state
reset waits up to 15 seconds for pending starts and otherwise refuses
with 503 from checkReset, before any container stops.
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Cloud Map lists were filtered by region, but every operation that names a namespace, service or operation by id or ARN fetched it by the bare id, so a request signed for one region read, changed or deleted another region's resource. AWS keeps Cloud Map resources per account and region. GetNamespace, DeleteNamespace, CreateService, GetService, DeleteService, the instance operations, GetOperation and the tag operations now answer a record only in the region recorded for it, with the not-found error each operation declares (NamespaceNotFound, ServiceNotFound, OperationNotFound, ResourceNotFoundException). A record stored without a region is answered in every region, as it was.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
S3 answers a bucket only in its own Region. A SigV4 request signed for
another Region now gets 301 PermanentRedirect with the bucket's Region in
x-amz-bucket-region and Bucket and Endpoint in the error, and a HEAD gets
the status and header with no body, which is what the SDKs' redirect
handling follows. ListBuckets, GetBucketLocation and CreateBucket are served
from every Region, and unsigned, presigned and SigV4A requests and buckets in
another partition are served as before. A bucket stored without a Region is
redirected from the default one, where ListBuckets reports it.
floci-duck now signs each bucket's requests for that bucket's Region through
temporary DuckDB secrets that end with the request, so Athena, S3 Select,
Redshift and the CUR reports keep reading and writing buckets outside the
default Region.
floci.services.s3.region-redirect (FLOCI_SERVICES_S3_REGION_REDIRECT,
default true) turns the redirect off.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Each EKS Auto Mode node now has a karpenter.sh/v1 NodeClaim, as Karpenter
keeps one on AWS, so kubectl get nodeclaims and tools that watch claims see
Auto Mode's nodes.
The claim is named after its pool with a five-character suffix, chosen at
launch so no other instance's claim has it and kept in the instance's
karpenter.sh/nodeclaim tag. It is owned by its NodePool, held by the
karpenter.sh/termination finalizer and labelled as its node is. Its spec
carries the pool's requirements, its pods' requests, and expireAfter and
terminationGracePeriod (336h and 24h0m0s when the pool doesn't say). Its
status goes Launched, then Registered, Initialized and Ready once the node
joins.
A claim whose instance is gone loses Karpenter's finalizer and is deleted, and
a missing one is made again without a new launch. Deleting a claim drains and
removes its node and terminates its instance, as deleting a pool does. A
NodePool being deleted launches nothing more. Only claims labelled
app.kubernetes.io/managed-by: eks are touched.
With floci.services.rds.endpoints-in-vpc on, a DB proxy's default endpoint
is served at its own address in the first of its subnets, under the name
RDS gives it, <proxy>.proxy-<identifier>.<region>.rds.<dnsSuffix>, and each
endpoint added to it at its own address in its own subnets, under
<endpoint>.endpoint.proxy-<identifier>. Each serves the engine family's
port, as "all proxies listen on port 5432 for PostgreSQL" and "on port
3306 for MySQL", so two proxies can both serve 5432; a relay forwards to
the proxy's listener, which takes a free port in the proxy range.
DescribeDBProxies and DescribeDBProxyEndpoints report the names, which
Floci's DNS server answers as soon as the proxy or endpoint exists. An IAM
token generated for any of a proxy's endpoints is good at the proxy, and
the proxies' certificate covers the names. A renamed endpoint answers by
its new name. Deleting an endpoint or the proxy removes its names and then
its relays; one Docker does not confirm removed stays tracked, keeping its
port from other databases, until Floci stops or restarts. A restart serves
them again at the addresses they had, and moves them in or out of the VPC
as the setting now says.
RdsEndpointAddresses gains a relay and name API for endpoints that are not
an instance's, with a best-effort discard, and reaches() replaces
namesCluster() for both clusters and proxies.
Closes#6273
An edge-optimized custom domain reports only its CloudFront distribution: the AWS CLI's create-domain-name example 1 (an EDGE domain) returns distributionDomainName and distributionHostedZoneId and no regional field. Floci wrote regionalDomainName and regionalHostedZoneId, and any regional certificate, on every domain. They are now serialized for regional domains only; the stored regional name is kept, because the custom domain filter still routes on it.
The two routing tests that address a domain through its .regional.local host now create a REGIONAL domain. The GetDomainNames assertion now finds the domain under item, and a new case creates an EDGE domain with a regional certificate name and ARN and checks that CreateDomainName, GetDomainName and GetDomainNames leave all four regional fields off. The custom-domain guide no longer says every domain reports a regionalDomainName and both certificate ARNs.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
AWS's Service Reference lists iam:PassRole for twelve API Gateway
operations, each passing its roles to apigateway.amazonaws.com. Floci
checked none: API Gateway is authorized by HTTP method, the passed-roles
table left the namespace out, and no member naming a role has a name the
table's rule knows (credentials, authorizerCredentials, credentialsArn,
authorizerCredentialsArn). An update names its role as a patch
operation's value, and an import inside its OpenAPI definition.
The roles are now checked for the operation the request's route resolves
to, which the table is keyed by, from three readings. A new vendored
source, tools/aws/sources/apigateway-roles.json, written by its own
script from the API references and developer guide, gives what they
read:
- The members that take a role, by the resource type each describes:
"To specify an IAM role for API Gateway to assume, use the role's
Amazon Resource Name (ARN)". PutIntegration, CreateIntegration,
CreateAuthorizer, CreateApi and UpdateApi read them, REST APIs' and
HTTP APIs' alike.
- A REST API update's patch operation, which names the property it
changes by its path ("the path for this property is /name"): the
value of the one whose path names a role member of the resource the
update returns, so UpdateIntegration reads
patchOperations[path=/credentials].value, UpdateAuthorizer
/authorizerCredentials and UpdateAccount /cloudwatchRoleArn. The
table gains a list step selecting the elements whose field holds a
value.
- An import's OpenAPI definition, JSON or YAML: the
x-amazon-apigateway-integration credentials of each Operation object,
the ANY method's included, and the x-amazon-apigateway-authorizer
authorizerCredentials of each security scheme, OpenAPI 2's and 3's,
where the guide says each extension sits. ImportRestApi and PutRestApi
take the whole body as the definition, ImportApi and ReimportApi a
body member. The definition is read as its service takes
and reads it, through a new PassedRoleLookup hook given the whole body:
API Gateway resolves a REST API definition's ${AWS::Region},
${AWS::AccountId} and ${AWS::Partition} before importing it, so a role
written with them is checked too, and takes an HTTP API's from its
body's body (the REST route's envelope) or Body (the JSON 1.1
handler's), or else the whole body, which the REST route also takes.
A REST JSON model's member is also read by its botocore name where its
wire name differs: Floci serves HTTP APIs over JSON 1.1 too
(AmazonApiGatewayV2.*), whose bodies name members as botocore does
(CredentialsArn, Body), and its handler takes either spelling as the
same member.
apigateway joins the passed-roles namespaces with all twelve operations
read and nothing added to the hand lists.
GetUsagePlanKeys ignored limit and position and returned every key attached to the plan in one response. It now pages with the same id-ordered pageById helper and pageResponse envelope GetUsagePlans and GetAuthorizers use: 25 keys by default, 500 at most, limit=0 rejected, position on nonterminal pages only, and an unknown position rejected with BadRequestException. GetUsage and the data plane keep the unpaged list.
Closes#9062
With floci.services.rds.endpoints-in-vpc on, each instance of an Aurora DB
cluster gets its own address in its VPC, as a standalone instance does, and
serves the cluster's port, which the API reference says "is managed by the
cluster". The cluster reports the names the Aurora user guide gives its
endpoints, <cluster>.cluster-<identifier>, <cluster>.cluster-ro-<identifier>
and <endpoint>.cluster-custom-<identifier>, and Floci's DNS server resolves
them to the instances as Aurora points them: the cluster endpoint to the
writer, following a failover; the reader endpoint to another instance, or
the writer when none is served; a custom endpoint to one of the instances it
holds, picked at random, and none once its static members are all deleted.
Answers live five seconds, the TTL of Aurora's DNS zones. A Multi-AZ DB
cluster, whose instances Floci does not create, and an Aurora Serverless v1
cluster, which has none, keep the proxy endpoint.
The names are routed again whenever a cluster's instances, writer or custom
endpoints change, under one lock, and are restored at restart. An IAM token
generated for any of a cluster's names is good at each of its instances, and
the proxies' certificate covers the names. StopDBCluster removes the
instances' relays and StartDBCluster serves them again; a failed instance
create forgets its name and leaves the names as they were; a cluster
restored from a snapshot serves the snapshot's port.
Refs #6273
AWS's Service Reference lists iam:PassRole for RunJobFlow, passing its
roles to application-autoscaling.amazonaws.com, ec2.amazonaws.com and
elasticmapreduce.amazonaws.com without saying which member's role goes
where, and JobFlowRole names an instance profile rather than a role.
The passed-roles table left the operation unread, so a caller allowed
elasticmapreduce:RunJobFlow could launch a cluster with any service role
and any instance profile.
A new vendored source, tools/aws/sources/emr-roles.json, written by its
own script from the EMR API reference, management guide and AWS CLI
reference, gives each member's role. The guide's page of each role names
its default role ("The default role name is EMR_EC2_DefaultRole"), and
the full access policy it gives users passes each default role to one
service ("iam:PassedToService": "ec2.amazonaws.com*"). The API reference
calls JobFlowRole an instance profile ("Also called instance profile and
Amazon EC2 role"), and the CLI reference's create-cluster examples give
the roles by name (--service-role EMR_DefaultRole). The steps' runtime
role, StepExecutionRoleArn, is not passed: "You can control access to
the runtime role with the condition key elasticmapreduce:ExecutionRoleArn."
The generator reads the source through ROLE_SOURCES, as it reads EKS's,
now taking a documented iam:PassedToService over a trust policy, a member
by name or as an instance profile where the source says so, and leaving
out a member whose role a condition key controls. RunJobFlow moves out of
notRead: ServiceRole to elasticmapreduce.amazonaws.com and AutoScalingRole
to application-autoscaling.amazonaws.com, each by name or ARN, and the
roles of the instance profile JobFlowRole names, by name or ARN, to
ec2.amazonaws.com, found with the instance-profile lookup RunInstances
already uses. A profile IAM does not hold passes no role, as Floci's EMR
already reads JobFlowRole. An instance-profile member is not read for a
call with no request of its own, which has no such lookup.
The instance profile is now found one way everywhere it is used
(IamService.instanceProfileNamed): by its name, or by its own ARN, path
and account included. IAM's passed-role check, EMR's step role and an
EC2 instance's credentials each read it their own way, and EMR kept only
the name after an ARN's last slash. A JobFlowRole ARN of another account
or path then found no role to check but ran the steps as the local
profile's role.
A member's JSON value is now read as the text a handler reads it as, a
number or a Boolean included, as the request resources and condition
keys already read a body's values. The passed-roles reader took strings
alone, while EMR takes "JobFlowRole":123456 as the profile 123456, so a
role named by a number went unchecked.
A v2 SendEmail or SendBulkEmail naming a stored template was not checked
on that template, so a policy granting or denying ses:SendEmail on one
template did not reach a v2 send with it. The request-resources generator
now reads, from botocore's shapes, the name and ARN members of a structure
named after a resource type inside a request structure
(Content.Template.TemplateName and TemplateArn, DefaultContent.Template
for bulk sends), and the table and its reader accept a field of a
structure inside a structure.
With TLS on, CreateEventSource and DescribeEventSource add *.c01.events-webhook.<region>.<host> to Floci's generated server certificate, so a client that verifies the certificate accepts a source's webhook URL. One wildcard covers every source of a Region. The source is stored under the service lock and the certificate is reissued outside it, as the API Gateway, Cognito and IoT custom domain operations do. A user-provided certificate is not changed. The TLS handshake test helper is shared through TlsTestSupport.
With the new opt-in floci.services.rds.endpoints-in-vpc, a standalone DB
instance gets its own address in the subnet of its Availability Zone, as on
RDS, and serves the Port it was created with, or its engine's default, under
the name RDS gives it: <instance>.<identifier>.<region>.rds.<dnsSuffix>, with
one identifier per account and Region. Floci's DNS server answers the name
with the address, so two instances can both serve 5432.
A relay container at the address forwards each connection to the instance's
auth proxy, so IAM authentication, TLS and the master login are unchanged;
IAM tokens bind to the name and port the proxy binding publishes. The
address follows the instance through create, stop and start, a backend
started on retry, a move to another DB subnet group, a blue/green
switchover, delete, a failed create and a restart, and keeps its subnet and
VPC in use for DeleteSubnet and DeleteVpc.
VpcAddressRelays serves any endpoint this way next to VpcContainerLeases,
which now takes back a preferred address; RdsDnsRecordSource answers the
names, and AwsEndpoints builds them. Clusters and DB proxies keep the proxy
endpoint for now.
Refs #6273
CreateCluster and UpdateClusterConfig take EKS Auto Mode's node role in
computeConfig.nodeRoleArn. AWS's Service Reference lists iam:PassRole
for both operations, with iam:PassedToService ec2.amazonaws.com and
eks.amazonaws.com, but not which member's role goes to which service.
Floci never checked the node role: CreateCluster read only its cluster
role, by hand, and UpdateClusterConfig was left out of the table.
A new vendored source, tools/aws/sources/eks-roles.json, written by its
own script from the EKS API reference and user guide, gives each member's
role and the service its trust policy is for. CreateCluster's roleArn is
the cluster IAM role ("provides permissions for the Kubernetes control
plane"), whose page links from the member and whose trust policy names
eks.amazonaws.com. nodeRoleArn is "the IAM Role EKS will assign to EC2
Managed Instances", whose description names the EKS Auto Mode IAM
reference, whose node IAM role section links the guide's page of that
role, whose trust policy names ec2.amazonaws.com. The generator reads
the source (ROLE_SOURCES) to choose, among the services the Service
Reference names for an operation, the one each member's role is for. It
fails on a vendored role for a service the reference does not name, and
on one no operation reads. --verify checks the source against the live
pages.
So CreateCluster now needs iam:PassRole on roleArn for eks.amazonaws.com
and on computeConfig.nodeRoleArn for ec2.amazonaws.com, and
UpdateClusterConfig on its node role for ec2.amazonaws.com. Both move
into the generated table. So do CreateNodegroup, CreateFargateProfile,
CreateAddon and UpdateAddon, whose roles PassedRoles read by hand, the
same members to eks.amazonaws.com the generator gives from botocore and
the Service Reference. Their hand readers are gone, and Step Functions'
EKS tasks now check them as a direct request does.
StatisticValues sent beside Values and Counts is read as a summary of the same distribution, so the weighted samples are kept without counting the summary twice. A conflicting scalar Value or a malformed summary still fails before anything is published. The weighted-summary and metric-math alarm tests share one JSON-to-Query conversion in CloudWatchTestRequests.
PutBucketReplication passes the Role of its ReplicationConfiguration to
S3, and AWS's Service Reference lists iam:PassRole for it with
iam:PassedToService s3.amazonaws.com. Floci never checked it: the
passed-roles table recorded the operation as not read, because its
request body is XML, so a caller allowed s3:PutReplicationConfiguration
could name any role.
PassedRoles now reads a REST-XML body the way the condition keys of a
REST-XML request are read (XmlParser.valuesAt): each member at the
elements botocore serializes it as, below the document element, a
list's elements under the name its shape gives them or as member. The
text is read without surrounding whitespace, which S3 keeps in a Role it
accepts. The generator reads rest-xml models too, and fails on a role
member reached through a map or a flattened list, which an XML body
does not nest as the table's paths do. Two operations move from notRead
into the table: S3's PutBucketReplication (Role, to s3) and S3 Access
Grants' CreateAccessGrantsLocation (IAMRoleArn, with no named service).
Form parameters are now read only from a request the Query controller
dispatches (IamActionRegistry.isQueryRequest: a form posted to the root
path), as formParameters already documented. A request to another
protocol's route is read as its handler reads it, whatever Content-Type
it is sent with: an S3 replication configuration sent as
application/x-www-form-urlencoded was parsed as one form key, so its role
went unchecked while S3 stored the XML. The same held for tag-on-create
and request resources reading a REST request's JSON body.
S3's PutBucketReplication now refuses with MalformedXML a document that
is not well-formed as a whole, or whose configuration does not hold
exactly one Role with text, as it already counts each rule's Destination
and Bucket. It read the first Role anywhere in the document from a parse
that stopped where the configuration ended, so a second Role holding an
element, or content after the configuration, left IAM reading no role
while S3 stored the document.
The table is keyed by operation, as the Service Reference lists it, but
the enforcement filter and the Step Functions request checks looked it
up by the IAM action. The two differ for PutBucketReplication, which is
authorized as s3:PutReplicationConfiguration, so its entry would never
have been found. Both now look roles up by the request's operation, as
tag-on-create already does. DMS's ModifyDataProvider and
ModifyMigrationProject, authorized as UpdateDataProvider and
UpdateMigrationProject, are found the same way once Floci serves them.
A cluster's trino-exchange-manager now makes Trino's
exchange-manager.properties, for fault-tolerant execution. With no
properties it is EMR's default, spooling in the cluster's HDFS in
trino-exchange/ under the trino user's home; exchange.base-directories
with exchange.use-local-hdfs names HDFS directories, and an s3://
directory spools in Floci's S3. The Trino project's Trino refuses EMR's
exchange.use-local-hdfs and an hdfs:// directory in a filesystem exchange
manager, so Floci leaves the first out and gives HDFS directories Trino's
own hdfs exchange manager, with a core-site.xml naming the cluster's
NameNode as its hdfs.config.resources: without one, Trino takes an hdfs://
directory for another file system's ("Wrong FS ... expected: file:///").
RevokeResource answered UnsupportedOperation. It now revokes a webhook event source or a subscriber for good. A revoked source answers 403 on its webhook URL and refuses UpdateEventSource and RotateWebhookCredentials with InvalidStateException. A revoked subscriber receives no more events and refuses UpdateSubscriber the same way. Both can still be described, listed and deleted, and report Revoked once revoked while leaving the member out before.
DeleteEventBus ignores revoked sources and subscribers, which outlive their bus under a key a new bus of the same name cannot reach. ListSubscribers pages by bus name, subscriber name and ARN, so an orphan and its namesake on the recreated bus both show.
Under enforcement a REST route no rule maps and no vendored model names
runs unchecked. AWS AppConfig with its data plane, AWS CodeArtifact and
Amazon CodeGuru Reviewer were among those: Floci serves each and no rule
mapped them.
Vendors the appconfig, appconfigdata, codeartifact and codeguru-reviewer
models' routes, 120 operations, so each request is checked as its
operation's action: a caller holding no grant for one is now refused
where the request used to pass. A request signed with a vendored model's
own name, which Floci also serves (appconfigdata), is checked under the
signing name the routes file records for that model (appconfig).
The three namespaces join the table of request resources. CodeArtifact's
48 operations and CodeGuru Reviewer's 14 read every type the Service
Authorization Reference marks required. Nine of AppConfig's 58 act on a
required type the table reads no member for (a deployment, a hosted
configuration version, an experiment run, a configuration profile named
as Configuration), so those are checked on the types it does read.
AppConfig Data's StartConfigurationSession is checked on the application
its ApplicationIdentifier names by its id or its name, from a measured
entry quoting AWS's own refusal of it on application/<app_id>, and
GetLatestConfiguration on the configuration of the session its
ConfigurationToken names: a reading gives a request's token that a
create of its service answers as naming what that create's session is
on, which the service finds.
A request member whose botocore shape is an account id now gives the
account of what the request names wherever a REST request carries it,
its path and query too, as the generator's own rule says, not only in
its body: CodeArtifact's domain-owner, QuickSight's AwsAccountId path
label on 196 operations, and Signer's GetSigningProfile profileOwner.
Such a resource in another account than the caller's is named as an ARN
of another account already is, in that account and as the caller's of
that name too, unless its service acts on it in that account. Signer,
ECR, CodeArtifact and Redshift do and say so, so each is checked on that
account's resource alone, as AWS checks it: Signer now reads the profile
or job its profileOwner or jobOwner names in that account, as AWS does,
where it read the caller's own, and saves a job it revokes there. Such a
request needs the owner's grant beside the caller's own policy, as AWS
requires of a cross-account request: CodeArtifact gives IAM a domain's
and a repository's policy, and Signer the profile permissions
AddProfilePermission adds, as the resource's policy (ResourcePolicyProvider),
a permission of one profile version holding for that version alone: a
job's, the version that signed it.
A resource a request names by another spelling than its service stores
it under is checked as the service reads it (resolveStoredArn, now also
for an ARN the reader builds from members): an AppConfig environment or
configuration profile by its id when named by its name, a CodeArtifact
PyPI or NuGet package by its normalized name, as AWS writes it in ARNs.
AppConfig, CodeArtifact and CodeGuru Reviewer give IAM the tags they hold
on the resource a request names (an application, a domain, repository or
package group, an association), so a grant conditioned on aws:ResourceTag
reaches a tagged resource; Signer reads a profile's tags in the profile's
own account, another account's included. A tagged create is checked for tagging on what
it makes where botocore's response gives it: CreateEnvironment answers
an Environment whose Id is the new environment's, AssociateRepository
the RepositoryAssociation whose AssociationArn is the association it
makes. A tagged StartDeployment's tags go on the deployment it makes,
its DeploymentNumber AppConfig's to mint, open. AppConfig stays out of
the passed-roles table: CreateExtension and UpdateExtension pass a role
in Actions{}[].RoleArn, a map of lists that file does not read.
A new vendored source, tools/aws/sources/codeartifact-permissions.json,
written by its own script from the CodeArtifact user guide, gives what
neither botocore nor the Service Reference says: CopyPackageVersions is
checked as ReadFromRepository on its source repository and as
CopyPackageVersions on its destination repository, and a package with
no namespace has an empty one in its ARN (package/my_domain/my_repo/
npm//react), so a request leaving namespace out is checked on that ARN.
A variable the reference names Encoded and a botocore shape's name is
filled from the member of that shape and encoded as its service encodes
it, through StoredResourceArns: CodeArtifact's package group pattern,
percent-encoded in lower case, which CodeArtifact now writes into the
group's own ARN as AWS does (/npm/team/* is /npm/team/%2a). A tag call
spelling a group's pattern otherwise (%2A), which CodeArtifact reads as
the same group, is checked on the group's own ARN, which CodeArtifact
resolves it to, so a deny on that ARN holds.
With AppConfig in the table, a tag call naming one of its ARNs with the
slash unencoded is refused as a path its model does not give, as for
every namespace the table reads; AppConfig's tests now send the ARN
encoded, as an SDK does. AppConfig Data's GetLatestConfiguration, which
a route filter moves off GET /configuration so S3's bucket of that name
keeps its route, is moved under an internal prefix the request records,
as every such route is, so IAM matches it on its modeled path. The table
tests place a create's members where the table locates them, expect a
member holding the type's own ARN to name it as it is, and expect each
resource in the account its own account member gives.
trino-node's and trino-log's properties now go into the image's own
node.properties and log.properties, after its lines, so an image of
trino.image's keeps its settings; Floci names the node only where neither
gives it an id; and trino-env's nested export
properties ("If any classification ends in env, use the export
sub-classification") become the Trino container's environment, which a
catalog reads as ${ENV:NAME} where its connector takes Trino's
configuration, as Iceberg's does. The exports come after Floci's
AWS settings, which they may change as a trino-env.sh would, and before
the variables Floci writes Trino's files from, which they may not.
For an identified workload, Route 53 and Cloud Map private DNS answers come only from zones associated with the querying VPC, account and Region; visibility is decided before the most specific zone is chosen, authoritative negative answers are kept, and conflicting runtime identities are refused. A caller with no known VPC keeps its private answers. EC2 and ECS register their guests' VPCs for the lifetime of the workload, revoking them on confirmed stop, and a terminating instance's IAM sessions and metadata tokens are revoked independently of Docker removal. The guest DNS checks run as nightly Docker checks.
CreateFunction accepted python3.15, ruby4.0, java8.al2023, java11.al2023 and java17.al2023, but ImageResolver had no image for them, so every invoke failed with "The runtime parameter ... is not supported". They now map to python:3.15, ruby:4.0, java:8.al2023, java:11.al2023 and java:17.al2023 on public.ecr.aws/lambda, so every identifier in Lambda's supported runtimes table resolves to an image.
The Lambda docs no longer say that any runtime with a base image works, and name the deprecated runtimes Floci runs instead.
A term filter pattern with a space between the minus and the excluded term, "ERROR" - "Unauthorized", was rejected with "expected a value", while AWS reads it as an exclusion, the same as "ERROR" -"Unauthorized". The term parser now skips whitespace after a minus and reads the next term as excluded, so metric filters, subscription filters and FilterLogEvents accept it alike.
A cluster with Floci's Trino now starts its primary node, and Trino on it,
in the background as it becomes ready, steps or none, the way an
application UI link already does; the cluster goes WAITING as before.
Clients outside the cluster reach Trino through Floci on a host of the
cluster's own, <cluster-id>.emr-trino.<Floci's host>, through the app UI
proxy: Trino's port is published on the primary node's loopback like the
node's web interfaces, the request keeps its Host, which Trino names its
next pages by, and goes on with X-Forwarded-Proto, which Trino honours
with http-server.process-forwarded. Until Trino answers the host gives a
503, which Trino's clients retry, and starts the node where it is not
running; an ending or ended cluster gives a 404. Floci's TLS certificate
names the new host label.
PutAccountDeliveryAttributes stores the account's SharedPoolDeliveryMode per Region, GetAccount always reports it under DeliveryAttributes (GLOBAL when unset), and configuration sets accept DeliveryOptions.SharedPoolDeliveryMode, which PutConfigurationSetDeliveryOptions keeps when a request omits it. The Java compatibility suite moves to AWS SDK 2.59.7.
Floci's shutdown stopped every Neptune cluster's proxy and graph
database container and nothing started them again, so after a restart
with persistent storage a cluster reported available with nothing
behind its port.
At startup each cluster now reports maintenance, and its instances
starting, with its proxy port held for it at once, so a cluster created
meanwhile is never handed it. Its container comes back in the
background on the volume its graph is kept in, in the engine the graph
was kept in, which the cluster's record now names, and its proxy
listens on its port again; the cluster and its instances then report
available. With no Docker daemon reachable they come back available
with no container, as a cluster created then does. A cluster whose
container or proxy does not start is left with none and its instances
failed, and is tried again at the next start. The restore runs in each
cluster's own account and Region, and marking the clusters calls no
Docker.
Floci now records which cluster holds each proxy port, so a cluster
whose stored port another cluster holds moves to a free one, its
instances with it, and one restored in the same process keeps its own. One recorded before its engine was kept is
taken to be in the configured one, and one recorded before its graph
was kept in a volume gets a volume, both kept before any Docker call.
A DeleteDBCluster while the restore is starting the cluster's container
leaves it deleting until the container has started, a second one too,
and the restore removes it then. A delete defers only while a restore
owns the cluster, which it does only once its marking is done, so one a
failed write left deleting is retried at once; one still deleting at the next start is removed in the
background. The delete, the restore and CreateDBInstance decide under a
per-cluster lock, and instance creation, deletion and the restore's
status writes under a per-instance one, taken first, so the restore
never puts back an instance deleted meanwhile. CreateDBInstance is
refused with InvalidDBClusterStateFault for a cluster that is not
available.
Shutdown now marks the container manager first, after which no
container starts. A container left under a cluster's name, by a Floci
that exited without stopping it, is now stopped with the same 30
seconds as at shutdown before its replacement starts, rather than
removed outright, so Gremlin Server saves its graph to the volume
first. The message refusing to delete a cluster with instances uses a
colon in place of its dash.
Closes#5664.
SES v2 was checked by 118 hand-written rules in IamActionRegistry, one
per route of the model, and no SES request, v1 or v2, was checked on
the resource it names: the ses namespace waited in the table of request
resources' NOT_COVERED, as the generator refused it while its REST
clients had no vendored routes to tell their requests apart.
Vendors the sesv2 and pinpoint-email models' routes under the ses
credential scope, so each v2 request is checked as its operation's
action by the route botocore gives it, and removes the hand rules. The
ses namespace joins the table of request resources, 231 operations over
the ses, sesv2, pinpoint-email and mailmanager clients: an identity, a
configuration set, a template or a contact list by the member naming it,
an ARN member by the ARN it holds, as the Service Reference gives their
formats; an operation naming none of its action's types stays on "*".
Floci mints the same identity/<name> and configuration-set/<name> ARNs.
SES v1 and v2 share the operation names of the table, and the generator
merged the rows of clients that share an endpoint prefix, holding that a
request cannot tell them apart: a v2 SendEmail was read for v1's
SourceArn, so a grant on one identity sent from another by adding one.
Every row of the table now names the APIs it is read for, each a
protocol botocore gives a client of the operation with its API version
(SourceArn is query/2010-12-01), and the reader reads a request for the
rows of its own API alone: a Query request's by the Version its handler
dispatches it by, its form's on a POST and never its URL's, a REST
request's by the version of the model whose route it matched, never by
a member a caller adds. A request whose API neither gives, or
one no row names, is read for every row, as before. 68 rows are read
for some of their operation's APIs only, over SES, Elastic Load
Balancing's classic and v2 APIs, EventBridge, Lambda and Bedrock.
botocore now gives ListConfigurationSets and ListEmailIdentities as
POST /v2/email/list-configuration-sets and POST /v2/email/list-identities.
The GET /v2/email/configuration-sets and GET /v2/email/identities routes
an SDK built before that still sends stay served and match no route of
the model, so they are not checked. The hand-kept copy of the SES v2
model's routes the registry test read is removed: the route coverage
test checks every vendored route.
Each trino-connector-<catalog> classification now adds that catalog to the
cluster's Trino, of the connector of its name (delta_lake for delta,
raptor_legacy for raptor) unless it names its own. delta, hudi and iceberg
sit on the cluster's Hive metastore, or on Floci's Glue when the
classification says glue, and on Floci's S3, as hive already does; Delta
writes to S3 are on, as the Release Guide's Delta tutorial inserts into a
table there. trino-config goes into config.properties after Floci's, and
its http-server.http.port moves the coordinator, its readiness query and
the address the steps' trino-cli reaches.
Resolve nodejs26.x to public.ecr.aws/lambda/nodejs:26, which the Docker launcher, the Kubernetes launcher and Web Function environments all use, and accept nodejs26.x for Web Function revisions next to nodejs24.x.
Closes#9392