Documentation ¶
Overview ¶
Package cedar contains all logic for a functional component acting as the Policy Decision Point, using Cedar as the policy language.
Index ¶
- Constants
- func DeterminePrincipal(a *attributes) (cedar.EntityType, cedar.String)
- func NewAttributeBuilder(logger *slog.Logger) types.AttributesBuilder
- func NewAttributeSet(logger *slog.Logger, in ...any) types.AttributeSet
- func NewController(pip pip.PIP, store string, recurse bool, logger *slog.Logger) control.Controller
- func NewEntityBuilder(logger *slog.Logger) types.EntitiesBuilder
- func NewEntitySet(logger *slog.Logger, in ...any) types.EntitySet
- func NewWrappedEntity(ce *cedar.Entity, logger *slog.Logger) types.Entity
- type WrappedEntity
Constants ¶
const ( TypeAction = "Action" TypeApp = "App" TypeDoelbinding = "Doelbinding" TypeInvalid = "Invalid" TypeJWT = "JWT" TypeService = "Service" TypeZaak = "Zaak" )
list of Cedar element types.
const Version = "1.0.0"
Version defines the version of this Cedar PDP.
Variables ¶
This section is empty.
Functions ¶
func DeterminePrincipal ¶
func DeterminePrincipal(a *attributes) (cedar.EntityType, cedar.String)
DeterminePrincipal determines the type of principal and its primary key.
func NewAttributeBuilder ¶
func NewAttributeBuilder(logger *slog.Logger) types.AttributesBuilder
NewAttributeBuilder returns the function prototype for building a new Cedar based attribute set.
func NewAttributeSet ¶
func NewAttributeSet(logger *slog.Logger, in ...any) types.AttributeSet
NewAttributeSet instantiates a new Cedar based attribute set.
func NewController ¶
NewController instantiates a new Cedar controller.
func NewEntityBuilder ¶
func NewEntityBuilder(logger *slog.Logger) types.EntitiesBuilder
NewEntityBuilder returns the function prototype for building a new Cedar based entity set.
func NewEntitySet ¶
NewEntitySet instantiates a new Cedar based entity set.
Types ¶
type WrappedEntity ¶
type WrappedEntity struct {
// contains filtered or unexported fields
}
WrappedEntity is a wrapper around a cedar entity.
It is read-only by design.
func (*WrappedEntity) Attributes ¶
func (e *WrappedEntity) Attributes() types.AttributeSet
Attributes implements the Entity interface.
func (*WrappedEntity) Parents ¶
func (e *WrappedEntity) Parents() []string
Parents implements the Entity interface.
func (*WrappedEntity) Type ¶
func (e *WrappedEntity) Type() string
Type implements the Entity interface.
func (*WrappedEntity) UID ¶
func (e *WrappedEntity) UID() string
UID implements the Entity interface.