Skip to content

server: real AuthProvider — persisted per-workspace tokens, create/revoke, bearer auth across the whole API #25

Description

@JArmandoAnaya

Context

Replace the hardcoded dev token with the real (deliberately simple) OSS auth: static
per-workspace tokens via the AuthProvider port. A valid token operates the workspace;
granular permissions are enterprise territory.

Deliverables

  • Token entity: name, created_at, hashed secret (store a hash, show the secret once at
    creation), revoked flag.
  • AuthProvider default adapter backed by the metadata store; validation on every request
    via FastAPI dependency; 401 with a stable error body when missing/invalid/revoked.
  • /health stays unauthenticated.

Acceptance criteria

  • Secrets stored hashed; creation returns plaintext exactly once
  • Revoked token ⇒ 401 immediately
  • Every endpoint except /health rejects unauthenticated requests (walked via the
    OpenAPI route table in a test)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apivisionset.server — REST API and OpenAPI contractkernelvisionset.kernel — domain, ports, adapters, servicesm3M3 — Surfaces: API + CLI + MCP (0.0.1-alpha.3)

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions