Skip to content

docs(secureservice): document admission config#687

Draft
ZanzyTHEbar wants to merge 8 commits into
anyproto:mainfrom
ZanzyTHEbar:federated-admission-docs
Draft

docs(secureservice): document admission config#687
ZanzyTHEbar wants to merge 8 commits into
anyproto:mainfrom
ZanzyTHEbar:federated-admission-docs

Conversation

@ZanzyTHEbar

Copy link
Copy Markdown

Stack

Eighth PR in the federated admission stack, after:

This PR is draft until the lower stack lands. Please review as the delta after #686.

Summary

  • Adds a secure-service README documenting JWT admission configuration.
  • Covers required config fields, signed identity binding, JWKS startup fetch/reuse, outbound token supply, and logging privacy boundaries.
  • Clarifies that the sync daemon validates bearer JWTs from JWKS and does not perform OIDC discovery or SAML validation.

Validation

  • PASS: go test -buildvcs=false ./net/secureservice ./net/peerservice
  • PASS: go test -buildvcs=false ./... -run '^$'

Risks

  • Docs-only change.

Introduce provider-neutral admission config and verifier types for future federated network admission support. The new config is disabled by default and does not change handshake behavior.
Add a static JWKS-backed AdmissionVerifier implementation for provider-neutral federated admission. The verifier validates token signature, issuer, audience, expiry, network id, Anytype identity binding, subject, and required claims without wiring it into the handshake yet.
Add an additive handshake credentials field for provider-neutral admission tokens and propagate it through secureservice contexts. This only carries tokens for future admission enforcement; it does not validate tokens or change existing handshake behavior.
Add provider-neutral inbound admission enforcement by composing AdmissionVerifier with credential checking. Admission remains disabled by default, config-only enablement fails fast until verifier construction is wired, and callers can inject a verifier through NewWithAdmissionVerifier.
Build the JWT admission verifier from secure-service admission config when admission is enabled and no verifier was injected. JWKS retrieval is bounded, sanitized, and skipped for disabled admission or explicit verifier injection.
Allow an optional provider component to supply outbound admission tokens before dialing peers. Caller-provided tokens take precedence, provider errors fail closed, and no OIDC or token storage implementation is introduced.
Add structured admission decision logs for accepted, rejected, and missing-token handshakes without logging bearer tokens, verifier errors, rejection reasons, or claims. Cover log fields and privacy canaries in focused secureservice tests.
Document JWT admission configuration, required fields, signed identity binding, JWKS startup behavior, outbound token supply, and logging privacy boundaries.
@ZanzyTHEbar

Copy link
Copy Markdown
Author

/oc please review this draft stacked PR, focusing on the delta after #686

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