The request-resources generator kept eight hand-written tables beside
its rules. Seven now come from botocore and the Service Reference, and
the eighth keeps only Floci's own coverage:
- CLIENTS_NOT_READ goes: reading Kinesis Data Analytics v1's client as
well changes no operation.
- MINTED_IDS: botocore's <Type>Arn pattern takes one more path segment
past a format that ends in a name (EventBridge's connections and API
destinations).
- UNQUALIFIED: the reference gives types whose formats are a type's and
one more :${...}, which no action acts on (Step Functions' alias and
version), or botocore documents a member as "name:<selector>"
(Parameter Store's Name).
- QUALIFIED_MEMBERS: botocore's shape takes an alias as well as the
type's ARN (Payment Cryptography's KeyArnOrKeyAliasType).
- FOUND_BY: botocore documents a type's key ("Scalable targets are
uniquely identified by the combination of resource ID, scalable
dimension, and namespace"), or a member names a type whose id no
request of the namespace gives (Redshift Serverless names, the Data
API's WorkgroupName); a keyed type is never filled from members.
- THROUGH: botocore's record of a thing the reference gives no type
holds its id beside members named after types (the Data API's
SessionData holds SessionId, ClusterIdentifier and WorkgroupName).
- ID_TARGETS keeps its coverage, EC2's instances; the id prefix comes
from botocore's documentation ("the instance ID (for example,
i-0123456789abcdef0)") and the list of resources from member shapes.
READ_IN_HAND_BUILT goes with CloudWatch Logs read whole, next.
The table changes only where the rules read more than the tables gave:
through entries for Athena query executions, named queries and
notebooks (their workgroup), CodePipeline executions, Cognito managed
login branding and terms, ECR layer uploads and an OpenSearch
migration, which no service answers yet, so no check changes;
QuickSight custom permissions and policy assignments found by name, as
their creates are; duplicate finds collapsed. Eight EC2 operations AWS
has since added are read.
Under IAM enforcement, these tasks are now authorized as the execution role, or as the Credentials role a state names. ECS runTask, in all its forms, is checked on the task definition revision it would run, so a family and the revision it stands for are the same resource. The ECS SDK tasks are checked on the service ECS would act on or describe, and listServices on any resource. Each EMR and EMR Serverless API is checked on its cluster, application or job run under its IAM action, and a ByName API needs the list it makes as well as the modify. createCluster and createApplication have no resource type, so they are checked on any resource.
A .sync task needs its starting call alone, so a job cannot fail mid-wait for lack of a Describe permission. A request naming nothing it can reach is left to its service, and a form an integration does not serve stays unsupported. With enforcement off nothing changes.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
DeleteFunction answered 204 for every function. AWS answers 202 with {}
when it deletes a durable function or a published version of one, and
Floci now does the same. A plain function and a missing version still
answer 204.
The policy evaluator defaulted a statement's Effect to Allow, so a statement
that named none granted what it described. The IAM guide says the element "is
required and specifies whether the statement results in an allow or an explicit
deny" and that "valid values for Effect are Allow and Deny", so a statement
naming neither describes no permission, and a document that describes no
permission is not a document that grants one. A resource policy whose statement
named a principal and an action but no effect allowed that call, and so did a
session policy, a service control policy and an identity policy: a statement is
held to naming an action and a resource when a document is stored, not to naming
an effect, so such a document is kept as written and was then read as a grant.
A statement names one of the two effects the policy language defines or it names
none, and one that names none states nothing. An Effect that is absent, that is
not a string, or that is some other word is read as neither now: the statement
grants nothing, denies nothing, and the request is decided by the rest of the
document. That is already this package's reading of a role trust policy, where a
statement whose Effect names neither effect matches nothing.
The service list behind GetOrganizationsAccessReport read the same default the
other way round. Walking the service control policy levels, every statement that
was not a Deny was counted as an allow, so a statement naming no effect, or
naming some word that is neither, left a service reachable through a statement
that permits nothing. Only an Allow counts there.
No document is held to a shape here: what is stored is read exactly as it was,
and this changes only what reading it comes to.
* feat(redshift): map Redshift IAM credentials to PostgreSQL roles
* docs(redshift): document IAM database identity for Redshift services
* fix(redshift): harden Redshift IAM role handover and DbGroups lifecycle
* fix(redshift): grant public schema usage on auto-create and resolve latest credential
* fix(redshift): log in as the IAM-derived role so PostgreSQL blocks the switch back
* fix(redshift): restore the role's own password once the backend login completes
* chore(redshift): write the password tracker lock comment in English
A cluster whose bootstrap action failed in the docker runner mode ended with
BOOTSTRAP_FAILURE and AWS's message, but DescribeCluster and ListClusters gave
no Status.ErrorDetails, which the Management Guide's error code pages point to
for the failed action, its return code and its script.
- An action that exits with another code than 0 gives
BOOTSTRAP_FAILURE_PRIMARY_WITH_NON_ZERO_CODE, with the ErrorData keys its page
lists: primary-instance-id, bootstrap-action, return-code, amazon-s3-path and
public-doc. A script that cannot be read gives
BOOTSTRAP_FAILURE_BA_DOWNLOAD_FAILED_PRIMARY, with the same keys but
return-code. ErrorData is a list of maps and no source shows how AWS spreads
the keys over them: Floci gives one map holding them all. ErrorMessage is the
reason's message and the error code's page, in Floci's words.
- A bootstrap that cannot run at all, or that Floci stopped, ends with
INTERNAL_ERROR as before and has no ErrorDetails: no documented code fits.
- The details are stored with the cluster, so they survive a restart with
persistent storage, and emr.md says what Floci gives.
The RDS engine-version test opened its connections through DriverManager,
which hands out only a driver the caller's class loader can see. After a
Quarkus restart the driver registered earlier belongs to another loader, so
whenever a shard ran the test after an application of another profile it
failed with "No suitable driver found", as main's shard 2 did at
01d61afd8a. It now loads PgJDBC through its own loader first, as the
blue/green and managed-password rotation tests do.
CreateStack answers before its execution ends, so the two rollback tests
that read ROLLBACK_COMPLETE right after creating the stack raced it; the
nested-stack one saw CREATE_IN_PROGRESS in main's shard 5 at 01d61afd8a.
Both now wait for the status with the class's awaitStackStatus.
Repositories can already declare up to 10 same-domain upstream repositories
via CreateRepository/UpdateRepository, but nothing ever consulted that list:
a native package-manager request for a version missing locally 404ed even
when an upstream had it, and CopyPackageVersions's includeFromUpstream flag
was accepted on the wire but documented as a no-op.
Adds a shared, cycle-safe breadth-first resolver over the upstreams graph
(UpstreamRepositoryResolver), reused by validateUpstreams (now rejecting
transitive cycles, not just direct self-reference, with an independent
uncapped reachability check so a cycle whose closing edge sits beyond the
resolution search cap still gets caught), by four new per-format importers
(Maven/npm/pypi/NuGet) wired into each native controller's existing "local
miss" hook, and by CopyPackageVersions's includeFromUpstream flag for both
generic and container-backed formats.
Widens the existing external-connection claim/fence/origin machinery with a
RetentionOriginKind (EXTERNAL_CONNECTION vs UPSTREAM_REPOSITORY) so the same
mechanism now also backs same-domain retention, and wires the previously
unused INTERNAL_UPSTREAM package-group restriction type through
isUpstreamRetentionBlocked the same way EXTERNAL_UPSTREAM already was.
Each upstream-repository importer brackets every candidate it reads with the
same beginUse/endUse lease DeleteRepository's own cleanup already respects,
so a concurrent delete of a candidate can't race a read of it; resolves a
version from its real staged byte count rather than an optional, sometimes
-1 Content-Length header; and, for Maven, continues past a candidate whose
own metadata names nothing eligible instead of stopping the whole search
there, and allows SNAPSHOT versions through the metadata merge the same way
the asset path already does. pypi's candidate selection also now checks for
the exact requested filename, not just a version match, and never swallows
a sidecar read failure silently. A generic version's upstream-origin claim
is now cleared on delete, republish, or a later direct overwrite copy, so
it never keeps reporting a stale source. npm's "treat a retained version as
the package default" guard now also catches an upstream-repository claim,
not just an external-connection one.
DynamoDB refuses the whole update when a path in a SET value reads
nothing. That covers a missing attribute or map key, a path through a
scalar, a list index past the end, and an if_not_exists whose path and
fallback are both absent. It reads the operands of a sum or list_append
one by one, so the first absent operand or the first of the wrong type
gives the error. A sum operand of the wrong type gets the same message
as list_append and ADD. In TransactWriteItems both errors cancel the
transaction with a ValidationError reason.
RunInstances now stores its reservation id on each instance it launches,
and DescribeInstances groups instances by it, so the ReservationId
RunInstances answers stays the same on every call and instances launched
together are listed together. An instance Floci did not launch keeps a
stable reservation of its own, and a provider's reservation id is kept.
Closes#8255
* refactor(storage): create a host bind directory only on the Docker host, in one place
* fix(memorydb): leave the bind directory to Docker when Floci runs in a container
* test(memorydb): build each test's container manager through one helper
The invocation event's InitialExecutionState carried "NextMarker": "",
and so did the last page of GetDurableExecutionState. AWS leaves the key
out in both places, and Floci now does the same. A page with operations
left still carries NextMarker.
* feat(paymentcryptography): the TR-34 key block
* fix(paymentcryptography): the rules a TR-34 key block has to follow
* docs(paymentcryptography): what a TR-34 key block is
* test(paymentcryptography): the TR-34 round trip shows the key that came back
* test(paymentcryptography): one exchange for the TR-34 tests
* fix(paymentcryptography): the nonce and the token a TR-34 import names
* docs(paymentcryptography): the nonce and the token a TR-34 import names
* fix(paymentcryptography): a TR-34 key block is read whatever follows it
* fix(paymentcryptography): a TR-34 header carries the optional blocks
* chore(paymentcryptography): the imports of the round-trip test in order
* fix(paymentcryptography): the TR-34 header is the reference's header
* fix(paymentcryptography): the TR-34 header, stale comments
* fix(paymentcryptography): the TR-34 comments match the code
A listener kept one certificate list with its default at the head, which left
four readings of the reference unanswered. DescribeListenerCertificates names
"the default certificate and the certificate list", telling them apart by
IsDefault and naming a default the list holds as well twice, "once with
IsDefault set to true and once with IsDefault set to false", where Floci
answered one flat list and no IsDefault at all. A listener's own Certificates
member is "the default certificate for the listener", and IsDefault "is not
included in the output when describing a listener", where Floci named every
certificate the listener held there. ModifyListener replaces the default alone,
the Application Load Balancers guide saying of a default added to the
certificate list that it "is used with the SNI protocol even if it is replaced
as the default certificate", where Floci dropped the list with the replacement.
And a listener made through the API starts with an empty certificate list,
which the same guide says of every listener not made in the console.
The default and the list are two members of the listener now, with the served
set, the default first and the list behind it, derived for the data plane and
for the certificate references. A listener saved before this reads the head of
its one list as the default and the rest as its certificate list.
The member create and modify take is held to one certificate, the reference
saying of it on both operations "You must provide exactly one certificate." No
published sentence gives the code a longer list is answered with, so it is the
ValidationError this service answers a request shape with, which is Floci's
reading rather than a sentence of AWS's.
AddListenerCertificates is left taking a list. Its member reads "You can
specify one certificate per call", while the Application Load Balancers guide
adds three certificates in one call of its own, so the sentence and the example
disagree and the example is the behaviour to keep. The operation answers with
the certificate list the add leaves behind now, which is what its output member
describes, rather than with the certificates the call named.
TooManyCertificates is answered for the first time. The published quota is
"Certificates per Application Load Balancer (excluding default certificates):
25", the number DescribeAccountLimits has been reporting all along, so the
listeners of one load balancer share that ceiling, their default certificates
are left out of the count, and the add that would pass it is refused. The
ceiling is the load balancer's rather than the listener's, so it is counted
where the write is made, under the lock a listener's certificate write takes:
two adds on sibling listeners would otherwise each count the other's list as it
stood before the other wrote and pass it together. Create reaches no quota, a
default certificate not being counted, and modify reaches it through its
default alone, a default the certificate list holds as well not being counted
while it is the default, so replacing it starts counting that entry. The number
in hand is the Application Load Balancer one, and a TLS listener on a Network
Load Balancer is held to the same ceiling, which is Floci's reading rather than
a published number of its own.
Removing a default certificate the certificate list holds as well stays
refused: "You can't remove the default certificate for a listener" names no
exception for that case.
The request-resources generator carried 106 CORRECTIONS over 22
namespaces, each a hand-written entry for one operation. They are gone,
and no Floci service states what an operation acts on either: a service
only looks up what it holds where an entry asks it to. Every operation
the corrections covered is now read from botocore's shapes and
documentation and the Service Reference, or, in two places, from a fix
to the handler whose behavior the correction worked around.
One table stays stated by hand, MEASURED, for what AWS was measured to
check where neither botocore nor the Service Reference says it. The
generator admits an entry only when it links to its measurement, names
types the reference does not list for the action, and gives what the
rules do not; review admits only real AWS evidence. It holds DynamoDB
ListTables, on table/* (#7336's probes and AWS's recorded denial), and
Step Functions SendTaskSuccess, SendTaskFailure and SendTaskHeartbeat,
on the token's activity or state machine (#7277's probes and AWS's
recorded denial). The generator's older hand tables (FOUND_BY, THROUGH,
MINTED_IDS, UNQUALIFIED, QUALIFIED_MEMBERS, ID_TARGETS,
CLIENTS_NOT_READ, READ_IN_HAND_BUILT) are unchanged.
Generator rules: documentation naming the type fills it when it says the
member is a name or an id as the variable is; an ARN head noun, or a
name ending in ArnList, makes an ARN member; fields of a top-level
structure and of the structures in a map are members; the id a create
answers beside another type's ARN is that type's (RunJobFlow's JobFlowId
and ClusterArn); an account-id member fills AccountId; a qualified
member fills first, and a ResourceId variable is the type's own id,
filled by a member named ResourceId before one named after the type. An
ARN member whose pattern names another service, or which its
documentation gives as the ARN of another type of the service, is not
read unless named after a type the action acts on. Each SDK client's
model is read apart, resources the clients disagree on carry their
endpoint, and a v2 load balancer's type is picked by its Type enum and
documented default. A variable no member fills is fixed to the one
value of an enum named after it that the operation's name gives
(CodePipeline's Custom action type owner), and a type named only by an
optional member documented as holding what the operation is about is
reached through that thing when the member is left out (EMR's
ModifyInstanceGroups, through its instance groups).
Reader and service changes: a member left out, or a JSON null, names
the service's default where it has one (Athena's primary workgroup and
AwsDataCatalog, EventBridge's default bus, per PutEvents entry); two
types whose formats differ by one variable are told apart by whether the
member names that default (EventBridge rules); a name for an id variable
is found by the service (Rekognition stream processors, Logs
deliveries); a bare id of the type an operation is about reaches the
acted-on type through its service (the project CodeBuild holds a build
under, the delivery destinations of the source a Logs
DeleteDeliverySource deletes). A member given a JSON null names nothing,
as the handlers read it, wherever the reader fills a variable from it,
so an EMR ClusterId or an IAM Identity Center TargetId of null no
longer names cluster/null or account/null. The table no longer has
absent or before, and the reader refuses a resource key it does not
know.
Checks that change where the old correction had no evidence of AWS
behind it: a Step Functions Local <stateMachineArn>#<test case> is
checked as given; Macie CreateMember on member/*; IAM Identity Center
ProvisionPermissionSet for ALL_PROVISIONED_ACCOUNTS on its instance and
permission set alone, the request-scoped account pinning that served the
account check removed; Logs DeleteDeliverySource on its delivery
destinations; a CodeBuild build id of no build Floci holds on *.
Handler fixes: Athena's ListDatabases, ListTableMetadata and
GetTableMetadata read Glue whichever catalog was named, so they were
also checked on AwsDataCatalog. They now refuse a catalog whose metadata
is not the account's Glue Data Catalog with MetadataException and are
checked on the catalog they name. Cost Explorer's cost reads ignored
BillingViewArn, so they were checked on *. They now answer the primary
billing view alone, refuse another with ResourceNotFoundException, and
are checked on the view they name.
The passed-roles table had drifted from the Service Reference and is
regenerated. AWS now passes CreateTrainingSession's role to
training-session.sagemaker alone, so its RoleArn is read rather than
left unread for naming two services, and AWS lists Secrets Manager's new
AssociateCrossAccountReplica, which the pinned botocore does not model
yet. The generator now leaves an operation no pinned model has unread on
its own, until a bump brings it in, in place of a hand-written entry for
each, so the two there were are gone.
The tag-on-create table had drifted too: AWS no longer lists a tagging
action for Network Firewall's CreateProxy, CreateProxyConfiguration and
CreateProxyRuleGroup, and lists five operations the pinned botocore
does not model yet. It is regenerated.
Floci listed every operation in the invocation event and in
GetDurableExecutionState. AWS leaves out the operations under a child
context closed without ReplayChildren=true, and everything below them.
Both now use one filtered view, and a context closed without
ContextOptions shows ReplayChildren: false. The checkpoint answer is
unchanged.
DescribeTargetHealth checked a Targets filter against the registered
targets by comparing the Id and effective port itself. It now uses
ElbV2HealthChecker.sameTarget, as RegisterTargets and DeregisterTargets
do since #8199, so all three tell registrations apart the same way.
No behaviour change.
With floci.docker.image-registry-base set, ContainerBuilder.resolveImage put
the base in front of every image, so an ECR image Floci had rewritten to its
loopback registry (localhost:<port>/<account>/<region>/<repo>), or a
repositoryUri it handed out, became <base>/localhost:<port>/...: a reference
Docker refuses, and no image a mirror holds. An ECS task, an image-backed
Lambda function or an EMR Serverless application with a custom image could not
run from Floci's ECR with the base set.
- An image in a registry on the Docker host's loopback (localhost, a
.localhost name, Floci's localhost.floci.io alias or a loopback address in
any spelling, checked with NetworkExposureGuard.isLoopback, with or without
a port) is launched as it is; every other image still goes under the base.
- The setting's Javadoc, its environment variable row and the ECR page say so.
CreateVolume, DeleteVolume, AttachVolume, DetachVolume, CreateTags and
DeleteTags ignored DryRun=true and carried out the request. The AWS EBS
CSI driver's controller sends a dry run CreateVolume, tagged
CSIVolumeName=IopsLimitDryRun, every time it starts in order to probe
the IOPS limits. AWS answers it with DryRunOperation and creates nothing,
while Floci created a real 4 GiB volume, with its backing file, on every
restart. A dry run DeleteVolume really deleted the volume.
Each of these calls now runs the checks its real path makes and then
answers DryRunOperation (HTTP 412) without changing anything, the
convention ModifyVolume already follows. CreateVolume answers once its
parameters and tag specification are read. DeleteVolume first requires
the volume to exist and be detached. AttachVolume requires the volume,
the instance, its state, the Availability Zone and the device to pass.
DetachVolume requires the attachment to match and the root device rules
to allow it. CreateTags checks the ids, the keys, the lengths, that each
resource exists and the per-resource limit. DeleteTags checks the ids
and the keys. No backing device is created, deleted, attached or
detached by a dry run.
Every handler read of DryRun goes through dryRun(p), which refuses a blank
or non-boolean value with InvalidParameterValue, as DeleteSecurityGroup and
DeleteLaunchTemplateVersions already did by hand; both now use it, and
checkDryRun sits on it. Every DryRunOperation comes from
Ec2Service.dryRunOperation().
Tests: a DryRun value that is not a boolean is refused on the six volume
and tag calls; under IAM enforcement a dry run needs the caller's current
permission. AwsSdkErrors.assertAwsError replaces the copies the route and
S3 enforcement tests kept.
* feat(ssm): generate the IAM request resources for SSM
* test(ssm): enforce IAM on parameter reads, deletes and tagging
* refactor(ssm): derive the SSM request resources without corrections
* fix(iam): read a Parameter Store name as its parameter's ARN holds it
* fix(ssm): refuse tagging a resource type other than a parameter
* test(ssm): read an unslashed parameter by its ARN under a grant on it
* test(iam): expect ssm parameter in the vendored unqualified types
* fix(ssm): keep tagging documents and associations
* refactor(iam): drop the SSM operations read in the hand-built namespaces
* chore(iam): resync Route 53 record set protection resource types
* fix(cur): check every request against the model's constraints
* fix(cur): refuse report names the emitter cannot write to S3
* test(iam): modify a report definition with a billing view ARN the model accepts
In a pool with UsernameAttributes the challenge sessions keep the user's own
username (the sub), while the user signs in with, and answers with, the email.
NEW_PASSWORD_REQUIRED, MFA_SETUP, SOFTWARE_TOKEN_MFA and the SMS and email MFA
codes compared USERNAME with that stored sub, so a response that carried the
email was rejected with "Invalid session for the user." or "Session does not
match user".
The AWS Developer Guide ("Working with user attributes") says that with
username attributes the email address or phone number can be used in place of
the username in all APIs except ListUsers. Only the SRP password verifier is
documented to need USER_ID_FOR_SRP (AdminInitiateAuth ChallengeParameters), so
the SRP paths stay as they are.
isSessionUser first compares the sign-in keys, so a pool without aliases and
its case sensitivity behave as before. Only when they differ is the supplied
value resolved to its user and compared with the user of the session, which is
what the custom-auth challenges already do. The alias of another user is still
rejected.
Tests: CognitoAliasMfaIntegrationTest covers TOTP (MFA_SETUP and
SOFTWARE_TOKEN_MFA), SMS MFA and NEW_PASSWORD_REQUIRED in an alias pool, each
with a response for another user that must be rejected. docs/services/cognito.md
lists the behaviour next to the custom-auth rule.
applyNewPasswordAttributes read the user back with the USERNAME of the
response. That value can now be the email the user signed in with, so a
userAttributes.email in the same response made it stop naming the user once
the attribute was applied. The password had been changed and the session
consumed by then, and the response failed with UserNotFoundException without
a way to retry. It now takes the username of the user from the session. The
custom-auth challenge, which already accepted the alias, gets the same.
isSessionUser also looked up the username of the session. Every session holds
the username of its user already, and adminGetUser scans the pool, so that
lookup was a second scan for nothing. The supplied value is resolved once and
compared with the username of the session.
The new test answers NEW_PASSWORD_REQUIRED with the email and a new email,
then signs in with the new one.
validateCustomUsername and the CUSTOM_CHALLENGE check now use isSessionUser,
so a single check decides whether a USERNAME names the session's user.
Move latestSms into CognitoRestAssuredUtils and share it between the
alias and message MFA tests.
Closes#8228
The pre token generation event always carried
groupConfiguration.iamRolesToOverride = [] and preferredRole = null, so a
trigger that reads the role Cognito computed for the user (to copy it into
the access token, for instance) got nothing. AWS fills both from the
user's groups: every group role, and the role of the lowest-precedence
group that has one, none when groups tied at that rank name different
roles.
Build groupConfiguration after checking that the pool has a pre token
generation trigger, read the pool's groups once instead of once per
membership, sort the test imports, and pin that a group without a role
does not outrank one with a role.
Closes#8222
A template can now create the three EFS types. They are provisioned
through EfsService, so a stack and a direct API call see the same
file systems, mount targets and access points.
- Ref and Fn::GetAtt resolve for every type.
- Updates change ThroughputMode, ProvisionedThroughputInMibps,
BackupPolicy, LifecyclePolicies, FileSystemPolicy,
FileSystemProtection and tags in place; create-only properties
replace the resource, and a failed update puts back what it changed.
- Backups are off on create unless BackupPolicy is ENABLED or the file
system is One Zone, and ThroughputMode provisioned requires
ProvisionedThroughputInMibps.
- Required properties are validated from the registry schema.
Ref #7972
* fix(verifiedpermissions): accept tokens issued by Floci's own Cognito pools
* fix(verifiedpermissions): verify emulated pool tokens with Cognito's own check
Authorize generated instance targets with their own stored tags before mutation. Return malformed Query errors as XML HTTP 404, reuse enforcement group cleanup, and update generated-target regression coverage. Regenerate IAM metadata on current main.
Closes#8159
* fix(ses): validate the topic in SetIdentityNotificationTopic
* test(ses): share the SNS topic helpers in the notification topic test
* refactor(ses): build the notificationType enum violation with the shared helper