Access Control
Manage users, roles, policies, and OIDC sign-in under Access Control. OIDC can replace or complement local password authentication and is available in Community (see Licensing). The workspace has three tabs:
| Tab | Covers |
|---|---|
| Access Rules | Policies, grants, reason codes, and the access check — the rules that decide who can open which protocol on which host |
| Directory | Users, groups, and roles |
| SSO | OIDC single sign-on configuration |
Capability-gated UI
The UI hides or makes actions read-only according to the caller’s RBAC capabilities, including connection launch, custom-field editing, audit views, and session controls. The backend checks permissions independently.
Core concepts
| Term | Meaning |
|---|---|
User | A local or OIDC-provisioned account |
Group | A named collection of users |
Role | A named collection of policies |
Policy | An allow/deny rule: effect × actions[] × resource_types[] × optional constraints |
PolicyBinding | Attaches a role to a user or group, optionally scoped to a specific resource |
RoleAssignment | Assigns a role directly to a user (bypasses the group step) |
API token | A per-user bearer credential with its own explicit action/resource-type scope |
Policies
A policy defines a rule that either allows or denies a set of actions on a set of resource types:
Policy {
name: "Allow SSH to production"
effect: "allow" // or "deny"
actions: ["CONNECT"]
resource_types: ["CONNECTION_TARGET"]
subjects: ["group:<group-id>"]
resources: ["connection_target:<target-id>"]
constraints: { "device_role": "server" } // optional JSON
}
Available actions
| Action | Meaning |
|---|---|
CREATE | Create a new resource |
READ | Read a resource |
UPDATE | Modify an existing resource |
DELETE | Remove a resource |
CONNECT | Open a session to a connection target |
OBSERVE | Observe a target through a read-only visual surface (used by MCP VNC capture) |
EXECUTE | Run commands (MCP SSH tools, playbook runs) |
MANAGE_ROLES | Administer roles and role assignments |
MANAGE_POLICIES | Administer policies and policy bindings |
VIEW_AUDIT | Audit-level review (e.g. other users' assistant conversations) |
SECRET | Read secret values (used by MCP and session credential resolution) |
WRITE | Generic write access (used by some admin operations) |
CCTV actions
Cameras and recorders use the dedicated resource type CCTV with six actions: CCTV_VIEW, CCTV_RECORDINGS, CCTV_EXPORT, CCTV_USERS, CCTV_SETTINGS, and CCTV_PTZ.
Only these six actions pair with CCTV; they cannot be used with other resource types.
Watching recorded footage (CCTV_RECORDINGS) and downloading a copy (CCTV_EXPORT) are separate grants. See CCTV.
The seeded cctv-operator role includes all six actions; admin:full-access covers CCTV automatically. In personal API tokens, CCTV scopes render as cctv:<operation> (cctv:view, cctv:ptz).
Evaluation rules
- A deny policy beats any allow — if any matching policy has
effect: "deny", the result isDeny. - The evaluator collects all policies reachable from the requesting user (via groups, role assignments, and direct bindings) and returns
Allowonly if at least one allow rule matches and no deny rule matches. - Constraints are optional JSON conditions that narrow when the policy fires. For example, restrict
CONNECTto targets with a specificdevice_roleortenant. - The access check under Access Rules (backed by
POST /api/v1/admin/access-control/access-evaluations) simulates a user × action × resource triple and shows the resulting decision — use it to debug policy stacks.
Define broad allows at the group or role level, and use deny policies for explicit exceptions.
Groups and roles
Users are organised into groups. Roles bundle policies. There are three binding paths, all evaluated together:
User → Group → Role → Policy
User → RoleAssignment → Role → Policy
User → PolicyBinding → Policy (direct policy bind, no role intermediary)
The union of all matching policies from all three paths forms the effective permission set for a request.
Assign roles to groups rather than individual users; use RoleAssignment for one-off exceptions.
SSO / OIDC
OIDC single sign-on is configured in Access Control → SSO. Once enabled, users can sign in through any OIDC-compatible provider (Keycloak, Authentik, Azure AD, Okta, etc.).
Key settings:
| Setting | Description |
|---|---|
enabled | Master switch for the OIDC login path |
issuer_url | OIDC issuer URL (e.g., https://keycloak.your-company.com/realms/piping) |
client_id | Registered client ID |
client_secret | Client secret — stored through the secrets layer, never in plain config |
redirect_url | Callback URL registered with the provider |
scopes | Requested OIDC scopes |
group_claim | Token claim used for group mapping |
provisioning_mode | manual or jit — how OIDC users are mapped to local users on first login |
With jit provisioning, OIDC users are created automatically on first login. The local password login path can coexist with OIDC or be disabled. The SSO tab includes a Test connection check (POST /api/v1/admin/auth/oidc/test-connection) to validate issuer discovery before enabling.
# Example: minimal OIDC config (set via API or the SSO tab)
issuer_url: 'https://keycloak.your-company.com/realms/piping'
client_id: 'piping'
client_secret: '<stored-as-secret>'
provisioning_mode: 'jit'
API tokens
Each user can create personal API tokens in Account → Settings → API Tokens (see User settings), scoped to specific actions and resource types. Tokens are the authentication mechanism for the MCP server and for programmatic API access.
UserApiToken {
name: "ci-pipeline-token"
token_prefix: "pat_..."
scopes: [
{ action: "read", resource_type: "inventory", resource_pattern: "*" },
{ action: "connect", resource_type: "connection_target", resource_pattern: "*" }
]
status: "active" // or "revoked"
expires_at: null // optional RFC3339 timestamp
last_used_at: "2025-06-01T10:00:00Z"
}
The supported action/resource pairs are listed by GET /api/v1/user/settings/api-tokens/scope-catalog. The optional resource_pattern narrows a scope from all objects (*) to specific ones (e.g. connection_target:<id>).
A request authenticated by token is subject to both the token's explicit scopes and the user's policy-derived permissions; effective access is the intersection of both.
Tokens are stored hashed. The plaintext is shown once at creation time. If a token is lost, revoke it and create a replacement.
To create a token:
POST /api/v1/user/settings/api-tokens
{
"name": "my-token",
"scopes": [
{ "action": "read", "resource_type": "inventory" },
{ "action": "connect", "resource_type": "connection_target" }
],
"expires_in_seconds": 2592000
}
# Action/resource strings are case-insensitive; an omitted resource_pattern defaults to "*"
# Response includes the full plaintext token — copy it now
Audit
The audit context records session lifecycle events and resource-access events as an append-only log. Each AuditEvent carries:
AuditEvent {
event_type: "connection.session.created" // e.g., connection.session.*, mcp.tool.invoked
actor_id: "<user-uuid>"
target_type: "connection_target"
target_id: "<target-uuid>"
metadata: { "protocol": "ssh", "session_id": "..." }
created_at: "2025-06-01T10:00:00Z"
}
Key event types:
| Event type | Meaning |
|---|---|
connection.session.created | A session record was created |
connection.session.activated | The session went active |
connection.session.disconnected | The client disconnected |
connection.session.terminated | The session was terminated |
connection.session.failed | The session failed to establish |
mcp.tool.invoked | An MCP tool was called |
secrets.resolve | A secret value was resolved |
inventory.<entity>.created / .updated / .deleted | Inventory mutations |
Audit events are immutable. Viewing the audit log requires VIEW_AUDIT on AUDIT_EVENT. Query and filter via GET /api/v1/audit/events; see Audit log.
REST API reference
| Method | Path | Purpose |
|---|---|---|
GET / POST | /api/v1/admin/access-control/users | List / create users |
GET / PUT / DELETE | /api/v1/admin/access-control/users/{id} | Read / update / delete user |
PUT | /api/v1/admin/access-control/users/{id}/password | Rotate password |
GET / POST | /api/v1/admin/access-control/groups | List / create groups |
GET / POST | /api/v1/admin/access-control/roles | List / create roles |
GET | /api/v1/admin/access-control/roles/{id}/grants | Effective grants of a role |
GET / POST | /api/v1/admin/access-control/role-assignments | List / create role assignments |
GET / POST | /api/v1/admin/access-control/policies | List / create policies |
POST | /api/v1/admin/access-control/policies/{id}/enable (/disable) | Toggle a policy |
POST | /api/v1/admin/access-control/access-evaluations | Simulate an access decision |
GET / POST | /api/v1/user/settings/api-tokens | List / create own API tokens |
GET | /api/v1/user/settings/api-tokens/scope-catalog | Supported token scopes |
POST | /api/v1/user/settings/api-tokens/{id}/revoke | Revoke API token |
GET | /api/v1/audit/events | Query audit log |
GET / PUT | /api/v1/admin/auth/oidc/settings | Read / update OIDC settings |
Users, groups, roles, and policies also expose /bulk endpoints. The authoritative route list is the OpenAPI contract — see API reference.