Module rbac

Module rbac 

Source
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§

PolicyEvaluator
RBAC policy evaluator.
RbacPolicy
RBAC policy definition.
ResourceRule
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.
RbacError
Error type for RBAC evaluation.

Type Aliases§

RbacResult
Result type for RBAC evaluation.