audit

package
v0.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: BSD-3-Clause-Clear Imports: 28 Imported by: 0

README

Extending audit recording

Use Record to submit an audit event:

event := audit.NewEvent(audit.EventObjectParams{
	Object: audit.EventObjectInfo{Type: audit.ObjectTypeRegisteredResource, ID: documentID},
	Action: audit.EventObjectAction{Type: audit.ActionTypeRead, Result: audit.ActionResultSuccess},
	ClientInfo: audit.EventClientInfo{Platform: "extension"},
})
event.Verb = audit.Verb("read")
err := params.Logger.Audit.Record(ctx, *event)

Record adds request attribution, validates the event, and calls the processor synchronously with a deadline detached from request cancellation. Check its returned error. Request context values remain available to the processor.

The built-in RewrapSuccess, RewrapDenied, RewrapFailure, PolicyCRUDSuccess, PolicyCRUDFailure, GetDecision, and GetDecisionV2 helpers construct an event and call Record. Rewrap accepts an explicitly classified result for validation, tamper, dependency, and other outcomes that do not fit a helper. They also return errors; callers must handle them. Record policy success only after the database transaction commits. An audit failure after a commit does not undo the operation.

Rewrap outcome contract

  • KAS records one event per processed KAO; pre-KAO failures produce one request-level event.
  • Results are success (key returned), failure (request rejected), or error (KAS or a dependency could not finish).
  • Non-success events include failure_reason. All events include policy_verified and suspected_tamper; KAO events also include kao_id.
  • Unverified policy attributes are omitted. Downstream mappings must treat denials as failure and can route suspected_tamper: true.

See the KAS rewrap audit outcomes reference for the flow and failure-reason taxonomy.

Processing and delivery

Register a custom processor at startup:

server.Start(
	server.WithAuditTimeout(15*time.Second),
	server.WithAuditProcessor(audit.ProcessorFunc(
		func(ctx context.Context, event audit.Event) error {
			return processAuditEvent(ctx, event)
		},
	)),
)

The timeout can also be set with logger.audit_timeout in YAML or OPENTDF_LOGGER_AUDIT_TIMEOUT. An explicit server.WithAuditTimeout overrides those settings. The default is five seconds; zero or negative values use it. Processors must honor the context deadline, including during external lookups and delivery. The budget applies to each event, not the whole request; a request that records several events can spend several processing budgets.

Processors handle conversion, destination validation, delivery, and recovery. Return nil after the destination or a durable recovery path accepts the event. Record returns processor errors and recovered panics. OpenTDF does not retry or emit a fallback.

Processors may run concurrently. They can change their local event value, but must independently copy any maps, slices, or referenced data they modify or retain. Callers must leave shared data unchanged until Record returns.

Principal identifies the authenticated requester; Actor may identify a different subject. Derive resource ownership from authoritative resource data, not the requester's JWT claims.

Without a custom processor, output remains level:"AUDIT", msg:<verb>, and audit:{...}. Success means the slog handler accepted the record, not that a downstream datastore persisted it. Durable delivery belongs in the processor.

For a standalone logger, pass audit settings in its config:

log, err := logger.NewLogger(logger.Config{
    Level: "info", Output: "stdout", Type: "json",
    AuditTimeout: 15 * time.Second,
    AuditProcessor: processor,
})

AuditProcessor is for Go callers and is excluded from serialized configuration.

Migration from buffered recording

Events are processed when recorded, without waiting for an interceptor flush. A later RPC error or panic does not change an already-recorded outcome. Decision and rewrap events describe completed sub-operations, not proof that the client received the final response.

ContextServerInterceptor() now only adds request metadata and takes no logger. LogAuditEvent, Logger.Detach, and Logger.LogPolicyCRUD have been removed. Use Record or the error-returning event helpers without an audit transaction. Background work can retain its own context lifecycle; recording itself detaches request cancellation and applies the configured timeout.

Documentation

Index

Constants

View Source
const (
	// Currently setting AUDIT level to 10, a level above ERROR so it is always logged
	LevelAudit    = slog.Level(10)
	LevelAuditStr = "AUDIT"
)

From the Slog docs (https://betterstack.com/community/guides/logging/logging-in-go/#customizing-slog-levels): The log/slog package provides four log levels by default, with each one associated with an integer value: DEBUG (-4), INFO (0), WARN (4), and ERROR (8).

Variables

View Source
var (
	ErrAuditTypeRegistrationSealed = errors.New("audit type registrations are sealed")
	ErrInvalidAuditTypeName        = errors.New("audit type name must not be empty")
	ErrAuditTypeAlreadyRegistered  = errors.New("audit type is already registered")
)
View Source
var (
	ErrInvalidEvent = errors.New("invalid audit event")
	ErrProcessing   = errors.New("audit event processing failed")
)
View Source
var (
	// ErrReservedAuditPath indicates a claim destination targets a protected audit field.
	ErrReservedAuditPath = errors.New("reserved audit path")
	// ErrUnknownAuditPath indicates a claim destination traverses an unknown closed-schema path.
	ErrUnknownAuditPath = errors.New("unknown audit path")
	// ErrAuditContainerPath indicates a claim destination resolves to a container instead of a writable leaf.
	ErrAuditContainerPath = errors.New("audit path resolves to a container")
	// ErrOverlappingAuditPaths indicates two claim destinations conflict because one is a prefix of the other.
	ErrOverlappingAuditPaths = errors.New("overlapping audit paths")
)
View Source
var (
	TestPolicyObjectVersionEnum_name = map[int32]string{
		0: "TEST_POLICY_OBJECT_VERSION_ENUM_UNSPECIFIED",
		1: "TEST_POLICY_OBJECT_VERSION_ENUM_OLD",
		2: "TEST_POLICY_OBJECT_VERSION_ENUM_NEW",
	}
	TestPolicyObjectVersionEnum_value = map[string]int32{
		"TEST_POLICY_OBJECT_VERSION_ENUM_UNSPECIFIED": 0,
		"TEST_POLICY_OBJECT_VERSION_ENUM_OLD":         1,
		"TEST_POLICY_OBJECT_VERSION_ENUM_NEW":         2,
	}
)

Enum value maps for TestPolicyObjectVersionEnum.

View Source
var File_logger_audit_test_proto protoreflect.FileDescriptor

Functions

func ApplyTypeRegistrations added in v0.25.2

func ApplyTypeRegistrations(reg TypeRegistrations) error

func ContextServerInterceptor

func ContextServerInterceptor() connect.UnaryInterceptorFunc

ContextServerInterceptor adds request attribution without owning audit delivery.

func ContextServerInterceptorV2 added in v0.30.0

func ContextServerInterceptorV2() connectv2.ServerInterceptor

ContextServerInterceptorV2 is ContextServerInterceptor for connect-go v2 servers.

func ContextWithActorID added in v0.12.0

func ContextWithActorID(ctx context.Context, actorID string) context.Context

func RegisterActionResult added in v0.25.2

func RegisterActionResult(ar ActionResult, name string) error

RegisterActionResult registers the emitted name for an additional action result. It must be called before the platform seals registrations during startup, and it cannot rename an already registered result.

func RegisterActionType added in v0.25.2

func RegisterActionType(at ActionType, name string) error

RegisterActionType registers the emitted name for an additional action type. It must be called before the platform seals registrations during startup, and it cannot rename an already registered type.

func RegisterObjectType added in v0.25.2

func RegisterObjectType(ot ObjectType, name string) error

RegisterObjectType registers the emitted name for an additional object type. It must be called before the platform seals registrations during startup, and it cannot rename an already registered type.

func ReplaceAttrAuditLevel

func ReplaceAttrAuditLevel(_ []string, a slog.Attr) slog.Attr

Used to support custom log levels showing up with custom labels as well see https://betterstack.com/community/guides/logging/logging-in-go/#creating-custom-log-levels

func SealTypeRegistrations added in v0.25.2

func SealTypeRegistrations()

SealTypeRegistrations blocks any further audit type registrations. The platform calls this during startup once all registrations have been applied.

Types

type ActionResult

type ActionResult int
const (
	ActionResultSuccess ActionResult = iota
	ActionResultFailure
	ActionResultError
	ActionResultEncrypt
	ActionResultBlock
	ActionResultIgnore
	ActionResultOverride
	ActionResultCancel
)

func (ActionResult) MarshalJSON

func (ar ActionResult) MarshalJSON() ([]byte, error)

func (ActionResult) String

func (ar ActionResult) String() string

type ActionType

type ActionType int
const (
	ActionTypeCreate ActionType = iota
	ActionTypeRead
	ActionTypeUpdate
	ActionTypeDelete
	ActionTypeRewrap
	ActionTypeRotate
)

func (ActionType) MarshalJSON

func (at ActionType) MarshalJSON() ([]byte, error)

func (ActionType) String

func (at ActionType) String() string

type Config added in v0.19.0

type Config struct {
	// JWTClaimMappings writes JWT claims to configured destinations in the audit
	// log output, preserving the original JSON value types where possible.
	JWTClaimMappings []JWTClaimMapping `mapstructure:"jwt_claim_mappings" json:"jwt_claim_mappings"`
}

Config contains platform-wide audit configuration.

func (Config) Validate added in v0.19.0

func (c Config) Validate() error

type ContextData

type ContextData struct {
	RequestID uuid.UUID
	UserAgent string
	RequestIP string
	ActorID   string
}

func GetAuditDataFromContext

func GetAuditDataFromContext(ctx context.Context) ContextData

GetAuditDataFromContext gets relevant audit data from the context object

func (ContextData) LogValue added in v0.4.25

func (c ContextData) LogValue() slog.Value

type DecisionResult

type DecisionResult int
const (
	GetDecisionResultPermit DecisionResult = iota
	GetDecisionResultDeny
)

func (DecisionResult) String

func (dr DecisionResult) String() string

type EntityChainEntitlement

type EntityChainEntitlement struct {
	EntityID                 string   `json:"entityId"`
	EntityCatagory           string   `json:"entityCatagory"`
	AttributeValueReferences []string `json:"attributeValueReferences"`
}

type EntityDecision

type EntityDecision struct {
	EntityID     string   `json:"id"`
	Decision     string   `json:"decision"`
	Entitlements []string `json:"entitlements"`
}

type Event added in v0.27.0

type Event struct {
	Verb      Verb              `json:"-" audit:"-"`
	ID        uuid.UUID         `json:"-" audit:"-"`
	Principal ctxAuth.Principal `json:"-" audit:"-"`

	Object        auditEventObject   `json:"object"`
	Action        eventAction        `json:"action"`
	Actor         auditEventActor    `json:"actor"`
	EventMetaData auditEventMetadata `json:"eventMetaData" audit:"extensible"`
	ClientInfo    eventClientInfo    `json:"clientInfo"`

	Original  map[string]any `json:"original,omitempty" audit:"extensible"`
	Updated   map[string]any `json:"updated,omitempty" audit:"extensible"`
	RequestID uuid.UUID      `json:"requestID" audit:"reserved"`
	Timestamp string         `json:"timestamp" audit:"reserved"`
}

Event is the canonical audit event passed to a Processor. Recorder metadata is excluded from the existing OpenTDF log payload.

func (Event) LogValue added in v0.27.0

func (e Event) LogValue() slog.Value

type EventClientInfo added in v0.25.2

type EventClientInfo struct {
	UserAgent string `json:"userAgent" audit:"reserved"`
	Platform  string `json:"platform" audit:"reserved"`
	RequestIP string `json:"requestIP" audit:"reserved"`
}

type EventMetaData added in v0.25.2

type EventMetaData map[string]any

type EventObject

type EventObject = Event

EventObject is retained for compatibility with existing audit constructors.

func CreateGetDecisionEvent

func CreateGetDecisionEvent(ctx context.Context, params GetDecisionEventParams) (*EventObject, error)

func CreatePolicyEvent

func CreatePolicyEvent(ctx context.Context, isSuccess bool, params PolicyEventParams) (*EventObject, error)
 TODO: Changes to oneOf proto properties are not yet audited correctly with the existing code.

	The Updated event object will contain both the original and updated oneOf properties due to
	the logic for merging maps within this function.  We will need to find a way to support them
	correctly in the near future.

func CreateRewrapAuditEvent

func CreateRewrapAuditEvent(ctx context.Context, params RewrapAuditEventParams) (*EventObject, error)

CreateRewrapAuditEvent retains the legacy IsSuccess/isDenied result mapping.

func CreateV2GetDecisionEvent added in v0.7.0

func CreateV2GetDecisionEvent(ctx context.Context, params GetDecisionV2EventParams) (*EventObject, error)

func NewEvent added in v0.25.2

func NewEvent(params EventObjectParams) *EventObject

NewEvent converts public DTOs into the internal log event type.

type EventObjectAction added in v0.25.2

type EventObjectAction struct {
	Type   ActionType   `json:"type" audit:"reserved"`
	Result ActionResult `json:"result" audit:"reserved"`
}

type EventObjectActor added in v0.25.2

type EventObjectActor struct {
	ID         string `json:"id" audit:"reserved"`
	Attributes []any  `json:"attributes"`
}

type EventObjectAttributes added in v0.25.2

type EventObjectAttributes struct {
	Assertions  []string `json:"assertions,omitempty"`
	Attrs       []string `json:"attrs,omitempty"`
	Permissions []string `json:"permissions,omitempty"`
}

type EventObjectInfo added in v0.25.2

type EventObjectInfo struct {
	Type       ObjectType            `json:"type"`
	ID         string                `json:"id"`
	Name       string                `json:"name,omitempty"`
	Attributes EventObjectAttributes `json:"attributes,omitempty"`
}

EventObjectInfo describes the object an audited action was performed on.

type EventObjectParams added in v0.25.2

type EventObjectParams struct {
	Object        EventObjectInfo
	Action        EventObjectAction
	Actor         EventObjectActor
	EventMetaData EventMetaData
	ClientInfo    EventClientInfo
	Original      map[string]any
	Updated       map[string]any
	RequestID     uuid.UUID
	Timestamp     string
}

type GetDecisionEventParams

type GetDecisionEventParams struct {
	Decision                DecisionResult
	EntityChainEntitlements []EntityChainEntitlement
	EntityChainID           string
	EntityDecisions         []EntityDecision
	ResourceAttributeID     string
	FQNs                    []string
}

type GetDecisionV2EventParams added in v0.7.0

type GetDecisionV2EventParams struct {
	EntityID                       string
	ActionName                     string
	Decision                       DecisionResult
	Entitlements                   subjectmappingbuiltin.AttributeValueFQNsToActions
	FulfillableObligationValueFQNs []string
	ObligationsSatisfied           bool
	// Allow ResourceDecisions to be typed by the caller as structure is in-flight
	ResourceDecisions any
}

type JWTClaimMapping added in v0.19.0

type JWTClaimMapping struct {
	Claim string `mapstructure:"claim" json:"claim"`
	Path  string `mapstructure:"path" json:"path"`
}

JWTClaimMapping maps a JWT claim to a destination in the emitted audit log. The destination path uses dot notation over the audit log output shape, e.g. `eventMetaData.requester.sub`.

type KasAttribute

type KasAttribute struct {
	URI string
}

type KasPolicy

type KasPolicy struct {
	UUID uuid.UUID
	Body KasPolicyBody
}

type KasPolicyBody

type KasPolicyBody struct {
	DataAttributes []KasAttribute
	Dissem         []string
}

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func CreateAuditLogger

func CreateAuditLogger(logger slog.Logger, options ...Option) *Logger

func (*Logger) ApplyConfig added in v0.19.0

func (a *Logger) ApplyConfig(cfg Config) error

ApplyConfig validates and copies audit enrichment configuration. Call only during setup, before the logger is shared with other goroutines.

func (*Logger) GetDecision

func (a *Logger) GetDecision(ctx context.Context, params GetDecisionEventParams) error

func (*Logger) GetDecisionV2 added in v0.7.0

func (a *Logger) GetDecisionV2(ctx context.Context, params GetDecisionV2EventParams) error

func (*Logger) PolicyCRUDFailure

func (a *Logger) PolicyCRUDFailure(ctx context.Context, params PolicyEventParams) error

PolicyCRUDFailure records a failed policy operation.

func (*Logger) PolicyCRUDSuccess

func (a *Logger) PolicyCRUDSuccess(ctx context.Context, params PolicyEventParams) error

PolicyCRUDSuccess records a successful operation after its database commit.

func (*Logger) Processor added in v0.27.0

func (a *Logger) Processor() Processor

Processor returns the configured processor, or nil for default OpenTDF processing.

func (*Logger) Record added in v0.27.0

func (a *Logger) Record(ctx context.Context, event Event) error

Record stamps and validates an event before processing it under a bounded context detached from request cancellation. Callers must not mutate reference data in event until Record returns.

func (*Logger) RecordTimeout added in v0.27.0

func (a *Logger) RecordTimeout() time.Duration

RecordTimeout returns the configured processing budget, or the five-second default.

func (*Logger) Rewrap added in v0.29.0

func (a *Logger) Rewrap(ctx context.Context, result ActionResult, params RewrapAuditEventParams) error

Rewrap records a rewrap outcome whose result and metadata were classified by the caller. It is used when a rewrap fails before the success/denial helpers can accurately describe the outcome.

func (*Logger) RewrapDenied added in v0.29.0

func (a *Logger) RewrapDenied(ctx context.Context, params RewrapAuditEventParams) error

RewrapDenied records a rewrap rejected by an authorization decision.

func (*Logger) RewrapFailure

func (a *Logger) RewrapFailure(ctx context.Context, params RewrapAuditEventParams) error

RewrapFailure records a failed rewrap and returns any recording error.

func (*Logger) RewrapSuccess

func (a *Logger) RewrapSuccess(ctx context.Context, params RewrapAuditEventParams) error

RewrapSuccess records a completed rewrap and returns any recording error.

func (*Logger) With

func (a *Logger) With(key string, value string) *Logger

type ObjectType

type ObjectType int
const (
	ObjectTypeSubjectMapping ObjectType = iota
	ObjectTypeResourceMapping
	ObjectTypeAttributeDefinition
	ObjectTypeAttributeValue
	ObjectTypeObligationDefinition
	ObjectTypeObligationValue
	ObjectTypeObligationTrigger
	ObjectTypeNamespace
	ObjectTypeConditionSet
	ObjectTypeKasRegistry
	ObjectTypeKasAttributeNamespaceAssignment
	ObjectTypeKasAttributeDefinitionAssignment
	ObjectTypeKasAttributeValueAssignment
	ObjectTypeKeyObject
	ObjectTypeEntityObject
	ObjectTypeResourceMappingGroup
	ObjectTypePublicKey
	ObjectTypeAction
	ObjectTypeRegisteredResource
	ObjectTypeRegisteredResourceValue
	ObjectTypeKeyManagementProviderConfig
	ObjectTypeKasRegistryKeys
	ObjectTypeKasAttributeDefinitionKeyAssignment
	ObjectTypeKasAttributeValueKeyAssignment
	ObjectTypeKasAttributeNamespaceKeyAssignment
	ObjectTypeDynamicValueMapping
)

func (ObjectType) MarshalJSON

func (ot ObjectType) MarshalJSON() ([]byte, error)

func (ObjectType) String

func (ot ObjectType) String() string

type Option added in v0.27.0

type Option func(*Logger)

Option configures an audit logger at construction time.

func WithProcessor added in v0.27.0

func WithProcessor(processor Processor) Option

WithProcessor configures canonical event processing.

func WithRecordTimeout added in v0.27.0

func WithRecordTimeout(timeout time.Duration) Option

WithRecordTimeout sets the processing budget. Non-positive values use five seconds.

type PolicyEventParams

type PolicyEventParams struct {
	ActionType ActionType
	ObjectID   string
	ObjectType ObjectType

	Original proto.Message
	Updated  proto.Message
}

type Processor added in v0.27.0

type Processor interface {
	Process(context.Context, Event) error
}

Processor accepts a fully stamped event. Processors own destination-specific validation, fan-out, delivery, and recovery. A nil error means the event was accepted by the intended destination or a durable recovery path.

Implementations may be called concurrently and must honor context cancellation. They must not mutate or retain maps, slices, or other reference data in Event.

type ProcessorFunc added in v0.27.0

type ProcessorFunc func(context.Context, Event) error

ProcessorFunc adapts a function to Processor.

func (ProcessorFunc) Process added in v0.27.0

func (f ProcessorFunc) Process(ctx context.Context, event Event) error

type Recorder added in v0.27.0

type Recorder interface {
	Record(context.Context, Event) error
}

Recorder immediately records an audit event. Implementations must return only after the configured processor has accepted or rejected the event.

type RewrapAuditEventParams

type RewrapAuditEventParams struct {
	Policy   KasPolicy
	PolicyID string

	// IsSuccess is retained for callers of CreateRewrapAuditEvent.
	//
	// Deprecated: use Logger.Rewrap or one of the Logger rewrap helpers.
	IsSuccess       bool
	FailureReason   string
	SuspectedTamper bool
	PolicyVerified  bool
	KAOID           string
	TDFFormat       string
	Algorithm       string
	PolicyBinding   string
	KeyID           string
	SessionKeyType  string
	// contains filtered or unexported fields
}

type TestPolicyObject added in v0.4.24

type TestPolicyObject struct {
	Id      string                      `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Active  *wrapperspb.BoolValue       `protobuf:"bytes,2,opt,name=active,proto3" json:"active,omitempty"`
	Version TestPolicyObjectVersionEnum `protobuf:"varint,3,opt,name=version,proto3,enum=service.logger.audit.TestPolicyObjectVersionEnum" json:"version,omitempty"`
	// add array field
	Tags []string `protobuf:"bytes,5,rep,name=tags,proto3" json:"tags,omitempty"`
	// add oneOf simulated field that has either a scalar or struct value
	//
	// Types that are assignable to PolicyUser:
	//
	//	*TestPolicyObject_Username
	//	*TestPolicyObject_User
	PolicyUser isTestPolicyObject_PolicyUser `protobuf_oneof:"policy_user"`
	Metadata   *common.Metadata              `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*TestPolicyObject) Descriptor deprecated added in v0.4.24

func (*TestPolicyObject) Descriptor() ([]byte, []int)

Deprecated: Use TestPolicyObject.ProtoReflect.Descriptor instead.

func (*TestPolicyObject) GetActive added in v0.4.24

func (x *TestPolicyObject) GetActive() *wrapperspb.BoolValue

func (*TestPolicyObject) GetId added in v0.4.24

func (x *TestPolicyObject) GetId() string

func (*TestPolicyObject) GetMetadata added in v0.4.24

func (x *TestPolicyObject) GetMetadata() *common.Metadata

func (*TestPolicyObject) GetPolicyUser added in v0.4.24

func (m *TestPolicyObject) GetPolicyUser() isTestPolicyObject_PolicyUser

func (*TestPolicyObject) GetTags added in v0.4.24

func (x *TestPolicyObject) GetTags() []string

func (*TestPolicyObject) GetUser added in v0.4.24

func (x *TestPolicyObject) GetUser() *User

func (*TestPolicyObject) GetUsername added in v0.4.24

func (x *TestPolicyObject) GetUsername() string

func (*TestPolicyObject) GetVersion added in v0.4.24

func (*TestPolicyObject) ProtoMessage added in v0.4.24

func (*TestPolicyObject) ProtoMessage()

func (*TestPolicyObject) ProtoReflect added in v0.4.24

func (x *TestPolicyObject) ProtoReflect() protoreflect.Message

func (*TestPolicyObject) Reset added in v0.4.24

func (x *TestPolicyObject) Reset()

func (*TestPolicyObject) String added in v0.4.24

func (x *TestPolicyObject) String() string

type TestPolicyObjectVersionEnum added in v0.4.24

type TestPolicyObjectVersionEnum int32

buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package

const (
	TestPolicyObjectVersionEnum_TEST_POLICY_OBJECT_VERSION_ENUM_UNSPECIFIED TestPolicyObjectVersionEnum = 0
	TestPolicyObjectVersionEnum_TEST_POLICY_OBJECT_VERSION_ENUM_OLD         TestPolicyObjectVersionEnum = 1
	TestPolicyObjectVersionEnum_TEST_POLICY_OBJECT_VERSION_ENUM_NEW         TestPolicyObjectVersionEnum = 2
)

func (TestPolicyObjectVersionEnum) Descriptor added in v0.4.24

func (TestPolicyObjectVersionEnum) Enum added in v0.4.24

func (TestPolicyObjectVersionEnum) EnumDescriptor deprecated added in v0.4.24

func (TestPolicyObjectVersionEnum) EnumDescriptor() ([]byte, []int)

Deprecated: Use TestPolicyObjectVersionEnum.Descriptor instead.

func (TestPolicyObjectVersionEnum) Number added in v0.4.24

func (TestPolicyObjectVersionEnum) String added in v0.4.24

func (TestPolicyObjectVersionEnum) Type added in v0.4.24

type TestPolicyObject_User added in v0.4.24

type TestPolicyObject_User struct {
	User *User `protobuf:"bytes,7,opt,name=user,proto3,oneof"`
}

type TestPolicyObject_Username added in v0.4.24

type TestPolicyObject_Username struct {
	Username string `protobuf:"bytes,6,opt,name=username,proto3,oneof"`
}

type TypeRegistrations added in v0.25.2

type TypeRegistrations struct {
	ObjectTypes   map[ObjectType]string
	ActionTypes   map[ActionType]string
	ActionResults map[ActionResult]string
}

type User added in v0.4.24

type User struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated added in v0.4.24

func (*User) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetId added in v0.4.24

func (x *User) GetId() string

func (*User) GetName added in v0.4.24

func (x *User) GetName() string

func (*User) ProtoMessage added in v0.4.24

func (*User) ProtoMessage()

func (*User) ProtoReflect added in v0.4.24

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset added in v0.4.24

func (x *User) Reset()

func (*User) String added in v0.4.24

func (x *User) String() string

type Verb added in v0.12.0

type Verb string
const (
	VerbDecision   Verb = "decision"
	VerbPolicyCRUD Verb = "policy crud"
	VerbRewrap     Verb = "rewrap"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL