Expand description
Role-Based Access Control (RBAC) for RingKernel.
This module provides fine-grained access control for kernel operations with predefined roles and customizable permission policies.
§Example
ⓘ
use ringkernel_core::rbac::{RbacPolicy, Role, Permission, PolicyEvaluator};
use ringkernel_core::auth::AuthContext;
let policy = RbacPolicy::new()
.with_role(Role::admin())
.with_role(Role::operator())
.with_role(Role::developer())
.with_role(Role::readonly());
let evaluator = PolicyEvaluator::new(policy);
// Check if user can launch kernels
if evaluator.is_allowed(&auth_context, Permission::KernelLaunch) {
// Launch kernel
}Structs§
- Policy
Evaluator - RBAC policy evaluator.
- Rbac
Policy - RBAC policy definition.
- Resource
Rule - A rule for specific resources.
- Role
- A role with a set of permissions.
- Subject
- Subject for RBAC evaluation (who is making the request).
Enums§
- Permission
- Fine-grained permissions for kernel operations.
- Rbac
Error - Error type for RBAC evaluation.
Type Aliases§
- Rbac
Result - Result type for RBAC evaluation.