contexa-iam

Admin Console

Web-based administration console providing security monitoring, unified policy management (Policy Center), unified identity management (Access Center), Zero Trust operations, and AI-powered policy generation.

Menu Structure

This page documents the OSS contexa-iam admin surface. The current default menu tree is created by AdminMenuService and exposes five top-level groups: Dashboard, Policy, Access, IAM, and Security. Zero Trust operations are currently presented under the Security group rather than as a separate top-level menu.

Menu GroupPagesPurposeCondition
Dashboard/admin, /admin/, /admin/dashboardSecurity metrics, Zero Trust decision breakdown, threat eventsAlways
Policy/admin/policy-center (Create with integrated resources, List, Simulator, Matrix)Unified policy operations including resource review, policy authoring, simulation, and matrix inspectionAlways
Access/admin/access-center (Users, Groups, Roles, Overview)Unified access management for user, group, role, and effective permission reviewAlways
IAMUsers, Groups, Roles, Permissions, Role Hierarchies, Password Policy, System Settings, Menu ManagementIdentity entities, hierarchy, password rules, and admin menu/system configurationAlways
SecuritySecurity Monitor, Blocked Users, Session Management, IP ManagementZero Trust operations, incident follow-up, session control, and IP rule managementAlways

Controllers

Most admin controllers are served under the /admin base path and return Thymeleaf template views. Some controllers (for example PasswordChangeController) use different base paths.

ControllerBase PathPurpose
DashboardController/admin, /admin/, /admin/dashboardSecurity overview with Zero Trust decision breakdown, authentication stats, and threat events
PolicyCenterController/admin/policy-centerUnified policy management for resources, quick/manual/AI creation, list, simulator, and matrix
PolicyController/admin/policiesServer-side policy CRUD route. Detail/edit flows render policydetails.html, while the current list experience is centered in Policy Center.
PolicyBuilderController/admin/policy-builderLegacy builder controller. The standalone admin/policy-builder.html template is not present in the current OSS tree, and authoring is centered in Policy Center.
ResourceAdminController/admin/workbench/resourcesLegacy resource-workbench route. The controller remains, but current OSS resource review is centered in Policy Center and the standalone admin/resource-workbench.html template is absent.
AccessCenterController/admin/access-centerUnified access management for users, groups, roles, CRUD subsets, and overview analytics
SecurityMonitorController/admin/security-monitorReal-time security event viewer with dashboard drill-down filters
UserManagementController/admin/usersUser CRUD with group assignment
GroupController/admin/groupsGroup CRUD with role assignment
RoleController/admin/rolesRole CRUD with permission assignment
PermissionController/admin/permissionsPermission CRUD with managed resource linking
RoleHierarchyController/admin/role-hierarchiesRole hierarchy management for permission inheritance
PasswordPolicyController/admin/password-policyPassword policy configuration (length, complexity, special characters)
SystemSettingsController/admin/system-settingsAdministrative system settings for the OSS admin surface
AdminMenuController/admin/menu-managementAdmin menu management for the current menu tree
BlacklistController/admin/blacklistBlocked user management with resolution workflows
IpManagementController/admin/ip-managementIP access rules (ALLOW/DENY) with CIDR support and expiration
SessionManagementController/admin/session-managementActive session tracking with forced invalidation and CSV export
PasswordChangeController/password-changePassword change form with policy validation

Policy Center

Access: /admin/policy-center

The Policy Center is the unified hub for current OSS policy operations. The current OSS template exposes four operator surfaces: Create, List, Simulator, and Matrix. Resource review and permission definition are integrated into the Create surface; older routes such as /admin/workbench/resources and /admin/policy-builder still exist in code, but the primary OSS UI is policy-center.html.

Create Surface (Resources + Policy Creation)

The Create surface combines resource review/definition with the current policy creation modes.

  • Resources area: Review discovered resources, define permissions, exclude or restore resources, and launch policy creation from the selected resource context.
  • Quick Mode: Role-permission mapping with search and chip-based selection. Creates a basic ALLOW policy.
  • Manual Mode: Full policy form with dynamic Target (URL/METHOD), Rule, and Condition (SpEL) editing. Directly creates Policy/PolicyTarget/PolicyRule/PolicyCondition entities.
  • AI Mode: Assisted policy draft generation inside Policy Center using current roles, permissions, conditions, and policy context. The generated draft remains subject to the normal save, approval, and activation rules.

List Surface

