Blog

Zero to pro IAM on a Nomatron server: SSO, roles, groups and organizations

Nov 26, 2026 By Nomatron

Set up identity and access on a Nomatron server: OIDC sign-in, local users, groups, custom roles and org-scoped role assignments, step by step.

Blog hero for "Zero to Pro IAM", with the eyebrow "Nomatron platform setup". A dashed identity-model panel shows two side-by-side blocks, Authentication and RBAC.

Every Nomatron server starts life with a single built-in account: root. That’s perfect for the first ten minutes, but what happens when the rest of the platform team needs in? A shared admin login is convenient right up until someone asks who changed a production deployment, and nobody can say.

In this post, you’ll go from that one login to an access model that grows with your teams. You’ll lock down the root account, turn on single sign-on with OIDC, create local users where you need them, map your identity provider’s groups to the admin, release and developer roles in each organization, give your auditors read-only access, and build custom roles where the built-in ones don’t quite fit. By the end, everyone signs in as themselves, access follows IdP group membership, and root goes back in the drawer for emergencies only.

What “pro” looks like

Before touching a keyboard, it helps to know where we’re heading. Here’s a strong starting model for most teams, and it’s the target for this post:

  • a very small IdP group mapped to platform-admin, for the people who run the Nomatron installation;
  • a small IdP group mapped to access-admin, for the people who look after users, roles and authentication;
  • an IdP group mapped to the read-only security-auditor role, for reviewers;
  • for each organization, IdP groups mapped to organization-admin, to release-manager where you need one, and to developer; and
  • organization-viewer only where somebody genuinely needs read-only visibility.

That’s it. No sprawling policy maze, and no hand-crafted permission set per person. Most of the work in this post is mapping the right IdP groups to the right roles, and keeping direct assignments for the exceptions.

Before you start

