CreateAssociation now resolves a document ARN in another account to that account's document when its owner shared it with the caller through ModifyDocumentPermission, and answers InvalidDocument for one that is not shared, is of another partition or does not exist. UpdateAssociation checks a new DocumentVersion through the same lookup. With IAM enforcement on, reachedInItsAccount has the request checked on the owner's document ARN alone, so the caller's identity policy must allow that ARN.
Closes#8364
No AWS image carries Pig, so a Pig step failed without running. With
floci.services.emr.pig.enabled on (off by default), a docker cluster
whose Applications name Pig gets Apache Pig 0.18.0 in its image:
downloaded to a temporary file from the first of
floci.services.emr.pig.urls that gives it whole with the checksum
floci.services.emr.pig.sha256 names (a URL that fails, stalls for a
minute or gives another checksum passes to the next), then streamed
into /usr/lib/pig as EmrReleaseImages makes the image, with Tez from
the release's Hive image and a /usr/bin/pig that EMR's own pig-script
runs.
Pig runs on the image's Tez, its bundled Tez and protobuf 3 left out,
on the cluster's YARN or in local mode, with exectype=tez, a working
directory without a scheme, which S3A takes, and no task reports and
one try for counters from the MapReduce JobHistory server the cluster
does not run, then the cluster's tez-site and pig-properties, in a
pig.properties of the step's own; pig-log4j and pig-env reach Pig too. A command step's new
tez-site.xml shares Hive's Tez-on-YARN settings.
Without the setting, a Pig step on a cluster that installs Pig still
fails without running, its message naming the setting; on one that
does not, EMR's pig-script says "Pig isn't installed." as on EMR.
ModifyDBSnapshot refused a request naming neither EngineVersion nor
OptionGroupName with InvalidParameterCombination, "At least one snapshot
attribute must be specified.", a message AWS does not use. The model
requires only DBSnapshotIdentifier, and neither the API reference nor the
User Guide's snapshot upgrade pages tie any error to a request with nothing
to change, so such a request now returns the snapshot unchanged. A missing
snapshot and one that is not available are still refused as before.
The RDS docs record this as Floci's reading of an undocumented case.
Closes#4083
On AWS a function's Hyperplane network interfaces sit in the subnets
its VpcConfig names, and EC2 refuses DeleteSubnet, and so DeleteVpc,
while one is there. Floci's Lambda never told EC2 a function used a
subnet, so DeleteSubnet succeeded under a VPC-configured function and
left it naming a subnet that was gone.
- LambdaService is a VpcDependencyProvider: a function of the caller's
account, or a published version of one, holds each subnet its
VpcConfig names and the VPC it is configured in
(LambdaFunctionStore.listWithVersionsForAccount, which also reads a
record stored before accounts were kept apart, unprefixed until it
is next read).
- CreateFunction and UpdateFunctionConfiguration save a function that
names subnets under EC2's subnet lock, so a DeleteSubnet either sees
it or runs before it is stored. A VpcConfig the request set is
resolved again under the lock, so a subnet deleted since the request
was validated is unknown, as one never created is, and the function
infers no VPC from it.
ECS awsvpc tasks already hold their subnet through the network
interface each task is given, which DeleteSubnet counts.
LambdaVpcResourceValidationIntegrationTest has DeleteSubnet refused
under a function, then under its published version once $LATEST moves
to another subnet, and allowed once the version is deleted, and a
subnet deleted while a function is created leaves it no inferred VPC.
LambdaFunctionStoreAccountScopeTest covers the unprefixed record.
ec2.md and lambda.md say so.
The generated request resources give DynamoDB's table, index and stream
types aws:ResourceTag/ keys, but DynamoDB had no StoredResourceArns, so
a condition on a table's tags saw none. DynamoDbStoredResourceArns now
answers from the selected backend: the native one reads the table
stored under the ARN in the account and Region it names, a
pre-multi-account one of the default account in place, matched on the
whole ARN; the DynamoDB Local one reads the tags Floci records for it
while DynamoDB Local still has the table. An index ARN gets its table's
tags when the table holds that index; a stream ARN gets none. Native tag
writes, CreateTable's included, now replace the map whole under one
lock, keeping tags already put, and the field is volatile.
Enabling an MFA device recorded state and changed nothing.
aws:MultiFactorAuthPresent and aws:MultiFactorAuthAge reached no request, so a
policy conditioned on either could not behave as it does on AWS, and
GetSessionToken and AssumeRole accepted SerialNumber and TokenCode and ignored
both, so no session could satisfy such a condition in the first place.
Both keys are published now from the credentials a request was signed with,
which is where the guide puts their availability: a long-term key carries
neither, and a session carries the first one, true only where a device was
used. A federated-user session carries neither, the guide putting federated
identities with the long-term keys. They are written by the one writer that
already says who is calling, so the enforcement filter, the per-resource and
per-item contexts, trust policies and the paths that evaluate a policy
themselves all see them at once.
The two STS operations hold a presented code to the seed of the device its
serial names, require that device to be enabled for the signing identity, and
spend the step it matched, since RFC 6238 has a verifier refuse the second
attempt of a code for the same time step. A key IAM holds nowhere has its claim
taken as made: there is no identity behind it whose devices could be checked,
and this emulator already reads such a key as acting for itself. A claim that
fails is refused with AccessDenied, the outcome AWS documents.
How far the authentication reaches is AWS's own line. GetSessionToken
credentials "include MFA information", so that session is MFA-authenticated on
its own requests. AssumeRole credentials "do not include MFA information in the
context", and "once the user has assumed the role, no further MFA checks are
made", so the device decides the assume and stops there. The device a call
presents belongs to that request, so both the trust policy and the caller's own
permission to make the call see it; the claim is read once per request and held
on it, a code being spendable only once.
CreateDBInstanceReadReplica now accepts MySQL and MariaDB sources and initialises the replica from a mysqldump or mariadb-dump copy of the source, the same copy CreateDBSnapshot uses. One engine set gates both the replica check and the SupportsReadReplica flag DescribeDBEngineVersions reports.
The copy passes MYSQL_PWD in the exec's environment rather than its command, uploads the dump readable by root only and removes it after the restore, keeps a name containing a newline whole, and replays each SHOW GRANTS row as one statement, so MariaDB's SET DEFAULT ROLE and MySQL's partial revokes restore. Other engines are still refused with InvalidDBInstanceState.
The generated request resources give Redshift Serverless's namespace,
workgroup, snapshot and recovery point types aws:ResourceTag/ keys, but
RedshiftServerlessService did not answer storedTags, so a condition on
their tags saw none. It now reads the namespace, the workgroup or the
snapshot stored under the ARN in the account and Region it names, a
pre-multi-account one of the default account included, in place,
matched on the whole ARN. A tag change is already stored on a copy, so
the tags read are one whole set.
With security-group enforcement on, the socat publisher was switched
off, so an application port a security group opened was never reachable
from the host. Docker can replace a host client's address (Docker
Desktop shows every client as its gateway), so no rule narrower than the
whole internet can be judged on it.
Host-published access now counts as traffic from outside the VPC: with
enforcement on, a port is published only when an ingress rule opens it
to 0.0.0.0/0, or failing that ::/0, which admit a client whatever
address it arrives with. The sidecar dials the instance through its
protected namespace's helper, on the helper's network: on its IPv4
address, or on its Docker IPv6 address for a port only ::/0 opens, which
is not published on a network without IPv6. A client's family is still
seen on the host, so a port only one family's rule opens binds only that
family's host addresses. A port whose rules move family is republished,
the family is persisted for restore, and a restart brings each running
instance's forwards in line with its current rules. Ports opened after
launch publish and revoking removes them, as with enforcement off; a
port only a narrower CIDR, a prefix list or a group reference opens
stays reachable on the direct container path.
Also brings Ec2ServiceTest's never-allocates check onto the
three-argument allocatePrivateIp that #8598 introduced, which left
main's tests not compiling after #8576.
The generated request resources give Athena's workgroup and data catalog
types aws:ResourceTag/ keys, but AthenaStoredResourceArns did not answer
storedTags, so a condition on their tags saw none. It now answers from
AthenaService.storedTags, which reads the workgroup or the data catalog
stored under the ARN in the account and Region it names, a
pre-multi-account one of the default account in place, matched on the
whole ARN; the built-in primary workgroup and AwsDataCatalog carry none.
The tag lists are volatile, as tagging already replaces a list whole.
* feat(paymentcryptography): the multi-region keys
* fix(paymentcryptography): the multi-region replication refuses what it cannot carry out
* test(compatibility-tests): the multi-region tests leave the account as they found it
* fix(paymentcryptography): the default replication regions are the ones of the region
* test(compatibility-tests): the multi-region tests keep their settings to their own region
* docs(paymentcryptography): what the multi-region replication does
* fix(paymentcryptography): the rules the multi-region replication follows
* chore(paymentcryptography): the shape check settles the type of a list of names
* style(paymentcryptography): the accessor the edit left on one line
* docs(paymentcryptography): the page says what the replication does
* fix(paymentcryptography): the replica answers as the reference answers
* fix(paymentcryptography): a key is replicated within the partition it is in
* style(paymentcryptography): the rules the replication shares are written once
* fix(paymentcryptography): the partition of a region is the one its ARN carries
* style(paymentcryptography): the tests of the service share the key they make
* style(compatibility-tests): the compatibility tests share the key they make
VpcNetworkManager keyed its VPC bindings, subnets and Docker networks
by Region and id alone, and every account's default VPC and subnets
share one id (vpc-default-<region>), so two accounts' default VPCs
shared one binding, one Docker network and one lease table: EC2
instances, Lambda functions, ECS tasks, EKS nodes and the MWAA,
CodeBuild and Batch containers of two accounts landed on the same
bridge. Ec2Service worked around the shared lease table by counting
every account's resources as holding the subnet's addresses.
- VpcNetworkManager takes the account on every call and keys bindings
and subnets by account, Region and id. A network carries the account
in its labels and, for any account but the default one, in its name;
the default account's keeps the name it always had, so its live
networks outlive the upgrade. A surviving network of another
account's VPC of the same id is a collision, as another Region's is.
- Startup reconciliation asks which accounts declare a VPC of an id in a
Region (DeclaredVpcs). A labelled network is kept while its account
declares the VPC; one an older version labelled with no account
belongs to the account declaring its VPC, the default account first,
and a non-default account's VPC keeps using that account-less network,
so its live containers stay attached across the upgrade.
- Ec2Service passes the caller's account, and the restore each stored
VPC's, subnet's and instance's own. The helpers other services call
(allocate, reserve, release, attach, detach) take the owning account
and run as it, as a caller may run outside the owner's request: a
provisioned or cross-account Lambda launch, a container removed in
the background. Lambda, ECS, EKS and VpcContainerLeases (MWAA,
CodeBuild, Batch) pass the account they already hold; Lambda's and
EKS's leases carry it to their release.
- An address is held by the caller's account's resources alone, as its
network and lease table are its own: the every-account holding check
goes, and the container lease map is keyed by account.
VpcNetworkManagerTest covers two accounts' default VPCs getting a
network each (the second's identical CIDR substituted), another
account's surviving network as a collision, a labelled network kept
only while its account declares the VPC, and an older version's
unlabelled network kept and adopted for the account declaring it. Ec2ServiceTest's cross-account
tests now pin the per-account holding. ec2.md says so.
Each MicroVM image version now records the build inputs it was created with (code artifact URI, base image ARN and version, build role) as an immutable BuildSpec. GetMicrovmImageVersion and ListMicrovmImageVersions read that snapshot instead of the image's latest inputs, so an update no longer rewrites what older versions report.
Versions stored before this change have no snapshot and fall back to their image's last known inputs; the docs note that their original inputs cannot be recovered.
Closes#7312
The generated request resources give CodeBuild's project and report
group types aws:ResourceTag/ keys, but CodeBuildStoredResourceArns did
not answer storedTags, so a condition on their tags saw none. It now
answers from CodeBuildService.storedTags, which reads the project or
the report group stored under the ARN in the account and Region it
names, a pre-multi-account one of the default account in place,
matched on the whole ARN, and gives its key and value pairs as tags.
The tag lists are volatile, as CodeBuild replaces a resource's list
whole and never changes one in place.
With security-group enforcement on, a managed ENI's identity was its
IPv4 address alone, so a rule naming an IPv6 range never matched a peer
on the IPv6 addresses its ENI now holds.
Each protected endpoint now carries its ENI's IPv6 addresses next to the
IPv4 one, and its helper's Docker IPv6 address next to the IPv4
transport. The compiler writes a peer's rules per identity: a rule
matching one of its IPv6 addresses admits it on the IPv6 transport only,
never on the IPv4 one, and on a Docker network without IPv6 there is no
IPv6 identity to match. Every transport a peer has is dropped after its
rules, as the IPv4 one already was. The EC2 and ECS registrations pass
the ENI's IPv6 addresses, the firewall manager reads the helper's Docker
IPv6 address, and AssignIpv6Addresses and UnassignIpv6Addresses update
the ENI's firewall identity. Every Docker address a managed peer has is
dropped after its rules, its IPv6 one included when its ENI holds no
IPv6 address, and an ICMP rule is written only for the family it
belongs to. IPv6 changes to one ENI serialize through their firewall
update; an assign the firewall refuses is taken back out of the store,
and an unassign reaches the firewall before it is stored.
The README now documents enforcement: what it filters, that it needs
rootful Docker with Linux containers, how to turn it on, and that an
application port opened after launch is not published while it is on.
Part of #2564.
Athena types a partition value as its key declares. Floci left the
values DuckDB's Hive partitioning reads from column=value folders to
DuckDB's autocast, so a string key holding 2026-11-14 came back as a
DATE, and a date key's folder holding text no date is read as rows with
the guessed type. Delimited-text tables already read their values as
text and cast them; every other format did not.
- A partitioned table without a location template reads with
hive_types_autocast = false, so each Hive partition value arrives as
text, and buildProjection casts it to its key's declared type
(GlueTableResolver.hivePartitionKeys), as it already did for
delimited text.
- A projecting table in the default layout keeps only rows whose typed
keys parse as their types (hiveValueFilter): Athena builds each path
from values its projection generates, so a folder like dt=latest for
a date key is one no query addresses, as the template layout already
treats it.
- A date or timestamp key whose date projection sets a format is parsed
with it in either layout (typedKey, strptimeFormat translating yyyy,
yy, MM, dd, HH, mm, ss and literal text, a doubled quote being one
quote, for try_strptime), so dt=20261116
under yyyyMMdd reads as a date; a format with other pattern letters is
cast as an ISO value. This closes the template layout's TODO too.
- Iceberg tables keep reading their own typed values.
AthenaPartitionTemplateSidecarIntegrationTest reads a string key
holding a date as VARCHAR, a date key as DATE, and skips a dt=latest
folder, and a yyyyMMdd date projection, against the real engine.
GlueViewDdlBuilderTest and GlueTableResolverTest cover the view and the
pattern translation.
athena.md says so.
Both policy simulators accepted OrderedOrganizationPolicyInputList and
ResourceHandlingOption and answered as though neither had been sent.
The levels now gate a simulation the way they gate the call it stands for,
through the same walk a live request takes through service control policies:
an action no level allows is an implicitDeny, a level that denies it is an
explicitDeny whatever the levels below allow, and a level carrying no
statements is skipped. A level whose document does not read as a policy is an
InvalidInput naming the item's position. The levels a call hands in are the
whole of the organization the simulation runs against, matching the console,
which includes SCPs only when the box is ticked.
A named scenario is held to the resources it requires, "to enforce the
presence of the required resources to ensure reliable simulation results", and
a value naming no published scenario is refused. A simulation that names no
scenario is left alone.
One difference from AWS's simulator is documented and open: AWS says its
simulator does not evaluate SCPs that have global conditions, while this walk
evaluates a condition in an SCP exactly as the live evaluation does.
The generated request resources give Step Functions' state machine,
version, alias, execution and activity types aws:ResourceTag/ keys, but
StepFunctionsService did not answer storedTags, so a condition on their
tags saw none. It now reads the state machine or the activity stored
under the ARN in the account and Region it names, in place, matched on
the whole ARN; a version the state machine holds and an execution have
the state machine's tags, as all versions of a state machine share its
tags and its executions inherit them, and an alias has none. Tagging
and untagging now put a new tag map in place of the old one under the
service's lock, so the lookup always copies one whole set and an update
copying the state machine no longer loses a tag written at the same
time. iam.md also names EventBridge and RDS, which answer it too.
A network interface held no IPv6 address: CreateNetworkInterface ignored
Ipv6Addresses and Ipv6AddressCount, AssignIpv6Addresses and
UnassignIpv6Addresses were not implemented, and nothing reported an
ipv6AddressesSet, so a dual-stack subnet's interfaces looked IPv4-only.
CreateNetworkInterface now takes the named addresses or a count drawn
from the subnet's associated IPv6 block, with a random host part. Left
out, the subnet's AssignIpv6AddressOnCreation gives one address; an
explicit 0 overrides it, as the API reference says.
AssignIpv6Addresses reads Ipv6Addresses.N (the name the SDKs send) or
Ipv6AddressCount, needs one of them, and reports only the addresses it
added; UnassignIpv6Addresses reports only the ones the interface held.
Both work on standalone interfaces and on an instance's launch-created
one. An address outside the subnet's blocks answers InvalidParameterValue
and one another interface holds InvalidIPAddress.InUse; prefix
delegation answers UnsupportedOperation, a list with any count
InvalidParameterCombination, and a reserved address (a block's four first
and its last) InvalidParameterValue. An interface holds at most as many
IPv6 addresses as private IPv4 ones, and a block without enough free hosts
answers InsufficientFreeAddressesInSubnet. DescribeNetworkInterfaces and
DescribeInstances report ipv6AddressesSet, and a supplied interface keeps
its addresses on the instance it launches. Termination now releases
interfaces under the topology lock, and an IPv6 change writes back only
what is still stored.
Part of #2564.
Athena reads a partitioned table through the partitions the Glue Data
Catalog holds for it, each from its own location, and a table whose
partitions are not loaded answers no rows. Floci read the table's whole
location with Hive partitioning instead: a folder no partition names
was read, a dropped partition's files still were, and a partition at a
location outside the table's, or in a non-Hive layout, was not.
- A Hive table with partition keys and no partition projection
(GlueTableResolver.readsRegisteredPartitions) is read through the
registered partitions holding data, each at its storage descriptor's
location or <table location>/key=value/... for one that gives none
(AthenaHiveDdlExecutor.defaultLocation).
- They are read together (registeredPartitionsSelect): one read of every
partition's location, columns matched by name, so a partition written
before a column was added reads NULL for it, each row joined by its
file's path to a VALUES row of its partition's location and values,
cast to the keys' types. Hive's __HIVE_DEFAULT_PARTITION__ is NULL,
and a value the type cannot hold fails the query with Athena's
HIVE_INVALID_PARTITION_VALUE.
- One listing of the table's location tells which partitions under it
hold data; one elsewhere is listed on its own. The view is built once
per batch for the qualified and unqualified views.
- A partition that does not give one value for each key, which Glue
refuses on AWS, is skipped. No partition holding data answers no rows,
typed as the declared columns.
AthenaDelimitedTextSidecarIntegrationTest reads a partition at its
default folder and one outside the table's location, skips an
unregistered folder, answers no rows with none registered, and fails a
date key holding 'soon' with HIVE_INVALID_PARTITION_VALUE; it fails
without this change. GlueViewDdlBuilderTest covers the view, typed keys,
Hive's default partition, a Parquet read by name, a skipped malformed
partition and the single listing. athena.md says so.
Since #8529 the generated request resources give Glue's types
aws:ResourceTag/ keys, but no StoredResourceArns answered for the glue
namespace, so a condition on a job's, a connection's or a registry's
tags saw none. GlueStoredResourceArns now answers storedTags from
GlueService.storedTags: a schema registry's or a schema's tags from the
schema registry, any other resource's from the tags applied to its ARN,
which Glue drops when it deletes the resource, each read in the account
and Region the ARN names, a pre-multi-account entry of the default
account in place, through AccountAwareStorageBackend.readInAccount.
Only string values are taken, as TagResource keeps the request's map
as given. Deleting a table or a user-defined function, directly or with
its database, now drops the tags applied to its ARN as Glue's other
deletes do, so one recreated under the same name starts with none.
Tagging a resource through the shared tag store now puts a new tag map
in place of the old one, so the lookup always copies one whole set.
Deleting an EKS add-on or Fargate profile now keeps only its ARN for
IAM authorization, keyed by the cluster's incarnation, so a deletion
waiter with a resource-scoped describe grant receives
ResourceNotFoundException instead of AccessDeniedException, while an
unrelated grant or an explicit deny still gets 403. Describe and list
still report the resource as gone, recreation clears the kept ARN and
cluster deletion purges it. Resource tags are not kept.
Closes#8494
ModifyNetworkInterfaceAttribute was not implemented, so a call to change
an interface's security groups, description, source/destination check
or DeleteOnTermination was refused, and with security-group enforcement
on an interface's groups could only change through ModifyInstanceAttribute.
The action now changes a standalone interface or one an instance was
launched with. The group list is read as SecurityGroupId.N, the name the
SDKs and the CLI send. On an instance's primary interface the groups and
the source/destination check are the instance's too. With enforcement
on, a group change reaches the interface's firewall before it is stored,
under the instance's lock, as ModifyInstanceAttribute does, so a policy
that cannot be applied leaves the groups as they were, and the ports the
instance's groups publish are reconciled after a primary-interface change.
The change re-checks the interface and its attachment in the critical
section that stores it, and AttachNetworkInterface and
DetachNetworkInterface now update the standalone record and the instance's
copy under the same topology lock.
ModifyInstanceAttribute no longer overwrites every interface's groups: on
an instance with more than one interface, a group or SourceDestCheck change
answers InvalidInstanceID ("There are multiple interfaces attached to
instance ... Please specify an interface ID for the operation instead."),
the code and message AWS returns, as the Terraform AWS provider quotes them.
The members Floci does not apply (EnablePrimaryIpv6, EnaSrdSpecification,
ConnectionTrackingSpecification, AssociatePublicIpAddress,
AssociatedSubnetIds and the attachment's ENA queue counts) answer
UnsupportedOperation, as ReplaceRoute refuses a target it cannot store,
rather than true with nothing changed.
Part of #2564.
Athena answers a table whose S3 location holds no data with no rows.
Floci's view read the location with DuckDB's read_* glob, which refuses
to bind when nothing matches, so every query on such a table failed.
- GlueViewDdlBuilder checks the location a table is read from (its read
path, so a projected table's partition folders) before building its
view. One that holds no data gets a view of no rows with the table's
declared columns as their declared types (GlueTableResolver
.emptyProjection), nested and binary columns as the engine reads them
(columnType: array<T> as T[], map, struct, binary as BLOB).
- TableLocation.holdsNoData lists the location in one scan: folder
markers (keys ending in a slash) hold no data, and a read path with
`*` segments is listed from its literal prefix, an object counting
when its key matches the glob. A location holding another glob
character, or whose bucket does not exist, is read as before.
GlueViewDdlBuilderTest covers an empty location, one holding only
folder markers, a projected location holding only objects its glob does
not reach, nested and binary column types, an unmodeled glob and a
missing bucket. AthenaDelimitedTextSidecarIntegrationTest
queries an empty location and a folder marker against the real engine.
athena.md says so.
The generated request resources give Lambda's function, function version
and alias, event source mapping, web function, revision and endpoint,
MicroVM image and network connector types aws:ResourceTag/ keys, but
LambdaStoredResourceArns did not answer storedTags, so a condition on
their tags saw none. It now answers from the service holding each:
LambdaService for a function, whose versions and aliases have its tags
as Lambda keeps tags on the function alone, and an event source mapping;
LambdaWebService for a web function, whose revisions and endpoints
inherit its tags; LambdaMicrovmsService for an image or a connector.
Each reads the resource under the ARN in the account and Region it
names, a pre-multi-account one of the default account in place, through
the new AccountAwareStorageBackend.readInAccount, matched on the whole
ARN. Tagging a function or a mapping now puts a new tag map in place of
the old one, so the lookup always copies one whole set.
IAM enforcement now reads RDS requests from the generated
request-resources table: all 168 RDS operations are checked on the
resources they name, from the Service Reference and pinned botocore,
so a policy scoped to a DB parameter group, proxy, snapshot or other
RDS resource applies. Stored tags of RDS and DocumentDB resources come
from the existing tag lookups for aws:ResourceTag conditions, read
only, in the ARN's own account.
Closes#8396
* fix(elbv2): apply regional ALB zone defaults with overrides
* fix(elbv2): restore legacy subnet snapshots during stack rollback
* fix(elbv2): require two ALB zones for the AWS default
* fix(elbv2): simplify explicit ALB zone rules
IAM enforcement now reads an event bus's or rule's stored tags for
aws:ResourceTag conditions, from the exact ARN's account, Region and
partition, without creating the default bus. ListTagsForResource,
TagResource and UntagResource share the same lookup.
Closes#8397
CreateDBInstance and ModifyDBInstance now check that every security
group a request names exists in the caller's account and Region and sits
in the instance's VPC, refusing an unknown id with InvalidParameterValue
and a group of another VPC with InvalidParameterCombination. Restores,
read replicas, Blue/Green deployments and CloudFormation go through the
same check, and DocumentDB shares it. An instance whose request names no
groups gets its VPC's default security group, as RDS documents, and
describe reports that group for an instance that keeps none.
Floci had no emr-containers service, so Airflow's EmrContainerOperator, the
aws emr-containers CLI and the SDKs had nothing to call. This adds its 25
operations: virtual clusters, job runs, job templates, managed endpoints,
security configurations and tags.
Job runs follow the job run states without running Spark on Kubernetes: a
run completes as soon as it is submitted, or after
floci.services.emrcontainers.job-run-duration-seconds. When Floci's EKS has
no cluster of the virtual cluster's container provider id, the run is FAILED
with "Cluster <id> does not exist." and CLUSTER_UNAVAILABLE, as AWS's "Common
errors when running jobs" page gives it; that page also gives the wording for
a job run on a missing or non-RUNNING virtual cluster. A job template's
${name} placeholders are filled from jobTemplateParameters or the parameter's
default. Deleting a virtual cluster clears its tags, as the development guide
says, only resources in an active state of the request's Region take tags,
and a job run's template and request tags together keep the 50-tag limit. A
virtual cluster created on an EKS cluster whose authenticationMode admits
access entries is access entry integrated, which ListVirtualClusters'
eksAccessEntryIntegrated filters on.
Every request is checked against botocore's emr-containers constraints,
vendored by tools/aws/regen_emr_containers_shapes.py and gated by make
aws-data-check. Routes sit under a signed-service prefix, so a path-style S3
request for a bucket named virtualclusters still reaches S3. The routes are
added to IAM's REST route table, and emr-containers to the IAM generators'
namespaces, so each operation is checked on the resource its path names,
StartJobRun and CreateManagedEndpoint need iam:PassRole on their
executionRoleArn, and the create operations need emr-containers:TagResource
for their tags, all from AWS's Service Reference.
No botocore model describes AWS Glue's Iceberg REST endpoint, so no
vendored route mapped its paths to an action, and the endpoint refused
every IAM principal under enforcement, letting only root credentials
and Floci's own query engine through.
- regen_rest_routes.py reads an endpoint botocore does not model from
the AWS page documenting it (DOCUMENTED): Glue's "REST APIs for Apache
Iceberg specifications" gives each operation's REST path, IAM action,
CloudTrail event and a link to its definition in the Apache Iceberg
REST catalog OpenAPI specification. Each row of the Iceberg REST
Catalog API is the Glue operation its IAM action and CloudTrail event
name, refused when they differ, on the method and path of the
definition it links, under the root and the catalogs/{catalog} prefix
the page's path gives. Rows of one operation are its route and its
alternatives. Where the page's own path differs from the definition
(DeleteNamespace's "namespces", CreateTable's GET), the definition is
taken and the difference recorded. Nothing is typed by hand.
- Reading the page needs the network, so a regeneration carries the
routes over from the vendored file, --fetch-documented reads them
again, and --verify checks them against the page;
documented-routes-verify runs in iam-data-verify.
- rest-routes.json gains the endpoint's ten Glue operations under the
glue scope, and iam-authorized-actions.json lists glue's actions of
no resource type, as it does for every routed scope. The same
regeneration takes the actions AWS has added since: GuardDuty's
ListInvestigationRecords and Route 53's IP guardrail policy actions.
- The controller's refusal of IAM principals goes. Each route is now
checked as its Glue operation, on the account's Data Catalog whichever
catalog the prefix names: the request-resource table reads no Glue
member from an Iceberg request, so a grant or deny scoped to a
federated catalog, a database or a table does not apply here.
Floci's own engine's token is not checked again.
- A request a documented route takes is another API's, so it carries
none of its operation's members: the enforcement filter has every
member reader (request resources, condition keys, tag-on-create,
passed roles) read none from it, so a Glue member a caller adds to an
Iceberg body, such as Tags or DatabaseInput, names no resource and
gives no condition key a value.
GlueIcebergIamIntegrationTest checks a principal allowed GetCatalog and
GetDatabase reading the configuration and the namespaces and refused
creating a namespace or loading a table, by GET or HEAD, a deny on the
catalog holding under an allow on everything, and root credentials and
a minted token answered, and a Glue member added to an Iceberg body
neither satisfying an aws:RequestTag condition nor naming a database.
glue.md and iam.md say so.
Under enforcement, the identity that owns a delegation request was denied every
operation on it unless a policy named them, so a customer who claimed a request
could not read it, forward it, reject it or release its token without being
granted each one. AWS grants those by default. The customer page's note, under
"Managing Permissions for Delegation Requests", reads "By default, IAM
principals who initiate a delegation request are automatically granted
permissions to manage that specific request. They can associate it with their
account, view request details, reject a request, forward it to an administrator
for approval, release the exchange token to the product provider after admin
approval, and list delegation requests that they own."
So the holder now carries a grant over the requests it owns:
GetDelegationRequest with GetHumanReadableSummary, UpdateDelegationRequest,
which is the forward, RejectDelegationRequest and SendDelegationToken on those
requests, and ListDelegationRequests. The summary sits beside the read because
the reference puts it there itself: its "rules are identical to
GetDelegationRequest API behavior, such that a party who has permissions to call
GetDelegationRequest for a given delegation request will always be able to
retrieve the human readable summary for that request".
Listing names no resource, the Service Reference giving that action none, and is
scoped by the condition key the same reference publishes on it:
iam:DelegationRequestOwner, under ArnEquals, held to the owner's own ARN. That
is the line the guide draws between its two listing permissions, the table's
"List delegation requests for your account", which an administrator grants, and
the note's "list delegation requests that they own", which an owner has without
one. So an owner names itself in OwnerId and is answered with its own requests,
while naming another owner, or naming none, is refused, and the account's whole
listing stays with the granted permission. The key is read from the request's
OwnerId member through the IAM condition-key table, which names the member for
the pair so that the table's own gates re-derive it. The seven other delegation
actions the reference lists that key on take its value from the stored request
rather than from a parameter, so they stay unread.
The grant reaches whoever claimed the request, user or role session alike:
AssociateDelegationRequest stores "the ARN of the current calling identity", so
a session is recorded under its own assumed-role ARN and is looked up by that
rather than by the role it assumed. It is read where an identity's policies are
assembled, beside the password self-service grant that works the same way, so a
live request, a simulation and the user's access report all see it.
That lookup runs wherever policies are assembled, so on every authorized
request and not only on a delegation one. It answers an empty store without
reading it, and otherwise from a view of who owns what that one scan builds and
any stored write invalidates whole, so the usual answer costs a lookup rather
than a scan of every record in every account. Invalidating the view whole is
what keeps it true: nothing updates it in place, so a claim, an expiry and a
reload all land the same way. An emulator reset wipes the backend without a
request passing through that one method, so the service is Resettable and drops
the view in clear(), which makes the invariant a hook rather than a
coincidence of the store being empty afterwards.
Two abilities the note names are left out, each for its own reason. Approving is
not implicit: the same page lists iam:AcceptDelegationRequest among the
permissions an administrator grants, which is the step the flow keeps for one.
Associating cannot be granted here at all, because a request records no owner
until it is claimed, so before the claim there is no identity to write a grant
for; the claim still needs a permission and everything after it does not.
The ownership itself comes through a port rather than a new dependency:
DelegationRequestOwnership, implemented by DelegationRequestService and asked by
IamService, which is how ScpProvider and ResourcePolicyProvider are declared so
that IAM does not reach into another store.
Glue was one of the namespaces the table of request resources did not
read yet, so under enforcement every Glue request was checked on *: a
grant scoped to one database or table could not allow anything, and a
deny scoped to one did not hold.
- Glue moves from NOT_COVERED to NAMESPACES and the generator reads all
314 of its operations. A table operation is checked on the account's
Data Catalog, the database and the table, the three types the Service
Reference gives glue:GetTable and its kin; a database operation on the
catalog and the database; jobs, crawlers, triggers, workflows and
connections on the ARNs Glue mints for them.
- Where a Glue request names its resources in ways the generator did not
read yet, its rules read a little further, each from botocore alone:
Input and List drop from a member's stem as Config and plurals do
(DatabaseInput.Name, ConnectionNameList); a list whose own list shape
is named for the type's names fills it (BatchDeleteTable's
TablesToDelete, a BatchDeleteTableNameList); "being" ends a type's name
in documentation (GetWorkflowRun's Name, "name of the workflow being
run"); a type of no variables of its own, the account's catalog, is no
longer dropped as an alternative to the unnamed type a create makes;
and a create whose request carries tags and whose action acts on other
types alone tags the resource it makes when the request names it in
full (CreateConnection's tags on connection/<ConnectionInput.Name>),
which the table reader now accepts.
- Outside Glue those rules change four entries: Redshift's
BatchModifyClusterSnapshots is checked on the snapshots its
SnapshotIdentifierList names instead of *, and EventBridge's
CreateEventSource and QuickSight's CreateDataSet and CreateTopic gain
a makes that changes nothing at runtime. Every other entry is
unchanged.
- What the table does not read stays as the metadata gives it: a
CatalogId is not read, so another account's or a federated catalog is
checked on the caller's account's ARNs, and a schema named by its
registry and name on schema/<SchemaName>, the Service Reference's
format, whose botocore pattern takes no slash.
IamRequestResourceEnforcementIntegrationTest checks a table on the
catalog, its database and itself, a database and a job on the ARNs Glue
gives them, a deny on one table or connection holding inside a batch
delete, a database's creation on its DatabaseInput.Name, a connection's
tags on its ConnectionInput.Name, and a workflow run on its workflow.
The generator's tests cover each rule; iam.md says so.
The embedded DNS server only started when Floci ran in Docker, so a
natively running Floci left <service>.<namespace>, Route 53 private
zone records and its own names unresolvable, both for the containers it
launches and for the host.
Natively it now starts up to two listeners. On a host with a docker0
bridge it listens on that bridge's address, port 53, the address
host-gateway points at, and hands it to the containers it launches as
their resolver, as it does from Docker. Port 53 needs root or
CAP_NET_BIND_SERVICE; without it Floci logs how to grant it and the
containers keep resolving through Docker. floci.dns.bridge-listener-enabled
turns it off. With floci.dns.host-port set it also listens on 127.0.0.1
at that port for the host's own resolver; that listener is never handed
to containers, and it refuses names Floci does not hold rather than
forwarding them, so a host resolver that routes a domain to Floci cannot
get a lookup back. Each listener answers Floci's own names with its own
address.
Startup now waits, up to five seconds, for the listener containers are
given to bind or fail, in Docker as well as natively, so a container
launched right after startup is not created without Floci's resolver.
Closes#2556
EMR Serverless resolves a custom image's digest either for each workload
or once, at the application's start: "Custom images are resolved to a
digest at application start; that digest is used for all jobs until the
application restarts". The user guide's table makes that the default for
EMR 7.13 and earlier (applicationLevelDigestResolution = true) and
resolution per workload the default from 7.14. Floci resolved every
custom image for each run, whatever the release or the setting.
Where an image configuration's applicationLevelDigestResolution is true,
or left unset on 7.13 or earlier, the application now reads the digest
of its image in Floci's ECR as it starts, gives it to the image
configuration as its resolvedImageDigest, and each run pulls the image by
that digest until the application starts again, an update meanwhile
notwithstanding; a job run's image configurations carry it. An image
outside ECR, or one Floci's ECR does not hold, has no digest to read and
is resolved for each run, as before, as is one in another account's
repository, which Floci does not check the application may pull; any
other answer from Floci's ECR fails the start, leaving the application
as it was. An update that turns a running application's image to
resolution per workload ends its pin, and a stopped application reports
no digest. EcrRegistryManager gains ecrImage, the repository and the tag
or digest an image URI names.