Repository navigation
Description
What's the problem
The credential transforms of the config layer (the steps that turn configured secrets into their stored or rendered forms) are Bash, part of slices 22 to 30. They are the last part of the config document layer that keeps render and apply on the Bash path. The exact list of transforms is not in the parent and must be read from the slices.
What it impacts
Setup and apply on every install: dashboard access and any service that consumes a transformed credential. A divergence locks an owner out or changes a credential on apply.
How I found it
Parent #4221 under tracker #3811 names credential transforms as part of the layer; go-port/3811 has go/internal/config with parity groups. Related open defects in the Bash behaviour: #4487 (a password over 72 bytes fails at hashing) and #4453 (validation depends on the shell locale). Unknown: which transforms are salted, so byte parity may not apply to all of them.
How important is it
Medium: small in size but security-sensitive, because it handles secrets.
Acceptance criteria
- The PR lists every credential transform in the Bash slices and ports each to Go behind the config-layer selector. Bash stays reachable and stays the default until every criterion holds.
- For deterministic transforms, Go and Bash give byte-identical output and exit status for a table of inputs.
- For salted transforms, the Go output verifies under the Bash verifier and the Bash output under the Go verifier; a test proves both directions.
- Behaviour matches the Bash behaviour on the base branch at the time of the PR, including any merged fixes for A dashboard password longer than 72 bytes passes validation and then fails at hashing with a misleading message #4487 and Dashboard password validation depends on the shell locale #4453. This PR does not fix those defects.
- No secret appears in an error, log line or panic text: a test plants a value, forces each failure path and searches the output.
- The existing config and credential suites pass unchanged in both selector positions. No Bash function is removed.
-
make test,make test-patch-coverageandmake lint-file-budgetpass. - Tier: tiers 1 to 3 in both positions, and one
tier4-e2ejob on the PR head with Go selected that applies a credential change and then authenticates to the dashboard with it.
Possible solutions
- Harvest the credential files from
go/internal/config; wrap secrets in a type that prints a fixed placeholder. - If a transform needs a hashing library, record the module pin as the port's supply-chain issue (Cover the Go CLI in release signing, verification and the vulnerability scan, and record the toolchain and module pins #4530) requires.
Parent requirement: #4221
Worker brief: Objective: the config layer's credential transforms run in Go behind the config-layer selector, identical in effect to Bash. First list every credential transform in Bash slices 22 to 30 in the PR. Port each from go/internal/config on go-port/3811. Deterministic transforms: byte-identical output and exit status against Bash over a table. Salted ones: cross-verification both ways. Match current Bash behaviour, including merged fixes for #4487 and #4453; do not fix those here. Add a planted-secret test over every failure path. Keep Bash default and intact. Proof: tiers 1 to 3 in both selector positions plus one tier4-e2e job on the PR head with Go selected that applies a credential change and logs in to the dashboard with it; paste the unedited evidence block. PR targets develop-v2.1.0 and stacks on the parse/validate child of #4221; if that has not merged, report blocked. Size S to M.
Activity