Organization & Permissions
Organization & Permissions
Organization & Permissions
NICo does not maintain its own user directory. Identity, org membership, and role assignments are all managed in the upstream identity provider. The REST API reads role claims from the authentication token on every request. Adding or removing a user is done in the identity provider, not through nicocli.
NICo accepts tokens from any OIDC-compatible IdP. The bundled dev Keycloak (deployed by setup.sh and documented in the Quick Start Guide) is the recommended starting point and the reference implementation for IdP wiring — you can use it as-is for evaluation, or model your production IdP setup after it. Configure additional or replacement IdPs via the issuers block in carbide-rest-api’s config; see the Reference Installation guide for the configuration surface and the claim mappings NICo expects (org name, display name, role claim).
NICo’s authorization model has three roles, all managed in the upstream identity provider:
A single user can hold roles in multiple orgs simultaneously. On dev/service-account orgs, one user typically holds both Provider Admin and Tenant Admin in the same org.
TENANT_ADMIN role at the org level.nicocli user getThe exact steps depend on your IdP. For the bundled dev Keycloak, this is realm administration in the Keycloak admin console — create the user, add them to the realm group that maps to the tenant org, and assign the role. See the Quick Start Guide for the realm layout.
PROVIDER_ADMIN role.nicocli user getSame caveat as above — this is an IdP admin task, not a nicocli operation.
Example response for a human user:
Service accounts have empty email/firstName/lastName. Human users have those populated from the IdP.
This endpoint does not return role information directly — roles are in the token and validated server-side. Confirm which roles you hold by attempting role-gated operations: nicocli allocation list requires Provider Admin; nicocli tenant get-current-tenant requires Tenant Admin.
If your deployment is configured for service-account auth, use nicocli service-account get to retrieve the current org’s service-account status, including the auto-created provider and tenant IDs.
NICo does not expose a “list users in this tenant” endpoint. Use the IdP’s admin console or API to view members and roles.
For audit purposes, NICo’s audit log records which user performed each operation:
Remove the role assignment (or org membership) in the identity provider. The change takes effect on the user’s next authentication attempt.
TENANT_ADMIN so they can provision the tenant.nicocli user get and nicocli tenant get-current-tenant.PROVIDER_ADMIN.