Security Main
Main security interface component for security policy management. Location:plugins/main/public/components/security/main.tsx
Usage
- 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
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
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
User Type
PoliciesTable
Manage security policies. Props:(policy: Policy) => void
Callback when a policy is selected
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
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
Security Audit
AuditLogsTable
Displays security audit logs. Props:object
Filters for audit logs
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
Check Permissions Before Rendering
Check Permissions Before Rendering
Verify user permissions before showing UI elements:
Validate Role Assignments
Validate Role Assignments
Ensure roles exist before assigning to users:
Log Security Actions
Log Security Actions
Always log security-related actions for audit:
Related Resources
Settings Components
Settings and configuration
RBAC Guide
Role-based access control
Authentication
Authentication configuration
Wazuh Core API
Security services API