feat(opcred,coord): operator-transmission header for /v0 auth#15
Merged
Merged
Conversation
First increment of the Cloudy operator-enrollment client: the client side of the operator-auth contract SoHoLINK PR #16 established on /v0. opcred already signs the 2-of-7 transmission (TransmissionSigner) but leaves the transport encoding to the client. Add it: - opcred.EncodeOperatorHeader + OperatorHeaderName: base64(JSON) of the transmission in the X-SohoCloud-Operator header, matching the coordinators decoder (SoHoLINK api.operatorTransmissionWire) field-for-field. - coord.DialAsOperator + a fail-closed RoundTripper that attaches a fresh signed header to every /v0 request; the credential wiring is injected by the caller so coord imports no credential package. The cross-implementation contract is held by test, not a shared type: a header Cloudy signs+encodes decodes (via the coordinators exact wire shape) to a transmission the protocols own Verify accepts against the keyset. If that passes, SoHoLINK OperatorAuth (same decode + same Verify) accepts it too. Also asserts the snake_case field names and the fail-closed path (a decoration failure never sends the request). gofmt/build/vet clean; full module + import tripwire green. Next increments: the HTTP enrollment driver (apply -> keys -> verify 2FA -> conformance A/B/C -> active) reusing opcred Keyset + ConformanceResponder. Signed-off-by: Jodson Graves <info@ntari.org>
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.
First increment of Cloudy's operator-enrollment client — the client side of the operator-auth contract SoHoLINK PR #16 established on
/v0.What
opcredalready signs the 2-of-7 transmission (TransmissionSigner) but deliberately leaves the transport encoding to the client. This adds it:opcred.EncodeOperatorHeader+OperatorHeaderName— base64(JSON) of the transmission in theX-SohoCloud-Operatorheader, matching the coordinator's decoder (SoHoLINK internal/api.operatorTransmissionWire) field-for-field (snake_case, base64-std byte fields).coord.DialAsOperator+ a fail-closed RoundTripper that attaches a fresh signed header to every/v0request; the credential wiring is injected by the caller, socoordimports no credential package.Contract held by test, not a shared type
A header Cloudy signs + encodes decodes — via the coordinator's exact wire shape — to a transmission the protocol's own
Verifyaccepts against the keyset. If that passes, SoHoLINK'sOperatorAuth(same decode + same Verify) accepts it too. Tests also pin the snake_case field names and the fail-closed path (a decoration failure never sends the request).Verified: gofmt/build/vet clean;
internal/opcred+internal/coordgreen; full module + import-graph tripwire green.Next increments (not in this PR)
The HTTP enrollment driver —
apply → register keys → verify (email 2FA) → conformance A/B/C → active— reusingopcred.Keyset+ConformanceResponder, then wiringDialAsOperatorinto the live loop.Author does not self-merge — for review.