You need a few things in place:

  • A running Nomatron v0.1.7 server that has completed nomatron database init.
  • An account that holds the root or access-admin role.
  • The nomatron CLI installed, with NOMATRON_ADDR set to your server address (for example https://nomatron.example.com).
  • An OIDC identity provider for the single sign-on section. This part is optional; the rest of the post works with local users too.

How identity and access fit together

Nomatron splits access into two questions. Authentication answers “who is this caller?” and RBAC answers “what is this caller allowed to do here?” Keep those two apart in your head and almost every access problem gets easier to debug.

RBAC itself is built from five nouns:

  • Users are the individual identities acting in Nomatron. They’re either built-in local users or users who signed in through an external OIDC provider.
  • Groups are collections of users inside an organization. In v0.1.7 they don’t hold roles. You use them where Nomatron asks for a team, such as approver groups.
  • Roles are reusable bundles of permissions. Some are built in; others are custom roles you create.
  • Permissions are the smallest unit. They take the form <scope>.<resource>[.<subresource>].<action>, for example global.users.list, organization.apps.read and organization.app_jobs.environments.plan.
  • Role assignments connect a subject, a role and a domain. That connection is what actually makes a role effective.

The assignment is the piece that trips people up, so it’s worth one more sentence. A subject is either a user, user:<id>, or a service account, service_account:<id>, and a domain is either global, for platform-wide work, or org:<organization_id>, for one organization. Subject plus role plus domain equals effective access. You can’t assign a role to a Nomatron group. To give a whole team a role, map their IdP group to it, as step 2 shows.

Diagram titled “How identity and access fit together”. Nomatron splits access into two questions, then builds RBAC from five nouns, shown as numbered cards. 1, Users: individual identities, either local users or users who signed in through an OIDC provider. 2, Groups: collections of users inside an organization, which do not receive role assignments. 3, Roles: reusable bundles of permissions, some built in and others custom. 4, Permissions: the smallest unit, for example organization.apps.read and global.users.list. 5, Role assignments: the connection that makes a role effective, made of a subject, a role and a domain. A panel below reads “Subject + role + domain = effective access”. A subject is user:ID or service_account:ID, and a domain is global, for platform-wide work, or org:ORGANIZATION_ID, for one organization. Group-based access comes from an IdP group claim, through an OIDC mapping, to a role, and, when Sync Groups is on, takes effect at the user’s next sign-in through that provider.

The five RBAC nouns, and how a subject, a role and a domain add up to access.

Nomatron ships with built-in roles so you don’t have to assemble everything from raw permissions on day one:

  • global roles: root, platform-admin, access-admin and security-auditor;
  • organization roles: organization-admin, release-manager, developer and organization-viewer.

Checkpoint: you now have the vocabulary. Time to put it to work, starting with the account everyone forgets about.

Step 1: Lock down the root account

Running nomatron database init creates the built-in root user and assigns it the default super-admin role. If you don’t supply credentials, init creates a root user with a default password. That’s fine for a throwaway laptop install and not fine anywhere else.

The safest approach is to set the root credentials at init time and read the password from a file. The command below bootstraps a root user named admin:

bash
nomatron database init \
  --config /etc/nomatron/nomatron.hcl \
  --root-username admin \
  --root-password-file /run/secrets/nomatron_root_password

This reads the password from a file your secret tooling has written, so it never appears on the command line or in your shell history. You can also use --root-password-stdin, or the NOMATRON_ROOT_PASSWORD environment variable populated from your secret store.

Note: root credential overrides only apply during the first initialization. If you rerun nomatron database init later with a root override, it fails fast with a clear error. Init is not a way to rotate root credentials.

If you already initialized without a password, change it straight away. Until you do, the Nomatron UI shows a banner reading “The Root User is still using the default password”, with a Change Password link.

Once root has a strong password, stop using it. The docs describe root as the break-glass superuser, and routine work belongs to named administrator accounts. The rest of this post creates exactly those.

Checkpoint: root has a strong password and is parked. Next, let’s give people their own front door.

Step 2: Turn on single sign-on with OIDC

If your company already has an identity provider, single sign-on is the best way into Nomatron. People use the login, MFA and account lifecycle they already have, and you don’t end up running a second password database.

How OIDC login works in Nomatron

Here’s the flow at a high level:

  1. A user starts a login from the browser, or with nomatron login --oidc.
  2. Nomatron starts an OIDC login transaction and sends the user to the identity provider.
  3. The user signs in at the provider, which redirects back to Nomatron.
  4. Nomatron exchanges the OIDC response on the server side and issues its own Nomatron token.

That last step matters. Nomatron APIs don’t accept raw identity provider tokens. After login, an OIDC user carries the same kind of Nomatron token as a password user, so everything downstream behaves the same way.

Diagram titled “How OIDC login works in Nomatron”. Four numbered steps. 1, Start login: the user starts a login from the browser, or with nomatron login –oidc. 2, Redirect to the IdP: Nomatron starts an OIDC transaction and sends the user to the identity provider. 3, Sign in and return: the user signs in at the provider, which redirects back to Nomatron. 4, Nomatron session: Nomatron exchanges the response on the server and issues its own 24-hour session. Two notes follow. Tokens: Nomatron issues its own session, and APIs do not accept raw identity-provider tokens. Password and OIDC logins both get a fixed 24-hour session that is not configurable, with no refresh token. Sync Groups: roles change at the next login. When Sync Groups is on, mapped roles are added or removed only when the user next signs in. Until then, the current session, which can last up to 24 hours, keeps the old roles.

The OIDC login flow. Mapped roles change only at the next sign-in.

Add the provider

An administrator adds the provider in the UI under Identity & Access > OIDC Providers. The same job can be done through the API with POST /api/v1/auth/providers, or in Terraform with the nomatron_oidc_provider resource.

The New OIDC Provider form asks for the following. There’s no separate discovery URL field: Nomatron uses the Issuer URL as the OIDC issuer when it talks to your identity provider.

New OIDC Provider form with Display Name Example IdP, Slug example-idp, Issuer URL, Client ID, a masked Client Secret and Scopes

The top of the New OIDC Provider form, filled in with example values. The client secret is masked.

  • Display Name: the label people see for the provider.
  • Slug: the provider’s short name, used in the callback URL below. Lowercase letters, numbers and hyphens only.
  • Issuer URL: your identity provider’s issuer, for example https://idp.example.com.
  • Client ID and Client Secret: the values from the application you register with your identity provider, such as <CLIENT_ID> and <CLIENT_SECRET>. Copy the secret straight from your secret store into the form.
  • Scopes: openid profile email by default.
  • Username Claim, Email Claim, Name Claim and Groups Claim: these default to preferred_username, email, name and groups.
  • Allowed Email Domains: optional, for example example.com.
  • Enabled: off by default. The provider isn’t used for sign-in until you turn this on.
  • Default Provider: off by default.
  • Auto Provision Users, Sync Profile and Sync Groups: all on by default. Sync Groups is what makes the group mappings later in this step work.

The form also has a Migrate existing identities toggle, which this post leaves off. There’s no CLI command for creating a provider. The CLI can list them with nomatron oidc providers list, which you’ll use in a moment.

Rest of the New OIDC Provider form: claim fields, Allowed Email Domains, and the Enabled, Default Provider, Auto Provision Users, Sync Profile, Sync Groups and Migrate existing identities toggles

The rest of the form. Enabled and Default Provider are switched on here for the example; both are off by default.

When you register Nomatron as an application in your identity provider, use this redirect URI. Replace https://nomatron.example.com with the URL of your own Nomatron installation, and swap in your provider slug:

text
https://nomatron.example.com/api/v1/auth/oidc/<provider-slug>/callback

The provider slug is the short name you give the provider in Nomatron. If the browser callback fails later, a mismatch here is the first thing to check.

Two API calls are handy once the provider exists. POST /api/v1/auth/providers/{provider}/test checks that discovery works, and POST /api/v1/auth/providers/{provider}/secret rotates the client secret.

Note: Nomatron encrypts stored secrets, including OIDC client secrets, with the key in NOMATRON_ENCRYPTION_KEY. Back that key up separately from the database, because those secrets can’t be decrypted after a restore without the original key.

Sign in from the browser and the CLI

The first successful login creates a Nomatron user automatically, with its auth_provider set to oidc:<provider-slug>. From the CLI, signing in looks like this:

bash
nomatron login --oidc

The CLI prints an authorization URL, opens your browser, and waits while you complete the login. If you leave out --provider, it uses the provider marked as default, or the first enabled provider if none is marked.

If your server has more than one provider, or you’re working on a host with no browser, these variations help:

bash
nomatron login --oidc --provider example-idp
nomatron login --oidc --provider example-idp --open-browser=false

The first picks a specific provider. The second prints the URL without opening a browser, so you can paste it into a browser elsewhere and leave the CLI running until it stores the token. Either way, you should see the CLI finish and save a Nomatron token to ~/.nomatron/token.json. A quick nomatron users list confirms that it works.

Map IdP groups to Nomatron roles

Signing in tells Nomatron who someone is. Group mappings decide what they can do. A mapping links a group claim value from your identity provider, an IdP group, to a Nomatron role in a domain. The role applies when a user signs in through that provider with that group in their claims, so a change takes effect at their next login, and sessions last a fixed 24 hours. Keep Sync Groups on so those roles are updated at each sign-in. You can create mappings with the CLI, with the API’s POST /api/v1/auth/providers/{provider}/group-mappings, or with the nomatron_oidc_group_mapping Terraform resource.

The commands below list your providers, then map an IdP group of platform admins to the platform-admin role in the global domain:

bash
nomatron oidc providers list

nomatron oidc mappings create \
  --provider example-idp \
  --external-group nomatron-platform-admins \
  --role platform-admin \
  --domain global \
  --description "IdP platform admins"

Anyone in the nomatron-platform-admins IdP group now picks up platform-admin the next time they sign in through example-idp.

Organization roles work the same way, with an organization domain instead of global:

bash
nomatron oidc mappings create \
  --provider example-idp \
  --external-group example-org-developers \
  --role developer \
  --domain org:<organization_id> \
  --description "example-org developers from the IdP"

nomatron oidc mappings list --provider example-idp

This maps the IdP’s example-org-developers group to the developer role inside one organization, then lists the mappings so you can check them. <organization_id> is the organization’s ID, a UUID, not its name or slug. You’ll get it in step 4. The only other domain you’ll use is global. In the UI, the mapping form’s Domain list shows organizations by name, such as Example Org, and saves the org:<organization_id> form.

OIDC group mapping form with External Group release-managers, Role team-deployer, Domain Example Org and Enabled on

An OIDC group mapping: the IdP group release-managers mapped to the example custom role team-deployer in Example Org.

One thing a mapping doesn’t do is make anyone a member of the organization. It grants roles, not membership, so an admin still adds people with nomatron organizations add-member, which step 4 covers.

Note: not every identity provider includes groups in standard OIDC tokens. Google Workspace, for example, works with the normal openid profile email scopes but doesn’t send group membership as a standard group claim by default. If expected roles are missing, check the group claim first. Direct role assignments to individual users keep working alongside mappings, so you always have a fallback.

Checkpoint: people can sign in as themselves, and IdP groups can carry roles with them. Now for teams that don’t have an IdP yet.

Step 3: No OIDC? Create local users safely

Plenty of teams start without single sign-on, and that’s fine. Local users are fully supported. The one rule is that passwords never go on the command line as a flag value.

The command below creates a local user and reads the initial password from a file:

bash
nomatron users create \
  --username morgan.smith \
  --name "Morgan Smith" \
  --password-file /run/secrets/morgan_password

This creates Morgan Smith with the username morgan.smith. The password comes from a file, so it never lands in shell history or process lists. In the UI, the New User form asks for Display Name, Username and Password. There’s no email field for a local user.

New User form with Display Name Jamie Lee, Username jamie.lee and a masked password

The New User form for a local user, filled in for Jamie Lee. The password is masked.

To reset a password later, pipe the new one in on stdin:

bash
printf '%s' "$NEW_PASSWORD" | nomatron users reset-password \
  --username morgan.smith \
  --password-stdin

Here $NEW_PASSWORD is populated from your secret store. You can also supply passwords through $NOMATRON_USER_PASSWORD. (And hopefully the password never spent any time on a sticky note.)

The rest of the user lifecycle lives in the same command family: users list, users read, users update, users activate, users deactivate and users revoke-sessions. You’ll use a few of these again in the offboarding section.

Checkpoint: you can create people, with or without an IdP. Next, they need somewhere to belong.

Step 4: Add people to an organization

An organization is the main tenant boundary in Nomatron. It owns the apps, environments, groups and approval rules for a team, and most role assignments are scoped to one. This post covers just enough to get your access model working; our organizations post, the previous one in this series, goes much further.

The commands below create an organization with a named owner, add a member and list the members:

bash
nomatron organizations create \
  --name "Example Org" \
  --slug example-org \
  --owner-username morgan.smith \
  --quiet

nomatron organizations add-member --name example-org --username <username>
nomatron organizations list-member --name example-org

This creates Example Org, with the slug example-org and Morgan as the owner. The owner is a member automatically, so the second command adds someone else. Notice that the later commands pass the slug, even to flags called --name. The CLI identifies an organization by its slug or its ID, never by its display name.

The --quiet flag prints only the new organization’s ID. Hold on to it, because every org:<organization_id> domain in this post needs it.

If you prefer the UI, go to Organizations, click New Organization, and fill in Organization Name, Owner Username and Description. The Organization Created modal shows the slug and organization ID along with the owner details.

Checkpoint: you have an organization, an owner and members. Time to stop thinking in individuals.

Step 5: Create groups for teams

Groups belong to an organization and name its teams. In v0.1.7 a Nomatron group doesn’t carry roles, and you can’t assign one a role. You use groups where Nomatron asks for a team, most often as approver groups in an app’s approval policy. Team-wide roles come from IdP groups instead, through the mappings in step 2.

The commands below create a platform group in example-org, add a member and list the members:

bash
nomatron groups create --organization example-org --name platform --owner-username morgan.smith
nomatron groups add-member --organization example-org --name platform --username morgan.smith
nomatron groups list-members --organization example-org --name platform

Create one group per team responsibility, for example release-managers and developers, and use them as approver groups. When a group owner moves on, groups transfer-owner hands ownership to someone else.

Direct role assignments, in step 7, need a user’s ID. You can read a user’s details as JSON like this:

bash
nomatron users read --username morgan.smith --format json

The user’s ID is the id field in that output, a UUID, and that’s what goes in user:<id>. Service accounts work the same way, with service_account:<id>. Always use these IDs, never names or usernames.

Checkpoint: your teams exist as groups, ready to use as approvers. Before handing out roles, let’s check whether the built-in ones are enough.

Step 6: Design custom roles from the permission catalog

The built-in roles cover a lot of ground, and they’re the right place to start. Custom roles earn their place when a built-in role is too broad or too narrow for a real responsibility in your team.

Good reasons to create a custom role:

  • you need a narrower, least-privilege release role;
  • you need an organization-scoped audit viewer; or
  • you want to separate approval powers from broader admin powers.

Bad reasons:

  • every team wants its own slightly renamed copy of the same role;
  • the model has drifted into lots of near-duplicates; or
  • you’re using roles to make up for a messy group structure.

Before you design anything, it helps to know what the built-in roles already cover:

Roles page listing the built-in roles and the custom role team-deployer

The Roles page under Identity & Access: the built-in roles plus an example custom role, team-deployer.

  • access-admin (global) manages users, roles, role assignments and OIDC providers, and can read and export the audit log. That includes permanently erasing users, so keep the IdP group mapped to it small.
  • security-auditor (global) is read-only. It can see users, roles, organizations, service accounts, clusters, integrations, the license, system status and usage reports, and it can read and export the audit log.
  • organization-admin holds every organization-scoped permission in its organization, including members, groups and ownership transfer.
  • release-manager runs delivery. It can update apps, manage app jobs and environments from creation to destroy, start, approve and reject promotions, roll back, trigger and cancel deployments, and manage app and job variables and approval policies. It can’t create apps or manage members and groups.
  • developer can create and update apps and app networks, create, plan and apply app jobs, set variable values, and trigger and cancel deployments. It can’t delete or destroy jobs, or start or approve promotions.
  • organization-viewer is read-only across the organization, including members, groups, apps, deployments and their logs, clusters, variable values and the organization’s audit log.

If one of these is close but doesn’t quite fit a real responsibility, that’s when a custom role earns its place.

Always start from what your server actually exposes rather than guessing permission names. The command below prints the permission catalog as JSON:

bash
nomatron permissions list --format json

This is the safest starting point for role design, because every permission you pick is one the server really knows about.

Next, create the role. Repeat --permissions once per permission:

bash
nomatron roles create \
  --name deployer \
  --permissions organization.app_jobs.plan \
  --permissions organization.app_jobs.apply

This creates a deployer role that can plan and apply app jobs and nothing else. You can check the definition with nomatron roles read --name deployer.

Details of the custom role team-deployer, type Custom, with its permission strings

A saved custom role, here the example team-deployer, with its type and permissions.

A few things to know about custom roles in v0.1.7:

  • Custom roles are always created as global roles, but they can hold organization.* permissions. Assign one in an org:<organization_id> domain, and those organization permissions apply only in that organization. That’s the supported way to build a team-specific role, and it’s exactly what the next step does with deployer.
  • roles update --permissions replaces the whole permission set, so always pass the complete list.
  • Custom roles depend on the custom_rbac_roles entitlement in your license, and the number you can create is set by the custom_rbac_role_count quota.

Checkpoint: you have the roles you need. Now let’s connect them to people.

Step 7: Assign roles, IdP groups first and users by exception

This is where everything comes together. Team-wide roles come from IdP groups, so map each team’s IdP group to its role in the organization’s domain. The commands below map example-org’s admin and release IdP groups to organization-admin and deployer, both inside example-org:

Diagram titled “Custom roles and OIDC mappings”, covering two details that catch people out. Left panel, Custom roles: created global, assigned in an organization. Custom roles are always created as global roles, but they can hold organization.* permissions. You create the role, which is always global, assign it to user:ID or service_account:ID in org:ORGANIZATION_ID, and those organization permissions apply only in that organization. Right panel, OIDC group mappings: a mapping grants a role, not membership. An IdP group claim goes through an OIDC mapping to a role, and takes effect at the user’s next sign-in through that provider, when Sync Groups is on. It does not add the user to the organization, so an admin still runs organizations add-member.

Where a custom role applies, and what an OIDC group mapping does and doesn’t do.

bash
nomatron oidc mappings create \
  --provider example-idp \
  --external-group example-org-admins \
  --role organization-admin \
  --domain org:<organization_id>

nomatron oidc mappings create \
  --provider example-idp \
  --external-group example-org-release-managers \
  --role deployer \
  --domain org:<organization_id>

Each mapping uses the role and domain shape we met earlier, with an IdP group in place of a subject. Everyone in the example-org-admins IdP group becomes an organization admin in example-org at their next sign-in, and the mapping grants nothing outside it. Keep nomatron roles assign for the exceptions: one user, or a service account, that needs a role their IdP groups don’t give them. Its subject is user:<id> or service_account:<id>.

If you ever need to undo a direct grant to one person, roles remove takes the same three values as roles assign:

bash
nomatron roles remove \
  --role_name deployer \
  --subject user:<user_id> \
  --domain org:<organization_id>

This removes the deployer role from one user in example-org without touching anyone else.

Here are the mappings from the target model, side by side. The IdP group names are examples; use the claim values your provider sends:

IdP groupRoleDomain
nomatron-platform-adminsplatform-adminglobal
nomatron-access-adminsaccess-adminglobal
nomatron-security-auditorssecurity-auditorglobal
example-org-adminsorganization-adminorg:<organization_id>
example-org-release-managersrelease-managerorg:<organization_id>
example-org-developersdeveloperorg:<organization_id>

Note: some assignments are system-managed rather than manual grants. An organization’s owner, for example, holds organization-admin in that organization through an assignment Nomatron manages itself. A normal roles remove won’t take it away; it moves to the new owner when ownership is transferred.

Checkpoint: access now follows IdP group membership. One more kind of identity to sort out: the non-human kind.

Step 8: Automation uses service accounts, not people

CI pipelines and Terraform runs shouldn’t borrow a person’s login. Give them a service account with its own token instead.

The commands below create a service account for CI and mint a token that expires at the end of March 2027:

bash
nomatron service-accounts create --name ci-deployer --description "CI automation"

nomatron service-accounts tokens create \
  --service-account-id <service_account_id> \
  --name ci-deployer-prod \
  --expires-at 2027-03-31T23:59:59Z

Store the token in your secret store straight away, and hand it to tools as $NOMATRON_TOKEN or through --api-token-file or --api-token-stdin. Give the service account only the roles it needs with nomatron roles assign, using --subject service_account:<service_account_id>.

Note: service accounts can’t approve deployments. An approval has to come from a user who is a member of the organization. That’s deliberate, and our approval policies post, next in this series, covers it in detail.

Checkpoint: people and machines each have their own identities. Let’s make sure it all works.

Step 9: Verify and debug access

Sooner or later someone will say “it says permission denied”. When that happens, work through this chain in order:

  1. Confirm the caller’s identity.
  2. Confirm the subject form (user:<id> or service_account:<id>) and, for OIDC users, which IdP groups were in their claims at their last sign-in.
  3. Confirm the target domain.
  4. Confirm which roles are assigned there.
  5. Confirm the role’s permission set.
  6. Confirm that the permission actually matches the action being attempted.

Most problems turn out to be a role assigned in the wrong domain, a mapping in the wrong domain, or an IdP group membership that isn’t what everyone assumed. The UI is the best place to check roles and assignments in context, even when you manage them with Terraform or the CLI.

The audit log lets you review recorded changes too. The command below lists audit entries for one organization:

bash
nomatron audit-logs list --organization example-org

You can narrow the results with --event-type, --resource-type, --from and --to when you’re looking for something specific.

Step 10: Offboarding checklist

People move on, and their access should move on with them. Here’s the order we recommend:

  1. Deactivate the user with nomatron users deactivate --username morgan.smith.
  2. Sign them out everywhere with nomatron users revoke-sessions --username morgan.smith.
  3. Hand over any live service accounts they own with nomatron users transfer-owned-credentials --username morgan.smith --to-username <admin_username>. This rotates those service accounts’ tokens. It’s available from the CLI and API only, and the receiving user must be an active root or platform-admin.
  4. Remove any roles assigned to them directly, take them out of their IdP groups, and remove them from Nomatron groups such as approver groups.

Why deactivate and revoke sessions first? Password and OIDC logins both get a fixed 24-hour session. It isn’t configurable, and there’s no refresh token. Roles that come from OIDC group mappings are only added or removed when the user next signs in, and only when Sync Groups is on. Until then, an existing session, which can last up to 24 hours, keeps the old roles. So taking someone out of an IdP group isn’t enough on its own, and that’s why deactivating them and revoking their sessions come first.

Step 11: Make it durable with Terraform

Once the model settles down, we recommend managing it as code. Terraform is the best steady-state surface for RBAC, because every access change becomes a reviewable pull request.

The relevant resources are nomatron_oidc_provider, nomatron_oidc_group_mapping, nomatron_user, nomatron_group, nomatron_group_member, nomatron_organization_member, nomatron_role, nomatron_role_assignment and nomatron_service_account.

The example below defines a read-only custom role and maps an auditors IdP group to it in the global domain:

hcl
resource "nomatron_role" "viewer" {
  name        = "viewer"
  description = "Read-only role"
  permissions = [
    "global.roles.read",
    "global.users.read",
  ]
}

resource "nomatron_oidc_group_mapping" "auditors_viewer" {
  provider_slug  = "example-idp"
  external_group = "nomatron-security-auditors"
  role           = nomatron_role.viewer.name
  domain         = "global"
}

Key points to note about this configuration:

  • The role lists explicit permissions from the catalog, with no wildcards.
  • The mapping takes the same IdP group, role and domain values as nomatron oidc mappings create.
  • Referencing the role through its resource attribute means Terraform creates the role before the mapping.

Note: nomatron_role_assignment, which you’d use for direct user and service account assignments, doesn’t have full remote read support in v0.1.7, so drift detection for assignments is more limited than for other resources. Keep assignment changes flowing through Terraform rather than mixing in ad hoc CLI changes.

Summary

This post walked through taking a Nomatron server from a single root login to a team-shaped access model. You locked down root, turned on OIDC single sign-on with group mappings, created local users safely, organized people into organizations and groups, built a custom role from the permission catalog, and mapped IdP groups to roles in the right domains. You also set up service accounts for automation, learned a reliable debugging order, and codified the result with Terraform.

Here’s the target model as a checklist:

  • Root has a strong password and is used for emergencies only.
  • People sign in as themselves, through OIDC where you can.
  • platform-admin, access-admin and security-auditor come from small IdP groups mapped in the global domain.
  • Each organization has its own admin, release and developer IdP groups, mapped to roles in its org domain.
  • Custom roles exist only for real gaps.
  • Automation uses service accounts with expiring tokens.
  • Offboarding follows a written checklist.

This approach is a good fit for any team running Nomatron for more than a handful of people. If you’re still the only user, keep it simple for now and come back when the second team arrives. For what lives inside an organization, what stays global, and how to run many teams on one control plane, see our organizations post, the previous one in this series. Next in this series, we’ll put these groups and roles to work with approval policies, from a single approver to per-environment rules. The RBAC section of the Nomatron docs covers every concept here in more detail.

Ready to try it on your own Nomad clusters? Get early access

HashiCorp, Nomad and Terraform are trademarks of HashiCorp. Nomatron is not affiliated with or endorsed by HashiCorp. Other names may be trademarks of their respective owners.