The default SQL Server image, mcr.microsoft.com/mssql/server
2022-CU28-ubuntu-22.04, pinned in #9959, is no longer in Microsoft's
registry, which answers 404 for it and whose SQL Server 2022 tags now
stop at CU27, so a SQL Server DB instance does not start. Pin
2022-CU27-GDR2-ubuntu-22.04, the newest 2022 build on Ubuntu 22.04
there, CU27's second security update.
The Service Reference lists a tag key named after each DMS resource
type, dms:rep-tag/${TagKey} on a replication instance and
dms:endpoint-tag/${TagKey} on an endpoint, which Floci never filled, so
a condition on one never matched. The DMS User Guide says "The tag keys
are prefixed with "dms", the resource type, and the "tag" prefix", in
the format dms:{resource type}-tag/{tag key}, and that such a key
"matches a resource with the given tag".
A fetcher vendors that section of the guide. The request-resources
generator reads a key of the format the reference lists on a type as
that type's stored-tag prefix, leaving out dms:req-tag/, the request's
tags, and refusing a key listed on two types. It writes the format as
tagKeyFormats, which the reader checks those keys against.
The request-resources check now also runs when one of the vendored
sources its generator reads changes, several of which were missing from
the Makefile's paths and the drift workflow's triggers.
IotDomainConfigurationService reads lastStatusChangeDate from a Clock, the system UTC clock outside tests. The tests drive a controlled clock instead of sleeping: a status change records the instant after an hour's advance, the same status keeps the earlier one, a seeded configuration carries the clock's instant, and refreshing its address an hour later keeps its status timestamp.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Under IAM enforcement a VPC peering request carried neither key, so a
policy scoped by either side of the peering refused what it should allow.
Each key is now the ARN of the VPC on that side, in its own Region and
account: from the connection EC2 holds for Accept, Reject, Delete and
ModifyVpcPeeringConnectionOptions, and from the request for the
connection CreateVpcPeeringConnection makes.
The generator reads an ARN key named as another type with a word before
it from the structure member that begins with the key's name, opted in
for EC2. Create's parameters are joined to the record's sides by AWS's
own sample request and response on the API reference page, vendored by
tools/aws/fetch_ec2_request_samples.py.
Closes#8366
A role's trust policy read a web identity token as two keys Floci built
by hand, <issuer>:sub and <issuer>:aud, the latter always from the aud
claim. The IAM User Guide's Default mapping, for every IdP it gives no
tab of its own, also gives amr, email and oaud, and reads aud from azp
where the token sets one; its page on creating an OIDC provider says AWS
STS uses azp as the audience the provider's client IDs are checked
against.
A fetcher vendors the Default tab's rows and the provider page's azp
sentence. The authorized-actions generator writes them as
webIdentityClaims, and AssumeRoleWithWebIdentity reads the trust policy's
keys and the token's audience from that section.
The S3 User Guide says that when a table bucket is created with tags,
s3tables:TableBucketTag acts on the tags in the request. Floci gave the
create's check only aws:RequestTag and aws:TagKeys, so a policy
conditioning CreateTableBucket on the table bucket key refused every
create.
A fetcher vendors the guide's two sentences, the key's exception and the
one naming CreateTableBucket as the operation creating a table bucket
with tags. The tag-on-create generator writes the key as the operation's
requestTagKeys where the Service Reference gives its action the key, and
TagOnCreate gives each request tag under it as well.
The routes of a host of a cluster's own, <cluster id>.<label>.<Floci's host>, move from EmrQueryEngineRoutes into
EmrClusterHostRoutes, which a host label, the application's name, the lookup of the cluster that runs it and the
lookup of where Floci reaches its port parameterize, so an application other than a query engine, HBase's master's
web interface next, can have a host of its own. Trino's and Presto's routes build theirs from their engine, and answer
as they did.
The IoT topic-rule integration tests wait for a republished message with Awaitility instead of a hand-written sleep loop. The wait checks at once, then every 25 ms for up to two seconds, and its timeout names the expected topic. The five callers no longer declare a checked exception.
Co-authored-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
AppConfig was left out of the generated passed-roles table because
CreateExtension and UpdateExtension name their roles in
Actions{}[].RoleArn, a map whose values are lists, which a member path
could not express. A path now steps into one container after another;
the steps after the first name no member, PassedRoles reads them as the
value already reached, and an XML path and the tag-on-create table
refuse them. The generator reads appconfig, adding its profile,
environment and extension operations, and fails on an XML role member
reached through a list of lists. The request-resources table drops the
rows for the members that now name passed roles.
PutEvents answers an entry whose EventGroupId and DeduplicationId, given or generated, the bus took in the last 5 minutes with SuccessCode DEDUPLICATED and the first event's EventId and SequenceNumber, and delivers nothing. The window runs from the first publish, and a repeat does not extend it. DeduplicationConfiguration CONTENT_BASED replaces each DeduplicationId with a SHA-256 hash of the entry's Source, DetailType, Detail and Resources. Keys are recorded only once the bus is saved, and a 60 second sweep drops expired ones. The webhook event sources' window moves into a shared DeduplicationWindow.
Capture the callback onStart() registers with the executor and run it twice: a first sweep that throws must leave the scheduled task alive, so the second run reaches the service again. A package-private constructor takes the executor so the test drives the callback without a scheduler thread.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
A GetProducts filter read only the product's attributes, under the exact
spelling of the field, so `productFamily` (held beside the attributes) and
`serviceCode` (the attribute is `servicecode`) matched nothing.
A filter's field is now one of the product's attributes, or else a member
the product holds beside them, as productFamily is. No field is named in
the code. The API reference says "Matching isn't case sensitive for any
filter type", so fields and values match without regard to case under
every filter type, and an exact regionCode in any case picks its Region.
With FLOCI_SERVICES_PRICING_AWS_PRICE_LIST=true (off by default),
GetProducts answers from the public files of AWS's Price List Bulk API
instead of the bundled snapshot. The service is looked up in AWS's offer
index. An exact regionCode filter reads the Region's current file, named
by the service's region index; without one, the current file for every
Region, named by the version index, is read. Each file is downloaded once
into <persistent-path>/pricing, and again when AWS publishes a new
version. It is read as a stream that keeps only the products of the page,
in the file's order, with their terms. An index is reused while AWS's
response says it is fresh (Cache-Control max-age less Age), and is
otherwise asked for again with its ETag, so an unchanged index comes
back as 304 without a body. A connection that takes 10 s to open, or
stops sending for 10 s, fails the request. The offer index address is
the setting FLOCI_SERVICES_PRICING_AWS_PRICE_LIST_URL.
A page holds at most MaxResults products, or the most the operation
models when the request names none. Pricing's request constraints come
from botocore through tools/aws/regen_pricing_shapes.py, and a request
that breaks one is refused in the words AWS answers with: MaxResults out
of range, more than 50 Filters, a filter's Field or Value outside 1 to
1024 characters, a missing member, or a filter Type outside the modeled
set. The shared request check now words a list of structures, each
element's members at its position counting from 1
(filters.1.member.type), as AWS does. A missing required member is
InvalidParameterException, the only validation error Pricing models,
instead of ValidationException. ListPriceLists holds a timestamp, which
the shared check does not word yet, so only its MaxResults is checked.
A token names the
file version it was read from: a token from a version AWS has replaced
has expired (ExpiredNextTokenException), and a token no page wrote is
answered as AWS answers it (InvalidNextTokenException).
Cost Explorer reads every product of a Region, not only the first 1000,
in one pass: the file is read once for where each SKU's terms are, then
for the products, reading a match's terms from their place. AWS lists
one product per operating system under a usage type, so a usage line is
priced at the product for its operation, as the BCM Pricing Calculator
matches it. Rates read from a version of AWS's file are kept until AWS
publishes another. A usage line with no usage costs nothing at any
rate, so no rate is looked up for it, and no Region's file is read for
a service nothing used.
DescribeServices, GetAttributeValues, ListPriceLists and
GetPriceListFileUrl keep answering from the snapshot.
Closes#8339
Pig's download from the first URL that gives it with its checksum, and the archive of what it runs from, move into
ApacheDistribution, which an application's layout and checksum algorithm parameterize, so HBase and ZooKeeper can be
downloaded the same way. Pig's distribution, messages, setting and image name stay as they were.
Lightsail was one of the namespaces the request-resources table left unread ("a later batch"), so every request of
it was checked on *: a grant scoped to an instance's ARN never matched, a deny scoped to one never held, and an
aws:ResourceTag condition read nothing. lightsail joins the table now, so each request is checked on the resources
the Service Reference gives its action, read from the request.
A Lightsail ARN carries an id the service mints (Instance/${Id}), while a request names the resource by its name, so
the table asks the service to find it. LightsailStoredResourceArns answers the caller's instance, disk, static IP or
key pair of the name a request gives (instanceName, diskName, staticIpName, keyPairName) in the request's Region, as
the ARN Lightsail stores for it (LightsailService.findArn), and the tags Lightsail keeps on the resource an ARN names,
read in the account and Region the ARN names without moving it and matched on the whole ARN
(LightsailService.storedTags), which an aws:ResourceTag condition reads.
Both read the store in place, a resource stored before keys carried the account included: findArn through
AccountAwareStorageBackend.readInAccount, and storedTags through readAllInAccount, a new scanning counterpart of
readInAccount that also finds the default account's pre-multi-account entries, each read where it is. DMS's
storedArn, which carried the same scan inline, uses it too.
A tag call is checked on its resourceArn; one naming the resource by its resourceName alone, the reads (GetInstance,
GetDisk and the like) and the creates are checked on *, as the generated table reads them.
IamRequestResourceEnforcementIntegrationTest checks that a grant on one instance's ARN reboots the instance a
request names by its name and refuses another, and that an aws:ResourceTag condition reads the tags of the instance a
stop names. LightsailStoredResourcesTest checks each lookup against another Region, type, name and a type Floci keeps
none of, and the stored tags of an instance and a key pair against another account, Region, type, service, id or no
ARN, and that both find an instance stored before accounts without moving it. AccountAwareStorageBackendTest checks
readAllInAccount.
The disabled-MQTT integration test checks the configured loopback listener with TcpListenerProbe.accepts, keeping its 250 ms connect timeout, and reports the listener's address if it accepts a connection.
Signed-off-by: Jackson Price <jxnprice@amazon.com>
IMDS now answers the network/interfaces/macs paths from a live view of the registered instance's account and region, read under the attachment lock: per-interface identity, primary and secondary IPv4 addresses, security groups, subnet and VPC CIDRs and the existing IPv6 fields. Detached interfaces, unknown MACs and absent fields answer 404, IMDSv2 token and instance isolation still apply, and saved instances without an owner fall back to the default account. The old per-field IPv6 handlers and MAC listing are replaced by the shared view, and resource reads share an account-and-key getForOwner overload.
Closes#8318
Each pair of invited-user rejection tests added in #10186 is now one parameterized test over ConfirmSignUp and AdminConfirmSignUp. Both invocations still check the NotAuthorizedException message, that the user stays in FORCE_CHANGE_PASSWORD and that no PostConfirmation trigger fires.
The source test already advances the clock and drives the ingestion ticks. Drive the final flush before reading S3 so the assertion can run immediately.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
The MQTT lazy-start suites check the listener with TcpListenerProbe.accepts before endpoint discovery and thing creation and after each starts the broker, and the WebSocket suite after its first upgrade, keeping the 250 ms, 2 s and 1 s connect timeouts. Each assertion names the loopback listener if its state is unexpected.
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Floci minted a Lightsail resource's ARN from its name (arn:aws:lightsail:<region>:<account>:Instance/web), while AWS
mints an id for it: the Lightsail API Reference gives an instance's ARN as
arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE, and a key pair's, a static
IP's and a disk's the same way, and the Service Authorization Reference writes every Lightsail type as <Type>/${Id}.
baseResource now mints a UUID for each instance, disk, static IP and key pair it makes, so an instance made again
under a name a deleted one had gets an ARN of its own, as on AWS. A request still names a resource by its name, and a
tag call by its name or by the stored ARN, which TagResource and UntagResource already matched on the whole ARN. A
resource stored before keeps the ARN it was made with.
This is the mint the request-resources table needs before Lightsail joins it: its rows find a resource by the name a
request gives and check it on the ARN Lightsail stores.
LightsailResourceProviderTest checks that each of the four types' ARNs carries a UUID after its type, that an
instance made again under a deleted one's name gets a new ARN, and that a tag call naming that ARN tags it;
LightsailIntegrationTest checks the ARN GetInstance answers.
WAF v2 was one of the namespaces the request-resources table left unread ("a later batch"), so every request of it
was checked on *: a grant scoped to a web ACL's ARN never matched, a deny scoped to one never held, and an
aws:ResourceTag condition read nothing. wafv2 joins the table now, so each request is checked on the resources the
Service Reference gives its action, read from the request.
A request giving an ARN member (ARN, ResourceARN, ResourceArn, WebACLArn) is checked on the resource it names, as
regional/<type>/<name>/<id> or global/..., the ARNs WAF v2 mints. UpdateWebACL and UpdateRuleGroup name their
resource by a lock token, which the table reads through LockToken: WafV2StoredResourceArns answers the caller's web
ACL, IP set, regex pattern set or rule group whose current token it is, of either scope the request's Region reaches,
the one the handler checks the token against (WafV2Service.lockHolder). WafV2Resource declares the getLockToken each
model already has. It answers the tags WAF v2 keeps on the resource an ARN names, read in the account, Region and
scope the ARN names without moving it and matched on the whole ARN (WafV2Service.storedTags), which an
aws:ResourceTag condition reads.
A request naming a resource by its Name, Scope and Id alone, and CreateIPSet and CreateRegexPatternSet, are checked
on <Scope>/<type>/*/*, the scope as the request spells it (REGIONAL or CLOUDFRONT) while WAF v2 mints regional/ and
global/, and CreateWebACL and CreateRuleGroup on *, as the generated table reads them.
IamRequestResourceEnforcementIntegrationTest checks that a grant on one web ACL's ARN lets an update giving its lock
token through and refuses the update of another, and that an aws:ResourceTag condition reads the tags of the web ACL
a tag call names. WafV2StoredResourcesTest checks the stored tags of a regional web ACL and a global IP set against
another account, Region, kind, service or no ARN, and the lock holder of either scope against another Region's
regional resource, another account's token and a replaced one.
Wait for the loopback listener to refuse connections before starting the next test or restarting the broker. Reuse the TCP probe in the MQTT and WebSocket suites and fail if the listener stays open.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
UpdateAlias with RoutingConfig {"AdditionalVersionWeights": {}}, or with a RoutingConfig that has no weights at all (what the Terraform AWS provider sends when a routing_config block is removed), was treated like an omitted RoutingConfig, so the alias kept its old weights. Both forms now clear the weighted routing; an UpdateAlias that omits RoutingConfig still leaves the weights unchanged, and weights that are not an object are refused with InvalidParameterValueException.
Closes#7890
Use bounded waits for HTTP pipeline results, approval notifications and execution events. Keep the polling intervals, report timeouts by operation and return the response that satisfied each wait.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
The payment cryptography guide now publishes the AS2805 cryptogram's construction: "HDC2" || IV || TDES-CBC body || HMAC-SHA256 tag, the two derived keys and their labels, the first-byte variant, the raw check value of the original key and the algorithm name in the tag. A test reads a cryptogram the way another producer would, recomputing the tag and decrypting the body under the published labels, and checks the carried key and its check value.
Closes#10207
AdminConfirmSignUp confirmed an AdminCreateUser invitee in FORCE_CHANGE_PASSWORD, bypassing the first password change. AdminConfirmSignUp and ConfirmSignUp now share requireUnconfirmed with ResendConfirmationCode, answering NotAuthorizedException "User cannot be confirmed. Current status is X" under the user lock, before any code is consumed, the status changes or PostConfirmation fires.
Closes#10178
Organizations was one of the namespaces the request-resources table left unread ("a later batch"), so every request
of it was checked on *: a grant scoped to an account's or an OU's ARN never matched, a deny scoped to one never held,
and an aws:ResourceTag condition read nothing. organizations joins the table now, so each request is checked on the
resources the Service Reference gives its action, read from the request.
An Organizations ARN carries the organization's id beside the id a request gives
(account/o-<organization>/<account id>), so the table fills one variable of it and asks the service for the rest.
OrganizationsStoredResourceArns finds the account, OU, root or policy a request names by its id alone in the caller's
organization, as the caller's handler finds it, and a handshake where the caller sent it or receives it: the account
it invites, any account for an invitation by email naming none, which may claim it, and each member for one enabling
all features, as AcceptHandshake lets them act on it. It answers the tags Organizations keeps on an account,
root, OU, policy or resource policy, matched on the whole ARN without moving it, which an aws:ResourceTag condition
reads. The lookups of an OU or a policy by its id in an organization move into organizationalUnitIn and policyIn,
beside accountIn, which DescribeOrganizationalUnit's and DescribePolicy's handlers and the new lookups share.
An organization's resources belong to its management account, so a member's request on one is judged across
accounts, the organization's resource policy deciding beside the member's own policies, as the existing
OrganizationsResourcePolicyProvider already supplies it. A handshake's recipient acts on it on its own policies: an
invitee belongs to no organization, and AcceptHandshake and DeclineHandshake are no actions a delegation policy grants
(the Organizations User Guide's supported delegation policy actions). So a handshake the caller receives is reached in
the management account (reachedInItsAccount), as a RAM invitation is, and the provider supplies no delegation policy
for it.
TagResource, UntagResource and ListTagsForResource, and the calls naming a parent or a target by its id (ListChildren,
ListPoliciesForTarget), are checked on *, and AttachPolicy and DetachPolicy on the policy alone, as the generated table
reads them.
IamRequestResourceEnforcementIntegrationTest checks, in an organization of its own, that a grant on one account's ARN
reads it by its id and refuses another, that an aws:ResourceTag condition reads the tags of an OU, that a member's
read of an OU is refused on its own grant alone and allowed where the organization's resource policy grants it too,
and that the account the organization invites reads the handshake on its own policy naming the handshake's ARN, with
that resource policy in place, and is refused on another. OrganizationsServiceTest checks each lookup for a member,
the management account, an outsider, an invitee, a claimant of an invitation by email and the members receiving a
handshake enabling all features, and the stored tags of each kind, the resource policy among them, against another
management account, organization, kind or service.
Poll SearchIndex for the disconnected state after the local MQTT client disconnects. Keep the five-second deadline and identify the thing if the index never reports the change.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
The V2 conditions, GitHub source and retry/rollback suites now read GetPipelineExecution through one PipelineExecutionWaits helper and wait on it with Awaitility, replacing the V2 suite's sleep loop. Retry and rollback still wait for the worker to leave activeRuns before the next operation; each suite keeps its own deadline.
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Network Firewall was one of the namespaces the request-resources table left unread ("a later batch"), so every request
of it was checked on *: a grant scoped to a firewall's ARN never matched, a deny scoped to one never held, and an
aws:ResourceTag condition read nothing. network-firewall joins the table now, so each request is checked on the
resources the Service Reference gives its action, read from the request: a firewall or a firewall policy by its ARN
or by the name its ARN ends in (firewall/<name>, firewall-policy/<name>, as Floci mints them), a rule group by its ARN,
and a tag call on its ResourceArn. A rule group named by its name and type alone is checked on *, and CreateRuleGroup
on the rule group its SourceMetadata.SourceArn names or else on *, as the generated table reads them.
The generator stopped on network-firewall. with_through reads CreateFirewall's VpcId as naming a firewall, as the
model's VpcEndpointAssociation structure holds a VpcId beside a FirewallArn, and with_made then marked that through
row made, a key the table's own check refuses on a through row. A resource a create names through another member
exists already, as one it names by its ARN does, so with_made no longer marks a through row; no other namespace's rows
change. The VpcId row stands as generated: Network Firewall answers no through lookup, so it adds no resource.
NetworkFirewallStoredResourceArns answers the tags Network Firewall keeps on the firewall, firewall policy or rule
group an ARN names, read in the ARN's account without moving it, which an aws:ResourceTag condition reads. It finds
nothing: the table builds a firewall's or a policy's ARN from its name, the ARN Floci mints.
IamRequestResourceEnforcementIntegrationTest checks that with no grant a firewall's read is refused, that a grant on
one firewall's ARN reads it by its name and by its ARN and refuses another, that a deny on one refuses it beside an
allow on every resource, and that an aws:ResourceTag condition reads the tags of a firewall and of a firewall policy a
tag call names. It also checks that a grant on one rule group's ARN reads it and refuses another, and the same rule
group named by its name and type, and that CreateFirewall is refused on a grant on every firewall alone and runs with
one on the firewall policy it names beside it. NetworkFirewallStoredTagsTest checks the stored tags of each kind, in
another account too.
The nine background runtime-restore hooks (Amazon MQ, DocumentDB, ElastiCache, ElastiCache Memcached, Kinesis Analytics, MemoryDB, MWAA, Neptune, OpenSearch) now extend one BackgroundRestoreStartupHook base and keep only their own name, order, enabled flag, restore call and failure message. The base logs failures under EmulatorLifecycle's category at error level with the stack trace; MemoryDB and the two ElastiCache hooks override the logging so every line stays as it was, ElastiCache using the parameterized warnv form. A unit test of the base covers a disabled service, a successful restore, a restore that does not block startup, a logged failure, a synchronous throw that fails startup, and an overridden log.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
restoresEksClustersOnlyAfterALateImdsStartCompletes runs onHttpStart on its own thread and waits until it parks on the IMDS join instead of holding the start back with Thread.sleep. LogCapture.listenFromThisThread hands each record to a listener, so recordLifecycleLog no longer copies its handler. LifecycleHookDiscoveryIntegrationTest checks the hooks CDI discovers and that creating a startup or post-HTTP hook creates no service ahead of its step.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
Now that the core boundary allowlist must stay empty, the allowlist file, its stale-entry test and the allowlist lookup can no longer change any outcome. Drop them and rename the check to coreBoundClassesReferenceNoAwsServiceCode; its failure message now points at giving the class a seam, or taking it off core-bound.txt.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
The ElastiCache metrics reference gives system.network.bandwidth.limit
as a vended Gauge in By/s: "The baseline network bandwidth for the
node's instance type. The limit is the same in each direction and
applies to each direction separately."
regen_elasticache_otel_metrics.py now also reads the user guide's
"Supported node types" page. It copies the baseline bandwidth in Gbps
of each node type its "Current Generation (Valkey)" tables list into
the vendored file. Only that section is read: the Memcached section
gives cache.r5.12xlarge 20 Gbps where the Valkey and Redis OSS
sections give 12.
The table converts each baseline to bytes a second, at 125000000 per
Gbps. A node emits the baseline of its group's node type, with no
attribute but valkey.role. A node type the page does not list for
Valkey emits none.
Closes#7030