Skip to content

Latest commit

 

History

History
152 lines (67 loc) · 1.7 KB

core.principal.md

File metadata and controls

152 lines (67 loc) · 1.7 KB

Home > @cerbos/core > Principal

Principal interface

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

Signature:

export interface Principal 

Properties

Property

Modifiers

Type

Description

attr?

Record<string, Value> | undefined

(Optional) Application-specific attributes describing the principal.

attributes?

Record<string, Value> | undefined

(Optional) Application-specific attributes describing the principal (deprecated).

id

string

A unique identifier for the principal.

policyVersion?

string | undefined

(Optional) The policy version to use when authorizing the principal.

roles

string[]

The roles held by the principal.

scope?

string | undefined

(Optional) The policy scope to use when authorizing the principal.