Cerbos JavaScript SDK
    Preparing search index...

    Interface Principal

    A principal (often a user, but potentially another actor like a service account) to authorize.

    interface Principal {
        attr?: Record<string, Value>;
        attributes?: Record<string, Value>;
        id: string;
        policyVersion?: string;
        roles: string[];
        scope?: string;
    }
    Index

    Properties

    attr?: Record<string, Value>

    Application-specific attributes describing the principal.

    {}

    attributes?: Record<string, Value>

    Application-specific attributes describing the principal (deprecated).

    {}

    Use attr instead, for consistency with policy expressions.

    id: string

    A unique identifier for the principal.

    policyVersion?: string

    The policy version to use when authorizing the principal.

    The Cerbos policy decision point server's configured default version.
    
    roles: string[]

    The roles held by the principal.

    scope?: string

    The policy scope to use when authorizing the principal.

    ""