Server-side paginated policy list with keyword search. Edit and delete actions are wired through POST-based form flows and detail pages.

Simulator Surface

Runs policy what-if checks against selected users, permissions, and conditions using the simulator APIs exposed from PolicyCenterController.

Matrix Surface

Builds the policy matrix view through the matrix APIs exposed by PolicyCenterController and PolicyMatrixService.

Security Monitor

Access: /admin/security-monitor

Real-time security event viewer based on the audit_log table. All queries use DB-level pagination to handle millions of records.

Dashboard Drill-Down

Dashboard links navigate to Security Monitor with pre-applied filters. The current dashboard exposes both Zero Trust decision cards and security indicator cards.

Dashboard IndicatorFilterQuery
ZT AllowZT_ALLOWeventCategory = 'SECURITY_DECISION' and decision = 'ALLOW'
ZT ChallengeZT_CHALLENGEeventCategory = 'SECURITY_DECISION' and decision = 'CHALLENGE'
ZT BlockZT_BLOCKeventCategory = 'SECURITY_DECISION' and decision = 'BLOCK'
ZT EscalateZT_ESCALATEeventCategory = 'SECURITY_DECISION' and decision = 'ESCALATE'
After-hours AccessAFTER_HOURSEvents outside 09:00-18:00 or on weekends
AI Security AnalysisSECURITY_DECISIONeventCategory = 'SECURITY_DECISION'
Admin OverrideADMIN_OVERRIDEeventCategory = 'ADMIN_OVERRIDE'
Distinct IPsDISTINCT_IPDistinct client IP grouping over the selected time window
Average Risk ScoreHIGH_RISKCurrent implementation drills into records where riskScore >= 0.4
Security ErrorsSECURITY_ERROReventCategory = 'SECURITY_ERROR'

Dashboard

The Dashboard (/admin, /admin/, /admin/dashboard) provides a comprehensive security overview with data aggregated from audit_log over the last 24 hours.

Sections

  • Policy Status: Total policies, active resources, and protection coverage
  • Zero Trust Decisions: Donut chart with ALLOW/CHALLENGE/BLOCK/ESCALATE/DENY breakdown and drill-down cards for ALLOW/CHALLENGE/BLOCK/ESCALATE
  • Authentication Stats: Semi-circle gauge showing success/failure ratio
  • Security Indicators: Drill-down links for after-hours access, security decision events, admin overrides, distinct IPs, high-risk records, and security errors
  • Threat Events: Recent high-risk events with direct links to Security Monitor detail
  • Blocked Users: Recently blocked users by the Zero Trust engine

Access Center

Access: /admin/access-center

Unified interface for managing the entire identity chain (User -> Group -> Role -> Permission) in a single tabbed view. The current template exposes four tabs: Users, Groups, Roles, and Overview.

Users Tab

Search users and manage their group and direct-role assignments. User detail shows groups, direct roles, group-inherited roles, and effective permissions. When assigning direct roles, the current client can also persist CRUD subsets per role through UserRolePermission.

EndpointMethodDescription
/admin/access-center/api/usersGETSearch users by keyword
/admin/access-center/api/users/{userId}/detailGETUser detail with groups, direct roles, group roles, and effective permissions
/admin/access-center/api/users/{userId}/groupsPOSTUpdate user group assignments
/admin/access-center/api/users/{userId}/rolesPOSTUpdate direct role assignments and their CRUD subsets

Groups Tab

View all groups with assigned roles and current members. Group-role mappings are updated here, and the current client can also persist CRUD subsets per group-role pair through GroupRolePermission.

EndpointMethodDescription
/admin/access-center/api/groupsGETList all groups
/admin/access-center/api/groups/{groupId}/detailGETGroup detail with roles and members
/admin/access-center/api/groups/{groupId}/rolesPOSTUpdate group role assignments and their CRUD subsets

Roles Tab

View all roles with their permissions and directly assigned users. This tab updates the permission set of a role.

EndpointMethodDescription
/admin/access-center/api/rolesGETList all roles
/admin/access-center/api/roles/{roleId}/detailGETRole detail with permissions and directly assigned users
/admin/access-center/api/roles/{roleId}/permissionsPOSTUpdate role permission assignments

Overview Tab

The Overview tab shows current counts for users, groups, roles, and permissions, plus a summary diagram explaining the User -> Group -> Role -> Permission structure.

Identity Management

Standard CRUD operations for Users (/admin/users), Groups (/admin/groups), Roles (/admin/roles), and Permissions (/admin/permissions).

