Cerbos JavaScript SDK
    Preparing search index...

    Interface ResourceRule

    A rule for actions that can be performed on a given resource.

    interface ResourceRule {
        actions: string[];
        condition?: Condition;
        derivedRoles?: string[];
        effect: Effect;
        name?: string;
        output?: Output;
        roles?: string[];
    }
    Index

    Properties

    actions: string[]

    The actions to which the rule applies.

    Actions can contain wildcards. Wildcards honour the : delimiter (e.g. a:*:d would match a:x:d but not a:x).

    condition?: Condition

    The condition that must be met for the rule to apply.

    derivedRoles?: string[]

    Derived roles to which the rule applies.

    effect: Effect

    The effect of the rule.

    name?: string

    A descriptive name for the rule.

    output?: Output

    User-defined output to be produced when evaluating the rule.

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

    roles?: string[]

    Static roles to which the rule applies.

    The special value * can be used to disregard roles when evaluating the rule.