mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 14:10:49 -05:00
83bc2bd2bfefe06dc26bebef8db4fd8521bdfe66
10
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
46d2f4e70f |
fix(docdb): refuse an engine version a live account does not list (#2682)
* fix(docdb): refuse an engine version a live account does not list CreateDBCluster and ModifyDBCluster derived a parameter group family from any engine version string and assigned "default.<family>" without checking that the family exists. The versions a live account lists for docdb are now the catalogue: 3.6.0, 4.0.0, 5.0.0, 5.0.1, 8.0.0, 8.0.1 and the major.minor form of one; anything else is refused before any change with "Cannot find version X for docdb". default.docdb8.0 joins the managed cluster parameter groups. Closes #2681 * test(docdb): refuse an unlisted engine version through the CLI |
||
|
|
f019573bf1 |
fix(docdb): store and return cluster and instance settings (#2651)
* fix(docdb): store and return cluster and instance settings CreateDBCluster and ModifyDBCluster dropped DBSubnetGroupName, DBClusterParameterGroupName, VpcSecurityGroupIds, StorageEncrypted, KmsKeyId, BackupRetentionPeriod, both windows, DeletionProtection and tags; instances dropped AutoMinorVersionUpgrade, PreferredMaintenanceWindow, CopyTagsToSnapshot and PromotionTier. Describe now returns what was given, or the defaults a live account assigns, and refuses what a live account refuses before any container is started: an unknown subnet group, parameter group, security group or KMS key, a KMS key on an unencrypted cluster, a retention period outside 1..354, malformed or overlapping windows. Records persisted before these fields existed are filled in with the defaults on read. Port is not taken from the request: the port a cluster reports is the one it is reachable on. Closes #2614 * fix(docdb): enforce deletion protection, parameter group family and undrivable windows DeleteDBCluster refuses a cluster with DeletionProtection, before any state changes. A named parameter group must belong to the family of the engine version the cluster will run, judged on modify against the requested version rather than the stored one; a cluster on a default group follows an engine version change to the new family's default. A window given without its counterpart that leaves no daily half hour for the derived one is refused with the live wording instead of a derived window that overlaps. * fix(docdb): refuse an engine version change that keeps a custom group of the old family * fix(docdb): judge a retained parameter group by its stored family, not its name * fix(docdb): classify a retained parameter group through the RDS catalogue, not its name --------- Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com> |
||
|
|
3b0e31b888 |
fix(rds,docdb): list DocumentDB clusters and instances in the RDS-family list form (#2623)
* fix(rds,docdb): list DocumentDB clusters and instances in the RDS-family list form The list form of DescribeDBClusters and DescribeDBInstances answered from one store: on the rds scope from RDS, on the docdb scope from DocumentDB, so a DocumentDB cluster was invisible to every list while its identifier form worked. A live account lists the whole family from either endpoint. RdsQueryHandler now assembles the list from both stores, honouring the db-cluster-id / db-instance-id filters in each and an engine filter across them (case-insensitive, OR over values, refused for a name outside the family's engine list as on AWS), and the controller sends the docdb-scope list form there too. The identifier form keeps routing to the store that owns the identifier. Both halves list the region the request is signed for. Closes #2613 * fix(rds): report and filter an Aurora member instance by its Aurora engine name DbInstance collapsed aurora-postgresql and aurora-mysql onto the community engine enum, so a cluster member reported Engine postgres and the engine filter matched it as postgres, where a live account says and matches aurora-postgresql. Keep the engine name the request gave (or the cluster's, for a member created without one) on the instance, and read it for both the Engine element and the filter; a record persisted before the field existed falls back to the enum. * fix(rds): give a persisted instance its engine name on restore An instance written before engineIdentifier existed deserializes with it null, and a runtime fallback to the enum would keep reporting an Aurora member as postgres. Backfill it in restorePersistedRuntime from the state that knows: the member's cluster for a member, the enum for a standalone instance. * fix(rds): never persist a guessed engine name for a member of a nameless cluster A cluster persisted before its own engineIdentifier existed (#1829) has none to hand down, and writing the member's enum in that case would store postgres for what may be an Aurora member — a guess that outlives the code able to tell. The backfill writes only what is certain: the cluster's stored name for a member, the enum for a standalone instance; a member of a nameless cluster is left unset. * fix(rds,neptune): list Neptune clusters and instances in the RDS-family list form too A live account lists a Neptune cluster from the rds, docdb and neptune endpoints alike and selects it with engine=neptune. The list form now merges Neptune rows the way it merges DocumentDB ones, and the neptune scope's list form goes to the same assembly. The Neptune store is not keyed by region, so its rows are scoped to the request's region by ARN. * fix(rds): close the subnet-group tags test in rds.bats --------- Co-authored-by: Priamo Germosen <6233424+pgermosen@users.noreply.github.com> |
||
|
|
d3871e1f25 |
feat(resourceexplorer2): add AWS Resource Explorer 2 with cross-service resource discovery (#2485)
* feat(resourceexplorer2): Add AWS Resource Explorer 2 with cross-service resource discovery Resource Explorer 2 lets AWS SDK clients discover resources across S3, RDS, DynamoDB, ElastiCache, and OpenSearch through a single query interface — the same way real AWS Resource Explorer aggregates resources from multiple services. Architecture: a ResourceProvider CDI interface in core/resource/ decouples Resource Explorer from individual services. Each service implements the interface to expose its resources. Resource Explorer discovers all providers via CDI Instance<ResourceProvider> and queries them live on every request — no intermediate store, no eventual consistency. New services become discoverable by implementing the interface; Resource Explorer never imports service packages directly. Query parsing: hand-written character-by-character tokenizer that implements the full Resource Explorer filter syntax — all 10 filter attributes (accountid, application, id, region, resourcetype, resourcetype.supports, service, tag, tag.key, tag.value), comma-OR within filters, negation (-), wildcard suffix (*), quoted strings, backslash escaping, and free-form text keywords. ListResources rejects free-form text (filter-only mode); Search accepts both. Tokens are classified by splitting on the first unescaped colon and looking the prefix up against the known attributes, matching the documented grammar. API surface: 20 REST JSON endpoints covering ListResources, Search, ListSupportedResourceTypes, full Index CRUD (CreateIndex always creates LOCAL — promote via UpdateIndexType, matching real AWS), full View CRUD with Scope and FilterString, BatchGetView with Errors for missing ARNs, default view association, and pagination with NextToken on all list operations. Tag operations use the existing SharedTagsController + TagHandler infrastructure. A default AGGREGATOR index and default view with tags included are auto-provisioned on startup so ListResources works without setup. AWS behavioral fidelity (matched against the API reference, not guessed): ListResources/Search with no view and no regional default return UnauthorizedException (401), not 404; the default view is scoped per region; CreateView requires a unique, regex-valid ViewName (ConflictException 409 / ValidationException 400) and only accepts "tags" as an included property; promoting a second aggregator index returns ConflictException; ListResources suppresses NextToken at MaxResults=1000; Search/ListResources cap results at the first 1000 matches; QueryString is required (empty string allowed) and MaxResults is range-validated. Pagination offsets are clamped so a stale NextToken against a shrunk live result set returns an empty page instead of a 500. All response JSON uses PascalCase field names built via Jackson ObjectNode (never valueToTree on domain models) to match the AWS SDK wire format exactly. Verified by decompiling every SDK model class with javap and comparing field-by-field, then running 16 read-only SDK tests against production resource-explorer-2 in us-east-1. ElastiCache ReplicationGroup gains arn and region fields so Resource Explorer can discover it. RDS resources get tags via ResourceGroupsTaggingService (the cross-service tagging API) since floci's RDS service doesn't implement AddTagsToResource. Indexes and views are persisted (hybrid storage) in production; tests pin the service to in-memory storage so runs stay isolated and idempotent. Testing: - 50 query parser unit tests covering the full grammar - 20 filter evaluation unit tests against synthetic resources - 9 pagination unit tests for the offset clamp and 1000-result cap - 73 integration tests (@QuarkusTest + RestAssured), grouped with @Nested by behavior class: conditional/stateful response fields, data provenance across services, edge/boundary pagination, cross-service data consistency, filter semantics, and AWS API fidelity (401 no-default-view, conflict on duplicate view name and second aggregator, view-name and included-property validation) - 28 SDK compatibility tests using real AWS SDK v2 ResourceExplorer2Client, asserting every field the SDK model exposes. Dual-mode: run against floci or real AWS via FLOCI_TARGET=aws (mutating tests skipped against real AWS). * feat(lambda): expose functions to Resource Explorer 2 Implement ResourceProvider so Lambda functions surface via the Resource Explorer 2 ListResources/Search APIs and lambda appears in ListSupportedResourceTypes. Iterates $LATEST versions only so published versions don't produce duplicate function entries. * feat(sns): expose topics to Resource Explorer 2 * feat(kms): expose keys to Resource Explorer 2 * feat(sqs): expose queues to Resource Explorer 2 Queue ARNs aren't persisted on the model; reconstruct them from the region (recovered from the storage key) plus the queue name via regionResolver.buildArn. * feat(ecr): expose repositories to Resource Explorer 2 * feat(stepfunctions): expose state machines to Resource Explorer 2 * feat(msk): expose clusters to Resource Explorer 2 * feat(pipes): expose pipes to Resource Explorer 2 * feat(acm): expose certificates to Resource Explorer 2 * feat(cognito): expose user pools to Resource Explorer 2 * feat(iam): expose users and roles to Resource Explorer 2 IAM is a global service: its ARNs carry no region, and Resource Explorer reports global resources with the region "global" (not an empty string), matching real AWS. Emit two resource types, iam:user and iam:role. * test(resourceexplorer2): parameterize per-service ListResources coverage The ten single-service resource tests were byte-for-byte identical except for the service name and resource type — the same service-filter/assert-no-foreign-service/assert-type-present shape copied ten times. Fold them into one @ParameterizedTest whose CsvSource carries the (service, resourceType) pairs, so adding a service is one row instead of a new @Nested class. IAM stays separate: it reports the global region and two resource types, which the shared shape can't express. * feat(amazonmq): expose brokers to Resource Explorer 2 Amazon MQ arrived on main after this branch was cut. Implement ResourceProvider so brokers surface via Search/ListResources and mq appears in ListSupportedResourceTypes, matching the other services already wired into Resource Explorer. Brokers carry an ARN and tags, so the mapping is the same shape as the rest: one mq:broker resource per stored broker. * feat(lightsail): expose resources to Resource Explorer 2 Lightsail landed upstream (#1583) after this branch began and models taggable, ARN-bearing resources (instances, disks, static IPs, key pairs) that AWS Resource Explorer indexes. Without a ResourceProvider its resources were invisible to Search/ListResources, unlike every other resource-owning service on this branch. LightsailService now implements ResourceProvider: getResources() maps each stored resource node to an ExplorerResource, deriving region and account from the ARN and resourceType as lightsail:<Type>; getSupportedResourceTypes() advertises the four stored types (static IPs flagged non-taggable, matching AWS). Coverage: a focused unit test asserts the node->ExplorerResource mapping (arn, type, region, account, tags) without Quarkus, plus the parameterized RE2 integration test seeds a Lightsail instance and disk and asserts both surface via ListResources. * feat(rum): expose app monitors to Resource Explorer 2 CloudWatch RUM (added upstream in #1797) owns taggable, ARN-addressable app monitors, so it fits the ResourceProvider extension point the rest of this branch uses to surface resources to Resource Explorer 2 Search, ListResources, and ListSupportedResourceTypes. RUM is the first RE2 provider whose API model carries neither an ARN nor a region (GetAppMonitor returns neither), so getResources() reconstructs the ARN: the region comes from the storage key, and the owning account is captured at creation time on the AppMonitor. That owner account is @JsonIgnore'd so it never leaks into the RUM API body and is not persisted; getResources() falls back to the default account for monitors reloaded from disk. Resolving the account at creation rather than at query time is what keeps a monitor's identity stable — an earlier draft read the account from the request context inside getResources(), which stamped every resource with the account of whoever called ListResources instead of its true owner. Injecting RegionResolver into RumService (threaded through the existing unit tests) and adding RegionResolver.getDefaultAccountId() support this. Adds RumResourceProviderTest, including a regression test proving the owner account is the creator's, not the querying caller's, plus a RumServiceTest assertion that the owner account never appears in the serialized API body. Extends ResourceExplorer2IntegrationTest to seed an app monitor and assert rum:appmonitor surfaces via ListResources and ListSupportedResourceTypes. * feat(resourceexplorer2): complete the API surface and close the AWS gaps Follow-up to the Resource Explorer 2 branch, addressing the gaps found reviewing it against the AWS API reference and search-syntax documentation. Wire-level corrections: - MaxResults ceilings are now per-operation, as AWS models them: 1000 for Search/ListResources/ListSupportedResourceTypes, 100 for indexes, 50 for views, 10 for member indexes. ListSupportedResourceTypes previously rejected page sizes AWS accepts, and ListViews accepted ones it rejects. - ListViews is scoped to the calling Region. AWS returns "the views available in the AWS Region in which you call this operation"; every Region's views were being listed. - Free-form keywords are OR'd rather than AND'd, which is how AWS reads them. The remaining deviation — AWS ranks a non-matching resource lower instead of excluding it — is documented rather than emulated, since a keyword-only search returning the whole account is not a useful local answer. - A tag filter against a view whose IncludedProperties omit `tags` is rejected with a ValidationException, as AWS documents for tag: / tag.key: / tag.value: / application:, instead of being evaluated on data the view may not expose. - Backslash escaping is honoured throughout the query grammar: escapes now survive tokenization and are resolved only where the character's meaning is decided, so `\-`, `\:`, `\,` and `\*` are literal text and a quoted phrase neutralises every operator inside it. - application: matches the application name as well as the resource-group ARN; resourcetype.supports:tags consults the provider's declared tag support instead of passing everything through; free-form keywords match tag keys and values. The remaining 12 operations are implemented, taking the service to all 32: the multi-Region setup lifecycle (CreateResourceExplorerSetup, DeleteResourceExplorerSetup, GetResourceExplorerSetup) provisions real indexes and views and records each Region's outcome independently, so one Region's failure is reported through its ErrorDetails rather than abandoning the task. The organization and trusted-service surfaces answer with the wire-accurate empty result, since floci models neither. Eleven more services expose their resources: EC2 (instances, VPCs, subnets, security groups, volumes, internet and NAT gateways, route tables), CloudFormation, CloudWatch Logs, EventBridge, Secrets Manager, SSM, ECS, EKS, Kinesis, Firehose, and ELB v2 — thirty providers in total. API Gateway and Route 53 stay out: RestApi carries no Region and Route53Service resolves no account id, so each needs a field added to an unrelated service first. Also documents the service, which a new service requires: docs/services/ resource-explorer.md with the generated action table, the deviations above, and the routing note, plus the mkdocs nav, README, and environment-variable entries. Seven existing tests asserted on the emulator's total resource count, which thirty providers push past Search's 1000-result cap; they are scoped to a bounded slice so their arithmetic stays meaningful. 24 tests added for the new behaviour. * fix(rum): keep a monitor's owning account across updates UpdateAppMonitor rebuilds the AppMonitor from its current state and never carried ownerAccountId over, so an update silently reassigned the monitor to whichever account next called ListResources. Resource Explorer then reported a wrong ARN and OwningAccountId for any monitor not owned by that caller. getResources' fallback for monitors reloaded from disk — where the transient owner account did not survive — was the configured default account. monitorStore.keys() is already scoped to the calling account by the account-aware backend, so a monitor reachable there is owned by that caller by construction; the caller's account is the correct fallback. Also addresses review findings on the Resource Explorer branch: braces in the compatibility test's cleanup, a synchronized override in the Lightsail provider test's storage stub, and four unread locals in the integration test. * chore: drop the stray local-dev Dockerfile docker/Dockerfile.localdev was carried in with the Resource Explorer work but is unrelated to it: nothing in the repo references it, and its header points at a CI pipeline and dev cluster that do not exist in this org. * fix(resourceexplorer2): order paginated results before slicing NextToken is a bare offset, but the list it indexes into is rebuilt on every call by iterating Instance<ResourceProvider> and StorageBackend.scan, neither of which promises an order. Offset pagination is only well defined over a stable order: page through Search or ListResources with MaxResults smaller than the result set and the second page indexes into a differently arranged list, silently dropping or repeating resources. Sort on a unique key before every paginate call: ARN for resources and indexes, the view ARN for ListViews, the resource type for ListSupportedResourceTypes. The regression test drives a provider that reshuffles its resources on each call, which is what an unordered map-backed store is free to do; without the sort a 25-resource set pages down to 16 distinct ARNs. This also makes ResourceProvider#getResources()'s "ordering is not significant" contract true rather than merely permitted. * docs: add the Resource Explorer row to the service matrix The downmerge picks up #2465's service-matrix gate, which fails `make docs-check` for any service registered in ResolvedServiceCatalog without a row in docs/services/index.md — resource-explorer-2 was one. The descriptor's external key carries the API version suffix while the page is resource-explorer.md, so it also needs an alias entry, the same way apigatewayv2 and cognito-idp do. * test(resourceexplorer2): scope the tag-provenance lookup to the caller's Region dynamoDbTagResourceUpdatesResourceExplorer took Resources[0] from an unfiltered ListResources and tagged it. ListResources spans every Region the view covers while DynamoDB TagResource resolves the table in the request's Region, so the ARN it picked only worked as long as the first result happened to be local. Deterministic ARN ordering makes that assumption fail reliably instead of by luck: the first table is now eu-west-2's and TagResource reports it as not found. Filter on region:us-east-1, the same way the region-scoping tests in this class already do. --------- Co-authored-by: Marius Volkhart <marius@volkhart.com> Co-authored-by: Hector Ventura <hectorvent@gmail.com> |
||
|
|
7b83bd5283 |
feat(rds,docdb): tag DocumentDB clusters and parameter groups (#2408)
* fix(rds): tag DB and DB cluster parameter groups The tag resolver handled db, cluster, subgrp, db-proxy and og, so tagging a parameter group answered that Floci does not implement the type — a live account tags both, and the terraform provider reads a group's tags as part of its read. DocumentDB's cluster parameter groups are these records too, so the same read fails for aws_docdb_cluster_parameter_group. Neither model carried tags, and neither carried the ARN a caller tags by: the create response omitted it, leaving nothing to address the group with. Both are stored and reported now, and tags given at create are kept, as a live account keeps them. * feat(docdb): tag clusters and instances aws_docdb_cluster reads a cluster's tags as part of every read, so a cluster that created fine failed its apply on DBClusterNotFoundFault — created, but not readable. DocumentDB signs with the rds credential scope, and on that scope it is told apart by Engine or a cluster/instance identifier. The tag actions carry neither, only the ARN of the resource they address, so they reached the RDS handler, which does not hold DocumentDB's records. The router reads that ARN now, and an ARN naming something DocumentDB does not have still goes to RDS. Clusters and instances store tags, keep the ones given at create, and answer the three tag actions. Behaviour follows a live account: an existing key is overwritten, removing a key that is not present is not an error, and an ARN in another region or account is rejected with the one message AWS gives for both — storage is keyed by identifier alone, so without that check an ARN naming another region would be answered with this caller's cluster. A tag update is a read-modify-write, so it takes the record's monitor and the other writers take the same one; otherwise tagging a cluster while it is being deleted stores it again. Paths that hold both take the instance's monitor before the cluster's. Filters on ListTagsForResource are accepted without validation: a live account rejects an unrecognised name, but Floci carries no list of the ones it accepts, and the tags of one named resource are the same answer either way. * fix(rds,docdb): store an empty value for a tag given without one A tag whose Key arrived without a Value was stored with a null, and the read hands the tags back as an immutable copy, which rejects nulls — so one such tag made every subsequent read of that resource fail with an internal error, not just the tag that caused it. A live account stores an empty value and reads it back. Both handlers parse tags the same way and both had it. * fix(rds,docdb): match the whole ARN when routing tags, and give legacy groups one Two things reported on review. Routing read the trailing name of the ResourceName ARN and looked it up in DocumentDB storage, but RDS and DocumentDB share one ARN space: an RDS resource whose name a DocumentDB record happens to share was answered — and mutated — out of the wrong store, and an RDS parameter group or option group could be resolved as a cluster. The whole stored ARN is matched now, which settles region, account, type and name at once, as the db-cluster-id filter already does. And only creation assigned a parameter group's ARN, so a group persisted by an earlier version read back without one, leaving describe with no ARN to report and the caller nothing to tag by. The read that backfills a missing region backfills the ARN too. The service keeps rejecting an ARN from another region or account: the router no longer sends it one, but the check guards its own contract, and it is covered directly rather than through the endpoint. * fix(rds,docdb): keep one identifier space across the RDS family Matching the whole ARN still left one ambiguity: an RDS cluster and a DocumentDB cluster of the same name in the same account and region produce the same ARN, and a tag call naming it could only reach one of them. A live account settles it — creating an Aurora cluster named like an existing DocumentDB one is refused with DBClusterAlreadyExistsFault, because the RDS family shares one identifier space. Floci already refused that direction, since a create naming an identifier DocumentDB holds is routed to DocumentDB, which answers AlreadyExists; the other direction was open, so a docdb create could take a name RDS already had. A create naming an identifier RDS holds now goes to RDS whatever engine it names, so it answers AlreadyExists too and the two stores cannot both hold one identifier — which is what makes an ARN unambiguous. * fix(rds,docdb): report a persisted identifier held by both services Creates can no longer put one identifier in both stores, but state written before that can, and a restart loads it. For such a record the identifier checks in the router already send every action to DocumentDB — describe, modify and delete included — and have long before tags existed, so tags answer from there too: one identifier keeps one answer, rather than a tag call reaching a record no describe can show. The collision is logged once per ARN, since the RDS record behind it cannot be reached on this scope at all and only deleting one of the two records fixes it. * fix(docdb): build cluster and instance ARNs from the caller's region The ARN was built from the configured default region, so a caller signing for anywhere else got back an ARN naming somewhere they were not — and since a tag call is checked against the region it is made from, that caller could not tag the cluster the create had just answered with. It also reopened the identifier collision from the other side: the create-time check looked for an RDS record in the request region while the ARN landed in the default one, so signing the create for another region got past the check and produced two records under one ARN. DocumentDB keys records by bare identifier, so the check now covers every region — narrower than AWS, which allows one name per region, but Floci cannot hold both and answer either correctly. The check also asked about the wrong identifier for instances: CreateDBInstance names its parent cluster, and that cluster existing in RDS is the normal case, not a clash. Only the identifier being created is checked, and the clash is answered with AlreadyExists directly rather than by handing the create to a service that rejects the engine first. * fix(rds): scope the create-time identifier check to the request's region Widening it to every region broke what RDS actually does: names are scoped by region, so the same instance name in two regions is two resources, and RdsControlPlaneTest.sdkScopesTheSameDbInstanceNameBySignedRegion pins exactly that. The second create answered DBInstanceAlreadyExists. The cross-region case that widening was meant to cover is closed by the ARNs instead: each carries the region it was created in, so two records of one name in different regions never share an ARN and no tag call has to choose between them. What must not exist is one identifier in both services in one region, and that is what the check now asks about. * fix(docdb): decide ownership of an identifier per region The routing checks asked whether DocumentDB holds an identifier at all, and its records are keyed by identifier alone, so a name DocumentDB held in one region was taken away from RDS in every other one: the create was refused as already existing, and a describe, modify or delete answered from the wrong region's record. The region now comes from the one place a record carries it — the ARN — so DocumentDB claims an identifier only in the region it was created in. Records written before ARNs carried the caller's region read as the configured default, which is the region they were in fact created under. This was true before tags existed; it becomes reachable in a way worth fixing now that a create in another region records that region rather than the default. * fix(docdb): check the identifier on every route into DocumentDB The create-time check lived in the rds credential scope's branch, but DocumentDB is reachable under its own scope too, and that one dispatches straight to its handler — which knows only its own store. A create signed that way could take an identifier RDS already held in the region, which is the state the ARN matching relies on being impossible. The check is one method now, called from both routes. Neptune shares the same identifier space and its scope is not checked either; that is untouched here, since this PR's invariant is about the ARN a tag call resolves and Neptune holds no tags. * fix(docdb): resolve a tag ARN to the record it names, not to the identifier resolveTagTarget checked the ARN's region against the caller's and then loaded the record by identifier, and records are keyed by identifier alone — so an ARN whose region matched the request but named a record stored in another region resolved to that other record, and tagged it. Reachable on the docdb credential scope, which dispatches to this service directly rather than through the routing that matches the whole ARN. The stored ARN is now compared with the one asked for, and anything else is not found. |
||
|
|
29b0d600c6 |
feat(rds,docdb): answer DescribeGlobalClusters (#2402)
* feat(rds,docdb): answer DescribeGlobalClusters aws_docdb_cluster reads global cluster information as part of every cluster read, so a cluster that created successfully failed its apply on UnsupportedOperation — created, but not readable. DocumentDB's signing name is rds and the action carries no engine or cluster identifier to route on, so the request reaches RdsQueryHandler whichever service the caller has in mind; the docdb scope Floci also accepts is answered the same way. Global clusters are not modelled, so the list is empty, which is what a live account with none answers. Behaviour follows a live account: MaxRecords outside 20-100 is rejected before the identifier is looked up, a named identifier that does not exist is GlobalClusterNotFoundFault, and a marker is rejected after the identifier. The response is in the RDS namespace, which is the namespace DocumentDB answers in. Filters are accepted without validation: every name AWS accepts answers empty here, and a partial list of accepted names would refuse filters a live account allows. * fix(rds): infer rds for DescribeGlobalClusters on unsigned requests Without a credential scope the service is inferred from the action name, and an action the RDS handler serves but the inference list does not name is dispatched to SQS, which answers UnsupportedOperation for it. * fix(rds): infer rds for every action the RDS handler serves The inference list that routes unsigned Query requests named 32 of the 43 actions RdsQueryHandler dispatches. The other eleven — the cluster parameter groups, the option groups, and both snapshot describes — were dispatched to SQS, which answers UnsupportedOperation for them. The two sets now match exactly: every dispatched action is inferable, and nothing inferable is undispatched. None of the added names appear in another service's inference list, so no existing routing changes. |
||
|
|
07476f09fe |
docs: regenerate action tables for docdb, elasticache, rds (#1765)
* docs: regenerate action tables for docdb, elasticache, rds * docs(docdb): clarify snapshots are a stub, not fully out of scope DescribeDBClusterSnapshots is listed in the action table (it returns an empty stub result), so narrow the Out of Scope note to snapshot creation/restore instead of claiming all snapshot operations are unsupported. |
||
|
|
de9a930e85 | docs: sync service action tables (#1769) | ||
|
|
7d70f64162 |
feat(docs): generate Supported Actions tables from handler source (#1641)
* feat(docs): generate Supported Actions tables from handler source The "Supported Actions" tables in docs/services/*.md were hand-maintained and drifted from the handlers. For example secrets-manager.md omitted RestoreSecret, which SecretsManagerJsonHandler dispatches, and acm.md listed RenewCertificate, which is not implemented anywhere in src/. Derive the action list from handler source so it cannot drift, while keeping the hand-written Description column: - tools/docs/regen_action_docs.py extracts actions from `case "X" ->` switch arms (including multi-label arms) and JAX-RS REST controllers, and rewrites only the rows between the <!-- floci:actions --> markers. Descriptions are preserved by action name; new actions get a "-" placeholder. PascalCase-only matching avoids picking up SCREAMING_CASE labels from non-action switches. - tools/docs/services.yaml registers 18 single-table switch services and lists the remaining switch handlers under deferred_handlers, so the new-service sentinel fires only on a genuinely unregistered handler. - make docs-sync / docs-check / docs-test, plus a Python-only CI workflow that gates on handler, doc, and tooling changes. - Migrate 18 service docs into marker blocks, reconciling real drift (adds RestoreSecret, ImportCertificate, and others; drops the unimplemented RenewCertificate). Revives the parser and CI gate from #738 by @ericbsantana and completes the description-preservation its spec described. REST-mode, mixed-mode, multi-table, non-tabular, S3, and ecr docs are deferred and tracked in deferred_handlers. * docs: drop standalone design spec from action-docs tooling Remove ideas/auto-generated-action-tables.spec.md and the four references to it (CONTRIBUTING.md, Makefile, regen_action_docs.py docstring, services.yaml). It was a planning artifact; the operational docs live in CONTRIBUTING.md and the tooling is self-documenting. The #738 / @ericbsantana credit is preserved in the PR description. * chore: address review on action-docs tooling - pin actions/checkout to v7.0.0 in docs-actions workflow to match the repo-wide bump (#1690), so dependabot does not immediately flag the new file - document in the generator docstring that a switch case label counts as supported purely by existing, so a per-action UnsupportedOperation stub would be a false positive (handlers here reject from the default arm) * docs: regenerate action tables against current handler source Resync the generated Supported Actions tables to handler source after rebasing onto the latest main: - cloudformation: add DescribeStackInstance and DescribeStackSetOperation now emitted by the handler, and keep the implemented StackSet descriptions - cloudtrail: add LookupEvents - firehose: add UpdateDestination - step-functions: add PublishStateMachineVersion, ListStateMachineVersions, DeleteStateMachineVersion - register the cloudcontrol handler in deferred_handlers so the strict unregistered-handler gate passes (no standalone action table yet) * fix(docs): prevent action-table generator from silently dropping actions Address the latest review pass on the action-docs tooling: - switch extraction now captures case arms whose labels wrap across lines (valid Java 14+ syntax). The capture group excludes only `{ } ;` boundaries, so it spans newlines between labels but stops at the arm's `->`. A wrapped arm was previously missed, and docs-check would stay green because the doc and the generated output agreed on the omission, defeating the whole drift-prevention guarantee. - REST extraction skips Javadoc / inline comments between a verb annotation and the method signature; such a line otherwise reset the lookahead and dropped the action. - parse_marker_block raises a descriptive error when a marker is not on its own line, instead of a bare "substring not found". - doc, source, and registry reads/writes are pinned to UTF-8 so generation is locale-independent (the docs contain non-ASCII text). - the docs-actions push trigger watches Makefile and the workflow file, matching its pull_request trigger. Adds regression tests for the multi-line arm and comment-skip paths (20 total). |
||
|
|
d77f11abbb |
docs(docdb): document DocumentDB service (#1386)
* docs(docdb): document DocumentDB service * docs(docdb): clarify data endpoint port is from DescribeDBClusters * docs: align AWS service count to 56 across docs and README --------- Signed-off-by: Hector Ventura <hectorvent@gmail.com> Co-authored-by: Hector Ventura <hectorvent@gmail.com> |