Documentation
¶
Index ¶
- Variables
- func RegisterAuditServer(s *grpc.Server, srv AuditServer)
- type AuditClient
- type AuditServer
- type CheckRequest
- func (*CheckRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CheckRequest) GetDeviceInfo() *proto1.DeviceInfo
- func (x *CheckRequest) GetRemoteZone() string
- func (x *CheckRequest) GetService() string
- func (x *CheckRequest) GetUsername() string
- func (*CheckRequest) ProtoMessage()
- func (x *CheckRequest) ProtoReflect() protoreflect.Message
- func (x *CheckRequest) Reset()
- func (x *CheckRequest) String() string
- type CheckResponse
- type GetLogsRequest
- func (*GetLogsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetLogsRequest) GetCount() int32
- func (x *GetLogsRequest) GetSince() *timestamppb.Timestamp
- func (x *GetLogsRequest) GetUserId() string
- func (*GetLogsRequest) ProtoMessage()
- func (x *GetLogsRequest) ProtoReflect() protoreflect.Message
- func (x *GetLogsRequest) Reset()
- func (x *GetLogsRequest) String() string
- type GetLogsResponse
- type LastLoginEntry
- func (*LastLoginEntry) Descriptor() ([]byte, []int)deprecated
- func (x *LastLoginEntry) GetAuthenticatorId() *proto1.AuthenticatorID
- func (x *LastLoginEntry) GetService() string
- func (x *LastLoginEntry) GetTimestamp() *timestamppb.Timestamp
- func (x *LastLoginEntry) GetUserId() string
- func (*LastLoginEntry) ProtoMessage()
- func (x *LastLoginEntry) ProtoReflect() protoreflect.Message
- func (x *LastLoginEntry) Reset()
- func (x *LastLoginEntry) String() string
- type Log
- func NewAddAppSpecificPasswordLog(userID, aspID string, authLog *authpb.Log) *Log
- func NewAddWebAuthnLog(userID, kh string, authLog *authpb.Log) *Log
- func NewDeleteAppSpecificPasswordLog(userID, aspID string, authLog *authpb.Log) *Log
- func NewDeleteOTPLog(userID string, authLog *authpb.Log) *Log
- func NewDeleteWebAuthnLog(userID, kh string, authLog *authpb.Log) *Log
- func NewLoginLog(authLog *authpb.Log) *Log
- func NewPasswordChangeLog(userID string, authLog *authpb.Log) *Log
- func NewSetOTPLog(userID string, authLog *authpb.Log) *Log
- func (*Log) Descriptor() ([]byte, []int)deprecated
- func (x *Log) GetArg() string
- func (x *Log) GetAuthLog() *proto.Log
- func (x *Log) GetSubject() string
- func (x *Log) GetTimestamp() *timestamppb.Timestamp
- func (x *Log) GetType() Log_Type
- func (*Log) ProtoMessage()
- func (x *Log) ProtoReflect() protoreflect.Message
- func (x *Log) Reset()
- func (x *Log) String() string
- type Log_Type
- type UnimplementedAuditServer
- type UnsafeAuditServer
Constants ¶
This section is empty.
Variables ¶
var ( Log_Type_name = map[int32]string{ 0: "TYPE_UNKNOWN", 1: "TYPE_LOGIN", 2: "TYPE_LOGOUT", 3: "TYPE_PASSWORD_RESET", 4: "TYPE_PRIMARY_PASSWORD_CHANGE", 5: "TYPE_ASP_CREATED", 6: "TYPE_ASP_DELETED", 7: "TYPE_WEBAUTHN_CREATED", 8: "TYPE_WEBAUTHN_DELETED", 9: "TYPE_TOTP_SET", 10: "TYPE_TOTP_DELETED", } Log_Type_value = map[string]int32{ "TYPE_UNKNOWN": 0, "TYPE_LOGIN": 1, "TYPE_LOGOUT": 2, "TYPE_PASSWORD_RESET": 3, "TYPE_PRIMARY_PASSWORD_CHANGE": 4, "TYPE_ASP_CREATED": 5, "TYPE_ASP_DELETED": 6, "TYPE_WEBAUTHN_CREATED": 7, "TYPE_WEBAUTHN_DELETED": 8, "TYPE_TOTP_SET": 9, "TYPE_TOTP_DELETED": 10, } )
Enum value maps for Log_Type.
var File_audit_proto_audit_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuditServer ¶
func RegisterAuditServer(s *grpc.Server, srv AuditServer)
Types ¶
type AuditClient ¶
type AuditClient interface {
CheckDevice(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
Ingest(ctx context.Context, in *Log, opts ...grpc.CallOption) (*emptypb.Empty, error)
GetLogs(ctx context.Context, in *GetLogsRequest, opts ...grpc.CallOption) (*GetLogsResponse, error)
}
AuditClient is the client API for Audit service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewAuditClient ¶
func NewAuditClient(cc grpc.ClientConnInterface) AuditClient
type AuditServer ¶
type AuditServer interface {
CheckDevice(context.Context, *CheckRequest) (*CheckResponse, error)
Ingest(context.Context, *Log) (*emptypb.Empty, error)
GetLogs(context.Context, *GetLogsRequest) (*GetLogsResponse, error)
// contains filtered or unexported methods
}
AuditServer is the server API for Audit service. All implementations must embed UnimplementedAuditServer for forward compatibility
type CheckRequest ¶
type CheckRequest struct {
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"`
DeviceInfo *proto1.DeviceInfo `protobuf:"bytes,3,opt,name=device_info,json=deviceInfo,proto3" json:"device_info,omitempty"`
RemoteZone string `protobuf:"bytes,4,opt,name=remote_zone,json=remoteZone,proto3" json:"remote_zone,omitempty"`
// contains filtered or unexported fields
}
func (*CheckRequest) Descriptor
deprecated
func (*CheckRequest) Descriptor() ([]byte, []int)
Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead.
func (*CheckRequest) GetDeviceInfo ¶
func (x *CheckRequest) GetDeviceInfo() *proto1.DeviceInfo
func (*CheckRequest) GetRemoteZone ¶
func (x *CheckRequest) GetRemoteZone() string
func (*CheckRequest) GetService ¶
func (x *CheckRequest) GetService() string
func (*CheckRequest) GetUsername ¶
func (x *CheckRequest) GetUsername() string
func (*CheckRequest) ProtoMessage ¶
func (*CheckRequest) ProtoMessage()
func (*CheckRequest) ProtoReflect ¶
func (x *CheckRequest) ProtoReflect() protoreflect.Message
func (*CheckRequest) Reset ¶
func (x *CheckRequest) Reset()
func (*CheckRequest) String ¶
func (x *CheckRequest) String() string
type CheckResponse ¶
type CheckResponse struct {
Unknown bool `protobuf:"varint,1,opt,name=unknown,proto3" json:"unknown,omitempty"`
// contains filtered or unexported fields
}
func (*CheckResponse) Descriptor
deprecated
func (*CheckResponse) Descriptor() ([]byte, []int)
Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead.
func (*CheckResponse) GetUnknown ¶
func (x *CheckResponse) GetUnknown() bool
func (*CheckResponse) ProtoMessage ¶
func (*CheckResponse) ProtoMessage()
func (*CheckResponse) ProtoReflect ¶
func (x *CheckResponse) ProtoReflect() protoreflect.Message
func (*CheckResponse) Reset ¶
func (x *CheckResponse) Reset()
func (*CheckResponse) String ¶
func (x *CheckResponse) String() string
type GetLogsRequest ¶
type GetLogsRequest struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Since *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=since,proto3" json:"since,omitempty"`
Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
// contains filtered or unexported fields
}
func (*GetLogsRequest) Descriptor
deprecated
func (*GetLogsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetLogsRequest.ProtoReflect.Descriptor instead.
func (*GetLogsRequest) GetCount ¶
func (x *GetLogsRequest) GetCount() int32
func (*GetLogsRequest) GetSince ¶
func (x *GetLogsRequest) GetSince() *timestamppb.Timestamp
func (*GetLogsRequest) GetUserId ¶
func (x *GetLogsRequest) GetUserId() string
func (*GetLogsRequest) ProtoMessage ¶
func (*GetLogsRequest) ProtoMessage()
func (*GetLogsRequest) ProtoReflect ¶
func (x *GetLogsRequest) ProtoReflect() protoreflect.Message
func (*GetLogsRequest) Reset ¶
func (x *GetLogsRequest) Reset()
func (*GetLogsRequest) String ¶
func (x *GetLogsRequest) String() string
type GetLogsResponse ¶
type GetLogsResponse struct {
Entries []*Log `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
// contains filtered or unexported fields
}
func (*GetLogsResponse) Descriptor
deprecated
func (*GetLogsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetLogsResponse.ProtoReflect.Descriptor instead.
func (*GetLogsResponse) GetEntries ¶
func (x *GetLogsResponse) GetEntries() []*Log
func (*GetLogsResponse) ProtoMessage ¶
func (*GetLogsResponse) ProtoMessage()
func (*GetLogsResponse) ProtoReflect ¶
func (x *GetLogsResponse) ProtoReflect() protoreflect.Message
func (*GetLogsResponse) Reset ¶
func (x *GetLogsResponse) Reset()
func (*GetLogsResponse) String ¶
func (x *GetLogsResponse) String() string
type LastLoginEntry ¶
type LastLoginEntry struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"`
AuthenticatorId *proto1.AuthenticatorID `protobuf:"bytes,3,opt,name=authenticator_id,json=authenticatorId,proto3" json:"authenticator_id,omitempty"`
Timestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// contains filtered or unexported fields
}
func (*LastLoginEntry) Descriptor
deprecated
func (*LastLoginEntry) Descriptor() ([]byte, []int)
Deprecated: Use LastLoginEntry.ProtoReflect.Descriptor instead.
func (*LastLoginEntry) GetAuthenticatorId ¶
func (x *LastLoginEntry) GetAuthenticatorId() *proto1.AuthenticatorID
func (*LastLoginEntry) GetService ¶
func (x *LastLoginEntry) GetService() string
func (*LastLoginEntry) GetTimestamp ¶
func (x *LastLoginEntry) GetTimestamp() *timestamppb.Timestamp
func (*LastLoginEntry) GetUserId ¶
func (x *LastLoginEntry) GetUserId() string
func (*LastLoginEntry) ProtoMessage ¶
func (*LastLoginEntry) ProtoMessage()
func (*LastLoginEntry) ProtoReflect ¶
func (x *LastLoginEntry) ProtoReflect() protoreflect.Message
func (*LastLoginEntry) Reset ¶
func (x *LastLoginEntry) Reset()
func (*LastLoginEntry) String ¶
func (x *LastLoginEntry) String() string
type Log ¶
type Log struct {
Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Type Log_Type `protobuf:"varint,2,opt,name=type,proto3,enum=audit.Log_Type" json:"type,omitempty"`
// Who performed the action. For TYPE_LOGIN this is also the subject
// of the action itself.
AuthLog *proto.Log `protobuf:"bytes,3,opt,name=auth_log,json=authLog,proto3" json:"auth_log,omitempty"`
// Normally the user ID.
Subject string `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
// Generic string argument, as a sub-identifier.
Arg string `protobuf:"bytes,5,opt,name=arg,proto3" json:"arg,omitempty"`
// contains filtered or unexported fields
}
func NewAddAppSpecificPasswordLog ¶
func NewDeleteAppSpecificPasswordLog ¶
func (*Log) GetTimestamp ¶
func (x *Log) GetTimestamp() *timestamppb.Timestamp
func (*Log) ProtoReflect ¶
func (x *Log) ProtoReflect() protoreflect.Message
type Log_Type ¶
type Log_Type int32
const ( Log_TYPE_UNKNOWN Log_Type = 0 Log_TYPE_LOGIN Log_Type = 1 Log_TYPE_LOGOUT Log_Type = 2 Log_TYPE_PASSWORD_RESET Log_Type = 3 Log_TYPE_PRIMARY_PASSWORD_CHANGE Log_Type = 4 Log_TYPE_ASP_CREATED Log_Type = 5 Log_TYPE_ASP_DELETED Log_Type = 6 Log_TYPE_WEBAUTHN_CREATED Log_Type = 7 Log_TYPE_WEBAUTHN_DELETED Log_Type = 8 Log_TYPE_TOTP_SET Log_Type = 9 Log_TYPE_TOTP_DELETED Log_Type = 10 )
func (Log_Type) Descriptor ¶
func (Log_Type) Descriptor() protoreflect.EnumDescriptor
func (Log_Type) Number ¶
func (x Log_Type) Number() protoreflect.EnumNumber
func (Log_Type) Type ¶
func (Log_Type) Type() protoreflect.EnumType
type UnimplementedAuditServer ¶
type UnimplementedAuditServer struct {
}
UnimplementedAuditServer must be embedded to have forward compatible implementations.
func (UnimplementedAuditServer) CheckDevice ¶
func (UnimplementedAuditServer) CheckDevice(context.Context, *CheckRequest) (*CheckResponse, error)
func (UnimplementedAuditServer) GetLogs ¶
func (UnimplementedAuditServer) GetLogs(context.Context, *GetLogsRequest) (*GetLogsResponse, error)
type UnsafeAuditServer ¶
type UnsafeAuditServer interface {
// contains filtered or unexported methods
}
UnsafeAuditServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuditServer will result in compilation errors.
Source Files
¶
- audit.go
- audit.pb.go
- audit_grpc.pb.go