The access chain is User -> Group -> Role -> Permission. Users inherit permissions through group membership and direct role assignment.

Role Hierarchies

Access: /admin/role-hierarchies

Parent roles automatically inherit all permissions from child roles. The hierarchy is resolved by Spring Security's RoleHierarchy and considered during CustomDynamicAuthorizationManager runtime evaluation.

Password Policy

Access: /admin/password-policy

Configures password rules used during registration and password change flows.

System Settings

Access: /admin/system-settings

System-wide IAM settings exposed in the OSS admin surface.

Menu Management

Access: /admin/menu-management

Administrative menu tree management for the current admin navigation structure.

Zero Trust Operations

Security Monitor

Access: /admin/security-monitor

Real-time audit log viewer with time-range filters (1h/6h/24h/3d), category filters (AI Analysis, Auth Failure, Admin Override), and DB-level pagination for millions of records.

Blocked Users

Access: /admin/blacklist

Manages users blocked by the Zero Trust engine. Supports filtering by status (BLOCKED, UNBLOCK_REQUESTED, RESOLVED, TIMEOUT_RESPONDED) and resolution workflows by administrators.

Security Management

IP Management

Access: /admin/ip-management

Manage IP-based access rules with ALLOW/DENY types. Supports IPv4/IPv6 addresses and CIDR notation. Rules can have optional expiration dates and can be toggled on/off. Export rules to CSV.

Session Management

Access: /admin/session-management

Monitor active user sessions with pagination and search. Displays session ID, username, client IP, user agent, login time, and last activity. Supports forced session invalidation (single session or all sessions for a user). Export sessions to CSV.

Password Policy

Access: /admin/password-policy

Configure password policy rules: minimum/maximum length, uppercase requirement, lowercase requirement, digit requirement, and special character requirement. Policy rules are enforced during user registration and password changes.

AI Policy Generation

The AI policy generation system uses SSE streaming to create policies from natural language requirements.

API Endpoints

EndpointMethodDescription
/admin/api/ai/policies/generate/streamPOSTSSE streaming policy generation from natural language
/admin/api/ai/policies/generatePOSTSynchronous policy generation
/admin/api/policies/build-from-business-rulePOSTSave generated policy to database

How It Works

  1. User enters a natural language requirement (e.g., "Allow developers to access /api/** during business hours")
  2. AdvancedPolicyGenerationLab enriches the request with all available roles, permissions, and conditions from the database
  3. PolicyGenerationContextRetriever searches vector DB for similar policy patterns (RAG)
  4. AI generates a PolicyResponse with roleIds, permissionIds, conditions, and ID-to-name mappings
  5. Frontend validates the response against available items and renders a preview
  6. User confirms and saves -- BusinessPolicyService creates Policy + PolicyTarget + PolicyRule + PolicyCondition entities
  7. CustomDynamicAuthorizationManager reloads and the policy takes effect immediately

Admin Console Architecture

The current OSS admin surface combines navigation groups and operational areas. The boxes below reflect the current menu tree and the major integrated workspaces.

Admin Console Navigation and Operational Areas
Dashboard/admin, /admin/dashboard -- security metrics, Zero Trust breakdown, threat events
Policy Center/admin/policy-center -- create with integrated resources, list, simulator, matrix
Access Center/admin/access-center -- users, groups, roles, overview, CRUD subset assignment
IAM PagesUsers, Groups, Roles, Permissions, Role Hierarchies, Password Policy, System Settings, Menu Management
Zero Trust OperationsSecurity Monitor and Blocked Users are exposed under the Security menu and provide investigation and response workflows
Security ManagementIP management and session management in the OSS admin surface

Getting Started

A complete walkthrough from deployment to fully dynamic authorization:

StepActionDetails
1Deploy your applicationResource Scanner automatically discovers all endpoints
2Open Policy Center (Create tab / integrated resources area)Review discovered resources with inline editing
3Define permissionsClick "Create Permission & Policy" for resources that need authorization
4Create policiesUse Quick Mode (role-permission mapping), Manual Mode (Target/Rule/Condition), or AI Mode (natural language)
5VerifyPolicy takes effect immediately via hot-reload. Test with different user roles.
6MonitorUse Dashboard and Security Monitor for real-time security visibility

Configuration Properties

YAML
contexa:
  iam:
    admin:
      rest-docs-path: /docs/index.html  # Path to REST API documentation