Skip to content

feat(opcred,coord): operator-transmission header for /v0 auth#15

Merged
NetworkTheoryAppliedResearchInstitute merged 1 commit into
mainfrom
feat/operator-header
Jul 14, 2026
Merged

feat(opcred,coord): operator-transmission header for /v0 auth#15
NetworkTheoryAppliedResearchInstitute merged 1 commit into
mainfrom
feat/operator-header

Conversation

@NetworkTheoryAppliedResearchInstitute

Copy link
Copy Markdown
Contributor

First increment of Cloudy's operator-enrollment client — the client side of the operator-auth contract SoHoLINK PR #16 established on /v0.

What

opcred already 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 the X-SohoCloud-Operator header, 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 /v0 request; the credential wiring is injected by the caller, so coord imports 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 Verify accepts against the keyset. If that passes, SoHoLINK's OperatorAuth (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/coord green; 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 — reusing opcred.Keyset + ConformanceResponder, then wiring DialAsOperator into the live loop.

Author does not self-merge — for review.

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>
@NetworkTheoryAppliedResearchInstitute
NetworkTheoryAppliedResearchInstitute merged commit 88ec32e into main Jul 14, 2026
1 check passed
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