Repository navigation
docs(config): the Config service reference, and an SDK journey that proves reachability (#98) - #658
Merged
Merged
Conversation
…roves reachability (#98) Closes #580 The end-to-end tier is the one that matters most for AWS Config. Its X-Amz-Target prefix is StarlingDoveService -- an internal code name bearing no resemblance to the config endpoint prefix -- and every aws-sdk-go-v2, boto3 and CLI call routes by that target. A plugin registered without the alias is fully unit-tested and unreachable from every SDK, which is what #561, #610 and #636 each turned out to be: a unit test driving a hand-built request never touches the alias. test/e2e/journey_config_test.go walks the detective-controls baseline a consumer actually performs: reachability on an empty account, both ordering refusals, a recorder reporting recording: false, its two-segment ARN, all three S3 refusals in the order PutDeliveryChannel documents them, Start, recording: true, a rule reporting INSUFFICIENT_DATA, a seed, NON_COMPLIANT, then the teardown-and-rebuild sequence. A second test covers InvalidRoleException and the rule's missing-recorder refusal through the SDK's own error types. docs/services.md gains the Config section on the Organizations template: the target-prefix warning, the 25-operation table, control-plane curl examples for all five seed families, and prose stating plainly that compliance is seeded and never computed, what the delivery-policy matcher checks and why it is deliberately permissive, that a recorder which exists is not a recorder that records, and the ListTagsForResource Limit contradiction with the bound substrate takes. A Provenance subsection records the six findings that came from somewhere other than the API reference. Verified live against the real AWS CLI across every lane: the three S3 refusals in order, recording false then true, regional isolation, InvalidRoleException, seeded compliance, PutEvaluations outranking the seed via a constructed ResultToken, advance-on-observation, the aws: tag refusal, the teardown ordering story, and a CloudFormation stack whose recorder deploys for real with its recording group translated to lowerCamel and recording: true because a channel is present.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #580
The last PR of the v0.101.0 milestone. PRs 1–6 built the plugin, its five seed families, the authz hook and the CloudFormation dispatches; this one documents the surface and proves it is reachable from a real client.
Why the e2e tier is not optional here
Config's
X-Amz-Targetprefix isStarlingDoveService— an internal code name bearing no resemblance to theconfigendpoint prefix — and every aws-sdk-go-v2, boto3 and CLI Config call routes by that target. A plugin registered without the alias is fully unit-tested and unreachable from every SDK. That is what #561, #610 and #636 each turned out to be: a unit test driving a hand-built request never touches the alias, so no amount of unit coverage can see the gap.test/e2e/journey_config_test.gowalks the detective-controls baseline a consumer actually performs:InvalidAction, nothing else would matterPutDeliveryChannelwith no recorder →NoAvailableConfigurationRecorderExceptionDescribeConfigurationRecorders(present) vs.DescribeConfigurationRecorderStatus(recording: false) — the release's headlineconfiguration-recorder/<name>/<id>ARNStartConfigurationRecorderwith no channel →NoAvailableDeliveryChannelExceptionNoSuchBucketException,InsufficientDeliveryPolicyException, then 200 once a Config-admitting policy existsStart→recording: trueINSUFFICIENT_DATA, a compliance seed over HTTP, thenNON_COMPLIANTDeleteDeliveryChannelwhile recording →LastDeliveryChannelDeleteFailedException, thenStop→ deletes → rebuild, because a fixture must be re-runnableA second test covers
InvalidRoleExceptionand the rule's missing-recorder refusal through the SDK's own error types.Docs
docs/services.mdgains the## Configsection on the Organizations template: the target-prefix warning, the 25-operation table,curlexamples for all five seed families, and prose on the points a reader would otherwise have to infer from the code — compliance is seeded, never computed and why; what the delivery-policy matcher checks and why it is deliberately permissive (a wrong refusal breaks working code, which is the worse failure direction); one recorder and one channel per account per Region; that a seed which would be silently ignored is refused; and how the conformance-pack status advances on observation.A
### Provenancesubsection records the six findings that came from somewhere other than the API reference — chiefly theListTagsForResourceLimitcontradiction (prose says max 50, Valid Range says 0–100; substrate takes 100, the model's bound, so it never refuses a request the model permits) and the ARN templates, which only the Service Authorization Reference gives.Verification
Full gate green:
gofmt/build/vet/golangci-lint(0 issues),make test(race),make docs-reference docs-reference-check docs-versions,npm --prefix docs run build,test/e2e.check-doc-versions.shearned its keep, rejecting a pinnedv0.101.0in the new prose.Verified live against the real AWS CLI (
AWS_MAX_ATTEMPTS=1) across every lane: the three S3 refusals in order;recordingfalse then true; regional isolation (eu-west-1empty);InvalidRoleException;INSUFFICIENT_DATA→ seed →NON_COMPLIANT;PutEvaluationsoutranking the seed via aResultTokenconstructed from its documented format;CREATE_IN_PROGRESS→CREATE_COMPLETEstaying put; theaws:tag refusal; the full teardown ordering story; and a CloudFormation stack whose recorder deploys for real, with its recording group translated to lowerCamel (allSupported/includeGlobalResourceTypesbothtrue) andrecording: truebecause a channel is present,Ref= the name,GetAtt ConfigRuleId= the minted ID.One doc correction came out of that run: the synthesized pack
StackArnisawsconfigconforms-{name}-{id}/{uuid}, not the{name}/{id}form the plan had written.