audit

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	OperationOIDCLoginSucceeded     = "oidc_login_succeeded"
	OperationOIDCLoginDenied        = "oidc_login_denied"
	OperationOAuthLoginSucceeded    = "oauth_login_succeeded"
	OperationOAuthLoginDenied       = "oauth_login_denied"
	OperationOAuthClientRegistered  = "oauth_client_registered"
	OperationOAuthConsentGranted    = "oauth_consent_granted"
	OperationOAuthConsentDenied     = "oauth_consent_denied"
	OperationOAuthGrantCreated      = "oauth_grant_created"
	OperationOAuthGrantRefreshed    = "oauth_grant_refreshed"
	OperationOAuthGrantRevoked      = "oauth_grant_revoked"
	OperationOAuthGrantReplay       = "oauth_grant_reuse_detected"
	OperationLocalLoginSucceeded    = "local_login_succeeded"
	OperationLocalLoginDenied       = "local_login_denied"
	OperationLogout                 = "logout"
	OperationSessionCreated         = "session_created"
	OperationSessionRevoked         = "session_revoked"
	OperationAPITokenCreated        = "api_token_created"
	OperationAPITokenUseRejected    = "api_token_use_rejected"
	OperationAPITokenRevoked        = "api_token_revoked"
	OperationPasswordSet            = "password_set"
	OperationPasswordRotated        = "password_rotated"
	OperationBreakGlassPasswordSet  = "break_glass_password_set"
	OperationUserSuspended          = "user_suspended"
	OperationUserRestored           = "user_restored"
	OperationUserCredentialsRevoked = "user_credentials_revoked"
	OperationSCIMUserCreated        = "scim_user_created"
	OperationSCIMUserReplaced       = "scim_user_replaced"
	OperationSCIMUserPatched        = "scim_user_patched"
	OperationSCIMUserDeactivated    = "scim_user_deactivated"
	OperationSCIMUserDeleted        = "scim_user_deleted"
	OperationSCIMGroupCreated       = "scim_group_created"
	OperationSCIMGroupReplaced      = "scim_group_replaced"
	OperationSCIMGroupPatched       = "scim_group_patched"
	OperationSCIMGroupDeleted       = "scim_group_deleted"
	OperationGroupMembershipChanged = "group_membership_changed"
	OperationGroupRoleChanged       = "group_role_changed"
	OperationGroupRepositoryChanged = "group_repository_grant_changed"
	OperationUserRoleChanged        = "user_role_changed"
	OperationUserRepositoryChanged  = "user_repository_grant_changed"
	OperationAdminMutationDenied    = "admin_mutation_denied"
)

Variables

View Source
var ErrInvalidEvent = errors.New("invalid audit event")

Functions

func RequestID

func RequestID(ctx context.Context) string

func WithRequestID

func WithRequestID(ctx context.Context, requestID string) context.Context

Types

type Event

type Event struct {
	ActorType            string    `json:"actor_type"`
	ActorID              string    `json:"actor_id"`
	TargetType           string    `json:"target_type"`
	TargetID             string    `json:"target_id"`
	AuthenticationMethod string    `json:"authentication_method"`
	Operation            string    `json:"operation"`
	Outcome              string    `json:"outcome"`
	RequestID            string    `json:"request_id"`
	CreatedAt            time.Time `json:"created_at"`
}

func NewEvent

func NewEvent(event Event) (Event, error)

func (Event) Validate

func (event Event) Validate() error

type Recorder

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

Jump to

Keyboard shortcuts

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