Authentication and Authorization#
NMP includes a built-in security layer that lets you control who can access your platform and what they can do. When multiple teams or users share an NMP deployment, authentication and authorization ensure that each user sees only the workspaces and resources they are permitted to access, and can only perform actions appropriate to their role.
Access control has two layers:
Authentication — Prove your identity. NMP validates a JWT issued by your OpenID Connect (OIDC) identity provider.
Authorization — Control what you can do. Workspace-scoped RBAC with roles (Viewer, Editor, Admin) and optional API scopes on tokens.
Both layers are opt-in. When auth.enabled is false (the default), all requests are allowed without checks. This lets you get started quickly and add security when you are ready for multi-user or production deployments.
How Authentication Works#
NMP authenticates every request using a JWT from your OIDC identity provider. The token is sent in the Authorization: Bearer <token> header, and NMP validates the signature, issuer, audience, and expiry. Refer to OIDC Setup to connect your identity provider.
How you obtain the token depends on your context:
CLI — Run
nmp auth loginto authenticate using the browser-based device flow. The CLI stores and auto-refreshes the token. Refer to Using Authentication.SDK — After
nmp auth login, the Python SDK automatically reads stored tokens from the CLI config and refreshes them transparently. Refer to Using Authentication.HTTP — For raw HTTP calls, fetch a token from your IdP (or from the CLI using
nmp auth token) and pass it in theAuthorization: Bearer <token>header.Studio — When auth is enabled, Studio automatically redirects you to your IdP to sign in and uses the resulting token for all API calls.
Tip
Quickstart shortcut — When running NMP quickstart without an OIDC provider, you can use an unsigned JWT:
nmp auth login --unsigned-token --email <email>
Quickstart-generated unsigned tokens expire after 24 hours.
Unsigned JWT login only works for quickstart and must not be used in production. See Getting Started below.
Getting Started#
Quickstart / Development#
Step 2: Make Authenticated Calls#
After authorization is enabled, all API requests must include an identity. The CLI and SDK are already configured after Step 1 — they read the admin email from the CLI config automatically.
# CLI is already configured after quickstart configure
# All commands are authenticated as the admin
nmp workspaces list
# To use a different identity:
nmp auth login --unsigned-token --email other-user@example.com
from nemo_platform import NeMoPlatform
# No arguments needed — the SDK reads base_url, workspace, and credentials
# from the active CLI context (set by `nmp auth login` or `nmp quickstart configure`).
# See: Initializing the CLI and SDK in the quickstart for other init options.
client = NeMoPlatform()
workspaces = client.workspaces.list()
print(f"Found {len(workspaces.data)} workspaces")
Production / Helm Deployment#
For production or Helm-based deployments, enable auth by setting platformConfig.auth.enabled: true in your Helm values and configure the auth: section in platform config. Refer to Auth Configuration for the full reference and OIDC Setup to connect your identity provider.
Where to Go Next#
Understand how NMP authentication and authorization work together — trust boundaries, principal model, and authorization layers.
Configure NMP to authenticate users using your OIDC identity provider.
Add users to workspaces, assign roles, and control who can access your resources.
Full configuration reference — enabling auth, PDP provider, OIDC settings, environment variables.
Security checklist for production deployments — OIDC, gateway headers, scoped tokens, TLS.
Fix common auth issues — 401/403 errors, login failures, role propagation delays.