Skip to main content

Access Management API

User, group, and role management combining a custom backend API with direct Keycloak Admin API calls.

FieldValue
Custom API Port50001 (shared with Operator Catalog)
Keycloak Port8080
Base Path/api/v1 (custom), /admin/realms/{realm} (Keycloak)
SourceFrontend service integration

User Management (Custom API)

MethodPathDescription
GET/api/v1/usersList users with filters
POST/api/v1/usersCreate user
GET/api/v1/users/{id}Get user details
PUT/api/v1/users/{id}Update user
DELETE/api/v1/users/{id}Delete user
POST/api/v1/users/{id}/reset-passwordReset user password

Keycloak Admin API

Direct calls to Keycloak for identity management. Requires admin-level JWT.

Users

MethodPathDescription
GET/admin/realms/{realm}/usersList Keycloak users
POST/admin/realms/{realm}/usersCreate Keycloak user
GET/admin/realms/{realm}/users/{id}Get user
PUT/admin/realms/{realm}/users/{id}Update user
DELETE/admin/realms/{realm}/users/{id}Delete user

Groups

MethodPathDescription
GET/admin/realms/{realm}/groupsList groups (hierarchical tree)
POST/admin/realms/{realm}/groupsCreate group
GET/admin/realms/{realm}/groups/{id}Get group
PUT/admin/realms/{realm}/groups/{id}Update group
DELETE/admin/realms/{realm}/groups/{id}Delete group

Roles

MethodPathDescription
GET/admin/realms/{realm}/rolesList roles
POST/admin/realms/{realm}/rolesCreate role
GET/admin/realms/{realm}/roles/{name}Get role
PUT/admin/realms/{realm}/roles/{name}Update role

Role Assignments

MethodPathDescription
GET/admin/realms/{realm}/users/{id}/role-mappings/realmGet user's realm roles
POST/admin/realms/{realm}/users/{id}/role-mappings/realmAssign roles to user

Keycloak Configuration

PropertyValue
ProtocolOAuth2 / OpenID Connect
Librarykeycloak-js 26.1.0
Realmdaitics-dev (dev), daitics (default)
Client IDdtx-portal
Init Modelogin-required
PKCES256 for HTTPS, disabled for HTTP
Token RefreshEvery 60 seconds
Tenant IDJWT tenant_id claim

Keycloak URLs

EnvironmentURL
Devhttp://100.91.186.89:8080
Testhttp://100.110.45.41:8080
Localhttp://localhost:8180

Key Types

User

{
id: string;
username: string;
email: string;
firstName: string;
lastName: string;
roles: Role[];
groups: UserGroup[];
enabled: boolean;
}

Role

{
id: string;
name: string;
description: string;
permissions: Permission[];
}

UserGroup (Hierarchical)

{
id: string;
name: string;
path: string;
parentId?: string;
children: UserGroup[]; // Recursive tree
}

Frontend Integration

FilePurpose
services/access-management/access-management.service.tsUser, role, group CRUD
services/access-management/useAccessManagement.tsReact Query hook
services/auth/keycloak.service.tsKeycloak auth integration
types/access-management.types.tsTypeScript types
stores/useAccessManagementStore.tsZustand filter/selection state
hooks/usePermissionCheck.tsPermission checking hook