Cerbos JavaScript SDK
    Preparing search index...

    Interface ResourcePolicyBody

    A policy defining rules for actions that can be performed on a given resource.

    interface ResourcePolicyBody {
        constants?: Constants;
        importDerivedRoles?: string[];
        resource: string;
        rules: ResourceRule[];
        schemas?: SchemaRefs;
        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.

    importDerivedRoles?: string[]

    Name of a set of derived roles to import.

    resource: string

    The name of the resource to which the policy applies.

    rules: ResourceRule[]

    Rules defining the actions that can be performed on the resource.

    schemas?: SchemaRefs

    Schemas for principal and resource attributes.

    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.