mirror of
https://github.com/floci-io/floci.git
synced 2026-11-25 23:00:59 -05:00
efd08b3a7710cfdbd4def15d14bbc3b586fb64e2
717
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
1370dc02fa |
fix(appconfig): return feature flags in retrieval format (#3890)
Co-authored-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com> |
||
|
|
bbaf3568c5 |
feat(codeartifact): support publishing and reading generic-format package versions (#3839)
Adds PublishPackageVersion, DescribePackageVersion, and GetPackageVersionAsset for CodeArtifact's generic package format, matching AWS's own wire restriction that PublishPackageVersion accepts only the generic format. Includes real asset hashing (MD5, SHA-1, SHA-256, SHA-512), SHA-256 integrity verification against the caller's x-amz-content-sha256 header, correct Unfinished/Published status transitions, and the documented AWS quotas for this action (350 assets per version, 5 GB max asset size), all returning ServiceQuotaExceededException when exceeded. Asset bytes are kept out of the JSON/WAL-backed package-version store (@JsonIgnore on PackageAsset.content) and instead go through a dedicated asset store, a disk file in persistent/hybrid/wal mode or a side map in memory mode, the same split S3Object/S3Service already uses for object bytes. Without this, a publish rewrote every asset of every package version on disk each time, growing quadratically under this action's own 350-asset/5GB quotas. The asset name is also validated against the wire model's AssetName pattern (no control characters), not just its length, since it is echoed back verbatim in the X-AssetName response header on GetPackageVersionAsset. Verified against the real botocore service-2.json wire model and the AWS CodeArtifact User Guide (including its PDF for the quotas table, since the HTML quotas page is JS-rendered). Live-verified with the real AWS CLI and the AWS SDK for Java v2 against a running Floci instance, including an exact byte-for-byte asset round-trip and the real ConflictException when republishing an already-Published version. |
||
|
|
e190f7d340 |
feat(iam): implement CreateLoginProfile, UpdateLoginProfile, DeleteLoginProfile (#3865)
* feat(iam): implement CreateLoginProfile, UpdateLoginProfile, DeleteLoginProfile GetLoginProfile previously existed as a permanent stub always returning NoSuchEntity, and the docs claimed the other three actions were supported even though the query handler had no case for them at all. Adds a LoginProfile model and the full lifecycle on IamService: a user holds at most one login profile, Create/Get/Delete default UserName to the caller's resolved identity (matching AWS), Update requires it explicitly, and Update leaves an omitted field (Password or PasswordResetRequired) unchanged rather than resetting it. The password is validated against AWS's wire character-class/length rule and, when the account has one, against the existing account password policy (PasswordPolicyViolation). Verified against the real AWS IAM API reference for all four actions' request/response shapes and error lists. * fix(iam): block DeleteUser on a login profile and carry it through UpdateUser rename Login profiles now persist, so deleteUser left an orphaned profile that a recreated user of the same name would inherit, and a rename dropped the profile. DeleteUser now returns DeleteConflict while a login profile exists, as AWS does, and UpdateUser moves the profile to the new name. |
||
|
|
75fee00adc |
fix(ec2): delete VPC default security group, route table and network ACL with the VPC (#3878)
* fix(ec2): delete VPC default security group, route table and network ACL with the VPC * test(ec2): check deleted VPC defaults by VPC scope instead of by ID --------- Co-authored-by: Jason van Zyl <jason@vanzyl.ca> |
||
|
|
29b601834b |
feat: add DynamoDB to Redshift zero-ETL replication (#3872)
* feat: add DynamoDB to Redshift zero-ETL replication * fix(redshift): preserve zero-etl account polling state * fix(redshift): preserve zero-etl target account |
||
|
|
0142d443ac |
feat(cloudformation): provision CloudWatch log streams (#3869)
* feat(cloudformation): provision CloudWatch log streams * fix(cloudformation): preserve conditional log stream name omission --------- Co-authored-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com> |
||
|
|
0f6b5ee3a2 |
feat(eks): sign k3s service account tokens with the cluster OIDC key (#3783)
* feat(eks): sign k3s service account tokens with the cluster OIDC key In real EKS, workloads authenticate via IAM Roles for Service Accounts (IRSA) using projected tokens signed by the cluster OIDC key with audience sts.amazonaws.com. In Floci, k3s launches with default signing flags, meaning it signs in-cluster pod tokens using its own internal auto-generated key under https://kubernetes.default.svc.cluster.local. Because Floci STS verifies tokens against Floci's per-cluster OIDC key and issuer, in-cluster pod tokens cannot be verified, forcing local workloads to use static credentials instead of IRSA. To bridge this gap, Floci now passes the cluster's per-cluster OIDC keypair and issuer to the k3s container on cluster start and restore. EksClusterManager exports the cluster keypair as restrictive PEM files (0600) into /etc/rancher/k3s/ and configures kube-apiserver with signing keys, dual issuers, and dual audiences (https://kubernetes.default.svc.cluster.local and sts.amazonaws.com). Projected pod tokens now verify cleanly against Floci STS, while internal cluster components continue operating without disruption. * fix(eks): isolate IRSA signing key files by account and region Persist cluster OIDC signing keypairs under dataPath/keys/<accountId>/<region>/<clusterName> instead of only clusterName. Because EKS cluster names are unique only within an account and region, same-named clusters across different accounts or regions previously shared host key files, risking key overwrite during startup or restore. * fix(eks): create signing key files with atomic owner-only permissions Create the signing key and public key files with PosixFilePermissions rw------- atomically on creation via Files.createFile, avoiding any brief window where private key material is readable with default umask permissions. * fix(eks): guard webhookPath against null cluster ARN and createdAt Safely resolve accountId, region, and createdAt with fallbacks in webhookPath when cluster fields are null, and ensure integration tests populate cluster ARN and createdAt. |
||
|
|
c603639e0b |
feat(cloudfront): Support HTTPS locally with correct key id (#3845)
* fix(core): route by the Host header on HTTP/2 requests HTTP/2 carries the authority in :authority and sends no Host header, so every lookup that reads Host fell through when a client negotiated HTTP/2. curl, the AWS SDK for Java and Go, and browsers all do that over HTTPS, which left CloudFront distribution domains, API Gateway execute-api and custom domains, Lambda function URLs and Cognito custom domains unreachable over https://. Copy the authority into a Host header before routing. S3 already covered this in its own filter. * feat(cloudfront): serve distributions over HTTPS on local hostnames A distribution's assigned domain name resolves to nothing local, so a signed URL could not be downloaded over https:// the way a viewer downloads one from CloudFront. Serve every distribution under <id>.cloudfront.localhost.floci.io and <id>.cloudfront.localhost as well, and add both to the SANs of the generated server certificate. The first resolves to 127.0.0.1 through public DNS on Linux, macOS and in containers. The second needs no DNS at all but only resolves where the runtime handles .localhost itself, which macOS and browsers do and Debian-based images do not. * fix(cloudfront): assign lower-case distribution domain names AWS writes a distribution's domain name in lower case and keeps the id upper case. Floci put the upper-case id straight into the host name, and a browser lower-cases the authority it sends, so the rebuilt resource never matched the one a signed URL was signed for and the download failed with 403. * refactor(cloudfront): derive the local delivery hosts from the DNS suffixes The suffix list was a fourth hardcoded copy of the emulator host suffixes, so a configured FLOCI_HOSTNAME or FLOCI_DNS_EXTRA_SUFFIXES resolved and was covered by TLS but did not route, and localhost.localstack.cloud did not either. Build it from the same source the embedded DNS uses. Match the host inside the scan findByHost already does, by comparing the host to <id><suffix>, which drops a store read per request and the assumption that the store keys distributions by an upper-case id. The tests read the default SAN list from TlsConfigSource rather than copying it. * fix(cloudfront): issue AWS-shaped public key ids CreatePublicKey answered a UUID where AWS answers K followed by 13 characters, the value a signed URL carries as Key-Pair-Id. Verified on AWS us-east-1 2026-09-18: a public key is K2VKB3XV74876Q, while key groups, cache policies, origin request policies and response headers policies are UUIDs, which Floci already matches. * refactor(core): resolve the HTTP/2 authority in each host routing filter The global Http2HostHeaderFilter made every service depend on a Host header it wrote, and no service file showed that. RequestHost now returns the Host header, or the HTTP/2 :authority when there is none. Each filter that routes by host calls it. S3 and Cognito had their own copy of this fallback and now use the helper. * test(core): check host routing over HTTPS and HTTP/2 against the real SANs The HTTP/2 routing test now boots with a CA-issued leaf that carries the default SANs. The client trusts only the Floci CA and checks each CloudFront local delivery host against that leaf. This replaces the HTTP/1.1 local delivery test, which only set a Host header and never reached TLS. S3 drops three resolveHost tests that RequestHostTest now covers. Its HTTP/2 bucket tests still guard the call to the helper. |
||
|
|
de54409fc6 |
fix(ecs): apply volumesFrom to task containers (#3811)
Co-authored-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com> |
||
|
|
023af51627 |
feat(redshift): manage master password with secrets manager (#3871)
* feat(redshift): manage master password with secrets manager * fix(redshift): align managed password contract * fix(redshift): expose managed password secret arn |
||
|
|
e32266537e |
feat(ecs): support fluentd FireLens routers and s3-hosted FireLens config (#3790)
* feat(ecs): route awsfirelens logs through a generated Fluent Bit router Start the router first, point awsfirelens containers at the generated unix socket, and store firelensConfiguration as registered. * feat(ecs): carry FireLens config through CloudFormation and aim outputs at Floci AWS::ECS::TaskDefinition provisioning now keeps each container LogConfiguration and FirelensConfiguration, so a stack that registers a FireLens router reaches the same launch path as RegisterTaskDefinition. The generated router points each awsfirelens output at Floci container-reachable base URL through Endpoint, and the app container awsfirelens log config uses fluentd-async, which Docker 28 accepts, instead of the removed fluentd-async-connect. Only s3, cloudwatch and firehose receive that endpoint: they are the AWS-written Go plugins and parse the value as a URL. The upstream C plugins (cloudwatch_logs, kinesis_firehose, kinesis_streams) hand it to getaddrinfo as a bare host name and always dial TLS, with no output-level switch for either, so a URL is a guaranteed DNS failure on Fluent Bit 1.9 and 5.0.9 alike, and a bare host plus port only reaches Floci plain HTTP port before certificate verification fails. Those outputs keep whatever the task definition gave them. * feat(ecs): support fluentd FireLens routers and s3-hosted FireLens config A fluentd FireLens router is now acted on at launch instead of being stored and ignored. Floci generates the config the ECS agent generates for that type: unix and forward sources, a grep filter per include-pattern and exclude-pattern, a record_transformer filter for the ECS metadata, the include of an external config, and one match block per awsfirelens container keyed on its @type. Fluentd takes its output plugin name from the log option @type rather than Name, its tags end in ** rather than *, and it gets neither the healthcheck sections nor Mem_Buf_Limit, both of which the agent emits for Fluent Bit only. The router image is handed /fluentd/etc/fluent.conf, so the config archive contents and its destination directory are now chosen per router type. config-file-type=s3 now reads the object from Floci's own S3 instead of ignoring the option, and writes it to the fixed external.conf path next to the generated config, /fluent-bit/etc/external.conf or /fluentd/etc/external.conf, which is where the agent mounts what it downloads. The object is read before any container is created, so a missing bucket or key stops the task with the agent's own wording as the stopped reason, Unable to download firelens s3 config file: unable to download s3 config <key> from bucket <bucket>: <detail>, rather than leaving a router running behind a task that already failed. RegisterTaskDefinition enforces the same split ECS does. A Fargate-compatible task definition cannot take its config from S3, and is rejected with Fargate launch type does not support FirelensConfiguration config file from 's3'; a config-file-value that does not name an S3 object is rejected as Invalid arn syntax. An EC2-compatible task definition keeps s3, and a Fargate task can still source its config from S3 the way AWS documents, through the aws-for-fluent-bit init process and its aws_fluent_bit_init_s3_* environment variables, which ECS never inspects and Floci passes through. Floci serves no ECS task metadata endpoint, so that init path fetches nothing locally yet, which docs/services/ecs.md now states. * fix(ecs): rejoin awsvpc tasks to the security-group namespace The FireLens launch loop stopped calling withNetworkMode(container:<helper>) and dropped the workload label, so prepareNetwork's ENI/nftables had nothing to isolate. Cover the join with a firewallManager-wired unit test. * test(ecs): assert FireLens router and app both join the SG namespace * test(ecs): verify FireLens router and app lifecycle in SG namespace test * refactor(ecs): reuse extractTaskId for FireLens cluster name * docs(ecs): note the launchType/compatibilities gap next to FireLens S3 * docs(ecs): scope the FireLens TCP-listen rationale to non-shared namespaces * fix(ecs): reject a FireLens type that is missing or not fluentd/fluentbit AWS requires firelensConfiguration.type and accepts only fluentd or fluentbit. parseFirelensConfiguration returned null for a missing type, registering the container as if FireLens were absent, and persisted any other string, so an unknown type only became ineffective later when findFirelensRouter recognized neither value. Both are now rejected at the RegisterTaskDefinition JSON boundary with the smithy validation wording, and are covered in EcsJsonHandlerRuntimePlatformLogConfigurationTest. |
||
|
|
677cdbe053 |
feat(redshift): authorize COPY and UNLOAD with IAM_ROLE (#3815)
* feat(redshift): parse IAM_ROLE clause on COPY and UNLOAD * feat(s3): add signed-principal authorization wrappers for role sessions * feat(redshift): authorize COPY/UNLOAD S3 access through an IAM_ROLE session * feat(redshift): thread IamService through the Redshift auth proxy chain * test(redshift): cover IAM_ROLE resolution and signed authorization in prepareCopy * fix(redshift): complete IAM_ROLE S3 authorization * test(redshift): cover IAM_ROLE authorization end to end * docs(redshift): document IAM_ROLE COPY and UNLOAD * fix(redshift): retain IAM_ROLE session during COPY * style(test): use Mockito static imports * fix(native): initialize redshift copy simulator at runtime * fix(redshift): address IAM role review feedback * test(redshift): use valid proxy relay keys * fix(redshift): require IAM roles to be associated * test(compat): recover CodeArtifact create retries * fix(redshift): parse IAM role location names * fix(docs): exclude Redshift IAM role member label * chore: remove unrelated CodeArtifact test |
||
|
|
fdec637c27 |
fix(eks): preserve worker webhook scope in the URL path (#3849)
* fix(eks): preserve worker webhook scope in the URL path * docs(eks): clarify scoped and legacy webhook routes |
||
|
|
eb787672b8 |
feat(timestream-influxdb): add Timestream for InfluxDB backed by InfluxDB 2.x containers (#3683)
* feat(timestream-influxdb): add Timestream for InfluxDB backed by InfluxDB 2.x containers Implements all 24 AmazonTimestreamInfluxDB operations; DB instances and read replica clusters run real influxdb:2.7 containers. * Fix #2566 Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> * fix(timestream-influxdb): reject unsupported RestoreFromDbBackup parameters Point-in-time restore needs a continuous backup, and REPLACE_EXISTING accepts no configuration overrides, so both are rejected instead of silently restoring on-demand data or dropping the overrides. * Fix #2566 Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> * style(timestream-influxdb): import the classes used instead of naming them inline Replaces the inline fully-qualified LinkedHashMap, Comparator, Predicate and TimestreamInfluxDbService references with imports. * Fix #2566 Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> --------- Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> |
||
|
|
918a09f54a |
fix(appsync): move the GraphQL engine to a sidecar, out of the native image (#3534)
graphql-java (~3.8MB with transitive deps) was an unconditional dependency, so it and its schema/execution/parser classes were reachable in every native image regardless of whether AppSync was ever used (issue #2917), the same systemic pattern already fixed for Kubernetes (#2914) and Kafka (#2916). Schema parsing and query execution now run in floci/floci-sidecar-graphql, published from floci-io/floci-sidecars, the same model #3799 already moved Cedar onto: GraphqlSidecarManager lazily starts the pinned image and checks the contract version it reports on /health, refusing a sidecar speaking another contract major with a message naming the image and the variable to change. GraphqlSidecarClient talks to it over plain HTTP. graphql-java is no longer a dependency of this repository at all, not even test-scoped: its schema/execution/parser classes, the query planner, and the 17 AWS scalar coercions now live entirely in the sidecar's own repository. The sidecar itself carries zero AppSync-specific knowledge, and zero AWS vocabulary: its scalars are generic named coercion kinds a caller maps its own scalar names onto, so SidecarSchemaCompiler now sends a scalars mapping (AWSDateTime -> date-time, and so on for all 17) alongside every SDL, or AWS scalar validation would silently degrade to pass-through coercion. It exposes three endpoints: schema validate/compile, a query planner that lists every (typeName, fieldName) coordinate a query would visit plus the directives on each (with zero interpretation of what they mean), and execute, which accepts an opaque denyFields list and nulls those coordinates out with the caller-supplied error. All @aws_auth/IAM/ Cognito/Lambda-authorizer interpretation stays in Floci (SidecarFieldAuthorizationPlanner, AppSyncAuthRequirements), computed from the planner's output before /v1/execute is ever called, so a query the planner can't fully analyze fails closed (refuses the request) instead of silently running unauthorized. SidecarSchemaCompiler replaces AppSyncSchemaParser: it still injects AppSync's directive declarations and the 17 scalar type declarations into the customer's SDL (pure string work) before handing the SDL to the sidecar. While the scalar coercion logic was still being ported to the sidecar's repository, testing surfaced a real bug: every scalar's parseLiteral() delegated to parseValue(), which throws CoercingParseValueException; graphql-java's literal validator only catches CoercingParseLiteralException, so an invalid literal argument (as opposed to an invalid variable) escaped as an unhandled exception instead of a spec-correct GraphQL ValidationError. Fixed in the sidecar before it was ever published. QueryRegistry, QueryExecutor, AuthFieldWrapper, AuthorizationDataFetcher's live DataFetcher wrapper, and AppSyncFieldUnauthorizedException are deleted: their in-process execution role no longer exists. The directive interpretation half of AuthorizationDataFetcher survives as AppSyncAuthRequirements, now taking generic data instead of live graphql-java objects, shared rather than duplicated. Verified end to end against the published image: pulled floci/floci-sidecar-graphql:0.2.0 fresh and ran the full AppSync suite (190 integration tests across schema lifecycle, auth, and execution) through the real GraphqlSidecarManager, including the sidecar starting and stopping as a real sibling container over the mounted Docker socket. |
||
|
|
6f87973649 |
feat(ecs): add FireLens task logging support (#3768)
* feat(ecs): add FireLens task logging support * fix(docker): omit extra hosts for container network mode * fix(ecs): bind FireLens router port to loopback |
||
|
|
5ec3fb67a8 | fix(ec2): resolve instance profile names through IAM (#3856) | ||
|
|
ad20699a6b |
fix(apigateway): complete API Gateway API key responses (#3817)
Return timestamps, stage keys, tags, and customer ID across create, get, list, and update operations to prevent Terraform provider crashes and state drift. Generate opaque IDs by default while preserving legacy generateDistinctId=false behavior. Keep API key values hidden unless explicitly requested. Add REST, SDK, and CloudFormation regression coverage. |
||
|
|
30b491a546 |
feat(glue): table version reads and deletes, batch partition delete, SearchTables (#3828)
GetTableVersion answers one archived version by VersionId, or the current table when none is given; an unknown version is EntityNotFoundException and a non-integer one InvalidInputException. DeleteTableVersion and BatchDeleteTableVersion drop archived versions, the batch form reporting per-version Errors; the current version is refused, as AWS refuses it on the console and the API, since DeleteTable is the way to drop it. BatchDeletePartition deletes up to 25 partitions and reports the ones not found in Errors, the shape the other batch partition calls use. SearchTables searches every table of the catalog: SearchText as a substring of name, database, description, owner, columns and parameter values (exact when quoted), Filters with the API reference's tokenised match for string keys and a Comparator for the time fields, SortCriteria on the same fields, and MaxResults with NextToken paging. Closes #3826 |
||
|
|
54a5cf3e9c |
feat(rds): global clusters and FailoverDBCluster (#3819)
CreateGlobalCluster creates an Aurora global database, empty or with an existing Aurora cluster as its primary, in which case engine, version, database name and encryption come from that cluster and may not be given. CreateDBCluster with GlobalClusterIdentifier joins a cluster: the first becomes the primary, every later one a secondary in a region that holds no member yet, with the primary's credentials and database name and a point-in-time copy of its data through the pg_dumpall mechanism that snapshots and read replicas use. DescribeGlobalClusters answers the real records for RDS, with IsWriter and Readers per member; DocumentDB and Neptune keep the shared empty answer. SwitchoverGlobalCluster and FailoverGlobalCluster promote the named secondary and demote the current primary to a secondary, the topology AWS keeps on switchover and restores after a managed failover. RemoveFromGlobalCluster detaches a member into a standalone cluster and the primary goes last; DeleteGlobalCluster needs an empty, unprotected global cluster; ModifyGlobalCluster renames, protects or upgrades, with members following. DBCluster now carries the writer role: the first instance is the writer, IsClusterWriter reports it instead of true for every member, deleting the writer promotes a remaining member, and FailoverDBCluster moves the role to the named reader or the first one; a cluster without a reader is refused with InvalidDBClusterStateFault. Closes #3778 |
||
|
|
22b0627245 |
test(compat): assert recorded metric filter publishing through the SDK modules (#3809)
* feat(logs): add metric filters with per-event metric publication Implements PutMetricFilter, DescribeMetricFilters, DeleteMetricFilter and TestMetricFilter on the CloudWatch Logs JSON 1.1 handler, backed by a filter pattern engine for term, space-delimited and JSON patterns. The grammar is checked against 148 TestMetricFilter cases recorded from AWS, kept as fixtures under src/test/resources/cloudwatchlogs and recaptured with the opt-in script under tools/aws-capture/cloudwatchlogs. Validation follows the observed AWS wire behavior: the five regex-bearing filters per log group quota is shared with subscription filters through one canonical backend monitor, a filter pattern may hold at most two regular expressions, defaultValue must be a JSON number, DescribeMetricFilters requires metricName and metricNamespace together in both directions, and TestMetricFilter reports one-based event numbers with an empty public extractedValues map for JSON patterns. Ingested events publish samples into CloudWatch Metrics per event at the event timestamp: matching events contribute the extracted or literal value, non-matching events contribute defaultValue, dimensions are all-or-none, and system dimensions only attach to matching events. Failed publications are retried from a bounded queue of 10,000 samples with stable publication ids. Resettable gains beforeReset and afterReset default hooks so the metric filter publisher can pause and drain before a state reset wipes storage and resume afterwards. EmulatorInfoController.performReset is serialized and calls the hooks around the existing container teardown and storage wipe, running afterReset in a finally block so a failed wipe cannot leave a publisher paused. The GetMetricStatistics and GetMetricData Query responses now carry the CloudWatch namespace so both read paths return the same samples. * feat(cloudformation): provision AWS::Logs::MetricFilter Adds LogsMetricFilterCfnProvisioner for creates, in-place updates, name changes and deletes. Ref and PhysicalResourceId are the filter name alone, as observed on AWS; the log group is kept as private resource metadata. A replacement deletes the old filter before creating the new one, matching the DELETE then CREATE event order AWS emits, and a failed replacement recreates the previous definition on rollback. Every mutation records an APPLIED, NOT_APPLIED or UNKNOWN outcome under the service lock so a failed or ambiguous call can never authorize deleting or overwriting a filter the stack does not own. Ownership that cannot be proven is resolved conservatively before the next mutation. The engine gains three small provisioner hooks that this type needs and others may reuse: - ProvisionContext carries a progress consumer so a provisioner can emit the intermediate DELETE_IN_PROGRESS and DELETE_COMPLETE events of a delete-first replacement while provision is still running. - rollbackUpdate(resource, progress) lets a provisioner restore its own previous state during UPDATE_ROLLBACK and report the steps as events. - hasPendingRollbackCleanup and retainsFailedUpdateState let a provisioner tell the engine that an UPDATE_FAILED resource still holds its own rollback snapshot, so the engine neither restores the previous resource over it nor refuses a later DeleteStack. Both default to false; only this provisioner overrides them. The type is listed in supported-resource-types.tsv, the generated resource table and CfnProvisionerFixture, with unit, integration, storage reload and SDK coverage. * docs(logs): document metric filters and the AWS verification record Describes the metric filter operations, publication semantics and CloudFormation support in docs/services/cloudwatch.md and adds cloudwatch-metric-filters-verification.md, the record of what was observed on AWS in eu-west-1, with which tools, and where each recorded fixture came from. Registers the handler and the verification page with the docs tooling and teaches the service inventory test to count facet pages. * feat(logs): publish metric filter samples off the PutLogEvents thread PutLogEvents evaluated each filter and wrote one CloudWatch Metrics sample per filter and event on the request thread while holding the filter-store monitor, up to a million writes for a maximal request, so ingestion latency depended on the Metrics sink and every PutMetricFilter waited behind the whole batch. The request thread now only evaluates the group's filters as they are at ingestion and hands the resulting immutable samples, with their stable publication ids, to a bounded queue of 100,000 samples. The existing single worker drains it and writes one sample per monitor acquisition, so a PutMetricFilter or a reset waits for at most one write. A batch that does not fit the queue is written inline on the request thread rather than dropped. Failed writes still land in the 10,000 sample retry map with the same ids and cadence as before. Reset pauses the worker, discards queued and failed samples and bumps a generation counter so a batch taken before the reset is never written into the wiped store. Shutdown drains the queue before storage shuts down and clears the retry map only after the worker has terminated. Samples ingested while Metrics is disabled are discarded at startup. Integration and SDK tests poll for the sample, as they would against AWS. * test(compat): assert recorded metric filter publishing through the SDK modules Extends the Java compatibility module with the publishing scenarios recorded from AWS: mixed defaults and quiet traffic, extraction and ordinary dimension series, system dimensions on matches only, and a Sum alarm driven by quiet defaults. Each series is read through the SDK's CloudWatch JSON protocol and again as a signed legacy Query request, so GetMetricStatistics and GetMetricData agree on every sample, timestamp, unit and dimension set. Expected values come from module-local copies of the root fixture metric-filter-publishing-aws.json. MetricFilterFixturePackagingTest checks the Java copy loads from the classpath and the root CloudWatchLogsMetricFilterFixturePackagingTest fails when either SDK module copy drifts from the root file. The Python module gains tests/metric_filter_replay.py, an opt-in replay of the same scenarios against a Floci endpoint or, with explicit profile, region and write acknowledgement, against AWS. Its logic is covered offline by tests/test_metric_filter_replay.py with the network blocked. Both module Dockerfiles are unchanged: the Java image already runs the whole suite and the Python image already copies tests/. * test(compat): assert every recorded statistic and poll for published samples The SDK publishing assertions compared only Sum and SampleCount although the AWS fixture also records Minimum and Maximum for the default-value scenarios. Both the SDK JSON reads and the signed legacy Query reads now assert every statistic the fixture carries, on GetMetricStatistics and GetMetricData. Publication now happens shortly after PutLogEvents returns, so present series are polled and absent series are asserted only after a later positive control of the same filter is visible, which the publisher's ordering guarantees. The read window ends at second 59 so a sample stamped on the following minute is never in scope. The live replay's Region check names the commercial partition explicitly. botocore already defaults get_available_regions to partition_name="aws", so GovCloud and China Regions were rejected before; the offline test now pins it. * test(compat): keep the metric filter SDK test on the Java 17 API of the compat image List.getLast() is Java 21; the sdk-test-java image compiles with Temurin 17. |
||
|
|
a3da2a3767 |
feat(rds): add SQL Server support to RDS (#3752)
* feat(rds): add SQL Server support * fix(rds): align SQL Server master handling * fix(rds): reject SQL Server DBName * fix(test): import Mockito matchers |
||
|
|
7e539155e1 |
fix(ec2): report the calling account as resource owner (#3814)
EC2 froze every resource's owner to the configured default account at construction time, so OwnerId came back as 000000000000 no matter which account the request resolved to. Per-account isolation itself worked, but the reported owner contradicted what STS returns for the same credentials and what SQS embeds in its ARNs. The visible consequence was DescribeImages --owners: the filter was honored but matched against the frozen value, so filtering on the account actually in use returned nothing, and the common Terraform pattern of pinning an AMI to a known owner account failed with "Your query returned no results". Resolve the owner per request through callerAccountId() instead, for the ownerId fields, the generated ARNs and the self owner alias. Callers outside a request scope (startup seeding, internal provisioning) still fall back to the configured default account. Closes #3775 |
||
|
|
008aa9ba35 |
feat(rds): read replicas with a point-in-time copy of the source (#3813)
CreateDBInstanceReadReplica creates a standalone instance with its own container and endpoint that inherits the source's engine, version, credentials, database name and, unless overridden, class, storage and minor version upgrades; a same-region replica also inherits the parameter, option, subnet and security groups, a cross-region one (source named by ARN) gets the region's defaults, as the API reference states. The replica starts with automated backups off, and both ends report the link the way DescribeDBInstances does: ReadReplicaSourceDBInstanceIdentifier plus a "read replication" StatusInfos entry on the replica, ReadReplicaDBInstanceIdentifiers on the source, identifier within a region and ARN across regions. A subnet group with a plain identifier source is refused with DBSubnetGroupNotAllowedFault. The replica's database is initialised from a pg_dumpall of the source taken at creation, the mechanism RestoreDBInstanceFromDBSnapshot already uses, so only PostgreSQL sources are accepted (CreateDBSnapshot draws the same line). Writes after creation are not streamed; the docs say so. PromoteReadReplica clears the link on both ends, turns backups on with the requested retention (one day when omitted) and window, and reboots the instance as RDS does. Deleting a source promotes its same-region replicas and leaves a cross-region replica with replication terminated, as the user guide documents for PostgreSQL; deleting a replica drops it from the source. SwitchoverReadReplica is refused with InvalidDBInstanceState, the only state error the API reference lists, since AWS supports it for Oracle and SQL Server only. PromoteReadReplicaDBCluster answers InvalidDBClusterStateFault because no cluster here is created as a replica. Refs #3778 |
||
|
|
75d1c2ae62 | feat(lambda): support custom Docker flags (#3751) | ||
|
|
9740b32b51 |
fix(athena): read Iceberg-format Glue tables via iceberg_scan (#3738)
* feat(athena): read Iceberg-format Glue tables via iceberg_scan Glue tables written by pyiceberg's GlueCatalog (Parameters.table_type= ICEBERG) never populate StorageDescriptor.InputFormat/SerializationLibrary, so GlueViewDdlBuilder's format-sniffing heuristic always fell through to read_csv_auto and failed parsing the table's binary Parquet data files. Detect Iceberg tables via Parameters.table_type and build the view from iceberg_scan(Parameters.metadata_location) instead, following the table's real manifest list rather than globbing every Parquet file physically present under its location -- which also fixes silently wrong results for any table with more than one snapshot (updates, deletes, repeated appends), not just the CSV-parse failure on a single-snapshot table. The iceberg extension is installed/loaded once, only when the DDL batch actually contains an Iceberg table. A table flagged ICEBERG but missing metadata_location falls back to the existing format-sniffed heuristic. Verified against a live build: pyiceberg write -> Athena SELECT returns correct rows for both a single-snapshot and a two-snapshot table; full athena + glue test suites (352 tests) pass with no regressions. Fixes #3737 This change was implemented by Claude (Anthropic's AI coding assistant), working on behalf of @maurice1979 who filed the linked issue. * docs(athena): fix formatting and clarify Iceberg handling explanation Corrected formatting and clarified the explanation regarding Iceberg tables and their handling in DuckDB. Signed-off-by: Jordi Vidal de LLobatera <is.maurice@protonmail.com> * docs(glue): cross-reference Iceberg handling from glue.md; fix em dash docs/services/glue.md still described only the InputFormat/SerdeInfo format-sniffing heuristic for choosing a DuckDB read function, without mentioning that Iceberg-format tables (Parameters.table_type=ICEBERG) bypass it entirely via iceberg_scan, per the change in the previous commit. Added a short cross-reference to Athena's format-inference docs so glue.md doesn't describe stale, pre-fix behavior. Also removed an em dash from GlueViewDdlBuilder's new Javadoc, per this repo's own AGENTS.md style rule (no em dashes; colons, commas, or periods instead). The matching instance in docs/services/athena.md was already fixed via the Copilot autofix suggestion. Both findings came from the Copilot pull request review on #3738. This change was implemented by Claude (Anthropic's AI coding assistant), working on behalf of @maurice1979. --------- Signed-off-by: Jordi Vidal de LLobatera <is.maurice@protonmail.com> |
||
|
|
0f4865e554 |
feat(rds): copy and reset parameter groups and copy option groups (#3781)
Add CopyDBParameterGroup, CopyDBClusterParameterGroup, CopyOptionGroup, ResetDBParameterGroup and ResetDBClusterParameterGroup. The groups, their overrides and options were already modelled and served by the create, modify, describe and delete actions; these five answered UnsupportedOperation. A copy resolves its source by name or ARN, creates the target through the existing create path so the already-exists check and the ARN come from one place, and copies the family and overrides, or the engine, major version and options for an option group, with any Tags applied. Source and target names must pass AWS's identifier rule, which is how AWS refuses to copy a managed default group: its name carries periods, and the answer is InvalidParameterValue with the identifier message. A reset drops the named overrides or all of them; ResetAllParameters together with a Parameters list is InvalidParameterCombination, and a managed default cluster group answers InvalidDBParameterGroupState as Modify does. Responses use the model's result wrappers and shapes. The action table in docs/services/rds.md is regenerated and its note that CopyOptionGroup is unimplemented removed. Closes #3777 |
||
|
|
d348686744 |
feat(sfn): support ItemReader InputType CSV (#3603)
* feat(sfn): support ItemReader InputType CSV
A Distributed Map can read a CSV dataset through ItemReader. Field names come
from the first row, or from ReaderConfig.CSVHeaders when CSVHeaderLocation is
GIVEN, and each data row becomes an object of string values.
Every value is a string, a row shorter than the headers pads with empty
strings, and a longer one drops the surplus, as AWS documents.
Drops the assertion that CSV is not implemented, which this replaces.
* feat(sfn): honour CSVDelimiter and quoted newlines in ItemReader CSV
ReaderConfig.CSVDelimiter selects COMMA, PIPE, SEMICOLON, SPACE or TAB. An
unsupported value fails the state with States.ItemReaderFailed.
CsvParser.parseAll gained a delimiter overload and now tracks quotes across
line breaks, so a quoted field may carry the delimiter or a newline without
ending the record. The single argument overload keeps comma behaviour for the
existing callers.
* fix(sfn): apply the documented CSV quote and backslash escaping
AWS preserves a doubled quote as a single quote whether or not the field is
quoted, so the reference dataset's {""MyKey"":""MyValue""} has to reach
States.StringToJson as {"MyKey":"MyValue"}. The reader dropped both quotes
instead: only a quote opening a field starts a quoted run, and the unquoted
case fell through to the toggle that consumed the pair.
Backslash escaping was missing as well. A backslash escapes another backslash,
a quote or the configured delimiter, and a backslash before anything else is
dropped.
parseLine and parseAll now share one scanner so the rules live in one place.
The backslash rules stay off for parseLine, which S3 Select and Athena use,
where a lone backslash is ordinary data.
|
||
|
|
6b389c33eb | feat(eks): authenticate EC2 workers through access entries (#3805) | ||
|
|
892927ceb5 |
feat(verifiedpermissions): run Cedar from the floci-sidecar-cedar image (#3799)
* feat(verifiedpermissions): run Cedar from the floci-sidecar-cedar image The Cedar sidecar now comes from floci-io/floci-sidecars as floci/floci-sidecar-cedar, pinned to an exact version because a cached :latest is never re-pulled. CedarSidecarManager reads the contract JSON that the image's /health returns: a sidecar speaking another contract major is refused immediately with a message naming the image and the FLOCI_SERVICES_VERIFIEDPERMISSIONS_CEDAR_IMAGE and _CEDAR_URL settings to change, instead of polling for thirty seconds or failing later on a request. A pre-configured URL is probed the same way. A sidecar whose health body is not JSON predates the contract and is accepted with a one-time warning. * test(verifiedpermissions): exercise the published Cedar image VerifiedPermissionsIntegrationTest no longer boots the in-tree sidecar in process: CedarSidecarManager starts the pinned image through Docker, the same path production takes, under a vp-test resource namespace so the manager's remove-before-start cannot kill a developer's live sidecar. It is skipped without Docker, and locally when the image is not present; in CI a missing image fails. VerifiedPermissionsServiceTest keeps its reject-before-persist coverage against a fake sidecar answering 400, and CedarSidecarClientTest pins the request shapes and the 200/400/other mapping Floci owns. * chore(build): drop the in-tree Cedar sidecar sidecars/cedar now lives in floci-io/floci-sidecars as cedar/ with its history. The build-helper test source root and the test-scoped cedar-java dependency existed only to boot that server inside the test JVM; the tests now run against the published image, so both go, along with the .dockerignore allowlist entry that let the sidecar Dockerfile see its sources from the repository root context. * ci: stop publishing the Cedar sidecar from this repository The release, nightly and reusable image workflows no longer build a Cedar image or record it in the provenance manifest; the sidecar is released from floci-io/floci-sidecars on its own cadence. The compatibility workflow no longer builds and starts the sidecar by hand: Floci pulls the pinned image itself over the mounted socket onto compat-net, exactly as it already does for floci-duck. The unit-test shards prefetch the pinned image, reading the tag from application.yml so the two cannot drift. The floci/floci:*-cedar tags stop at this change; whether the next release cut retags the sidecar image under the old name for a deprecation window is a release decision, not a workflow default. * docs(verifiedpermissions): document the external Cedar sidecar image The Verified Permissions page names floci/floci-sidecar-cedar, why it is pinned to an exact version, how to pre-pull it, where its API and the sidecar contract are documented, and what a contract mismatch looks like. The README's Docker integration table gains the Verified Permissions row it never had. AGENTS.md records the sidecar rule: own repository, no tag suffix on the Floci image, no :latest default, the sidecar releases first, and how a sidecar is tested from here. |
||
|
|
f004aeaad5 |
feat(cognito): implement federated sign-in (#3748)
* feat(cognito): add federation transaction stores * fix(cognito): atomically consume federation state * feat(cognito): support OIDC provider exchange * fix(cognito): validate OIDC federation providers * fix(cognito): validate OIDC endpoint schemes * feat(cognito): add federated oauth routes * fix(cognito): preserve oauth state and codes * feat(cognito): implement federated sign-in coverage * chore: remove internal task report * fix(cognito): use Cognito IdP callback for federation * fix(cognito): use provider callback for token exchange |
||
|
|
f7565dff3e |
feat(apigateway): honour the remaining REST integration settings (#3434)
* feat(apigateway): honour the remaining REST integration settings
PutIntegration persisted 6 of the 16 fields AWS documents. The rest were
accepted without error and silently dropped, so an integration could be created
exactly as intended and then behave as though the configuration were absent.
- timeoutInMillis is applied to the backend call and defaults to AWS's 29,000ms
rather than the previously hardcoded 30s. Values below AWS's 50ms floor are
rejected; the 29s ceiling is an edge-optimized limit, so Regional APIs may
exceed it.
- tlsConfig.insecureSkipVerification skips backend certificate and hostname
verification. Without it an HTTPS backend behind a private CA or a self-signed
certificate was unreachable with no way to opt out.
- contentHandling converts payloads in both directions: CONVERT_TO_TEXT
base64-encodes a binary request for mapping templates, CONVERT_TO_BINARY
decodes a base64 text request before it is sent. Integration responses accept
it too, applied as an output conversion after response templates.
- binaryMediaTypes on the RestApi marks content types as binary. A binary body
now reaches an AWS_PROXY integration base64-encoded with isBase64Encoded set;
previously it was read as a UTF-8 string, which corrupted it.
- connectionType VPC_LINK requires connectionId to name a link that exists and
is available. The five REST VPC Link operations are implemented at /vpclinks.
Floci has no real VPC, so a valid link routes straight to the integration URI;
what is enforced is the misconfiguration AWS also rejects.
- cacheNamespace and cacheKeyParameters drive response caching, gated on both
switches AWS requires: cacheClusterEnabled on the stage and caching/enabled on
the method. Only successful responses are cached, expiring after the method's
ttlInSeconds.
- credentials is persisted and returned. Floci does not enforce IAM, so the role
is not actually assumed.
The same fields are now carried through an OpenAPI import, which previously
dropped them from x-amazon-apigateway-integration.
* fix(apigateway): align TLS, cache keys and VPC link patches with AWS
Three review findings on the REST integration settings, all cases where the
local behaviour was looser than the contract AWS documents.
tlsConfig.insecureSkipVerification installed a trust-all X509TrustManager, so an
expired certificate, a broken chain or a chain with no root reached the backend
happily. AWS skips only the check that the certificate was issued by a supported
certificate authority; it still performs basic validation of the expiration
date, the hostname and the presence of a root certificate authority. A backend
that would fail in AWS therefore worked here, which is the direction that hides
a production TLS misconfiguration. The trust manager now verifies validity,
checks that the chain holds together and terminates in a self-signed root, and
requires cA=true on that root when it actually issued a leaf. Hostname
verification is now requested explicitly rather than being switched off: note
that java.net.http.HttpClient always applies HTTPS endpoint identification and
ignored the previous null algorithm, so the hostname was in fact still checked,
but the code and its documentation both claimed otherwise.
The response cache key appended the method and request path to cacheNamespace.
AWS allows one cacheNamespace across several resources exactly so those
resources return the same cached data, and no two resources share a path, so the
setting could never do what it exists for. The key is now the namespace plus the
declared cacheKeyParameters. The namespace still defaults to the resource id, so
resources that did not opt into sharing stay separate.
UpdateVpcLink never looked at op. Any operation on /name or /description was
applied, so op=remove,path=/name set the name instead of being rejected, and
every other path was silently ignored and reported as success. AWS's patch table
supports only replace on those two paths; anything else is now a
BadRequestException.
Also removes the em dashes AGENTS.md disallows from the test files this branch
adds, which the Documentation Style check flagged.
* fix(apigateway): enforce keyCertSign and name constraints under insecureSkipVerification
The comment on CaIssuanceSkippingTrustManager claimed the root check matched
AWS's two requirements on a private root, cA=true together with a keyUsage
including keyCertSign, but only getBasicConstraints() was ever consulted. A root
with CA:TRUE and no keyCertSign was accepted here and rejected by real API
Gateway, which is the direction that hides a broken certificate authority until
deployment. The keyUsage bit is now checked alongside basicConstraints. An
absent keyUsage extension is still accepted: RFC 5280 leaves the key
unrestricted when it is missing, and PKIX reads it the same way.
The rest of the chain walk is now the platform's PKIX validator, anchored on the
chain's own root, which is exactly the "stop checking that the root is one we
trust, keep checking everything else" semantic this setting has in AWS. That
brings X509v3 name constraints with it, which the hand-rolled walk did not
implement at all, along with basicConstraints and keyCertSign on intermediates
and pathLenConstraint. The anchor's own extensions are not examined by PKIX, so
the root's checks stay explicit, and its NameConstraints extension is passed
through to the TrustAnchor. Expiration stays explicit too, because PKIX exempts
a trust anchor from it and AWS does not.
A lone self-signed certificate keeps its own path: it is its own root and is the
plain self-signed-server case the setting exists to enable, so CA extensions are
not demanded of it.
Three tests against real HTTPS backends: a well-formed private CA chain is
reached, a root declaring CA:TRUE without keyCertSign is rejected, and a root
that permits itself only internal.example while issuing for localhost is
rejected. The latter two return 200 without this change.
* fix(apigateway): require keyUsage on a private root and evaluate name constraints properly
Two corrections to the previous round's TLS work.
AWS states the root constraint as "x509 extension keyUsage must have
keyCertSign", which a root carrying no keyUsage extension at all does not
satisfy. The previous commit read a missing extension as leaving the key
unrestricted, which is generic RFC 5280 semantics but not this API
Gateway-specific requirement, and so accepted a certificate authority real API
Gateway turns away. A root without the extension is now rejected.
The name constraints handling was also wrong, in a way its own test hid.
Constraints were unwrapped from the root and handed to the TrustAnchor, but the
platform validator refuses to process anchor-supplied constraints and fails with
"name constraints in trust anchor not supported". So a root carrying the
extension was rejected blindly, never evaluated, and the test asserting a
violated constraint passed on that unrelated error.
Root-level constraints are now rejected deliberately, with an error that says
so, rather than as a side effect of a validator limitation. That is also the
documented behaviour: AWS tells operators hitting validation errors under
insecureSkipVerification to check their CA certificates for Name Constraints
extensions and reissue without them. Constraints on an intermediate sit inside
the certification path, where the validator does read them, and those are
enforced for real: the log now shows "name constraints check failed" rather than
"not supported".
Tests follow the same split. A three-certificate chain whose intermediate
permits only internal.example while issuing for localhost is rejected, a chain
whose intermediate permits localhost is reached, so the first is failing on the
constraint rather than on chain length, and a root carrying constraints is
rejected as its own documented case. Plus a root with CA:TRUE and no keyUsage
extension, which returns 200 without this change.
* fix(apigateway): match binaryMediaTypes literally apart from the catch-all
The matcher expanded a subtype wildcard, so an image/* entry covered
image/png. Nothing in the AWS documentation establishes that as a
pattern: */* is documented concretely ("To support all binary media
types, specify */*"), while every other example names one exact media
type at a time, and the browser walkthrough tells you to register the
concrete image/webp even though the request's Accept header carries
image/*. Expanding it made Floci treat a payload as binary where AWS
would compare the entry as a literal string and treat it as text.
Entries are now compared literally, ignoring the charset parameter,
with */* as the one wildcard. The wildcard branch keeps its coverage
through a */* test, and a second test pins the subtype wildcard as
not expanded so the behaviour cannot drift back silently.
|
||
|
|
d624988ff8 |
feat(appconfig): implement ListDeployments (#3749)
* feat(appconfig): add deployment listing service * feat(appconfig): expose ListDeployments * docs(appconfig): document ListDeployments * chore(appconfig): clean controller imports * fix(appconfig): make deployment pagination cursor-based |
||
|
|
66bcdaf675 |
feat(codeartifact): add CodeArtifact control-plane support (#3713)
Floci had zero CodeArtifact support: no service package, no docs, nothing. Any terraform apply touching aws_codeartifact_domain, aws_codeartifact_repository, or either permissions-policy resource failed outright. This adds the full CodeArtifact control plane: domain and repository CRUD, resource policies with optimistic-locking revisions, tags, and the fixed set of real AWS-hosted external (upstream) connections (public:npmjs, public:pypi, public:maven-central, etc.). Package publish/fetch endpoints per format (npm, PyPI, Maven, NuGet, generic) are intentionally out of scope here: this closes the terraform apply gap, not real package serving. ListTagsForResource (POST /v1/tags?resourceArn=) is CodeArtifact's one tag operation that addresses the resource with a query parameter on the bare path rather than a path segment, unlike every other V1TagsController/SharedTagsController handler. That method lives on V1TagsController itself rather than the shared AbstractTagsController base: SharedTagsController (mounted at /tags) already declares its own bare POST (tagResourceByBody, for TagResource), so a bare POST on the shared base collides with it and Quarkus refuses to start. CodeArtifact's handler is @V1Tags-qualified and only ever registered against V1TagsController, so the method belongs there. core/common stays service-free: CodeArtifactTagHandler registers itself as a bean the same way MskTagHandler does, and TagHandler gained a default for the lowercase key/value entry names CodeArtifact uses instead of AWS's usual capitalized Key/Value. Known, documented limitations (see docs/services/codeartifact.md): no cycle detection across upstream chains, no referential-integrity check when deleting a repository other repositories reference as an upstream, and no authorization check on cross-account domainOwner addressing (consistent with Floci's opt-in IAM enforcement elsewhere). Verified against the real botocore codeartifact service-2.json (protocol, exact querystring vs. body placement per operation, exact ARN format, epoch-seconds timestamps, real error shapes) and the live AWS API docs for behavioral rules not in the wire model (DeleteDomain blocked while repositories exist, the real fixed external-connection name/format list, PutDomainPermissionsPolicy's all-body field placement vs. the sibling repository operation's querystring placement). Live-verified three ways: - Unit tests including a concurrent-create race test proving the synchronized guard actually holds under contention, plus full-stack QuarkusTest/RestAssured integration tests. - A real terraform init/apply/plan/destroy cycle against a running Floci instance, independently confirming destroy actually tore the domain down via a follow-up describe-domain call. - A live AWS SDK v2 Java test exercising the real CodeartifactClient against a live instance. |
||
|
|
d9abefb83f |
feat(redshift): seed catalog and system views (#3552)
* feat(redshift): seed catalog and system views on cluster startup Seed Amazon Redshift catalog and system views on container startup into both template1 and dev databases so BI, ORM, and migration tools (Tableau, Looker, DBeaver, Flyway, Liquibase, dbt) can introspect database schema metadata without missing-relation errors. * feat(redshift): record COPY failures in stl_load_errors and dynamicize query logs Record failed S3 COPY attempts into pg_catalog.stl_load_errors via LoadErrorRecorder across simple and extended query flows. Convert stl_query and svl_qlog into dynamic views backed by pg_stat_activity, and add stv_wlm_query_state and svv_diskusage catalog views. * fix(redshift): align catalog views with documented Redshift column schema * fix(redshift): separate catalog seeding from copy error recording * test(redshift): preserve container manager coverage |
||
|
|
996a680cdc |
fix(ec2): reject key pair requests without KeyName (#3727)
* fix(ec2): reject key pair requests without KeyName CreateKeyPair accepted a request with no KeyName and stored a nameless key pair; the duplicate check then dereferenced that name on every later CreateKeyPair, and the Query catch-all reported it as "Unexpected error: null". CreateKeyPair and ImportKeyPair now answer MissingParameter, ImportKeyPair answers InvalidKeyPair.Format instead of an InternalFailure for material that is not base64, DeleteKeyPair requires a name or an id and returns the deleted keyPairId, and the name comparisons tolerate a nameless record already sitting in a persistent store. The EC2 docs still described the placeholder key material that #3307 replaced. Closes #3356 * fix(ec2): return InvalidKey.Format for malformed key material on ImportKeyPair The EC2 API error reference lists InvalidKey.Format as the key pair not being in a valid OpenSSH public key format, which is the message this branch sends. InvalidKeyPair.Format is a separate documented code for a different failure. |
||
|
|
98c47c4347 |
feat(eks): implement access-entry management (#3745)
* feat(eks): implement access-entry management * test(eks): wait for cluster activation in access-entry compatibility test * fix(eks): validate access-entry maxResults with shared parser |
||
|
|
03603aeacd |
fix(ec2): stage user data outside guest temporary mounts (#3736)
* fix(ec2): stage user data outside guest temporary mounts * docs(ec2): correct user-data script staging path |
||
|
|
d4a96913df |
fix(ec2): issue instance-profile role credentials through IMDS (#3742)
* fix(ec2): issue instance-profile role credentials through IMDS * test(ec2): cover null IMDS unregister and shutdown revocation |
||
|
|
ef03c59864 |
fix(apigateway): prevent JWT issuer and JWKS SSRF (#3743)
* fix(apigateway): prevent JWT issuer and JWKS SSRF * fix(apigateway): import verifier types |
||
|
|
33d17c0146 |
feat(secretsmanager): add the five missing actions and correct response fidelity (#3711)
* feat(secretsmanager): add the five missing actions and correct response fidelity Secrets Manager implemented 18 of the 23 actions in the API reference. This adds the remaining five and corrects a number of response and validation divergences found by working through each operation's reference page. New actions: - CancelRotateSecret turns rotation off and reports the half-built AWSPENDING version an interrupted rotation left behind. The staging labels are left alone, as AWS leaves them, because that version id is the only handle on a stale AWSPENDING - and a stale AWSPENDING that is not also AWSCURRENT makes every later RotateSecret fail with "a previous rotation isn't complete". - ValidateResourcePolicy reports wildcard principals under the same REFLEXIVE_PRINCIPAL_CHECK name AWS uses. BlockPublicPolicy on PutResourcePolicy now enforces the same check. - ReplicateSecretToRegions, RemoveRegionsFromReplication and StopReplicationToReplica, backed by a replication model on Secret. Replicas carry the primary's ARN with the Region swapped, track later writes to the primary, and are read-only; a primary that still has replicas cannot be deleted. Scheduled rotation now fires. RotationRules were stored and echoed back but never acted on, so AutomaticallyAfterDays and ScheduleExpression described a schedule that could not happen. A background sweep rotates secrets whose NextRotationDate has passed, reusing the EventBridge Scheduler expression parser for rate() and cron(). The schedule advances when a rotation is dispatched rather than when it succeeds, so a failing rotation cannot pin the sweep on one secret forever. Response fidelity: - ListSecrets honours SortBy, SortOrder and IncludePlannedDeletion, and its entries carry SecretVersionsToStages, the rotation fields, DeletedDate and PrimaryRegion. - PrimaryRegion and ReplicationStatus appear only on multi-Region secrets, matching AWS's "only returns fields that have a value" rule. - Versions with no staging labels are deprecated: DescribeSecret and ListSecretVersionIds omit them unless IncludeDeprecated is set, and an empty VersionStages array is omitted rather than sent. - ListSecretVersionIds gained IncludeDeprecated, LastAccessedDate and paging. Validation, all previously accepted silently: - DeleteSecret rejects a recovery window outside 7-30 and the ForceDeleteWithoutRecovery/RecoveryWindowInDays combination. A window of 0 used to fall through to force-delete, turning a request for no recovery window into an unrecoverable delete. - CreateSecret uses ClientRequestToken as the version id and is idempotent on retry; UpdateSecret, which AWS documents as not idempotent, rejects a token that already names a version. - RotationRules bounds, secret name charset, SecretString/SecretBinary exclusivity, KMS key existence and state, and the documented caps on BatchGetSecretValue, Filters, ExcludeCharacters and ResourcePolicy. Secret values remain stored in the clear; encrypting them with the emulator's own KMS would protect nothing while making the store unreadable. KmsKeyId is validated instead, which is the part a caller can observe. Two deviations are deliberate and recorded in docs/services/secrets-manager.md: LastRotatedDate is retained after CancelRotateSecret, and RotateSecret with RotateImmediately=false does not create the throwaway AWSPENDING version. * test(secretsmanager): create a real KMS key in the sdk-test-java compat test kmsKeyIdPreservation asserted that floci round-trips whatever KmsKeyId it is handed, using an ARN that was never created. That passed only because floci did not check the key; real AWS rejects a key it cannot access, and so does the new validation. The test now creates a key through the emulated KMS and round-trips that ARN, so it still covers KmsKeyId preservation without depending on the missing check. A second case pins the rejection itself. * refactor(secretsmanager): import types instead of qualifying them inline AGENTS.md asks for imports unless a name collision forces qualification. AwsException and UUID had neither. * fix(secretsmanager): hold the rotation lock while promoting a replica StopReplicationToReplica wrote the promoted replica outside the per-secret lock every other mutation in this file takes. The promotion races the primary's replica sync, and losing that race writes the replica back over the copy the call just promoted. Also imports KmsKey, ConcurrentHashMap and HashMap rather than qualifying them inline, per the same AGENTS.md rule. * test(secretsmanager): assert the KMS rejection by exception type, not message text createSecretWithAnUnknownKmsKeyIsRejected matched "InvalidParameterException" against the message, but that is the exception type; the message itself reads "You can't access the KMS key ... in this Region". The assertion now checks the typed InvalidParameterException and the text it actually carries. * test(secretsmanager): give the new KMS compat test its own order createSecretWithAnUnknownKmsKeyIsRejected inherited @Order(13) from the test it was added next to, so two cases shared a position. JUnit breaks the tie deterministically, but the duplicate made the sequence misleading; the tail is renumbered so each case keeps a distinct order. Also sorts the new KMS imports, which landed between the lambda ones. * fix(secretsmanager): guard every write to a secret with its owning monitor UpdateSecret read, mutated and persisted without taking the secret's lock, unlike every other mutator in the class, so two concurrent calls could drop one another's field. StopReplicationToReplica locked the replica's own ARN, but persist() writes a primary's replica slots while holding only the primary's lock: two monitors guarding one store slot, so a sync landing after the promotion could overwrite the promoted copy. The promotion now runs under the primary's monitor, and its two halves run in one critical section so nothing lands between them. SecretsManagerWriteLockTest parks a write mid-flight and asserts the second caller waits; both cases fail without the fixes. |
||
|
|
1831f10105 |
fix(config): enforce safe default network binding (#3684)
* fix: enforce safe default network binding * fix(config): keep signed test authority stable Pin the integration-test listener to the existing all-interface test bind and opt into that bind only in the test profile. This preserves localhost-based SigV4 fixtures while production keeps the loopback default. * fix(config): keep compat image backward compatible * chore: retrigger CI * fix(config): mirror JVM image network binding |
||
|
|
a2fddaf08d |
feat(eks): expose IMDS on 169.254.169.254 inside cluster containers (#3693)
* feat(eks): expose IMDS on 169.254.169.254 inside cluster containers When applications or agents run on Kubernetes nodes or use hostNetwork: true, they expect the AWS Instance Metadata Service (IMDS) at the standard link-local address 169.254.169.254:80. In Floci, EKS k3s cluster containers lacked access to IMDS at this link-local address, preventing workloads from discovering instance identities, node IAM roles, or dynamic cluster credentials without custom endpoint overrides. This change exposes IMDS on 169.254.169.254:80 inside EKS cluster containers when floci.services.eks.imds is enabled. It configures a background TCP relay via socat pointing to the host's EC2 metadata port, registers a synthesized EC2 node instance with the cluster's IAM role and container IP in Ec2MetadataServer, extracts reusable metadata proxy logic into Ec2MetadataProxy, and documents node network namespace reachability and hop limit handling. * fix(eks): address review feedback on lifecycle check, default flag, and instance seed * fix(eks): synthesize distinct node instance profile and import CompletableFuture * test(eks): enable IMDS profile and provide curl in docker test fixture |
||
|
|
f99e507916 |
feat(apigateway): implement GetUsage (#3561)
* feat(apigateway): implement GetUsage GetUsage had no implementation, so a caller asking a usage plan what it had consumed hit an unsupported action. This returns the real envelope with zeroed numbers rather than metering anything. Shape captured from real API Gateway: an items map of API key id to one pair per day of the inclusive range, alongside usagePlanId, startDate and endDate, and no position element when there is no further page. The pair is [used, remaining], not [used, quota]. Measured on a live usage plan, the second element is the quota limit minus cumulative use in the period: a plan with a 1,000,000 limit reported 999863 after 137 calls, then 999740 after 123 more. Anything reading that element as a quota is reading it wrong. Both elements are zero here, deliberately. Nothing counts requests per API key, and a usage plan carries no quota to subtract from, so there is no limit to report against. Throttle settings are already accepted and stored without being enforced, so this is consistent with how the service treats the rest of that surface. Storing a quota on the usage plan and counting on the execute path are the two pieces still missing, and both the javadoc and the service docs say so. A caller that sums the used counts therefore gets zero, which is what it already got when the action did not exist, without having to special-case a missing endpoint. Validation follows the captured errors: an unknown plan is NotFoundException and an end date before the start date is BadRequestException, "Usage end date must be after start date". * fix(apigateway): paginate GetUsage GetUsage takes limit and position, which this did not accept at all: every attached key came back in one response, so the implementation only matched the single-page case the original capture happened to exercise. Pagination now runs over the API key entries, defaulting to 25 a page. The token is the last key id already returned rather than a positional offset, so a page resumes after a known key and a concurrent key attachment cannot shift it. No position is emitted on the terminal page, matching the shape captured from real AWS. Two edges deliberately differ from real API Gateway, because it is not a good guide there. It answers limit=0 with an InternalFailure, which is a fault rather than a contract, so a page size below one is a BadRequestException here. It also accepts a limit past the documented maximum of 500, so anything larger is clamped rather than refused. Both choices are written down in the service docs. An unrecognised position is a BadRequestException, "Invalid position parameter", which is the message real API Gateway returns. The existing tests looked keys up with a dotted GPath. API key ids are random and can begin with a digit, which Groovy then parses as a number, so every lookup into items now uses bracket notation. That was luck rather than correctness before. * fix(apigateway): stop inventing a GetUsage limit ceiling The previous head clamped any limit above 500 to 500, extrapolated from a single observation that 501 was accepted. One accepted value does not establish a rule. Probed properly against real API Gateway: 500, 501, 1000, 5000, 100000 and 2147483647 are all accepted without error. The documented maximum is not a rejection boundary, so no ceiling is imposed here either and the regression asserts the observed rule across that ladder rather than an emulator specific clamp. Whether the service caps the page it actually returns above 500 is not observable without a usage plan holding more than 500 keys, so nothing is assumed about it and the docs say as much. The lower bound stays a deliberate divergence, now with both values measured: limit=0 and limit=-1 both answer InternalFailure on real API Gateway. That is a fault rather than a contract, so a page size below one is a bad request here instead of a reproduced 500. * fix(apigateway): cap the GetUsage page at 500 while still accepting more Removing the ceiling entirely went too far the other way. The probe shows real API Gateway accepts a limit above 500, so rejecting one would be wrong, but it never showed the service returning more than 500 entries in a single page, and the documented contract caps a page at 500. Returning more than 500 was therefore as unevidenced as rejecting the request. Request acceptance and response page size are now separate: a larger limit is honoured as a request, and the page stays capped at 500 until a real result with more than 500 keys shows otherwise. resolveUsageLimit becomes package-private so the distinction can be asserted directly rather than needing a usage plan with 500 keys behind it. * fix(apigateway): return GetUsage key usage under the values wire key The response serialised the per-key usage map as "items", which is the SDK-side member name, not the wire key. The Usage shape models that member with locationName "values", so a real client parsing a body keyed "items" finds the field absent and reads no usage at all. Verified with botocore's own rest-json parser against the apigateway service model: a body keyed "values" populates the member, a body keyed "items" leaves it None. Assertions and the service docs move with it. Only GetUsage is affected; the sibling list actions are a different shape and are untouched. |
||
|
|
ef341e1c01 |
feat(sfn): support ItemReader InputType JSONL (#3602)
A Distributed Map could only read a JSON dataset: every other InputType failed the state with "not yet implemented". JSONL now reads one item per line, skipping blank lines, so a trailing newline is not an item. ReaderConfig.ItemsPointer stays JSON only, as on AWS, and MaxItems truncates a JSONL dataset the same way it truncates a JSON one. |
||
|
|
682989288a | fix: add Scheduler retry backoff and DLQ handling (#3687) | ||
|
|
e2aefa654b |
feat(sagemaker): add SageMaker emulation with Docker-backed training (#1949)
Implement the SageMaker control plane over the AWS JSON 1.1 protocol
(X-Amz-Target: SageMaker.*) plus the runtime invocation path:
- Models, endpoint configs, endpoints, training jobs, and tags with
AWS-shaped validation errors (ValidationException / ResourceInUse)
- CreateTrainingJob runs the training image as a real Docker container
using the /opt/ml contract: hyperparameters, resourceconfig and
inputdataconfig under /opt/ml/input/config, S3 channel data under
/opt/ml/input/data/<channel>, and /opt/ml/model uploaded back to S3
as model.tar.gz under the configured S3OutputPath
- CreateEndpoint hosts the model image as a long-lived container with
the serve command, /ping health checks, and ModelDataUrl artifacts
extracted into /opt/ml/model
- POST /endpoints/{name}/invocations proxies to the container and maps
model 5xx responses to ModelError (HTTP 424) like SageMaker Runtime
- Training container logs stream to CloudWatch Logs under
/aws/sagemaker/TrainingJobs
- Storage wired through StorageFactory with memory/persistent modes,
config in EmulatorConfig and both application.yml files
- Unit, integration, and Docker-gated integration tests plus a boto3
compatibility test; service and docs registered in the catalog
|
||
|
|
801edd863d |
feat(macie2): add member administration (#3488)
* feat(macie2): add member administration * fix(macie2): align member account fidelity * fix(macie2): align member pagination limit |
||
|
|
5db516d9d5 |
feat(sfn): Map ItemReader with s3:listObjectsV2 (#3460)
* feat(sfn): support the s3:listObjectsV2 Distributed Map ItemReader The Map state listed the resource as accepted at CreateStateMachine but failed every execution with States.ItemReaderFailed. It now calls the S3 service in process, reads every page under Prefix, and gives each child the AWS item shape: Etag, Key, LastModified, Size and StorageClass. Bucket and Prefix come from Parameters or JSONata Arguments. An empty prefix succeeds with zero iterations and ReaderConfig.MaxItems trims the list. LastModified is epoch seconds. Real AWS renders it as a double in JSONPath state machines and as an integer in JSONata ones, and the emulator does the same. Fixes #3409 * fix(sfn): evaluate ItemSelector in JSONata Map states A JSONata Map state passed ItemSelector through the JSONPath resolver, so every {% %} expression reached the child as a literal string. The Map state now resolves ItemSelector as a JSONata template with $states.input bound to the Map input and $states.context.Map.Item carrying Value and Index, as on AWS. Real AWS evaluates ItemSelector before it records MapIterationStarted. A failing expression therefore fails the Map state without any event for that iteration, in both query languages. The evaluation moved ahead of the iteration event to match. Verified against real Step Functions in us-east-1 on 2026-09-12. * chore(sfn): simplify the listObjectsV2 reader and the ItemSelector failure path The reader listed the bucket page by page although the S3 service returns the whole sorted listing in one call. The Map state kept two copies of the iteration failure handling. The tests reuse the shared mapper and one JSONata Map definition. * perf(sfn): cap the listObjectsV2 listing at MaxItems ReaderConfig.MaxItems keeps the first keys in key order on AWS, which is what the S3 service returns for maxKeys. The reader now passes MaxItems to the listing instead of building every item and trimming afterwards. * chore(sfn): declare local types in the listObjectsV2 reader Replace var with explicit types in the production code this branch added. * chore(sfn): declare local types in the listObjectsV2 reader tests Replace var with explicit types in the test code this branch added. * fix(sfn): list every object when MaxItems is absent S3Service now treats max keys 0 as a request for an empty page, as AWS does for max-keys=0. The listObjectsV2 reader passed 0 when ReaderConfig.MaxItems was not set, so the Map got no items. It now asks for Integer.MAX_VALUE in that case, like the DynamoDB import path. |
||
|
|
86072aaa84 |
fix(lambda): back off DynamoDB Streams retries and expire aged records (#3613)
* fix(lambda): back off DynamoDB Streams ESM retries and enforce MaximumRecordAgeInSeconds * fix(lambda): treat unset MaximumRecordAgeInSeconds as no age cutoff Keep expired records retrying when no finite Lambda age limit is configured. |