MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / AuthzPolicy

Class AuthzPolicy

crates/openshell-server/src/auth/authz.rs:31–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29/// to prevent accidentally leaving admin endpoints unprotected.
30#[derive(Debug, Clone)]
31pub struct AuthzPolicy {
32 /// Role name that grants admin access. Empty disables admin checks.
33 pub admin_role: String,
34 /// Role name that grants standard user access. Empty disables user checks.
35 pub user_role: String,
36 /// When true, enforce scope-based permissions on top of roles.
37 pub scopes_enabled: bool,
38}
39
40impl AuthzPolicy {
41 /// Validate the policy configuration.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected