Cerbos JavaScript SDK
    Preparing search index...

    Interface PrincipalPolicyBody

    A policy defining overrides for a specific user.

    interface PrincipalPolicyBody {
        constants?: Constants;
        principal: string;
        rules: PrincipalRule[];
        scope?: string;
        scopePermissions?: ScopePermissions;
        variables?: Variables;
        version: string;
    }
    Index

    Properties

    constants?: Constants

    Constants defined for use in conditions.

    Requires the Cerbos policy decision point server to be at least v0.40.

    principal: string

    The ID of the principal to whom the policy applies.

    rules: PrincipalRule[]

    Rules defining the overrides that apply to the principal.

    scope?: string

    Scope of the policy.

    scopePermissions?: ScopePermissions

    Scope permissions determining how rules are evaluated within a scope hierarchy.

    variables?: Variables

    Variables defined for use in conditions.

    Requires the Cerbos policy decision point server to be at least v0.29.

    version: string

    The version of the policy.

    Policies are uniquely identified by the principal name and version pair. You can have multiple policy versions for the same principal (e.g. production vs. staging). The version value default is special as it is the default fallback when no version is specified in the request.