3 Commits

Author SHA1 Message Date
ebe2079a83 Migrate module path from kyle/ to mc/ org
All import paths updated from git.wntrmute.dev/kyle/mcdsl to
git.wntrmute.dev/mc/mcdsl to match the Gitea organization.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 02:03:45 -07:00
ee88ebecf2 Add pre/post interceptor hooks to grpcserver.New
New Options parameter with PreInterceptors and PostInterceptors
allows services to inject custom interceptors into the chain:

  [pre-interceptors] → logging → auth → [post-interceptors] → handler

This enables services like metacrypt to add seal-check (pre-auth)
and audit-logging (post-auth) interceptors while using the shared
auth and logging infrastructure.

Pass nil for the default chain (logging + auth only).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:21:29 -07:00
aa608b7efd Add grpcserver package: gRPC server with method-map auth
- MethodMap with Public, AuthRequired, AdminRequired maps
- Default deny for unmapped methods (safety net)
- Auth interceptor: extracts Bearer token from metadata,
  validates via Authenticator, sets TokenInfo in context
- Logging interceptor: method, code, duration
- TLS 1.3 optional (skipped for testing)
- TokenInfoFromContext helper
- 10 tests with mock MCIAS

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 16:33:02 -07:00