OIDC

Nomatron is in early access. Some advanced workflows may not be covered in the public docs.

This file covers CLI login with OIDC providers configured on the Nomatron server.

Commands

  • nomatron login --oidc
  • nomatron login --oidc --provider <slug>
  • nomatron oidc providers list
  • nomatron oidc mappings list
  • nomatron oidc mappings create
  • nomatron oidc mappings delete

When To Use It

  • Use OIDC login when your Nomatron server is configured to trust an external identity provider.
  • Use it when your organization requires browser-based sign-in, SSO, MFA, or IdP-managed account lifecycle.
  • Use --provider when the server has multiple OIDC providers and you do not want to use the default provider.

How It Works

The CLI starts an OIDC login transaction with the Nomatron API and prints an authorization URL. The browser completes the provider login, Nomatron exchanges the OIDC response server-side, and the CLI polls until Nomatron returns an internal Nomatron JWT.

The CLI stores the resulting Nomatron token in:

text
~/.nomatron/token.json

Nomatron resource APIs do not accept external OIDC tokens directly. After login, the CLI uses the same Nomatron token format as password login and service-account workflows.

How To Use It

Log in with the default OIDC provider:

bash
nomatron login --oidc

Log in to a specific server:

bash
nomatron --addr https://nomatron.example.com login --oidc

Log in with a specific OIDC provider:

bash
nomatron login --oidc --provider google-workspace

Print the authorization URL without opening a browser automatically:

bash
nomatron login --oidc --open-browser=false

Return machine-readable output:

bash
nomatron login --oidc --format json

Provider Selection

If --provider is omitted, the CLI asks the server for enabled login providers and chooses the provider marked as default. If no provider is marked as default, it uses the first enabled provider returned by the server.

Provider slugs are configured by an administrator in the Nomatron UI under Identity & Access > OIDC Providers.

RBAC And Groups

OIDC users are created as Nomatron users on first successful login. Their auth_provider is set to oidc:<provider-slug>.

Role access comes from normal Nomatron RBAC:

  • Manual user role assignments still work.
  • OIDC group mappings can assign roles during login when the provider emits group claims.
  • OIDC-sourced role assignments are refreshed on each login.

Not every OIDC provider includes groups in standard OIDC tokens. For example, Google Workspace login works with the normal openid profile email scopes, but Google Workspace group membership is not emitted as a standard OIDC group claim by default.

Group Mapping Commands

List configured OIDC providers:

bash
nomatron oidc providers list

List mappings for a provider:

bash
nomatron oidc mappings list --provider google-workspace

Create a global mapping:

bash
nomatron oidc mappings create \
  --provider google-workspace \
  --external-group nomatron-platform-admins \
  --role platform-admin \
  --domain global \
  --description "Google Workspace platform admins"

Create an organization-scoped mapping:

bash
nomatron oidc mappings create \
  --provider google-workspace \
  --external-group acme-developers \
  --role developer \
  --domain org:<organization_id> \
  --description "ACME developers from Google Workspace"

Delete a mapping:

bash
nomatron oidc mappings delete --id 11111111-1111-1111-1111-111111111111

Mappings use the same token resolution as other API-backed CLI commands. Run nomatron login, nomatron login --oidc, or set NOMATRON_TOKEN before managing mappings.

Examples

Complete SSO login against a development server exposed through ngrok:

bash
nomatron --addr https://example.ngrok-free.app login --oidc --provider google-workspace

Complete SSO login in a terminal-only environment:

bash
nomatron login --oidc --provider okta --open-browser=false

Then paste the printed URL into a browser, complete login, and leave the CLI running until it stores the token.

Use the saved token with another command:

bash
nomatron users list

Troubleshooting

  • If login says no OIDC providers are enabled, ask an administrator to enable at least one provider.
  • If the browser callback fails, check that the provider redirect URI matches /api/v1/auth/oidc/<provider-slug>/callback.
  • If login completes in the browser but the CLI expires, rerun nomatron login --oidc and finish the browser step before the transaction expires.
  • If expected roles are missing, check the provider group claim and the OIDC group-to-RBAC mappings in Nomatron.