Cerbos JavaScript SDK
    Preparing search index...

    Interface ExportConstants

    A set of exported constants to be reused in other policies.

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

    interface ExportConstants {
        apiVersion?: string;
        description?: string;
        disabled?: boolean;
        exportConstants: ExportConstantsBody;
        metadata?: PolicyMetadata;
        variables?: Record<string, string>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    apiVersion?: string

    API version of the policy.

    description?: string

    Description of the policy.

    disabled?: boolean

    Whether the policy is ignored by the Cerbos engine.

    exportConstants: ExportConstantsBody

    A set of exported constants.

    metadata?: PolicyMetadata

    Metadata about the policy.

    variables?: Record<string, string>

    Variable expressions defined for the policy.

    Each variable is evaluated before any rule condition. A variable expression can contain anything that condition expression can have.

    Define variables within the policy body instead, provided the Cerbos policy decision point server is at least v0.29 (DerivedRolesBody.variables, PrincipalPolicyBody.variables, or ResourcePolicyBody.variables).