Skip to main content
The Security components provide interfaces for managing security policies, user permissions, role-based access control, and security events.

Security Main

Main security interface component for security policy management. Location: plugins/main/public/components/security/main.tsx

Usage

The Security component provides access to:
  • Security events and alerts
  • RBAC policy management
  • User and role management
  • Security configuration
  • Audit logs

Security Events

SecurityEventsTable

Displays security events and alerts with filtering and search. Props:
object
Filters to apply to events
(event: SecurityEvent) => void
Callback when an event is clicked
Usage:

SecurityEvent Type

RBAC Components

RolesTable

Manage security roles and permissions. Props:
(role: Role) => void
Callback when a role is selected
(role: Role) => void
Callback to edit role
(role: Role) => void
Callback to delete role
Usage:

Role Type

UsersTable

Manage security users and role assignments. Props:
(user: User) => void
Callback when a user is selected
(user: User) => void
Callback to edit user
Usage:

User Type

PoliciesTable

Manage security policies. Props:
(policy: Policy) => void
Callback when a policy is selected
Usage:

Policy Type

Role Editor

RoleEditor

Form component for creating and editing roles. Props:
Role
Existing role to edit (omit for new role)
(role: Role) => void
required
Callback when role is saved
() => void
required
Callback when editing is cancelled
Usage:

Permission Selector

PermissionSelector

Component for selecting resource permissions. Props:
Permission[]
required
Current permissions
(permissions: Permission[]) => void
required
Callback when permissions change
string[]
List of available resource types
Usage:

Security Audit

AuditLogsTable

Displays security audit logs. Props:
object
Filters for audit logs
Usage:

Complete Example

Full security management interface:

Utility Functions

checkPermission()

Check if current user has a specific permission.

hasRole()

Check if current user has a specific role.

getCurrentUser()

Get current user information.

Best Practices

Verify user permissions before showing UI elements:
Ensure roles exist before assigning to users:
Always log security-related actions for audit:

Settings Components

Settings and configuration

RBAC Guide

Role-based access control

Authentication

Authentication configuration

Wazuh Core API

Security services API