Skip to content

Epic: Enterprise auth #871

Description

@rickylabs

NetScript should cover enterprise authentication end to end—especially the
Microsoft identity layers—by fully leveraging WorkOS and Better Auth instead of
rebuilding their products or exposing only a fraction of their capabilities.

The target architecture keeps a vendor-neutral NetScript identity/session/policy
kernel while assigning clear responsibilities:

  • KV OAuth provides direct OAuth/OIDC, including first-class Entra ID behavior.
  • WorkOS provides enterprise SAML/OIDC SSO, administrator onboarding,
    organizations, Directory Sync/SCIM, audit delivery, and optional RBAC/FGA/Vault
    adapters.
  • Better Auth provides application-facing authentication modalities and session/
    organization/admin capabilities through its upstream plugin ecosystem.
  • NetScript provides truthful capability discovery, multi-backend routing,
    normalization, authorization policy ports, secret references, CLI/scaffold
    configuration, and conformance testing.
  • Machine, agent, CLI, and MCP authentication is a first-class lane spanning
    Entra client credentials, WorkOS API Keys/M2M/device/Agent Auth, Better Auth
    machine-auth plugins, and the shipped @netscript/mcp protected-resource
    surface.
  • NetScript-as-IdP is deliberately separate backlog scope, using WorkOS Connect
    or Better Auth OAuth Provider only behind an outbound issuer contract.

This epic deliberately separates config-first leverage from new adapter work.
Every capability must have one lifecycle owner per tenant, especially where
WorkOS and Better Auth overlap in organizations, SSO, or SCIM.

Epic acceptance

  • gate: each advertised backend capability has a reachable conformance test
  • gate: direct Entra ID OIDC and brokered Microsoft SAML/OIDC have documented ownership and security boundaries
  • gate: organization, membership, directory, session, and authorization contracts are tenant-safe and fail closed
  • gate: WorkOS and Better Auth capabilities are exposed through configuration/adapters without copying upstream implementations
  • gate: secrets, audit events, and administrative operations meet redaction and lifecycle requirements
  • gate: generated projects can select, configure, mock, and smoke-test supported auth profiles
  • gate: service, machine, CLI, and delegated-agent identities have explicit organization, scope, actor, credential, revocation, audit, and MCP ownership
  • gate: inbound enterprise SSO and outbound NetScript-as-IdP are separate security contracts and delivery slices
  • gate: all implementation PRs satisfy CI and the required opposite-family evaluation before merge

Children

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions