audit

package
v0.3.17 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Project      = "project"
	Domain       = "domain"
	Name         = "name"
	Version      = "version"
	NodeID       = "node_id"
	RetryAttempt = "retry_attempt"
	ResourceType = "resource"

	TaskProject = "task_project"
	TaskDomain  = "task_domain"
	TaskName    = "task_name"
	TaskVersion = "task_version"
)

Variables

This section is empty.

Functions

func ParametersFromExecutionIdentifier

func ParametersFromExecutionIdentifier(identifier *core.WorkflowExecutionIdentifier) requestParameters

func ParametersFromIdentifier

func ParametersFromIdentifier(identifier *core.Identifier) requestParameters

func ParametersFromNamedEntityIdentifier

func ParametersFromNamedEntityIdentifier(identifier *admin.NamedEntityIdentifier) requestParameters

func ParametersFromNamedEntityIdentifierAndResource

func ParametersFromNamedEntityIdentifierAndResource(identifier *admin.NamedEntityIdentifier, resourceType core.ResourceType) requestParameters

func ParametersFromNodeExecutionIdentifier

func ParametersFromNodeExecutionIdentifier(identifier *core.NodeExecutionIdentifier) requestParameters

func ParametersFromTaskExecutionIdentifier

func ParametersFromTaskExecutionIdentifier(identifier *core.TaskExecutionIdentifier) requestParameters

Types

type AccessMode

type AccessMode int
const (
	ReadOnly AccessMode = iota
	ReadWrite
)

type AuthenticatedClientMeta

type AuthenticatedClientMeta struct {
	ClientIds     []string
	TokenIssuedAt time.Time
	ClientIP      string
}

type Client

type Client struct {
	ClientIP string
}

type LogBuilder

type LogBuilder interface {
	WithAuthenticatedCtx(ctx context.Context) LogBuilder
	WithRequest(method string, parameters map[string]string, mode AccessMode, requestedAt time.Time) LogBuilder
	WithResponse(sentAt time.Time, err error) LogBuilder
	Log(ctx context.Context)
}

func NewLogBuilder

func NewLogBuilder() LogBuilder

type Message

type Message struct {
	Principal Principal

	Client Client

	Request Request

	Response Response
}

type Principal

type Principal struct {
	// Identifies authenticated end-user
	Subject string

	// The client that initiated the auth flow.
	ClientID string

	TokenIssuedAt time.Time
}

type Request

type Request struct {
	// Service method endpoint e.g. GetWorkflowExecution
	Method string

	// Includes parameters submitted in the request.
	Parameters map[string]string

	Mode AccessMode

	ReceivedAt time.Time
}

Details about a specific request issued by a user.

type Response

type Response struct {
	// e.g. gRPC status code
	ResponseCode string

	SentAt time.Time
}

Summary of service response details.

Jump to

Keyboard shortcuts

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