Skip to content

feat(secureservice): carry admission tokens#682

Draft
ZanzyTHEbar wants to merge 3 commits into
anyproto:mainfrom
ZanzyTHEbar:federated-admission-handshake-token
Draft

feat(secureservice): carry admission tokens#682
ZanzyTHEbar wants to merge 3 commits into
anyproto:mainfrom
ZanzyTHEbar:federated-admission-handshake-token

Conversation

@ZanzyTHEbar
Copy link
Copy Markdown

Summary

  • Add an additive Credentials.admissionToken handshake field and regenerate protobuf/vtproto outputs.
  • Propagate remote admission tokens through handshake.Result and secureservice post-handshake contexts.
  • Add outbound/remote context helpers and copy credentials before injecting outbound tokens to avoid mutating cached credentials.

Stack

Security

  • Transport-only change: tokens are carried but not validated or enforced yet.
  • Outbound and remote token context keys are split to avoid replaying a remote peer's bearer token on a later outbound handshake.
  • Existing deployments continue to send no token by default.

Validation

  • PASS: go test ./net/secureservice ./net/secureservice/handshake
  • PASS: go test ./... -run '^$'
  • PASS: worktree review found no findings after the context split.
  • KNOWN PRE-EXISTING FAIL: go test ./... still fails at net/rpc/limiter TestLimiter_Concurrent_Bursts with 40 <= 38, matching the unrelated failure observed before this stack.

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.
@ZanzyTHEbar
Copy link
Copy Markdown
Author

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

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