auditlog

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMessage        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMessage          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMessage = fmt.Errorf("proto: unexpected end of group")
)
View Source
var LogCategory_name = map[int32]string{
	0: "Unspecified",
	1: "Admin",
	2: "System",
}
View Source
var LogCategory_value = map[string]int32{
	"Unspecified": 0,
	"Admin":       1,
	"System":      2,
}
View Source
var LogLevel_name = map[int32]string{
	0: "Unspecified",
	1: "Info",
	2: "Debug",
	3: "Warn",
	4: "Error",
	5: "Fatal",
}
View Source
var LogLevel_value = map[string]int32{
	"Unspecified": 0,
	"Info":        1,
	"Debug":       2,
	"Warn":        3,
	"Error":       4,
	"Fatal":       5,
}

Functions

This section is empty.

Types

type Access added in v0.16.0

type Access struct {
	AccountAccess     *AccountAccess              `protobuf:"bytes,1,opt,name=account_access,json=accountAccess,proto3" json:"account_access,omitempty"`
	NamespaceAccesses map[string]*NamespaceAccess `` /* 200-byte string literal not displayed */
}

func (*Access) Descriptor added in v0.16.0

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

func (*Access) Equal added in v0.16.0

func (this *Access) Equal(that interface{}) bool

func (*Access) GetAccountAccess added in v0.16.0

func (m *Access) GetAccountAccess() *AccountAccess

func (*Access) GetNamespaceAccesses added in v0.16.0

func (m *Access) GetNamespaceAccesses() map[string]*NamespaceAccess

func (*Access) GoString added in v0.16.0

func (this *Access) GoString() string

func (*Access) Marshal added in v0.16.0

func (m *Access) Marshal() (dAtA []byte, err error)

func (*Access) MarshalTo added in v0.16.0

func (m *Access) MarshalTo(dAtA []byte) (int, error)

func (*Access) MarshalToSizedBuffer added in v0.16.0

func (m *Access) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Access) ProtoMessage added in v0.16.0

func (*Access) ProtoMessage()

func (*Access) Reset added in v0.16.0

func (m *Access) Reset()

func (*Access) Size added in v0.16.0

func (m *Access) Size() (n int)

func (*Access) String added in v0.16.0

func (this *Access) String() string

func (*Access) Unmarshal added in v0.16.0

func (m *Access) Unmarshal(dAtA []byte) error

func (*Access) XXX_DiscardUnknown added in v0.16.0

func (m *Access) XXX_DiscardUnknown()

func (*Access) XXX_Marshal added in v0.16.0

func (m *Access) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Access) XXX_Merge added in v0.16.0

func (m *Access) XXX_Merge(src proto.Message)

func (*Access) XXX_Size added in v0.16.0

func (m *Access) XXX_Size() int

func (*Access) XXX_Unmarshal added in v0.16.0

func (m *Access) XXX_Unmarshal(b []byte) error

type AccountAccess added in v0.16.0

type AccountAccess struct {
	Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
}

func (*AccountAccess) Descriptor added in v0.16.0

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

func (*AccountAccess) Equal added in v0.16.0

func (this *AccountAccess) Equal(that interface{}) bool

func (*AccountAccess) GetRole added in v0.16.0

func (m *AccountAccess) GetRole() string

func (*AccountAccess) GoString added in v0.16.0

func (this *AccountAccess) GoString() string

func (*AccountAccess) Marshal added in v0.16.0

func (m *AccountAccess) Marshal() (dAtA []byte, err error)

func (*AccountAccess) MarshalTo added in v0.16.0

func (m *AccountAccess) MarshalTo(dAtA []byte) (int, error)

func (*AccountAccess) MarshalToSizedBuffer added in v0.16.0

func (m *AccountAccess) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AccountAccess) ProtoMessage added in v0.16.0

func (*AccountAccess) ProtoMessage()

func (*AccountAccess) Reset added in v0.16.0

func (m *AccountAccess) Reset()

func (*AccountAccess) Size added in v0.16.0

func (m *AccountAccess) Size() (n int)

func (*AccountAccess) String added in v0.16.0

func (this *AccountAccess) String() string

func (*AccountAccess) Unmarshal added in v0.16.0

func (m *AccountAccess) Unmarshal(dAtA []byte) error

func (*AccountAccess) XXX_DiscardUnknown added in v0.16.0

func (m *AccountAccess) XXX_DiscardUnknown()

func (*AccountAccess) XXX_Marshal added in v0.16.0

func (m *AccountAccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccountAccess) XXX_Merge added in v0.16.0

func (m *AccountAccess) XXX_Merge(src proto.Message)

func (*AccountAccess) XXX_Size added in v0.16.0

func (m *AccountAccess) XXX_Size() int

func (*AccountAccess) XXX_Unmarshal added in v0.16.0

func (m *AccountAccess) XXX_Unmarshal(b []byte) error

type LogCategory

type LogCategory int32
const (
	LOG_CATEGORY_UNSPECIFIED LogCategory = 0
	LOG_CATEGORY_ADMIN       LogCategory = 1
	LOG_CATEGORY_SYSTEM      LogCategory = 2
)

func (LogCategory) EnumDescriptor

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

func (LogCategory) String

func (x LogCategory) String() string

type LogLevel

type LogLevel int32
const (
	LOG_LEVEL_UNSPECIFIED LogLevel = 0
	LOG_LEVEL_INFO        LogLevel = 1
	LOG_LEVEL_DEBUG       LogLevel = 2
	LOG_LEVEL_WARN        LogLevel = 3
	LOG_LEVEL_ERROR       LogLevel = 4
	LOG_LEVEL_FATAL       LogLevel = 5
)

func (LogLevel) EnumDescriptor

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

func (LogLevel) String

func (x LogLevel) String() string

type LogRecord

type LogRecord struct {
	// when does this log get generated from the source
	EmitTime *types.Timestamp `protobuf:"bytes,1,opt,name=emit_time,json=emitTime,proto3" json:"emit_time,omitempty"`
	// level of the log, i.e. info, warn, error etc
	Level LogLevel `protobuf:"varint,2,opt,name=level,proto3,enum=api.auditlog.v2.LogLevel" json:"level,omitempty"`
	// If it's customer/user's operator, use email address; if it's Temporal's support to run operation on behalf of
	// the customer, use "support@temoral.io" instead
	UserEmail string `protobuf:"bytes,3,opt,name=user_email,json=userEmail,proto3" json:"user_email,omitempty"`
	// customer ip address or server name, if it's "Temporal Internal", the real ip address will be hidden.
	CallerIpAddress string `protobuf:"bytes,4,opt,name=caller_ip_address,json=callerIpAddress,proto3" json:"caller_ip_address,omitempty"`
	// what operation
	Operation string `protobuf:"bytes,5,opt,name=operation,proto3" json:"operation,omitempty"`
	// Detailed information about the operation.  For example, it could be the invited user email for "InviteUser" operation,
	// could be "enable audit logging" for UpdateAccount operation
	Details *OperationDetail `protobuf:"bytes,6,opt,name=details,proto3" json:"details,omitempty"`
	// operation status from API call
	Status string `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"`
	// admin or system
	Category LogCategory `protobuf:"varint,8,opt,name=category,proto3,enum=api.auditlog.v2.LogCategory" json:"category,omitempty"`
	// Version of the log entry, starting from 0.  The version will be updated when there is a backfill/resend of the same
	// logs
	Version int32 `protobuf:"varint,9,opt,name=version,proto3" json:"version,omitempty"`
	// Unique ID for the log record.
	LogId string `protobuf:"bytes,10,opt,name=log_id,json=logId,proto3" json:"log_id,omitempty"`
}

LogRecord is the top level audit log message. The logs from Temporal will be transformed into LogRecord and sent to user in some unmarshalled format, i.e. json. The message is structured following some common log formats. It has the order of emit_time | level | user_email | caller_ip | operation | operation_details | status | category | version. Example: 2022-10-24T15:09:25.744Z INFO xyz@temporal.io 127.0.0.1 DeleteNamespace test-auditlog.temporal-account OK Admin 0

func (*LogRecord) Descriptor

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

func (*LogRecord) Equal

func (this *LogRecord) Equal(that interface{}) bool

func (*LogRecord) GetCallerIpAddress

func (m *LogRecord) GetCallerIpAddress() string

func (*LogRecord) GetCategory

func (m *LogRecord) GetCategory() LogCategory

func (*LogRecord) GetDetails

func (m *LogRecord) GetDetails() *OperationDetail

func (*LogRecord) GetEmitTime

func (m *LogRecord) GetEmitTime() *types.Timestamp

func (*LogRecord) GetLevel

func (m *LogRecord) GetLevel() LogLevel

func (*LogRecord) GetLogId

func (m *LogRecord) GetLogId() string

func (*LogRecord) GetOperation

func (m *LogRecord) GetOperation() string

func (*LogRecord) GetStatus

func (m *LogRecord) GetStatus() string

func (*LogRecord) GetUserEmail

func (m *LogRecord) GetUserEmail() string

func (*LogRecord) GetVersion

func (m *LogRecord) GetVersion() int32

func (*LogRecord) GoString

func (this *LogRecord) GoString() string

func (*LogRecord) Marshal

func (m *LogRecord) Marshal() (dAtA []byte, err error)

func (*LogRecord) MarshalTo

func (m *LogRecord) MarshalTo(dAtA []byte) (int, error)

func (*LogRecord) MarshalToSizedBuffer

func (m *LogRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogRecord) ProtoMessage

func (*LogRecord) ProtoMessage()

func (*LogRecord) Reset

func (m *LogRecord) Reset()

func (*LogRecord) Size

func (m *LogRecord) Size() (n int)

func (*LogRecord) String

func (this *LogRecord) String() string

func (*LogRecord) Unmarshal

func (m *LogRecord) Unmarshal(dAtA []byte) error

func (*LogRecord) XXX_DiscardUnknown

func (m *LogRecord) XXX_DiscardUnknown()

func (*LogRecord) XXX_Marshal

func (m *LogRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogRecord) XXX_Merge

func (m *LogRecord) XXX_Merge(src proto.Message)

func (*LogRecord) XXX_Size

func (m *LogRecord) XXX_Size() int

func (*LogRecord) XXX_Unmarshal

func (m *LogRecord) XXX_Unmarshal(b []byte) error

type NamespaceAccess added in v0.16.0

type NamespaceAccess struct {
	Permission string `protobuf:"bytes,1,opt,name=permission,proto3" json:"permission,omitempty"`
}

func (*NamespaceAccess) Descriptor added in v0.16.0

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

func (*NamespaceAccess) Equal added in v0.16.0

func (this *NamespaceAccess) Equal(that interface{}) bool

func (*NamespaceAccess) GetPermission added in v0.16.0

func (m *NamespaceAccess) GetPermission() string

func (*NamespaceAccess) GoString added in v0.16.0

func (this *NamespaceAccess) GoString() string

func (*NamespaceAccess) Marshal added in v0.16.0

func (m *NamespaceAccess) Marshal() (dAtA []byte, err error)

func (*NamespaceAccess) MarshalTo added in v0.16.0

func (m *NamespaceAccess) MarshalTo(dAtA []byte) (int, error)

func (*NamespaceAccess) MarshalToSizedBuffer added in v0.16.0

func (m *NamespaceAccess) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NamespaceAccess) ProtoMessage added in v0.16.0

func (*NamespaceAccess) ProtoMessage()

func (*NamespaceAccess) Reset added in v0.16.0

func (m *NamespaceAccess) Reset()

func (*NamespaceAccess) Size added in v0.16.0

func (m *NamespaceAccess) Size() (n int)

func (*NamespaceAccess) String added in v0.16.0

func (this *NamespaceAccess) String() string

func (*NamespaceAccess) Unmarshal added in v0.16.0

func (m *NamespaceAccess) Unmarshal(dAtA []byte) error

func (*NamespaceAccess) XXX_DiscardUnknown added in v0.16.0

func (m *NamespaceAccess) XXX_DiscardUnknown()

func (*NamespaceAccess) XXX_Marshal added in v0.16.0

func (m *NamespaceAccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NamespaceAccess) XXX_Merge added in v0.16.0

func (m *NamespaceAccess) XXX_Merge(src proto.Message)

func (*NamespaceAccess) XXX_Size added in v0.16.0

func (m *NamespaceAccess) XXX_Size() int

func (*NamespaceAccess) XXX_Unmarshal added in v0.16.0

func (m *NamespaceAccess) XXX_Unmarshal(b []byte) error

type OperationDetail

type OperationDetail struct {
	// the namespace the operation was performed on
	Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// the users the operation was performed on
	TargetUsers []string `protobuf:"bytes,2,rep,name=target_users,json=targetUsers,proto3" json:"target_users,omitempty"`
	// if any role is processed, we provide the role information
	Roles []string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty"`
	// if client ca is included, we provide the fingerprints
	ClientCaFingerprints []string `protobuf:"bytes,4,rep,name=client_ca_fingerprints,json=clientCaFingerprints,proto3" json:"client_ca_fingerprints,omitempty"`
	// if search attribute is processed, we provide the search attributes
	SearchAttributeUpdate *SearchAttributeUpdate `` /* 126-byte string literal not displayed */
	// additional message if there is any
	AdditionalMessage string `protobuf:"bytes,6,opt,name=additional_message,json=additionalMessage,proto3" json:"additional_message,omitempty"`
	// namespace's region if available
	Region string `protobuf:"bytes,7,opt,name=region,proto3" json:"region,omitempty"`
	// if there are account features changed, i.e. external metrics, audit logging sink etc.
	AccountFeatures []string `protobuf:"bytes,8,rep,name=account_features,json=accountFeatures,proto3" json:"account_features,omitempty"`
	// some third party log details, i.e. auth0
	ThirdPartyDetails *ThirdPartyLogDetail `protobuf:"bytes,9,opt,name=third_party_details,json=thirdPartyDetails,proto3" json:"third_party_details,omitempty"`
	// the access in the request if there is any
	Access *Access `protobuf:"bytes,10,opt,name=access,proto3" json:"access,omitempty"`
	// the namespace access in the request if there is any
	NamespaceAccess *NamespaceAccess `protobuf:"bytes,11,opt,name=namespace_access,json=namespaceAccess,proto3" json:"namespace_access,omitempty"`
}

OperationDetails includes potential more detailed operation logs extracted from the different fields in the Temporal API logs or third party logs, e.g. auth0

func (*OperationDetail) Descriptor

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

func (*OperationDetail) Equal

func (this *OperationDetail) Equal(that interface{}) bool

func (*OperationDetail) GetAccess added in v0.16.0

func (m *OperationDetail) GetAccess() *Access

func (*OperationDetail) GetAccountFeatures

func (m *OperationDetail) GetAccountFeatures() []string

func (*OperationDetail) GetAdditionalMessage

func (m *OperationDetail) GetAdditionalMessage() string

func (*OperationDetail) GetClientCaFingerprints

func (m *OperationDetail) GetClientCaFingerprints() []string

func (*OperationDetail) GetNamespace

func (m *OperationDetail) GetNamespace() string

func (*OperationDetail) GetNamespaceAccess added in v0.16.0

func (m *OperationDetail) GetNamespaceAccess() *NamespaceAccess

func (*OperationDetail) GetRegion

func (m *OperationDetail) GetRegion() string

func (*OperationDetail) GetRoles

func (m *OperationDetail) GetRoles() []string

func (*OperationDetail) GetSearchAttributeUpdate

func (m *OperationDetail) GetSearchAttributeUpdate() *SearchAttributeUpdate

func (*OperationDetail) GetTargetUsers

func (m *OperationDetail) GetTargetUsers() []string

func (*OperationDetail) GetThirdPartyDetails

func (m *OperationDetail) GetThirdPartyDetails() *ThirdPartyLogDetail

func (*OperationDetail) GoString

func (this *OperationDetail) GoString() string

func (*OperationDetail) Marshal

func (m *OperationDetail) Marshal() (dAtA []byte, err error)

func (*OperationDetail) MarshalTo

func (m *OperationDetail) MarshalTo(dAtA []byte) (int, error)

func (*OperationDetail) MarshalToSizedBuffer

func (m *OperationDetail) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*OperationDetail) ProtoMessage

func (*OperationDetail) ProtoMessage()

func (*OperationDetail) Reset

func (m *OperationDetail) Reset()

func (*OperationDetail) Size

func (m *OperationDetail) Size() (n int)

func (*OperationDetail) String

func (this *OperationDetail) String() string

func (*OperationDetail) Unmarshal

func (m *OperationDetail) Unmarshal(dAtA []byte) error

func (*OperationDetail) XXX_DiscardUnknown

func (m *OperationDetail) XXX_DiscardUnknown()

func (*OperationDetail) XXX_Marshal

func (m *OperationDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OperationDetail) XXX_Merge

func (m *OperationDetail) XXX_Merge(src proto.Message)

func (*OperationDetail) XXX_Size

func (m *OperationDetail) XXX_Size() int

func (*OperationDetail) XXX_Unmarshal

func (m *OperationDetail) XXX_Unmarshal(b []byte) error

type SearchAttributeUpdate

type SearchAttributeUpdate struct {
	ExistingAttribute string `protobuf:"bytes,1,opt,name=existing_attribute,json=existingAttribute,proto3" json:"existing_attribute,omitempty"`
	NewAttribute      string `protobuf:"bytes,2,opt,name=new_attribute,json=newAttribute,proto3" json:"new_attribute,omitempty"`
}

func (*SearchAttributeUpdate) Descriptor

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

func (*SearchAttributeUpdate) Equal

func (this *SearchAttributeUpdate) Equal(that interface{}) bool

