Skip to content

spec(030): the aws-config feature reads environment credentials only (A-65) - #391

Merged
bartekus merged 1 commit into
mainfrom
spec/030-env-credentials
Oct 29, 2026
Merged

bartekus merged 1 commit into
mainfrom
spec/030-env-credentials

Conversation

@bartekus

@bartekus bartekus commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Spec 030: amend 3.5 item 2 so the optional aws-config feature provides an environment-variable credential provider, not the full AWS default credential chain. Records the owner's two live-stage decisions as A-65. Status and implementation are unchanged.

Why

  • The first live probe run (2026-10-29) reached no endpoint. aws_config::defaults(..).load() builds the default region chain and with it an instance metadata client. aws-config is built with default-features = false, so it has no HTTP client and panicked before any credential was read.
  • The full chain needs a second HTTPS client beside Rustev's one stack (3.5 item 4). The owner chose the environment-only provider instead (A-65).
  • A host that needs profiles, single sign-on, role assumption or instance metadata supplies its own provider, which 3.5 item 2 already allows. The full chain may be added later as a separate feature with its own decision.

What changes

  • specs/030-bedrock-backend/spec.md: 3.5 item 2 amended; one negative case and one acceptance item added (no credential variables set is a credential failure, unsent, never a panic); the Verification section gains its verify:cli block, including a run under --features aws-config, which no command ran before; an implementation record note on the defect and the unsettled reservation it left in the testing journal.
  • docs/decisions/00-founding-decisions.md: A-65, the residency decision for the live binding (ca-central-1 to US regions through the us. profile, synthetic or spec 023 admitted data only) and the credential decision.
  • .statecraft/derived/: refreshed for the spec edit.

The provider change, the live probe and smoke, and the recorded fixtures follow in impl(030), stacked on this PR.

The feature run fails on main today (tests/spend.rs writes its scratch journal outside the repository). impl(030) fixes it and adds 030 to VERIFIED_SPECS; until then the block gates nothing.

@github-actions

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the two changed files: docs/decisions/00-founding-decisions.md (adds A-65) and specs/030-bedrock-backend/spec.md (amends credentials section and adds incident narrative).

A-65 decision scope vs spec changes: A-65 decides two points -- credentials and residency. The spec diff amends only the credentials section (3.5 item 2). For residency, A-65 says "the declared destinations are those AWS documents for that source region," phrasing that points to existing documentation rather than requiring a spec text change. This is consistent with the decision being informational on residency, and I cannot see the full spec to confirm whether a residency section exists -- no concrete defect is evidenced.

Credentials amendment (3.5 item 2): The change narrows the aws-config feature from "standard AWS default credential chain" to env-var-only (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN). The stated rationale -- that the default chain builds an IMDS client which needs an HTTP client that aws-config is built without (default-features = false) -- is internally consistent and matches the incident narrative.

Behaviors table: The existing row for "Built without aws-config, with AWS_ACCESS_KEY_ID set and no provider | Construction refused; no environment read" remains coherent: refusal is because no provider was supplied, not because the env var was read. The new row for the with-aws-config, no-env-vars case is consistent with the amended spec text.

Incident narrative: The narrative documents the panic (IMDS client construction before any credential read), the unsettled 641,190-unit reservation counted as liability per 3.9, and the owner's resolution. This is appropriate historical record under "Decisions at approval."

Cross-references: The spec amendment is tagged "(amended 2026-10-29, A-65)" and A-65 cites "030 3.5 item 2, amended" -- the cross-references are bidirectional and consistent.

Security/principle checks: No Permitted type, no authorization production, no silent conversions, no unsafe added. The env-var-only credential restriction is if anything more conservative than the previous default-chain approach.

No concrete defects found.

{"head": "6ba1fa2339ecdedaa89e7846564c45508d4f7017", "verdict": "no-findings", "findings": []}

Subject: a965ae8...6ba1fa2, diff digest 53137d23d8105ac0c806dce6c7dd71603b31e63c121615b0d2ed7a52dc011550, 1 call(s). An AI comment is not an approval.

…(A-65)

Amends 3.5 item 2: the optional aws-config feature provides an environment-variable credential provider, not the full default chain, which needs a second HTTPS client. Records the owner residency and credential decisions for the live stage as A-65.
@bartekus
bartekus force-pushed the spec/030-env-credentials branch from 6ba1fa2 to 4dcf72b Compare October 29, 2026 20:06
@github-actions

Copy link
Copy Markdown

AI review (no-findings)

Reviewing the two changed files for bugs, security issues, and governance inconsistencies.

docs/decisions/00-founding-decisions.md — A-65

A-65 records two owner decisions for spec 030's live stage: (1) residency (ca-central-1 → US regions via us. geographic inference profile, synthetic or spec-023-admitted data only), and (2) credentials (aws-config feature uses environment-only provider, not the full AWS default chain). The entry is self-consistent and correctly scoped ("raises no cap, authorizes no production use and makes no residency-compliance claim").

specs/030-bedrock-backend/spec.md

  • 3.5 item 2 amendment: The old text promised an aws-config feature that added "a provider over the standard AWS default credential chain." The amendment restricts this to three specific environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN) and explains why (no second HTTP client). The "without that feature" sentinel text at the end is preserved verbatim and remains accurate.
  • Acceptance table: The new row ("Built with aws-config, no credential environment variables set → Credential failure, unsent; no panic…") correctly characterises the amended behaviour and is directly traceable to the panic incident described in the implementation record.
  • Verification block: The verify:cli block is defined now; the spec text correctly states "030 joins make verify with the change that lands the recorded fixtures," and the implementation record confirms spec 030 has not yet joined VERIFIED_SPECS. The three commands are network-free and consistent with the acceptance items they cover. The --features aws-config command covers only the environment-variable test, which does not require live fixtures.
  • Implementation record: The panic incident is accurately narrated. The note that the 641,190-unit reservation "stays unsettled, counted as liability as 3.9 requires" is consistent with spec 030's charge-accounting rules.
  • Residency (A-65 point 1): A-65 records a residency decision for spec 030, but no hunk in the spec diff updates a residency section. The spec comment in the verify block mentions "residency" among items already covered by cargo test -p rustev-bedrock --locked, which implies a residency section already exists in the spec body. I cannot see the full spec text, so I cannot confirm whether the spec's residency section needs updating; I am not flagging an absence I cannot observe.

No concrete defects found.

{"head": "4dcf72bc44163752b60e19929f646906aec77f65", "verdict": "no-findings", "findings": []}

Subject: a965ae8...4dcf72b, diff digest 8ead1826bdbd2f293457ec400b7ed1154d46ed32c4d956b2436f28862043ccee, 1 call(s). An AI comment is not an approval.

@bartekus
bartekus added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit bfe423c Oct 29, 2026
30 checks passed
@bartekus
bartekus deleted the spec/030-env-credentials branch October 29, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant