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 --oidcnomatron login --oidc --provider <slug>nomatron oidc providers listnomatron oidc mappings listnomatron oidc mappings createnomatron 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
--providerwhen 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:
~/.nomatron/token.jsonNomatron 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:
nomatron login --oidcLog in to a specific server:
nomatron --addr https://nomatron.example.com login --oidcLog in with a specific OIDC provider:
nomatron login --oidc --provider google-workspacePrint the authorization URL without opening a browser automatically:
nomatron login --oidc --open-browser=falseReturn machine-readable output:
nomatron login --oidc --format jsonProvider 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:
nomatron oidc providers listList mappings for a provider:
nomatron oidc mappings list --provider google-workspaceCreate a global mapping:
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:
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:
nomatron oidc mappings delete --id 11111111-1111-1111-1111-111111111111Mappings 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:
nomatron --addr https://example.ngrok-free.app login --oidc --provider google-workspaceComplete SSO login in a terminal-only environment:
nomatron login --oidc --provider okta --open-browser=falseThen 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:
nomatron users listTroubleshooting
- 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 --oidcand 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.