func (*SearchAttributeUpdate) GetExistingAttribute

func (m *SearchAttributeUpdate) GetExistingAttribute() string

func (*SearchAttributeUpdate) GetNewAttribute

func (m *SearchAttributeUpdate) GetNewAttribute() string

func (*SearchAttributeUpdate) GoString

func (this *SearchAttributeUpdate) GoString() string

func (*SearchAttributeUpdate) Marshal

func (m *SearchAttributeUpdate) Marshal() (dAtA []byte, err error)

func (*SearchAttributeUpdate) MarshalTo

func (m *SearchAttributeUpdate) MarshalTo(dAtA []byte) (int, error)

func (*SearchAttributeUpdate) MarshalToSizedBuffer

func (m *SearchAttributeUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SearchAttributeUpdate) ProtoMessage

func (*SearchAttributeUpdate) ProtoMessage()

func (*SearchAttributeUpdate) Reset

func (m *SearchAttributeUpdate) Reset()

func (*SearchAttributeUpdate) Size

func (m *SearchAttributeUpdate) Size() (n int)

func (*SearchAttributeUpdate) String

func (this *SearchAttributeUpdate) String() string

func (*SearchAttributeUpdate) Unmarshal

func (m *SearchAttributeUpdate) Unmarshal(dAtA []byte) error

func (*SearchAttributeUpdate) XXX_DiscardUnknown

func (m *SearchAttributeUpdate) XXX_DiscardUnknown()

func (*SearchAttributeUpdate) XXX_Marshal

func (m *SearchAttributeUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SearchAttributeUpdate) XXX_Merge

func (m *SearchAttributeUpdate) XXX_Merge(src proto.Message)

func (*SearchAttributeUpdate) XXX_Size

func (m *SearchAttributeUpdate) XXX_Size() int

func (*SearchAttributeUpdate) XXX_Unmarshal

func (m *SearchAttributeUpdate) XXX_Unmarshal(b []byte) error

type ThirdPartyLogDetail

type ThirdPartyLogDetail struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// the third party source, e.g. auth0
	Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"`
	// the raw log message from the third party app, e.g. the whole auth0 event log
	RawMessage string `protobuf:"bytes,3,opt,name=raw_message,json=rawMessage,proto3" json:"raw_message,omitempty"`
}

func (*ThirdPartyLogDetail) Descriptor

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

func (*ThirdPartyLogDetail) Equal

func (this *ThirdPartyLogDetail) Equal(that interface{}) bool

func (*ThirdPartyLogDetail) GetId

func (m *ThirdPartyLogDetail) GetId() string

func (*ThirdPartyLogDetail) GetRawMessage

func (m *ThirdPartyLogDetail) GetRawMessage() string

func (*ThirdPartyLogDetail) GetSource

func (m *ThirdPartyLogDetail) GetSource() string

func (*ThirdPartyLogDetail) GoString

func (this *ThirdPartyLogDetail) GoString() string

func (*ThirdPartyLogDetail) Marshal

func (m *ThirdPartyLogDetail) Marshal() (dAtA []byte, err error)

func (*ThirdPartyLogDetail) MarshalTo

func (m *ThirdPartyLogDetail) MarshalTo(dAtA []byte) (int, error)

func (*ThirdPartyLogDetail) MarshalToSizedBuffer

func (m *ThirdPartyLogDetail) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ThirdPartyLogDetail) ProtoMessage

func (*ThirdPartyLogDetail) ProtoMessage()

func (*ThirdPartyLogDetail) Reset

func (m *ThirdPartyLogDetail) Reset()

func (*ThirdPartyLogDetail) Size

func (m *ThirdPartyLogDetail) Size() (n int)

func (*ThirdPartyLogDetail) String

func (this *ThirdPartyLogDetail) String() string

func (*ThirdPartyLogDetail) Unmarshal

func (m *ThirdPartyLogDetail) Unmarshal(dAtA []byte) error

func (*ThirdPartyLogDetail) XXX_DiscardUnknown

func (m *ThirdPartyLogDetail) XXX_DiscardUnknown()

func (*ThirdPartyLogDetail) XXX_Marshal

func (m *ThirdPartyLogDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ThirdPartyLogDetail) XXX_Merge

func (m *ThirdPartyLogDetail) XXX_Merge(src proto.Message)

func (*ThirdPartyLogDetail) XXX_Size

func (m *ThirdPartyLogDetail) XXX_Size() int

func (*ThirdPartyLogDetail) XXX_Unmarshal

func (m *ThirdPartyLogDetail) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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