* feat(eventbridge): create partner event buses from EventSourceName
CreateEventBus and AWS::Events::EventBus now accept EventSourceName. The
bus takes the source's name, so Name must equal it and must match
aws.partner/<partner>/<source>. Floci does not model partner event
sources, so any well-formed source name is accepted without one being
created or activated first.
A partner bus name contains slashes, so rule lookups for a bus no longer
match the rules of a bus nested under its name, and a rule ARN on a
partner bus resolves its bus and rule name from the last slash.
* test(eventbridge): cover partner event buses
Covers creating a partner bus from its EventSourceName, a name that
differs from the source or is not a partner name, rules, targets, tags
and PutEvents on the bus by name and by ARN, nested partner buses
keeping their rules apart, deletion, and the CloudFormation resource.
* refactor(eventbridge): resolve rule ARNs from the first slash again
ruleKey joins the bus and rule name with a slash, so splitting a rule
ARN at the first or the last slash finds the same stored rule. The
original split is kept, and the test that only exercised the changed
split goes with it; tagging a rule on a custom bus by ARN stays covered
by the existing tag tests.
* fix(eventbridge): validate rule names in PutRule
PutRule accepted any name, so a name holding a slash was stored under a
key that ListRules, PutEvents and DeleteEventBus no longer treat as a
rule of that bus, and could collide with a rule on a nested partner bus.
Rule names now match [\.\-_A-Za-z0-9]+ and are at most 64 characters,
as AWS models them, and a missing or out-of-pattern name fails with
ValidationException. The CloudFormation AWS::Events::Rule resource
creates its rule through the same PutRule path.
* fix(cloudformation): reject a Policy or malformed source on a partner event bus
An AWS::Events::EventBus with EventSourceName now checks the source name
against aws.partner/<partner>/<source> in the provisioner, so a
malformed one fails with ValidationError like the resource's other
checks rather than with the service's ValidationException. A Policy
given with EventSourceName is rejected with ValidationError before the
bus is created, since Floci never applies a resource policy to a bus
whose name holds a slash.
* fix(eventbridge): answer partner and rule name violations in AWS's shape
CreateEventBus with EventSourceName and PutRule now report a bad name
the way AWS's validation layer does, through SmithyValidationErrors:
"1 validation error detected: Value '...' at 'name' failed to satisfy
constraint: ...", naming the length, pattern or missing member that
failed. A partner bus with no Name now gets the required-member error
rather than a name mismatch. The partner source pattern is one public
constant on EventBridgeService, which the CloudFormation provisioner
now uses too.
* fix(eventbridge): refuse PutPermission and RemovePermission on a partner bus
Both operations model the bus as NonPartnerEventBusName, so AWS refuses
a partner bus there. Floci stored the policy, but never applied a
resource policy to a bus whose name holds a slash, so the statement had
no effect. They now fail with ValidationException in AWS's validation
shape, and an AWS::Events::EventBusPolicy on a partner bus fails the
stack the same way.
* fix(cloudformation): let an update change a partner bus's EventSourceName
Once a bus exists its Name is fixed, and a Name change is already
refused as a replacement, so EventSourceName carries nothing more on an
update. An UpdateStack that drops, adds or changes it while keeping
Name used to be validated as if it were creating the bus and failed;
it now updates the bus in place. Whether the bus is a partner bus is
read from its name, so a Policy on one is still refused when the
template stops naming its source.
* test(eventbridge): cover nested-bus PutEvents, partner rule tags and CFN rules
PutEvents on a partner bus does not fire the rules of a bus nested under
its name, a rule on a partner bus is tagged and listed by its ARN, and
an AWS::Events::Rule names a partner bus in EventBusName and goes with
the stack.
* docs(eventbridge): note partner bus permissions, PutEvents and the rule-name upgrade
* fix(cloudformation): validate a supplied EventSourceName on an event bus update
An update that keeps the bus's Name skipped EventSourceName entirely, so
a malformed source, one that does not match Name, or one newly added to
a custom bus was accepted. When the template supplies EventSourceName it
is now checked the way creation checks it; leaving it out still updates
the bus in place.
* fix(eventbridge): let a legacy slash-named rule block DeleteEventBus
DeleteEventBus only counted rules whose name held no slash, so a bus
whose only rule was a legacy slash-named one could be deleted, orphaning
the rule; a scheduled one kept firing after a restart. Every rule stored
under the bus now blocks the delete, except the rules of an existing
nested partner bus, which share the key prefix but belong to that bus.
* fix(eventbridge): validate rule names in the rule and target operations
Only PutRule checked the rule name, so DeleteRule, EnableRule,
DisableRule, PutTargets, RemoveTargets and ListTargetsByRule took a
name like a/b and looked it up by key, which on a partner bus could
reach a rule of a nested bus. They now answer a ValidationException the
way PutRule does. A legacy slash-named rule that is stored on the bus
named in the request is still reachable by its exact name, so it can
have its targets removed and be deleted.
* refactor(eventbridge): split a rule ARN at its last slash
A rule name holds no slash, so the bus is everything before the last
one. Splitting at the first slash found the same stored rule, since the
key joins bus and rule with a slash, but left RuleRef's bus and rule
wrong for a rule on a partner bus such as
rule/aws.partner/example.com/acct/r1.
* docs(eventbridge): describe legacy slash-named rules and EventSourceName updates
A legacy slash-named rule is hidden from ListRules and PutEvents but
still reachable by its exact name and blocks DeleteEventBus, and the
other rule operations now validate the name. On a CloudFormation update
a supplied EventSourceName is validated as on creation.
* fix(eventbridge): keep every persisted rule reachable by its exact name
PutRule did not validate rule names before, so a stored rule can be longer
than 64 characters or contain a space, colon or at sign. Skip name validation
whenever a rule with that exact name is stored on the requested bus, not only
for slashed names, so such a rule can still have its targets removed, be
disabled and be deleted, and no longer blocks DeleteEventBus forever.
* fix(eventbridge): name the rule member in target operation validation errors
PutTargets, RemoveTargets and ListTargetsByRule take the rule name in their
Rule member, so report a rejected name at 'rule' as AWS does instead of
at 'name'.
* fix(eventbridge): validate the rule name in DescribeRule
DescribeRule now applies the same rule name check as the other rule
operations, so a malformed name fails with ValidationException instead of
ResourceNotFoundException, while a persisted rule stays describable by its
exact name.
* fix(eventbridge): resolve a legacy slashed rule ARN on a custom bus
Splitting a rule ARN at its last slash finds rules on partner buses but
misses a rule persisted with a slash in its name on a custom bus, such as
rule/foo/team/r1. When no rule is stored for the last-slash split, fall back
to the first-slash split if the rule stored there belongs to that bus, so
TagResource, UntagResource and ListTagsForResource reach it again.
* refactor(eventbridge): decide DeleteEventBus by each rule's own bus
Count a stored rule against the bus being deleted when its eventBusName is
that bus, rather than inferring ownership from whether a nested bus exists
under the rule key's prefix.
* docs(cloudformation): note that AWS replaces a bus whose EventSourceName is dropped
* test(eventbridge): cover legacy slashed rules on a custom bus
Exercise the rule and target operations on a slash-named rule persisted on a
custom bus, and check that a slashed name stored for a different bus is still
rejected by every rule and target operation.
* refactor(eventbridge): split a rule ARN at its last slash only
A rule's store key joins the bus and rule name with a slash, so splitting
rule/foo/team/r1 at its first or last slash names the same stored rule. The
first-slash fallback could never find a rule the last-slash lookup missed;
drop it and resolve the ARN without a store lookup.
* test(eventbridge): pin the error a removed legacy slashed rule returns
Once the stored rule is gone, DescribeRule validates its slashed name again and
fails with ValidationException. Assert that code, and that the rule left the
store, instead of any AwsException.
* fix(cloudformation): treat a gone legacy-named rule as deleted
A stack created before rule names were validated can hold a rule whose name
PutRule now rejects. Once that rule is gone, ListTargetsByRule validates the
name and fails with ValidationException, so DeleteStack ended DELETE_FAILED.
Check whether the rule is stored first, through a new
EventBridgeService.ruleExists that skips name validation, and treat a missing
rule as already deleted.
* docs(eventbridge): spell out what a legacy slashed rule can still do
A slashed rule on the default bus can't be tagged by ARN, since rule/team/rule-1
reads as rule rule-1 on bus team; it stays reachable by exact name for the rule
and target operations only. A stack holding a legacy-named rule can still be
deleted, but an UpdateStack touching it fails because PutRule rejects the name.
* fix(eventbridge): report the length violation of a long partner bus name on permission calls
Signed-off-by: Tyler Webb <tyler.webb@verkada.com>
* test(cloudformation): drop the section divider above the partner bus provisioner tests
Signed-off-by: Tyler Webb <tyler.webb@verkada.com>
* docs(eventbridge): ground the partner bus permission rejection in the API model
Signed-off-by: Tyler Webb <tyler.webb@verkada.com>
* fix(eventbridge): keep a partner bus off a legacy rule that shares its key
A rule key joins the bus and rule name with a slash, so a slash-named rule
persisted by an earlier version on a custom bus named aws.partner (for
example example.com/orders/r1) has the same key as rule r1 on partner bus
aws.partner/example.com/orders. Rule lookups, ListRules and PutEvents now
check the stored rule's bus, so the partner bus neither lists, fires nor
manages that rule, and PutRule on the partner bus is rejected rather than
taking over the legacy rule's tags and targets.
Signed-off-by: Tyler Webb <tyler.webb@verkada.com>
* test(eventbridge): keep Step Functions target rule names within the 64 character limit
PutRule now rejects rule names longer than 64 characters, as AWS does. The
Step Functions integration test built names from a 16 character prefix, the
suffix and a UUID, so the missing-target rule name reached 67 characters and
PutRule rejected it before the test ran. Use a shorter prefix.
Signed-off-by: Tyler Webb <tyler.webb@verkada.com>
* fix(eventbridge): check a permission call's bus name against the modeled 256 character limit
PutPermission and RemovePermission type EventBusName as NonPartnerEventBusName, which the model bounds at 1 to 256 characters with pattern [\.\-_A-Za-z0-9]+. The partner bus check used the 64 character rule name limit, so a partner bus name of 65 to 256 characters drew a length violation AWS does not report.
Signed-off-by: Tyler Webb <tyler.webb@verkada.com>
---------
Signed-off-by: Tyler Webb <tyler.webb@verkada.com>
A required member the request carried empty was answered as a member it
never carried: `requireParam` threw the null violation for a blank value
as well as for an absent one, and `validatedPolicySourceArn` handed a
blank to the resolver that answers an absent `PolicySourceArn`. On this
protocol an empty value is a member the request carries, so what a blank
breaks is the shape declared for it, and that is the constraint AWS's
validation layer reports.
For nearly every member nothing moves, because the constraints read
ahead of the operation already answer a blank against the minimum, the
pattern or the value set its shape declares: `RoleName=` breaks its
pattern, `Status=` its value set, `PolicyDocument=` both its minimum and
its pattern. Of every member read through `requireParam`, only
`serviceName` on `CreateServiceSpecificCredential` declares none of the
three. A blank there reaches the operation now, where a service name
nothing supports is `NoSuchEntity` with the name echoed as the caller
sent it, which is what LocalStack's AWS-validated snapshots record for a
malformed name as well as for an unsupported one.
`PolicySourceArn` is the one `arnType` member this package reads by hand,
the simulators answering an absent one in a sentence of their own. A
blank is held to the 20 characters the member declares now, which is the
answer `GetContextKeysForPrincipalPolicy` gives for the same member
through the model, so the two readers of it agree on the same input. One
left out keeps that sentence.
`docs/services/iam.md` records the split beside the wording an absent
member answers with, and four tests in the constraints class pin both
halves on both members. One assertion in the service-specific credential
tests pinned the old reading, a blank name said never to reach the
service check, and it moves with the fix: the blank reaches it and the
absent name is what the required-parameter check answers.
Under enforcement a REST route no rule maps and no vendored model names
runs unchecked. AWS Fault Injection Service, AWS RAM, CloudWatch
Observability Access Manager, AWS Resource Explorer, AWS Account
Management and AWS Control Catalog were among those: none of their 94
served routes had a rule.
Vendors the six models, so each route is checked as its operation's
action, on the resource its request names. A caller holding no grant
for them is now refused where the request used to pass; that is the
behaviour change.
Resource Explorer's five routes that S3 Vectors shares are matched on
the path without the prefix its filter moves them under. The FIS and
Resource Explorer tag routes are the shared controller's and keep its
bare /tags form. OAM's tag routes take the ARN as the rest of the path,
as the controllers serving them do, so an ARN sent with its slash
unencoded is checked too.
The request-resources generator reads these requests with no
hand-written correction, through four rules that hold for any service:
- A bare id after a path segment naming a type names that type:
/safetyLevers/{id}/state is the lever whose state
UpdateSafetyLeverState sets.
- A member fills the variables of a resource's own path before the
account its ARN is in, so Account Management's AccountId is the
member account of an accountInOrganization ARN.
- A type whose ARN is the account alone applies to a request leaving
out its optional account member, when that member names another
type: a request without AccountId acts on the caller's own account.
- A create makes its own type even when a member holds the resources
the action acts on: CreateResourceShare makes the share, and its
resourceArns are what the share holds.
Account Management finds that member account's organization and
management account in the caller's organization, through the lookup
the reader asks a service for the ARNs it stores, so a request naming a
member is checked on the ARN AWS checks.
The first rule also reads four CloudFront web ACL association
operations and four OpenSearch data source attachment operations on the
distribution or application their paths name. Floci serves none of
them.
An ARN fitting both a customer's format and one AWS owns is AWS's, so
an AWS managed permission is not also checked in the caller's account.
Regenerating the tables also brings in what AWS has added since the
last sync: eight Amazon Cognito user pool session operations and eight
Kinesis Analytics snapshot operations, none of which Floci serves. The
snapshot create's tags are read once the pinned botocore has it. The
count of tagged operations in iam.md is now the table's, 589, which
also takes 23 that earlier syncs added without moving it.
DescribeConfigurationRecorderStatus did not return the recorder's arn,
a member botocore models on ConfigurationRecorderStatus, and neither
Describe call read the Arn request member both of them model.
Return the arn in the status. An Arn that does not name the recorder
now answers NoSuchConfigurationRecorderException, which both
operations model, as a name that matches nothing already did. Given
both Arn and ConfigurationRecorderNames, each must name the recorder;
the model and the API reference don't say what AWS does then. A
recorder saved before recorders had an ARN has no arn in its status,
and no Arn finds it, until its next Put.
Both Describe methods carried the same check that answers
NoSuchConfigurationRecorderException for an Arn that does not name the
recorder. It now lives in one private helper, as requireRule and
requireAuthorizationKey do for their checks. No behaviour change.
The two Arn tests called a private post helper that repeated
RestAssuredJsonUtils.awsAction. They now call awsAction directly.
Under IAM enforcement no EMR Serverless request was checked: its model
was not among the vendored REST routes and its namespace's request
resources were not read, so no request was mapped to an action and the
filter let it through. A caller with no permissions could create, read,
update and delete applications and start and cancel job runs. A request
sent straight to /_emrserverless, the prefix its route filter moves
requests onto, reached the controller too, whatever it was signed for.
EmrServerlessRouteFilter now goes through SignedServiceRoute, as the
other filters that move a service's routes do: a request signed for
EMR Serverless is moved onto /_emrserverless, one sent to the prefix
signed for another service is refused, and the prefix it records lets
IAM match the vendored routes at the model's paths. EMR Serverless's
routes are vendored and its requests read, so an application call is
checked on the application its path names. Its namespace also leaves
the exclusions of regen_iam_tag_on_create.py and regen_iam_passed_roles.py:
tags a create sends are checked as emr-serverless:TagResource, and
StartJobRun and StartSession check iam:PassRole on the execution role.
Co-authored-by: mrfelek <17274927+mrfelek@users.noreply.github.com>
Closes#7998
Validate description types before creating or changing an integration so malformed JSON returns BadRequestException instead of an uncaught ClassCastException. Preserve omitted, null and empty-string behavior. Cover create and update over REST and JSON 1.1, including rejection without stored changes.
The Organizations handler read each member with asText, asInt or path,
so a Tags that isn't a list was read as no tags, a number where a
string belongs as its text, and a string MaxResults as a number.
Vendor botocore's Organizations request shapes with
tools/aws/regen_organizations_shapes.py, kept in sync by make
aws-data-check. Once the switch in handle finds a served operation,
walk the request against that operation's input shape with
RequestShapeCheck before the operation reads it, as Rekognition's
handler does. An operation Floci doesn't serve still answers
UnknownOperationException, whatever its body.
A mismatch is a SerializationException worded as DynamoDB's
deserializer words it. Organizations' own error and wording haven't
been measured.
The tag checks parseTags already makes still run: a null member counts
as absent in the walk, so a null or missing Key or Value and a repeated
key keep their InvalidInputException.
API Gateway was the one REST service besides S3 that the registry
authorized by hand: seven rules gave every management route its HTTP
method's action, apigateway:GET, apigateway:POST and so on, with two
named exceptions written in. Its routes were vendored for the coverage
test only.
The developer guide gives the management API's actions as the HTTP
verbs, and the Service Reference lists most API Gateway operations the
action of their route's method beside permissions AWS checks only when
the request carries what they guard, such as UpdateRestApiPolicy for a
resource policy or iam:PassRole for a role. The authorized-actions
table now lists those operations, 55 of them, under authorizedByMethod,
and a request on such an operation's route is checked as the action its
own method names: TagResource is a PUT in v1 and a POST in v2. The
other 132 are the single-action renames the table already held,
RejectDomainNameAccessAssociation and PutRoutingRule among them, or
keep the action of their own name, as the portal, portal product and
routing rule operations do.
So the rules go and API Gateway leaves the hand-routed scopes. Every
route Floci serves is checked as before. Its v1 tag routes are the
shared tags controller's, so they take an ARN sent unencoded and keep
the bare /tags forms, whose tagging form is a POST although v1 tags
with a PUT. v2's tag routes take an unencoded ARN too, as its
controller does.
The routes Floci does not serve, those of portals, portal products and
routing rules, are now checked as the actions AWS names for them rather
than as their method. A path no route of either model has, such as a
deployed API's execute path signed for apigateway, is no longer checked
as a management action: AWS authorizes an invocation as
execute-api:Invoke, which the execute path checks itself.
Regenerating the authorized-actions table also brings in two Lake
Formation operations AWS has added since,
GetGlueFunctionSessionContext and GetTemporaryGlueFunctionCredentials,
both authorized as lakeformation:GetDataAccess. Floci serves neither.
The passed-role generator imports the authorized-actions one, so the
online IAM gate checks the passed-role table for this change too, and
the table no longer held: AWS now passes EMR StartSession's role to
managed-compute.elasticmapreduce alone. Syncing it had failed since AWS
listed iam:PassRole for three more operations the generator found no
role member on, and asks a reason for.
CloudWatch Logs StartQuery names no role at any depth, in the pinned
botocore or the newest, so it is not read for that reason. SSM
RegisterDefaultHostManagementConfiguration and Kinesis Analytics
ImportSnapshot are newer than the pinned botocore, so their requests
cannot be read yet. They get a reason the sync and the offline gate
both refuse once the pinned models carry the operation, so a bump
cannot leave their roles unread. Floci serves StartQuery and neither of
the others.
That refusal caught two entries the pin had already outgrown. ECS
CreateGateway and UpdateGateway were excused as operations botocore
does not model, from the day the table was generated, and the pin has
had both for a while, each naming the infrastructureRoleArn of "the IAM
role that the gateway assumes to create and manage infrastructure on
your behalf". The reference passes it to ecs.amazonaws.com, so the
table reads it for both now. StartSession's role goes where the
reference sends it, and the hand mapping that picked elasticmapreduce
out of its two services is gone. Floci serves neither ECS gateway
operation nor StartSession.
* fix(glue): remove database functions during deletion
Remove user-defined functions belonging to a deleted database alongside
its existing table cleanup. Recreating the database must not expose its
old functions or prevent a fresh function with the same name.
Cover deletion and recreation through the service and AWS SDK, retaining
same-name functions in a neighboring database.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(glue): make database function cleanup atomic
Include default-account legacy functions in one atomic deletion batch and
coordinate database lifecycle with function writes and legacy lookups.
Match the stored database identity when selecting records for cleanup.
Cover persisted legacy data, account ownership, write failures and races.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
---------
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
Reject an invalid type format before changing the stored definition.
Keep validation inside the existing synchronized update operation.
Cover the refused request through service and AWS SDK tests, including
unchanged get/list responses and a subsequent successful valid update.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
* fix(ecs): preserve requested service platform version
* fix(ecs): restore requested platform version on rollback
Snapshot the requested service setting separately from the resolved revision version so rollback preserves LATEST. Retain a fallback for older snapshots and cover numeric versions, serialization and rollback after restart.
A docker cluster's YARN and HDFS ran on its primary node alone, however
many instances the cluster named. On EMR "Core nodes run the Data Node
daemon", "a core node runs YARN NodeManager daemons, Hadoop MapReduce
tasks, and Spark executors", and "Task nodes don't run the Data Node
daemon".
- Each core and task node is a container of its own on the cluster's
network, with its data in a volume of its own, its name there the
private DNS name ListInstances gives it. The primary node keeps a
DataNode and a NodeManager only on a cluster created with no core
node, which keeps them as core nodes are added, and a primary node
whose volume holds a DataNode's data runs it in any case, so the
blocks on it stay in reach.
- ListInstances gives each group's instances addresses of their own, so
an instance keeps its address while another group resizes.
- How many follows the instance groups' counts or the instance fleets'
target capacities, at most yarn-max-worker-nodes, core nodes first. A
fleet's unit of capacity is one node. With 0 a cluster runs on its
primary node alone.
- HDFS keeps what EMR's does: one copy of a block below four core nodes,
two below ten, three otherwise, or the hdfs-site classification's
dfs.replication. Steps' Spark, Hive and hadoop clients write that many.
- A resize reaches the nodes of a cluster a step has started them on, on
another thread: a new node takes work once it has registered, and one
no longer wanted is decommissioned, HDFS and YARN telling when it may
go, within EMR's default hour, each node its own, then goes with its
data. Core nodes stop at the copies HDFS keeps.
- A core node's NodeManager is decommissioned only once HDFS has moved
its blocks, as a decommissioned NodeManager exits, which ends the
node's container, its DataNode with it. A core node that has gone
stays among HDFS's excluded nodes until the NameNode has it dead, 40s
after it stopped, so the copies it held never count again.
- A core node that stops before HDFS has moved its blocks starts again
on its data, and one a shutdown cut off while it was decommissioned
starts again with the cluster's next step, from its volume, which
carries its name, to be decommissioned then. A task node's volume a
shutdown left goes.
- A decommissioning round that fails, a refresh of HDFS's or YARN's
lists among them, is tried again on the next; a node Docker will not
remove yet stays to be removed then, and one whose start a teardown
passed goes. A cluster's end removes the volumes of nodes that have no
container, and finishes even when Docker cannot list its nodes.
- The node list is read inside the cluster's lock, so a step queued
before a resize starts the nodes asked for by then.
- Container logs come from every node, a decommissioned one's first.
* test(rds): reuse MySQL login harness in older socket tests
* fix(rds): rewrite compressed IAM DDL in multi-statement queries
* fix(rds): preserve compressed MySQL frames at relay boundaries
* fix(lambda): retain MicroVM run settings and image version
Retain execution settings in run responses and stored MicroVM metadata, and select the requested image version. Validate request bodies with vendored model constraints through the shared request validator.
* fix(lambda): share connector defaults and verify list summaries
Use the same managed connector projection for image and MicroVM responses. Cover the requested version and unchanged summary fields in ListMicrovms, including explicit-version and omitted-version controls.
Systemd guests ran with --cgroupns=host and the host's /sys/fs/cgroup bound
in, so every guest's systemd managed the same cgroup tree as the Docker
host and as each other. Two guests running Kubernetes nodes (kubelet with
the systemd cgroup driver, as Kubernetes The Hard Way configures it)
shared one kubepods.slice: both nodes saw the same inode, and each kubelet
tore down the other's pod sandboxes, so every pod restarted in a loop
(SandboxChanged, "network namespace for sandbox ... is closed").
A private namespace without the bind, as kind runs its nodes, gives each
guest's systemd its own writable subtree, because Docker mounts it
read-write for a privileged container. Measured on OrbStack (cgroup v2):
two guests boot to 'running', each with cgroup 0::/init.scope on a
distinct cgroupfs root.
A guest under security-group enforcement runs unprivileged, and Docker
mounts an unprivileged container's private cgroupfs read-only, where
systemd cannot create its slices. That guest keeps the host namespace and
the read-write bind, so it boots as before; the docs say its cgroups stay
shared.
fix(ec2): keep the IMDS proxy out of a systemd guest's root cgroup
A privileged systemd guest now has a private cgroup namespace, and a
docker exec lands in that namespace's root. Floci leaves its link-local
IMDS proxy (socat) running from such an exec, so the guest's root cgroup
held a process. cgroup v2 will not enable controllers in a cgroup's
subtree_control while it holds processes, so the root's stayed empty and
kubelet with the cgroupfs driver died creating kubepods.slice
("openat2 /sys/fs/cgroup/kubepods.slice/pids.max: no such file or
directory"). Whether a node hit it depended on whether anything else
enabled the controllers before the proxy started.
The proxy's install and start scripts now move their own shell into the
leaf /sys/fs/cgroup/floci first, so socat and everything else they start
stay out of the root. They do so only at the root of a cgroup v2
namespace whose cgroupfs is writable; a host-namespace container, a
cgroup v1 host and a read-only mount run as before. A plain directory
rather than systemd-run, because the proxy starts while the guest's
systemd may still be booting, and systemd neither reaps nor moves a
cgroup it did not create. EKS's pod-identity proxy shares the script.
The Docker integration test launches a privileged systemd guest through the real
container spec. It now also reads /proc/self/cgroup, which must be 0::/ at the
namespace root, and creates and removes a directory under /sys/fs/cgroup, so
native Linux CI fails if the guest falls back to the host cgroup namespace.
Rewrap the class javadoc, rename the test to cover both the modules and the
cgroup namespace, and comment what each cgroup probe does and does not prove.
* fix(eventbridge): validate scheduled rule rate expressions
Validate schedule expressions before PutRule creates or mutates a rule. Reject mismatched rate units with the AWS ValidationException while preserving existing rule state and timers. Keep stored-expression parsing tolerant.
Add service, SDK and scheduler regression coverage.
Closes#7996.
* refactor(eventbridge): share rate parsing and cover legacy stack updates
Use one matcher and parsed value/unit helper for strict API validation and tolerant stored-expression execution. Keep unit agreement checks at the API boundary.
Add a CloudFormation SDK regression proving that unrelated stack updates already skip unchanged legacy rules while direct PutRule calls remain strict. Correct the outdated test comment suggesting every resource is re-provisioned.
* refactor(eventbridge): share AWS rate validation with Scheduler
Move positive value, supported unit and singular/plural constraints into core.common.AwsRateExpressions. Both API validators call the shared checks while their execution parsers retain support for legacy stored expressions.
Parse Scheduler rates once per call and retain its checked interval conversion. Add cross-service tests for matching acceptance and rejection reasons.
Addresses review 5876298647 on #8113.
Keep the current tags when replacing an imported certificate under its
existing ARN. Certificate.setTags already copies the map and normalizes
null, so use that boundary for initial imports and reimports alike.
Cover tag retention and replacement material through the AWS SDK in
commercial and GovCloud regions, including later tag additions/removals
and an untagged certificate.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
CreateBlueGreenDeployment stages a green copy of a PostgreSQL, MySQL or
MariaDB instance with the target engine version, parameter group, class
and storage, linked to the blue instance as a read replica and loaded
from a dump of it. SwitchoverBlueGreenDeployment gives green the blue
identifier, ARN, endpoint and tags and renames blue to <name>-old<n>;
the container manager moves each running container to its new ARN so
stop and delete still find it. DescribeBlueGreenDeployments supports the
four documented filters and paging, and reports INVALID_CONFIGURATION
when a member is gone. DeleteBlueGreenDeployment honours DeleteTarget
before switchover. Deployments are taggable by their deployment ARN.
Closes#8069
TagResource, UntagResource and ListTagsForResource answered
TargetNotFoundException for the organization's resource policy, because
resolveTagOwner matched account, root, OU and policy IDs only. The
model's TaggableResourceId pattern accepts rp- IDs, and AWS's own
CloudFormation handler for AWS::Organizations::ResourcePolicy tags the
policy and lists its tags through that ID.
resolveTagOwner now matches the organization's resource policy ID and
saves the organization, as the root branch does. Any other rp- ID still
answers TargetNotFoundException. The code comments that said a resource
policy is not a TagResource target are corrected, and the docs table
lists the resource policy among the tag targets.
UpdateSecretVersionStage removed the label from the old version and only then found that the target version does not exist, so the refused request left the secret without that label. Look the target version up before any label is moved.
Validate the attached stage and removal version before checking the
destination, keeping both checks ahead of any label mutation.
Cover omitted and mismatched removal IDs with missing destinations
through the AWS SDK for current and custom stages.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
PutReportDefinition now stores its Tags on the report definition, and
TagResource, UntagResource and ListTagsForResource read and change them
by ReportName instead of answering empty stubs. ModifyReportDefinition
keeps the tags, a missing report answers ResourceNotFoundException, and
the TagList and TagKeyList constraints from the model are checked.
Closes#7952
PutReportDefinition and TagResource now fail with ValidationException when the report would hold more than 50 tags, when Tags is not a list, or when a tag key, value or TagKeys entry is not a string.
tools/aws/regen_cur_shapes.py vendors the TagResource, UntagResource and ListTagsForResource input constraints from botocore, and CurRequestShapes checks them, and the Tags of PutReportDefinition, through RequestConstraintCheck in place of the hand-written limits.
MemoryDbService threw ClusterNotFoundFault, UserNotFoundFault and
ACLNotFoundFault with HTTP 404. The MemoryDB API Reference lists 400
for each, and botocore has no status for them. AWS's Smithy model
gives them httpError(404), but botocore calls MemoryDB over awsJson1_1,
which ignores HTTP binding traits.
Use 400 at all eleven places that throw them: the Describe, Update and
Delete actions, CreateACL with an unknown user, CreateCluster with an
unknown ACL, and the three tag operations.
Closesfloci-io/floci#8007
Persist whether a standalone instance has never initialized its database. Protect engine versions before backend startup so runtime loss and proxy failures cannot expose existing storage to a metadata-only version change. Update SDK compatibility assertions to reject unsupported upgrades and verify resizing separately.
Apply supported minor upgrades using the version-specific image on the existing volume and endpoint. Keep major upgrades, downgrades, and pinned-image changes blocked before mutation. Preserve the never-started case, report failed restarts honestly, and restore successful minor-upgrade coverage in the Java SDK compatibility suite.
* fix(glue): preserve existing partitions on duplicate creation
Reject CreatePartition for values already stored in the table before
mutating partition metadata. Keep the existing BatchCreatePartition
error and allow explicit updates through UpdatePartition.
Port the independent duplicate check and regression from
AndreKurait/floci commit f6905c8ced6c21fd9aeca013beb4ac511e5c1469.
Add SDK coverage for single and batch creation, preserved metadata,
per-item batch errors, and subsequent explicit updates.
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(glue): serialize concurrent partition creation
Synchronize single and batch creates so duplicate detection and writes share
one service critical section. Cover all four concurrent single/batch combinations,
preserving the first metadata and per-item batch errors.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(glue): isolate catalog fixtures from Athena readers
Share the existing floci-duck resource lock with Athena and Firehose tests.
Their catalog setup must not read temporary Glue metadata whose S3 locations
are placeholders while the catalog test is running.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
---------
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Co-authored-by: Andre Kurait <akurait@amazon.com>
Closes#7979
Resolve symlinks on the working directory's path, relative or absolute,
and check every directory on the resolved path. Stop the check at a
function's EFS mount path, which Lambda enters as the access point's user.
Build the Dockerfile-only build context in one place,
DockerBuildContext.ofDockerfile, for the helper image and the two Docker
tests that built it by hand.
It created an application named test-app, which AppConfigIntegrationTest looks up by name when both run in one shard.
* feat(dynamodb): serve DescribeLimits and DescribeEndpoints
DynamoDB reports the default quotas of 80,000 read and write capacity
units per account and 40,000 per table. It names its Regional endpoint
with a cache period of 1,440 minutes.
* fix(dynamodb): name Floci's own address in DescribeEndpoints
With endpoint discovery on, the AWS SDK for Java 2.x sends later
requests to the address DescribeEndpoints names, even when the client
sets an endpoint. The Regional AWS host sent them to real DynamoDB.
Stream records through CopyBulkLoader.Cursor in loadRecords and reuse writeRecord, eliminating duplicate decompression, line skipping, record reading, heap tracking and blank line filtering.
Verify Cursor record iteration, line tracking and raw byte capture, along with writeRecord chunking across PostgreSQL CopyData wire frames.
GetSnapshot and ListSnapshots with an ownerAccount other than the caller's now read the
owner's snapshots and return only the ones the snapshot resource policy shares with the
caller. A snapshot is never shared across partitions.
* fix(bedrock-agentcore): use runtime IDs and endpoint names in ARNs
Keep runtime ARNs stable across versions and use the parent runtime ID and endpoint name for endpoint ARNs. Update API responses, ARN lookups, tagging dispatch and CloudFormation references together.
* fix(bedrock-agentcore): preserve legacy and harness runtime lookups
RedshiftQueryHandler wrote the same Tags/Tag loop in eight resource
builders: clusters, snapshots, cluster parameter groups, cluster
subnet groups, snapshot schedules, event subscriptions, snapshot copy
grants and integrations. They now call one tagsXml helper.
The XML is unchanged. Clusters, snapshot copy grants and integrations
still leave out an empty Tags list, and the other five still write
one. A new RedshiftQueryHandlerTest case pins both shapes for all
eight; it passes before and after the change.