Skip to content

Implement institutional SSO authentication integration #5

Open

Description

@scttfrdmn

Overview

Integrate institutional Single Sign-On (SSO) authentication with the backend service.

Tasks

  • Research SAML/OAuth2/OIDC integration patterns
  • Add authentication middleware to backend
  • Implement session management
  • Add JWT token generation and validation
  • Create login/logout endpoints
  • Add user profile endpoint
  • Integrate with institutional IdP (configurable)
  • Add authentication state to web application
  • Add CLI authentication flow

Success Criteria

  • Users can authenticate via institutional SSO
  • Sessions persist across requests
  • JWT tokens properly signed and validated
  • Both web and CLI can authenticate
  • User profile information available

Configuration Needed

  • IdP endpoints
  • Client ID/secret
  • Redirect URIs

Related

See ROADMAP.md Phase 1, Week 5-6
See ark-gaps-and-suggestions.md Gap 1.3

Activity

  1. added this to the v0.1.0 - Foundation milestone on Dec 10, 2025
  2. added
    priority:high
    type:feature
    component:backend
    on Dec 10, 2025
  3. scttfrdmn commented on Jun 9, 2026

    @scttfrdmn
    CollaboratorAuthor

    Current-state reconciliation + OIDC flow (post-kernel roadmap, #11; Tier 2).

    Part of this has shipped since this issue was written. The auth progression is dev-token → JWT → OIDC, and the first two stages exist:

    So the remaining scope of this issue is the OIDC stage specifically, not auth from scratch:

    • Add an OIDC relying-party flow (authorization-code + PKCE) against a configurable institutional IdP (issuer URL, client id/secret, redirect URIs — config shape already sketched above).
    • Exchange the IdP id_token for the existing internal JWT (reuse internal/auth issue/validate — don't fork the token model).
    • Map IdP claims → qualify user identity (the same identity the training/COC kernel routing in Route SetIdentityTags + RecordCountryCheck through the evidence kernel #40 consumes).
    • Web: replace dev-token with the OIDC redirect flow; CLI: device-code or local-callback flow.
    • Production guard: dev-token endpoint already 404s when AUTH_DEV_MODE != true — keep that invariant.

    Dependencies: this blocks #35 (PI-initiated onboarding needs real identity) and #36 (data-access request workflow, currently status:blocked). No upstream blocker — can start independently.

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

    component:backendpriority:hightype:feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions