mirror of
https://dev.azure.com/schwarzit/schwarzit.stackit-public/_git/audit-go
synced 2026-02-08 00:57:24 +00:00
Remove strict identifier type specification from schema
This commit is contained in:
parent
ed68f3c6d9
commit
5d8aa9ee94
22 changed files with 1340 additions and 1407 deletions
|
|
@ -107,6 +107,14 @@ auditApi, err := NewMockAuditApi()
|
|||
if err != nil { ... }
|
||||
```
|
||||
|
||||
### Supported data types
|
||||
| Singular-Type | Plural-Type | Routable to customer | Description |
|
||||
|---------------|---------------|----------------------|----------------------|
|
||||
| system | system | no | The STACKIT system |
|
||||
| project | projects | yes | STACKIT project |
|
||||
| organization | organizations | yes | STACKIT organization |
|
||||
| folder | folders | yes | STACKIT folder |
|
||||
|
||||
### Customization
|
||||
|
||||
#### os.Stdout logging
|
||||
|
|
|
|||
105
audit/api/api.go
105
audit/api/api.go
|
|
@ -2,14 +2,28 @@ package api
|
|||
|
||||
import (
|
||||
"context"
|
||||
"github.com/google/uuid"
|
||||
"time"
|
||||
|
||||
auditV1 "dev.azure.com/schwarzit/schwarzit.stackit-core-platform/common-audit.git/gen/go/audit/v1"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
type EventType string
|
||||
type SingularType string
|
||||
type PluralType string
|
||||
|
||||
const (
|
||||
EventTypeAdminActivity EventType = "admin-activity"
|
||||
EventTypeSystemEvent EventType = "system-event"
|
||||
EventTypePolicyDenied EventType = "policy-denied"
|
||||
EventTypeDataAccess EventType = "data-access"
|
||||
)
|
||||
|
||||
var SystemIdentifier = &auditV1.ObjectIdentifier{Identifier: uuid.Nil.String(), Type: string(SingularTypeSystem)}
|
||||
var RoutableSystemIdentifier = NewRoutableIdentifier(SystemIdentifier)
|
||||
|
||||
// AuditApi is the interface to log audit events.
|
||||
//
|
||||
// It provides a Log method that can be used to validate and directly send events.
|
||||
|
|
@ -24,32 +38,26 @@ type AuditApi interface {
|
|||
// Parameters:
|
||||
// * ctx - the context object
|
||||
// * event - the auditV1.AuditEvent
|
||||
// * visibility - route the event only internally or to the customer (not evaluated in the legacy solution)
|
||||
// * routingIdentifier - the identifier for the AMQP-Topic selection (optional)
|
||||
// * auditV1.ObjectType_OBJECT_TYPE_ORGANIZATION
|
||||
// * auditV1.ObjectType_OBJECT_TYPE_PROJECT
|
||||
// * objectIdentifier - the identifier of the object (optional - if not folder must be identical to routingIdentifier)
|
||||
// * auditV1.ObjectType_OBJECT_TYPE_ORGANIZATION
|
||||
// * auditV1.ObjectType_OBJECT_TYPE_FOLDER
|
||||
// * auditV1.ObjectType_OBJECT_TYPE_PROJECT
|
||||
// * visibility - route the event only internally or to the customer (no routing in the legacy solution)
|
||||
// * routableIdentifier - the identifier of the object
|
||||
//
|
||||
// It may return one of the following errors:
|
||||
/*
|
||||
- ErrEventNil - if event is nil
|
||||
- ErrObjectIdentifierVisibilityMismatch - if object identifier and visibility are not in a valid state
|
||||
- ErrRoutableIdentifierMissing - if routing identifier type and object identifier type do not match
|
||||
- ErrRoutableIdentifierTypeMismatch - if routing identifier type and object identifier types are not compatible
|
||||
- ErrUnsupportedObjectIdentifierType - if an unsupported object identifier type was provided
|
||||
- ErrUnsupportedResourceReferenceType - if an unsupported resource reference type was provided
|
||||
- protovalidate.ValidationError - if schema validation errors have been detected
|
||||
- protobuf serialization errors - if the event couldn't be serialized
|
||||
*/
|
||||
//
|
||||
// - ErrUnknownSingularType - if the routableIdentifier type is unknown
|
||||
// - ErrUnknownPluralType - if the routableIdentifier type is unknown
|
||||
// - ErrEventNil - if event is nil
|
||||
// - ErrObjectIdentifierNil - if the object identifier is nil
|
||||
// - ErrObjectIdentifierVisibilityMismatch - if object identifier and visibility are not in a valid state
|
||||
// - ErrUnsupportedObjectIdentifierType - if an unsupported object identifier type was provided
|
||||
// - ErrAttributeIdentifierInvalid - if identifier in a checked attribute and the object identifier do not match
|
||||
// - ErrAttributeTypeInvalid - if the type from checked attribute and the type from object identifier do not match
|
||||
// - protovalidate.ValidationError - if schema validation errors have been detected
|
||||
// - protobuf serialization errors - if the event couldn't be serialized
|
||||
Log(
|
||||
ctx context.Context,
|
||||
event *auditV1.AuditLogEntry,
|
||||
visibility auditV1.Visibility,
|
||||
routingIdentifier *RoutingIdentifier,
|
||||
objectIdentifier *auditV1.ObjectIdentifier,
|
||||
routableIdentifier *RoutableIdentifier,
|
||||
) error
|
||||
|
||||
// ValidateAndSerialize validates and serializes the event into a byte representation.
|
||||
|
|
@ -57,15 +65,21 @@ type AuditApi interface {
|
|||
ValidateAndSerialize(
|
||||
event *auditV1.AuditLogEntry,
|
||||
visibility auditV1.Visibility,
|
||||
routingIdentifier *RoutingIdentifier,
|
||||
objectIdentifier *auditV1.ObjectIdentifier,
|
||||
routableIdentifier *RoutableIdentifier,
|
||||
) (*CloudEvent, error)
|
||||
|
||||
// Send the serialized content as byte array to the audit log system.
|
||||
// It may return one of the following errors:
|
||||
//
|
||||
// - ErrTopicNameResolverNil - if the topic name resolver is nil
|
||||
// - ErrMessagingApiNil - if the messaging api is nil
|
||||
// - ErrCloudEventNil - if the cloud event is nil
|
||||
// - ErrObjectIdentifierNil - if the object identifier is nil
|
||||
// - amqp errors - if the event couldn't be sent
|
||||
Send(
|
||||
ctx context.Context,
|
||||
routingIdentifier *RoutingIdentifier,
|
||||
serializedPayload *CloudEvent,
|
||||
routableIdentifier *RoutableIdentifier,
|
||||
cloudEvent *CloudEvent,
|
||||
) error
|
||||
}
|
||||
|
||||
|
|
@ -139,25 +153,32 @@ type CloudEvent struct {
|
|||
traceState *string
|
||||
}
|
||||
|
||||
// RoutingIdentifierType is an enumeration of allowed identifier types.
|
||||
type RoutingIdentifierType int
|
||||
|
||||
// RoutingIdentifierType enumeration values.
|
||||
const (
|
||||
RoutingIdentifierTypeOrganization RoutingIdentifierType = 0
|
||||
RoutingIdentifierTypeProject RoutingIdentifierType = 1
|
||||
)
|
||||
|
||||
// RoutingIdentifier is a representation for identifiers of allowed types.
|
||||
type RoutingIdentifier struct {
|
||||
Identifier uuid.UUID
|
||||
Type RoutingIdentifierType
|
||||
}
|
||||
|
||||
// TopicNameResolver is an abstraction for dynamic topic name resolution
|
||||
// based on event data or api parameters.
|
||||
type TopicNameResolver interface {
|
||||
|
||||
// Resolve returns a topic name for the given routing identifier
|
||||
Resolve(routingIdentifier *RoutingIdentifier) (string, error)
|
||||
// Resolve returns a topic name for the given object identifier
|
||||
Resolve(objectIdentifier *RoutableIdentifier) (string, error)
|
||||
}
|
||||
|
||||
type RoutableIdentifier struct {
|
||||
Identifier string
|
||||
Type SingularType
|
||||
}
|
||||
|
||||
func NewRoutableIdentifier(objectIdentifier *auditV1.ObjectIdentifier) *RoutableIdentifier {
|
||||
if objectIdentifier == nil {
|
||||
return nil
|
||||
}
|
||||
return &RoutableIdentifier{
|
||||
Identifier: objectIdentifier.Identifier,
|
||||
Type: SingularType(objectIdentifier.Type),
|
||||
}
|
||||
}
|
||||
|
||||
func (r RoutableIdentifier) ToObjectIdentifier() *auditV1.ObjectIdentifier {
|
||||
return &auditV1.ObjectIdentifier{
|
||||
Identifier: r.Identifier,
|
||||
Type: string(r.Type),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/google/uuid"
|
||||
"strings"
|
||||
|
||||
"dev.azure.com/schwarzit/schwarzit.stackit-core-platform/common-audit.git/audit/messaging"
|
||||
auditV1 "dev.azure.com/schwarzit/schwarzit.stackit-core-platform/common-audit.git/gen/go/audit/v1"
|
||||
|
|
@ -14,31 +16,37 @@ import (
|
|||
// ContentTypeCloudEventsProtobuf the cloudevents protobuf content-type sent in metadata of messages
|
||||
const ContentTypeCloudEventsProtobuf = "application/cloudevents+protobuf"
|
||||
|
||||
// ErrUnknownPluralType indicates that the given input is an unknown plural type
|
||||
var ErrUnknownPluralType = errors.New("unknown plural type")
|
||||
|
||||
// ErrUnknownSingularType indicates that the given input is an unknown singular type
|
||||
var ErrUnknownSingularType = errors.New("unknown singular type")
|
||||
|
||||
// ErrUnsupportedRoutableType indicates that the given input is an unsupported routable type
|
||||
var ErrUnsupportedRoutableType = errors.New("unsupported routable type")
|
||||
|
||||
// ErrEventNil indicates that the event was nil
|
||||
var ErrEventNil = errors.New("event is nil")
|
||||
|
||||
// ErrObjectIdentifierNil indicates that the object identifier was nil
|
||||
var ErrObjectIdentifierNil = errors.New("object identifier is nil")
|
||||
|
||||
// ErrObjectIdentifierVisibilityMismatch indicates that a reference mismatch was detected.
|
||||
//
|
||||
// Valid combinations are:
|
||||
// * Visibility: Public, ObjectIdentifier: <value>
|
||||
// * Visibility: Private, ObjectIdentifier: <value | nil> -> If ObjectIdentifier is nil,
|
||||
// the ObjectReference in the message will be ObjectName_OBJECT_NAME_SYSTEM
|
||||
// * Visibility: Public, ObjectIdentifier: <type>
|
||||
// * Visibility: Private, ObjectIdentifier: <type | system>
|
||||
var ErrObjectIdentifierVisibilityMismatch = errors.New("object reference visibility mismatch")
|
||||
|
||||
// ErrRoutableIdentifierMissing indicates that a routable identifier is expected for the constellation of data.
|
||||
var ErrRoutableIdentifierMissing = errors.New("routable identifier expected")
|
||||
|
||||
// ErrRoutableIdentifierMismatch indicates that a routable identifier (uuid) does not match.
|
||||
var ErrRoutableIdentifierMismatch = errors.New("routable identifier type does not match")
|
||||
|
||||
// ErrRoutableIdentifierTypeMismatch indicates that a routable identifier type does not match the expected type.
|
||||
var ErrRoutableIdentifierTypeMismatch = errors.New("routable identifier type does not match")
|
||||
|
||||
// ErrUnsupportedObjectIdentifierType indicates that an unsupported object identifier type has been provided.
|
||||
var ErrUnsupportedObjectIdentifierType = errors.New("unsupported object identifier type")
|
||||
|
||||
// ErrUnsupportedResourceReferenceType indicates that an unsupported reference type has been provided.
|
||||
var ErrUnsupportedResourceReferenceType = errors.New("unsupported resource reference type")
|
||||
// ErrAttributeTypeInvalid indicates that an invalid type has been provided.
|
||||
var ErrAttributeTypeInvalid = errors.New("attribute type invalid")
|
||||
|
||||
// ErrAttributeIdentifierInvalid indicates that the object identifier
|
||||
// and the identifier in the checked attribute do not match
|
||||
var ErrAttributeIdentifierInvalid = errors.New("attribute identifier invalid")
|
||||
|
||||
// ErrTopicNameResolverNil states that the topic name resolve is nil
|
||||
var ErrTopicNameResolverNil = errors.New("topic name resolver nil")
|
||||
|
|
@ -46,21 +54,23 @@ var ErrTopicNameResolverNil = errors.New("topic name resolver nil")
|
|||
// ErrMessagingApiNil states that the messaging api is nil
|
||||
var ErrMessagingApiNil = errors.New("messaging api nil")
|
||||
|
||||
// ErrSerializedPayloadNil states that the give serialized payload is nil
|
||||
var ErrSerializedPayloadNil = errors.New("serialized payload nil")
|
||||
// ErrCloudEventNil states that the given cloud event is nil
|
||||
var ErrCloudEventNil = errors.New("cloud event nil")
|
||||
|
||||
func validateAndSerializePartially(
|
||||
validator *ProtobufValidator,
|
||||
event *auditV1.AuditLogEntry,
|
||||
visibility auditV1.Visibility,
|
||||
routingIdentifier *RoutingIdentifier,
|
||||
objectIdentifier *auditV1.ObjectIdentifier,
|
||||
routableIdentifier *RoutableIdentifier,
|
||||
) (*auditV1.RoutableAuditEvent, error) {
|
||||
|
||||
// Return error if the given event is nil
|
||||
// Return error if the given event or object identifier is nil
|
||||
if event == nil {
|
||||
return nil, ErrEventNil
|
||||
}
|
||||
if routableIdentifier == nil {
|
||||
return nil, ErrObjectIdentifierNil
|
||||
}
|
||||
|
||||
// Validate the actual event
|
||||
err := (*validator).Validate(event)
|
||||
|
|
@ -68,34 +78,25 @@ func validateAndSerializePartially(
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// Ensure that an object identifier is set if the event is public
|
||||
if objectIdentifier == nil && visibility == auditV1.Visibility_VISIBILITY_PUBLIC {
|
||||
// Ensure that a valid object identifier is set if the event is public
|
||||
if isSystemIdentifier(routableIdentifier) && visibility == auditV1.Visibility_VISIBILITY_PUBLIC {
|
||||
return nil, ErrObjectIdentifierVisibilityMismatch
|
||||
}
|
||||
|
||||
// Routing identifier not set but object identifier with routable identifier
|
||||
if routingIdentifier == nil && objectIdentifier != nil &&
|
||||
visibility != auditV1.Visibility_VISIBILITY_PRIVATE {
|
||||
|
||||
return nil, ErrRoutableIdentifierMissing
|
||||
// Check that provided identifier type is supported
|
||||
if err := IsSupportedSingularType(routableIdentifier.Type); err != nil {
|
||||
if errors.Is(err, ErrUnknownSingularType) {
|
||||
return nil, ErrUnsupportedRoutableType
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Routing identifier type and object identifier types are not compatible
|
||||
if routingIdentifier != nil &&
|
||||
objectIdentifier != nil &&
|
||||
objectIdentifier.Type == auditV1.ObjectType_OBJECT_TYPE_FOLDER &&
|
||||
routingIdentifier.Type != RoutingIdentifierTypeOrganization {
|
||||
|
||||
return nil, ErrRoutableIdentifierTypeMismatch
|
||||
// Check identifier consistency across event attributes
|
||||
if err := areIdentifiersIdentical(routableIdentifier, event.LogName); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Routing identifier type and object identifier do not match
|
||||
if routingIdentifier != nil &&
|
||||
objectIdentifier != nil &&
|
||||
objectIdentifier.Type != auditV1.ObjectType_OBJECT_TYPE_FOLDER &&
|
||||
routingIdentifier.Identifier.String() != objectIdentifier.Identifier {
|
||||
|
||||
return nil, ErrRoutableIdentifierMismatch
|
||||
if err := areIdentifiersIdentical(routableIdentifier, event.ProtoPayload.ResourceName); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Test serialization even if the data is dropped later while logging to the legacy solution
|
||||
|
|
@ -110,18 +111,10 @@ func validateAndSerializePartially(
|
|||
}
|
||||
|
||||
routableEvent := auditV1.RoutableAuditEvent{
|
||||
EventName: event.ProtoPayload.MethodName,
|
||||
Visibility: visibility,
|
||||
Data: &auditV1.RoutableAuditEvent_UnencryptedData{UnencryptedData: &payload},
|
||||
}
|
||||
|
||||
// Set oneof protobuf fields after creation of the object
|
||||
if objectIdentifier == nil {
|
||||
routableEvent.ResourceReference = &auditV1.RoutableAuditEvent_ObjectName{
|
||||
ObjectName: auditV1.ObjectName_OBJECT_NAME_SYSTEM}
|
||||
} else {
|
||||
routableEvent.ResourceReference = &auditV1.RoutableAuditEvent_ObjectIdentifier{
|
||||
ObjectIdentifier: objectIdentifier}
|
||||
EventName: event.ProtoPayload.MethodName,
|
||||
ObjectIdentifier: routableIdentifier.ToObjectIdentifier(),
|
||||
Visibility: visibility,
|
||||
Data: &auditV1.RoutableAuditEvent_UnencryptedData{UnencryptedData: &payload},
|
||||
}
|
||||
|
||||
err = (*validator).Validate(&routableEvent)
|
||||
|
|
@ -135,12 +128,13 @@ func validateAndSerializePartially(
|
|||
// Send implements AuditApi.Send
|
||||
func send(
|
||||
topicNameResolver *TopicNameResolver,
|
||||
messagingApi *messaging.MessagingApi,
|
||||
messagingApi *messaging.Api,
|
||||
ctx context.Context,
|
||||
routingIdentifier *RoutingIdentifier,
|
||||
routableIdentifier *RoutableIdentifier,
|
||||
cloudEvent *CloudEvent,
|
||||
) error {
|
||||
|
||||
// Check that given objects are not nil
|
||||
if topicNameResolver == nil {
|
||||
return ErrTopicNameResolverNil
|
||||
}
|
||||
|
|
@ -148,10 +142,21 @@ func send(
|
|||
return ErrMessagingApiNil
|
||||
}
|
||||
if cloudEvent == nil {
|
||||
return ErrSerializedPayloadNil
|
||||
return ErrCloudEventNil
|
||||
}
|
||||
if routableIdentifier == nil {
|
||||
return ErrObjectIdentifierNil
|
||||
}
|
||||
|
||||
topic, err := (*topicNameResolver).Resolve(routingIdentifier)
|
||||
// Check that provided identifier type is supported
|
||||
if err := IsSupportedSingularType(routableIdentifier.Type); err != nil {
|
||||
if errors.Is(err, ErrUnknownSingularType) {
|
||||
return ErrUnsupportedRoutableType
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
topic, err := (*topicNameResolver).Resolve(routableIdentifier)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -167,10 +172,10 @@ func send(
|
|||
applicationAttributes["cloudEvents:type"] = cloudEvent.dataType
|
||||
applicationAttributes["cloudEvents:subject"] = cloudEvent.subject
|
||||
if cloudEvent.traceParent != nil {
|
||||
applicationAttributes["cloudEvents:traceparent"] = cloudEvent.traceParent
|
||||
applicationAttributes["cloudEvents:traceparent"] = *cloudEvent.traceParent
|
||||
}
|
||||
if cloudEvent.traceState != nil {
|
||||
applicationAttributes["cloudEvents:tracestate"] = cloudEvent.traceState
|
||||
applicationAttributes["cloudEvents:tracestate"] = *cloudEvent.traceState
|
||||
}
|
||||
|
||||
return (*messagingApi).Send(
|
||||
|
|
@ -180,3 +185,37 @@ func send(
|
|||
(*cloudEvent).dataContentType,
|
||||
applicationAttributes)
|
||||
}
|
||||
|
||||
func isSystemIdentifier(identifier *RoutableIdentifier) bool {
|
||||
if identifier.Identifier == uuid.Nil.String() && identifier.Type == SingularTypeSystem {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func areIdentifiersIdentical(routableIdentifier *RoutableIdentifier, logName string) error {
|
||||
dataType, identifier := getTypeAndIdentifierFromString(logName)
|
||||
pluralType := AsPluralType(dataType)
|
||||
singularType, err := SingularTypeFromPlural(pluralType)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return areTypeAndIdentifierIdentical(routableIdentifier, singularType, identifier)
|
||||
}
|
||||
|
||||
func areTypeAndIdentifierIdentical(routableIdentifier *RoutableIdentifier, dataType SingularType, identifier string) error {
|
||||
if routableIdentifier.Identifier != identifier {
|
||||
return ErrAttributeIdentifierInvalid
|
||||
}
|
||||
if routableIdentifier.Type != dataType {
|
||||
return ErrAttributeTypeInvalid
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func getTypeAndIdentifierFromString(input string) (string, string) {
|
||||
parts := strings.Split(input, "/")
|
||||
dataType := parts[0]
|
||||
identifier := parts[1]
|
||||
return dataType, identifier
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,10 @@ import (
|
|||
"dev.azure.com/schwarzit/schwarzit.stackit-core-platform/common-audit.git/audit/messaging"
|
||||
auditV1 "dev.azure.com/schwarzit/schwarzit.stackit-core-platform/common-audit.git/gen/go/audit/v1"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/bufbuild/protovalidate-go"
|
||||
"github.com/google/uuid"
|
||||
|
|
@ -43,8 +46,8 @@ type TopicNameResolverMock struct {
|
|||
mock.Mock
|
||||
}
|
||||
|
||||
func (m *TopicNameResolverMock) Resolve(routingIdentifier *RoutingIdentifier) (string, error) {
|
||||
args := m.Called(routingIdentifier)
|
||||
func (m *TopicNameResolverMock) Resolve(routableIdentifier *RoutableIdentifier) (string, error) {
|
||||
args := m.Called(routableIdentifier)
|
||||
return args.String(0), args.Error(1)
|
||||
}
|
||||
|
||||
|
|
@ -60,7 +63,7 @@ func Test_ValidateAndSerializePartially_EventNil(t *testing.T) {
|
|||
validator := NewValidator(t)
|
||||
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, nil, auditV1.Visibility_VISIBILITY_PUBLIC, nil, nil)
|
||||
&validator, nil, auditV1.Visibility_VISIBILITY_PUBLIC, nil)
|
||||
|
||||
assert.ErrorIs(t, err, ErrEventNil)
|
||||
}
|
||||
|
|
@ -68,11 +71,11 @@ func Test_ValidateAndSerializePartially_EventNil(t *testing.T) {
|
|||
func Test_ValidateAndSerializePartially_AuditEventValidationFailed(t *testing.T) {
|
||||
validator := NewValidator(t)
|
||||
|
||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
event.LogName = ""
|
||||
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, routingIdentifier, objectIdentifier)
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, NewRoutableIdentifier(objectIdentifier))
|
||||
|
||||
assert.EqualError(t, err, "validation error:\n - log_name: value is required [required]")
|
||||
}
|
||||
|
|
@ -80,101 +83,172 @@ func Test_ValidateAndSerializePartially_AuditEventValidationFailed(t *testing.T)
|
|||
func Test_ValidateAndSerializePartially_RoutableEventValidationFailed(t *testing.T) {
|
||||
validator := NewValidator(t)
|
||||
|
||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
_, err := validateAndSerializePartially(&validator, event, 3, routingIdentifier, objectIdentifier)
|
||||
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
_, err := validateAndSerializePartially(&validator, event, 3, NewRoutableIdentifier(objectIdentifier))
|
||||
|
||||
assert.EqualError(t, err, "validation error:\n - visibility: value must be one of the defined enum values [enum.defined_only]")
|
||||
}
|
||||
|
||||
func Test_ValidateAndSerializePartially_CheckVisibility(t *testing.T) {
|
||||
func Test_ValidateAndSerializePartially_CheckVisibility_Event(t *testing.T) {
|
||||
validator := NewValidator(t)
|
||||
|
||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
|
||||
t.Run("Visibility public - object identifier nil - routing identifier nil", func(t *testing.T) {
|
||||
t.Run("Visibility public - object identifier nil", func(t *testing.T) {
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, nil, nil)
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, nil)
|
||||
|
||||
assert.ErrorIs(t, err, ErrObjectIdentifierNil)
|
||||
})
|
||||
|
||||
t.Run("Visibility private - object identifier nil", func(t *testing.T) {
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PRIVATE, nil)
|
||||
|
||||
assert.ErrorIs(t, err, ErrObjectIdentifierNil)
|
||||
})
|
||||
|
||||
t.Run("Visibility public - object identifier system", func(t *testing.T) {
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, RoutableSystemIdentifier)
|
||||
|
||||
assert.ErrorIs(t, err, ErrObjectIdentifierVisibilityMismatch)
|
||||
})
|
||||
|
||||
t.Run("Visibility public - object identifier nil - routing identifier set", func(t *testing.T) {
|
||||
t.Run("Visibility public - object identifier set", func(t *testing.T) {
|
||||
routableEvent, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, NewRoutableIdentifier(objectIdentifier))
|
||||
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, routableEvent)
|
||||
})
|
||||
|
||||
t.Run("Visibility private - object identifier system", func(t *testing.T) {
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, routingIdentifier, nil)
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PRIVATE, RoutableSystemIdentifier)
|
||||
|
||||
assert.ErrorIs(t, err, ErrObjectIdentifierVisibilityMismatch)
|
||||
assert.ErrorIs(t, err, ErrAttributeIdentifierInvalid)
|
||||
})
|
||||
|
||||
t.Run("Visibility public - object identifier set - routing identifier nil", func(t *testing.T) {
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, nil, objectIdentifier)
|
||||
|
||||
assert.ErrorIs(t, err, ErrRoutableIdentifierMissing)
|
||||
})
|
||||
|
||||
t.Run("Visibility public - object identifier set - routing identifier set", func(t *testing.T) {
|
||||
t.Run("Visibility private - object identifier set", func(t *testing.T) {
|
||||
routableEvent, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, routingIdentifier, objectIdentifier)
|
||||
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, routableEvent)
|
||||
})
|
||||
|
||||
t.Run("Visibility private - object identifier nil - routing identifier nil", func(t *testing.T) {
|
||||
routableEvent, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PRIVATE, nil, nil)
|
||||
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, routableEvent)
|
||||
})
|
||||
|
||||
t.Run("Visibility private - object identifier nil - routing identifier set", func(t *testing.T) {
|
||||
routableEvent, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PRIVATE, routingIdentifier, nil)
|
||||
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, routableEvent)
|
||||
})
|
||||
|
||||
t.Run("Visibility private - object identifier set - routing identifier nil", func(t *testing.T) {
|
||||
routableEvent, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PRIVATE, nil, objectIdentifier)
|
||||
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, routableEvent)
|
||||
})
|
||||
|
||||
t.Run("Visibility private - object identifier set - routing identifier set", func(t *testing.T) {
|
||||
routableEvent, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PRIVATE, routingIdentifier, objectIdentifier)
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PRIVATE, NewRoutableIdentifier(objectIdentifier))
|
||||
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, routableEvent)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_ValidateAndSerializePartially_IdentifierTypeMismatch(t *testing.T) {
|
||||
func Test_ValidateAndSerializePartially_CheckVisibility_SystemEvent(t *testing.T) {
|
||||
validator := NewValidator(t)
|
||||
|
||||
event, routingIdentifier, objectIdentifier := NewFolderAuditEvent(nil)
|
||||
routingIdentifier.Type = RoutingIdentifierTypeProject
|
||||
event := NewSystemAuditEvent(nil)
|
||||
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, routingIdentifier, objectIdentifier)
|
||||
t.Run("Visibility public - object identifier nil", func(t *testing.T) {
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, nil)
|
||||
|
||||
assert.ErrorIs(t, err, ErrRoutableIdentifierTypeMismatch)
|
||||
assert.ErrorIs(t, err, ErrObjectIdentifierNil)
|
||||
})
|
||||
|
||||
t.Run("Visibility private - object identifier nil", func(t *testing.T) {
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PRIVATE, nil)
|
||||
|
||||
assert.ErrorIs(t, err, ErrObjectIdentifierNil)
|
||||
})
|
||||
|
||||
t.Run("Visibility public - object identifier system", func(t *testing.T) {
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, RoutableSystemIdentifier)
|
||||
|
||||
assert.ErrorIs(t, err, ErrObjectIdentifierVisibilityMismatch)
|
||||
})
|
||||
|
||||
t.Run("Visibility public - object identifier set", func(t *testing.T) {
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, NewRoutableIdentifier(
|
||||
&auditV1.ObjectIdentifier{Identifier: uuid.NewString(), Type: string(SingularTypeOrganization)}))
|
||||
|
||||
assert.ErrorIs(t, err, ErrAttributeIdentifierInvalid)
|
||||
})
|
||||
|
||||
t.Run("Visibility private - object identifier system", func(t *testing.T) {
|
||||
routableEvent, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PRIVATE, RoutableSystemIdentifier)
|
||||
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, routableEvent)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Visibility private - object identifier set", func(t *testing.T) {
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PRIVATE, NewRoutableIdentifier(
|
||||
&auditV1.ObjectIdentifier{Identifier: uuid.NewString(), Type: string(SingularTypeOrganization)}))
|
||||
|
||||
assert.ErrorIs(t, err, ErrAttributeIdentifierInvalid)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_ValidateAndSerializePartially_IdentifierMismatch(t *testing.T) {
|
||||
func Test_ValidateAndSerializePartially_UnsupportedIdentifierType(t *testing.T) {
|
||||
validator := NewValidator(t)
|
||||
|
||||
event, routingIdentifier, objectIdentifier := NewProjectAuditEvent(nil)
|
||||
routingIdentifier.Identifier = uuid.New()
|
||||
event, objectIdentifier := NewFolderAuditEvent(nil)
|
||||
objectIdentifier.Type = "invalid"
|
||||
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, routingIdentifier, objectIdentifier)
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, NewRoutableIdentifier(objectIdentifier))
|
||||
|
||||
assert.ErrorIs(t, err, ErrRoutableIdentifierMismatch)
|
||||
assert.ErrorIs(t, err, ErrUnsupportedRoutableType)
|
||||
}
|
||||
|
||||
func Test_ValidateAndSerializePartially_LogNameIdentifierMismatch(t *testing.T) {
|
||||
validator := NewValidator(t)
|
||||
|
||||
event, objectIdentifier := NewFolderAuditEvent(nil)
|
||||
parts := strings.Split(event.LogName, "/")
|
||||
identifier := parts[1]
|
||||
|
||||
t.Run("LogName type mismatch", func(t *testing.T) {
|
||||
event.LogName = fmt.Sprintf("projects/%s/logs/admin-activity", identifier)
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, NewRoutableIdentifier(objectIdentifier))
|
||||
|
||||
assert.ErrorIs(t, err, ErrAttributeTypeInvalid)
|
||||
})
|
||||
|
||||
t.Run("LogName identifier mismatch", func(t *testing.T) {
|
||||
event.LogName = fmt.Sprintf("folders/%s/logs/admin-activity", uuid.NewString())
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, NewRoutableIdentifier(objectIdentifier))
|
||||
|
||||
assert.ErrorIs(t, err, ErrAttributeIdentifierInvalid)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_ValidateAndSerializePartially_ResourceNameIdentifierMismatch(t *testing.T) {
|
||||
validator := NewValidator(t)
|
||||
|
||||
event, objectIdentifier := NewFolderAuditEvent(nil)
|
||||
parts := strings.Split(event.ProtoPayload.ResourceName, "/")
|
||||
identifier := parts[1]
|
||||
|
||||
t.Run("ResourceName type mismatch", func(t *testing.T) {
|
||||
event.ProtoPayload.ResourceName = fmt.Sprintf("projects/%s", identifier)
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, NewRoutableIdentifier(objectIdentifier))
|
||||
|
||||
assert.ErrorIs(t, err, ErrAttributeTypeInvalid)
|
||||
})
|
||||
|
||||
t.Run("ResourceName identifier mismatch", func(t *testing.T) {
|
||||
event.ProtoPayload.ResourceName = fmt.Sprintf("folders/%s", uuid.NewString())
|
||||
_, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, NewRoutableIdentifier(objectIdentifier))
|
||||
|
||||
assert.ErrorIs(t, err, ErrAttributeIdentifierInvalid)
|
||||
})
|
||||
}
|
||||
|
||||
func Test_ValidateAndSerializePartially_SystemEvent(t *testing.T) {
|
||||
|
|
@ -183,16 +257,11 @@ func Test_ValidateAndSerializePartially_SystemEvent(t *testing.T) {
|
|||
event := NewSystemAuditEvent(nil)
|
||||
|
||||
routableEvent, err := validateAndSerializePartially(
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PRIVATE, nil, nil)
|
||||
&validator, event, auditV1.Visibility_VISIBILITY_PRIVATE, RoutableSystemIdentifier)
|
||||
|
||||
assert.NoError(t, err)
|
||||
|
||||
switch reference := routableEvent.ResourceReference.(type) {
|
||||
case *auditV1.RoutableAuditEvent_ObjectName:
|
||||
assert.Equal(t, auditV1.ObjectName_OBJECT_NAME_SYSTEM, reference.ObjectName)
|
||||
default:
|
||||
assert.Fail(t, "unexpected resource reference")
|
||||
}
|
||||
assert.Equal(t, event.LogName, fmt.Sprintf("system/%s/logs/%s", SystemIdentifier.Identifier, EventTypeSystemEvent))
|
||||
assert.True(t, proto.Equal(routableEvent.ObjectIdentifier, SystemIdentifier))
|
||||
}
|
||||
|
||||
func Test_Send_TopicNameResolverNil(t *testing.T) {
|
||||
|
|
@ -209,8 +278,8 @@ func Test_Send_TopicNameResolutionError(t *testing.T) {
|
|||
|
||||
var cloudEvent = CloudEvent{}
|
||||
|
||||
var messagingApi messaging.MessagingApi = &messaging.AmqpMessagingApi{}
|
||||
err := send(&topicNameResolver, &messagingApi, context.Background(), nil, &cloudEvent)
|
||||
var messagingApi messaging.Api = &messaging.AmqpApi{}
|
||||
err := send(&topicNameResolver, &messagingApi, context.Background(), RoutableSystemIdentifier, &cloudEvent)
|
||||
assert.ErrorIs(t, err, expectedError)
|
||||
}
|
||||
|
||||
|
|
@ -220,11 +289,31 @@ func Test_Send_MessagingApiNil(t *testing.T) {
|
|||
assert.ErrorIs(t, err, ErrMessagingApiNil)
|
||||
}
|
||||
|
||||
func Test_Send_SerializedPayloadNil(t *testing.T) {
|
||||
func Test_Send_CloudEventNil(t *testing.T) {
|
||||
var topicNameResolver TopicNameResolver = &LegacyTopicNameResolver{topicName: "test"}
|
||||
var messagingApi messaging.MessagingApi = &messaging.AmqpMessagingApi{}
|
||||
var messagingApi messaging.Api = &messaging.AmqpApi{}
|
||||
|
||||
err := send(&topicNameResolver, &messagingApi, context.Background(), nil, nil)
|
||||
assert.ErrorIs(t, err, ErrSerializedPayloadNil)
|
||||
assert.ErrorIs(t, err, ErrCloudEventNil)
|
||||
}
|
||||
|
||||
func Test_Send_ObjectIdentifierNil(t *testing.T) {
|
||||
var topicNameResolver TopicNameResolver = &LegacyTopicNameResolver{topicName: "test"}
|
||||
var messagingApi messaging.Api = &messaging.AmqpApi{}
|
||||
var cloudEvent = CloudEvent{}
|
||||
|
||||
err := send(&topicNameResolver, &messagingApi, context.Background(), nil, &cloudEvent)
|
||||
assert.ErrorIs(t, err, ErrObjectIdentifierNil)
|
||||
}
|
||||
|
||||
func Test_Send_UnsupportedObjectIdentifierType(t *testing.T) {
|
||||
var topicNameResolver TopicNameResolver = &LegacyTopicNameResolver{topicName: "test"}
|
||||
var messagingApi messaging.Api = &messaging.AmqpApi{}
|
||||
var cloudEvent = CloudEvent{}
|
||||
var objectIdentifier = auditV1.ObjectIdentifier{Identifier: uuid.NewString(), Type: "unsupported"}
|
||||
|
||||
err := send(&topicNameResolver, &messagingApi, context.Background(), NewRoutableIdentifier(&objectIdentifier), &cloudEvent)
|
||||
assert.ErrorIs(t, err, ErrUnsupportedRoutableType)
|
||||
}
|
||||
|
||||
func Test_Send(t *testing.T) {
|
||||
|
|
@ -234,9 +323,91 @@ func Test_Send(t *testing.T) {
|
|||
|
||||
messagingApiMock := MessagingApiMock{}
|
||||
messagingApiMock.On("Send", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil)
|
||||
var messagingApi messaging.MessagingApi = &messagingApiMock
|
||||
var messagingApi messaging.Api = &messagingApiMock
|
||||
|
||||
var cloudEvent = CloudEvent{}
|
||||
assert.NoError(t, send(&topicNameResolver, &messagingApi, context.Background(), nil, &cloudEvent))
|
||||
assert.NoError(t, send(&topicNameResolver, &messagingApi, context.Background(), RoutableSystemIdentifier, &cloudEvent))
|
||||
assert.True(t, messagingApiMock.AssertNumberOfCalls(t, "Send", 1))
|
||||
}
|
||||
|
||||
func Test_SendAllHeadersSet(t *testing.T) {
|
||||
topicNameResolverMock := TopicNameResolverMock{}
|
||||
topicNameResolverMock.On("Resolve", mock.Anything).Return("topic", nil)
|
||||
var topicNameResolver TopicNameResolver = &topicNameResolverMock
|
||||
|
||||
messagingApiMock := MessagingApiMock{}
|
||||
messagingApiMock.On("Send", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil)
|
||||
var messagingApi messaging.Api = &messagingApiMock
|
||||
|
||||
traceState := "rojo=00f067aa0ba902b7,congo=t61rcWkgMzE"
|
||||
traceParent := "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
|
||||
expectedTime := time.Now()
|
||||
var cloudEvent = CloudEvent{
|
||||
specVersion: "1.0",
|
||||
source: "resourcemanager",
|
||||
id: "id",
|
||||
time: expectedTime,
|
||||
dataContentType: ContentTypeCloudEventsProtobuf,
|
||||
dataType: "type",
|
||||
subject: "subject",
|
||||
traceParent: &traceParent,
|
||||
traceState: &traceState,
|
||||
}
|
||||
assert.NoError(t, send(&topicNameResolver, &messagingApi, context.Background(), RoutableSystemIdentifier, &cloudEvent))
|
||||
assert.True(t, messagingApiMock.AssertNumberOfCalls(t, "Send", 1))
|
||||
arguments := messagingApiMock.Calls[0].Arguments
|
||||
topic := arguments.Get(1).(string)
|
||||
assert.Equal(t, "topic", topic)
|
||||
contentType := arguments.Get(3).(string)
|
||||
assert.Equal(t, ContentTypeCloudEventsProtobuf, contentType)
|
||||
applicationProperties := arguments.Get(4).(map[string]any)
|
||||
assert.Equal(t, "1.0", applicationProperties["cloudEvents:specversion"])
|
||||
assert.Equal(t, "resourcemanager", applicationProperties["cloudEvents:source"])
|
||||
assert.Equal(t, "id", applicationProperties["cloudEvents:id"])
|
||||
assert.Equal(t, expectedTime.UnixMilli(), applicationProperties["cloudEvents:time"])
|
||||
assert.Equal(t, ContentTypeCloudEventsProtobuf, applicationProperties["cloudEvents:datacontenttype"])
|
||||
assert.Equal(t, "type", applicationProperties["cloudEvents:type"])
|
||||
assert.Equal(t, "subject", applicationProperties["cloudEvents:subject"])
|
||||
assert.Equal(t, traceParent, applicationProperties["cloudEvents:traceparent"])
|
||||
assert.Equal(t, traceState, applicationProperties["cloudEvents:tracestate"])
|
||||
messagingApiMock.AssertExpectations(t)
|
||||
}
|
||||
|
||||
func Test_SendWithoutOptionalHeadersSet(t *testing.T) {
|
||||
topicNameResolverMock := TopicNameResolverMock{}
|
||||
topicNameResolverMock.On("Resolve", mock.Anything).Return("topic", nil)
|
||||
var topicNameResolver TopicNameResolver = &topicNameResolverMock
|
||||
|
||||
messagingApiMock := MessagingApiMock{}
|
||||
messagingApiMock.On("Send", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil)
|
||||
var messagingApi messaging.Api = &messagingApiMock
|
||||
|
||||
expectedTime := time.Now()
|
||||
var cloudEvent = CloudEvent{
|
||||
specVersion: "1.0",
|
||||
source: "resourcemanager",
|
||||
id: "id",
|
||||
time: expectedTime,
|
||||
dataContentType: ContentTypeCloudEventsProtobuf,
|
||||
dataType: "type",
|
||||
subject: "subject",
|
||||
}
|
||||
assert.NoError(t, send(&topicNameResolver, &messagingApi, context.Background(), RoutableSystemIdentifier, &cloudEvent))
|
||||
assert.True(t, messagingApiMock.AssertNumberOfCalls(t, "Send", 1))
|
||||
arguments := messagingApiMock.Calls[0].Arguments
|
||||
topic := arguments.Get(1).(string)
|
||||
assert.Equal(t, "topic", topic)
|
||||
contentType := arguments.Get(3).(string)
|
||||
assert.Equal(t, ContentTypeCloudEventsProtobuf, contentType)
|
||||
applicationProperties := arguments.Get(4).(map[string]any)
|
||||
assert.Equal(t, "1.0", applicationProperties["cloudEvents:specversion"])
|
||||
assert.Equal(t, "resourcemanager", applicationProperties["cloudEvents:source"])
|
||||
assert.Equal(t, "id", applicationProperties["cloudEvents:id"])
|
||||
assert.Equal(t, expectedTime.UnixMilli(), applicationProperties["cloudEvents:time"])
|
||||
assert.Equal(t, ContentTypeCloudEventsProtobuf, applicationProperties["cloudEvents:datacontenttype"])
|
||||
assert.Equal(t, "type", applicationProperties["cloudEvents:type"])
|
||||
assert.Equal(t, "subject", applicationProperties["cloudEvents:subject"])
|
||||
assert.Equal(t, nil, applicationProperties["cloudEvents:traceparent"])
|
||||
assert.Equal(t, nil, applicationProperties["cloudEvents:tracestate"])
|
||||
messagingApiMock.AssertExpectations(t)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ type LegacyTopicNameResolver struct {
|
|||
}
|
||||
|
||||
// Resolve implements TopicNameResolver.Resolve
|
||||
func (r *LegacyTopicNameResolver) Resolve(*RoutingIdentifier) (string, error) {
|
||||
func (r *LegacyTopicNameResolver) Resolve(*RoutableIdentifier) (string, error) {
|
||||
return r.topicName, nil
|
||||
}
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ type LegacyTopicNameConfig struct {
|
|||
//
|
||||
// Note: The implementation will be deprecated and replaced with the "routableAuditApi" once the new audit log routing is implemented
|
||||
type LegacyAuditApi struct {
|
||||
messagingApi *messaging.MessagingApi
|
||||
messagingApi *messaging.Api
|
||||
topicNameResolver *TopicNameResolver
|
||||
validator *ProtobufValidator
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@ type LegacyAuditApi struct {
|
|||
//
|
||||
// Note: The NewLegacyAuditApi method will be deprecated and replaced with "newRoutableAuditApi" once the new audit log routing is implemented
|
||||
func NewLegacyAuditApi(
|
||||
messagingApi *messaging.MessagingApi,
|
||||
messagingApi *messaging.Api,
|
||||
topicNameConfig LegacyTopicNameConfig,
|
||||
validator ProtobufValidator,
|
||||
) (*AuditApi, error) {
|
||||
|
|
@ -56,6 +56,9 @@ func NewLegacyAuditApi(
|
|||
}
|
||||
|
||||
// Topic resolver
|
||||
if topicNameConfig.TopicName == "" {
|
||||
return nil, errors.New("topic name is required")
|
||||
}
|
||||
var topicNameResolver TopicNameResolver = &LegacyTopicNameResolver{topicName: topicNameConfig.TopicName}
|
||||
|
||||
// Audit api
|
||||
|
|
@ -73,16 +76,15 @@ func (a *LegacyAuditApi) Log(
|
|||
ctx context.Context,
|
||||
event *auditV1.AuditLogEntry,
|
||||
visibility auditV1.Visibility,
|
||||
routingIdentifier *RoutingIdentifier,
|
||||
objectIdentifier *auditV1.ObjectIdentifier,
|
||||
routableIdentifier *RoutableIdentifier,
|
||||
) error {
|
||||
|
||||
cloudEvent, err := a.ValidateAndSerialize(event, visibility, routingIdentifier, objectIdentifier)
|
||||
cloudEvent, err := a.ValidateAndSerialize(event, visibility, routableIdentifier)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return a.Send(ctx, routingIdentifier, cloudEvent)
|
||||
return a.Send(ctx, routableIdentifier, cloudEvent)
|
||||
}
|
||||
|
||||
// ValidateAndSerialize implements AuditApi.ValidateAndSerialize.
|
||||
|
|
@ -90,11 +92,10 @@ func (a *LegacyAuditApi) Log(
|
|||
func (a *LegacyAuditApi) ValidateAndSerialize(
|
||||
event *auditV1.AuditLogEntry,
|
||||
visibility auditV1.Visibility,
|
||||
routingIdentifier *RoutingIdentifier,
|
||||
objectIdentifier *auditV1.ObjectIdentifier,
|
||||
routableIdentifier *RoutableIdentifier,
|
||||
) (*CloudEvent, error) {
|
||||
|
||||
routableEvent, err := validateAndSerializePartially(a.validator, event, visibility, routingIdentifier, objectIdentifier)
|
||||
routableEvent, err := validateAndSerializePartially(a.validator, event, visibility, routableIdentifier)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -132,11 +133,11 @@ func (a *LegacyAuditApi) ValidateAndSerialize(
|
|||
// Send implements AuditApi.Send
|
||||
func (a *LegacyAuditApi) Send(
|
||||
ctx context.Context,
|
||||
routingIdentifier *RoutingIdentifier,
|
||||
routableIdentifier *RoutableIdentifier,
|
||||
cloudEvent *CloudEvent,
|
||||
) error {
|
||||
|
||||
return send(a.topicNameResolver, a.messagingApi, ctx, routingIdentifier, cloudEvent)
|
||||
return send(a.topicNameResolver, a.messagingApi, ctx, routableIdentifier, cloudEvent)
|
||||
}
|
||||
|
||||
// convertAndSerializeIntoLegacyFormat converts the protobuf events into the json serialized legacy audit log format
|
||||
|
|
@ -222,39 +223,40 @@ func (a *LegacyAuditApi) convertAndSerializeIntoLegacyFormat(
|
|||
}
|
||||
}
|
||||
|
||||
if routableEvent.ObjectIdentifier == nil {
|
||||
return nil, ErrObjectIdentifierNil
|
||||
}
|
||||
|
||||
// Context and event type
|
||||
var messageContext *LegacyAuditEventContext
|
||||
var eventType string
|
||||
switch ref := routableEvent.GetResourceReference().(type) {
|
||||
case *auditV1.RoutableAuditEvent_ObjectIdentifier:
|
||||
switch routableEvent.ObjectIdentifier.Type {
|
||||
case string(SingularTypeProject):
|
||||
eventType = "ADMIN_ACTIVITY"
|
||||
if ref.ObjectIdentifier.Type == auditV1.ObjectType_OBJECT_TYPE_ORGANIZATION {
|
||||
messageContext = &LegacyAuditEventContext{
|
||||
OrganizationId: &ref.ObjectIdentifier.Identifier,
|
||||
FolderId: nil,
|
||||
ProjectId: nil,
|
||||
}
|
||||
|
||||
} else if ref.ObjectIdentifier.Type == auditV1.ObjectType_OBJECT_TYPE_FOLDER {
|
||||
messageContext = &LegacyAuditEventContext{
|
||||
OrganizationId: nil,
|
||||
FolderId: &ref.ObjectIdentifier.Identifier,
|
||||
ProjectId: nil,
|
||||
}
|
||||
} else if ref.ObjectIdentifier.Type == auditV1.ObjectType_OBJECT_TYPE_PROJECT {
|
||||
messageContext = &LegacyAuditEventContext{
|
||||
OrganizationId: nil,
|
||||
FolderId: nil,
|
||||
ProjectId: &ref.ObjectIdentifier.Identifier,
|
||||
}
|
||||
} else {
|
||||
return nil, ErrUnsupportedObjectIdentifierType
|
||||
messageContext = &LegacyAuditEventContext{
|
||||
OrganizationId: nil,
|
||||
FolderId: nil,
|
||||
ProjectId: &routableEvent.ObjectIdentifier.Identifier,
|
||||
}
|
||||
case *auditV1.RoutableAuditEvent_ObjectName:
|
||||
case string(SingularTypeFolder):
|
||||
eventType = "ADMIN_ACTIVITY"
|
||||
messageContext = &LegacyAuditEventContext{
|
||||
OrganizationId: nil,
|
||||
FolderId: &routableEvent.ObjectIdentifier.Identifier,
|
||||
ProjectId: nil,
|
||||
}
|
||||
case string(SingularTypeOrganization):
|
||||
eventType = "ADMIN_ACTIVITY"
|
||||
messageContext = &LegacyAuditEventContext{
|
||||
OrganizationId: &routableEvent.ObjectIdentifier.Identifier,
|
||||
FolderId: nil,
|
||||
ProjectId: nil,
|
||||
}
|
||||
case string(SingularTypeSystem):
|
||||
eventType = "SYSTEM_EVENT"
|
||||
messageContext = nil
|
||||
default:
|
||||
return nil, ErrUnsupportedResourceReferenceType
|
||||
return nil, ErrUnsupportedObjectIdentifierType
|
||||
}
|
||||
|
||||
var visibility string
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
|||
defer solaceContainer.Stop()
|
||||
|
||||
// Instantiate the messaging api
|
||||
messagingApi, err := messaging.NewAmqpMessagingApi(messaging.AmqpConfig{URL: solaceContainer.AmqpConnectionString})
|
||||
messagingApi, err := messaging.NewAmqpApi(messaging.AmqpConfig{URL: solaceContainer.AmqpConnectionString})
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Validator
|
||||
|
|
@ -65,7 +65,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
// Instantiate test data
|
||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
|
||||
// Log the event to solace
|
||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||
|
|
@ -73,8 +73,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
|||
ctx,
|
||||
event,
|
||||
visibility,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
NewRoutableIdentifier(objectIdentifier),
|
||||
))
|
||||
|
||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||
|
|
@ -103,7 +102,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
// Instantiate test data
|
||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
|
||||
// Log the event to solace
|
||||
visibility := auditV1.Visibility_VISIBILITY_PRIVATE
|
||||
|
|
@ -111,8 +110,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
|||
ctx,
|
||||
event,
|
||||
visibility,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
NewRoutableIdentifier(objectIdentifier),
|
||||
))
|
||||
|
||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||
|
|
@ -142,7 +140,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
// Instantiate test data
|
||||
event, routingIdentifier, objectIdentifier := NewFolderAuditEvent(nil)
|
||||
event, objectIdentifier := NewFolderAuditEvent(nil)
|
||||
|
||||
// Log the event to solace
|
||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||
|
|
@ -150,8 +148,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
|||
ctx,
|
||||
event,
|
||||
visibility,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
NewRoutableIdentifier(objectIdentifier),
|
||||
))
|
||||
|
||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||
|
|
@ -180,7 +177,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
// Instantiate test data
|
||||
event, routingIdentifier, objectIdentifier := NewFolderAuditEvent(nil)
|
||||
event, objectIdentifier := NewFolderAuditEvent(nil)
|
||||
|
||||
// Log the event to solace
|
||||
visibility := auditV1.Visibility_VISIBILITY_PRIVATE
|
||||
|
|
@ -188,8 +185,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
|||
ctx,
|
||||
event,
|
||||
visibility,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
NewRoutableIdentifier(objectIdentifier),
|
||||
))
|
||||
|
||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||
|
|
@ -219,7 +215,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
// Instantiate test data
|
||||
event, routingIdentifier, objectIdentifier := NewProjectAuditEvent(nil)
|
||||
event, objectIdentifier := NewProjectAuditEvent(nil)
|
||||
|
||||
// Log the event to solace
|
||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||
|
|
@ -227,8 +223,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
|||
ctx,
|
||||
event,
|
||||
visibility,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
NewRoutableIdentifier(objectIdentifier),
|
||||
))
|
||||
|
||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||
|
|
@ -257,7 +252,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
// Instantiate test data
|
||||
event, routingIdentifier, objectIdentifier := NewProjectAuditEvent(nil)
|
||||
event, objectIdentifier := NewProjectAuditEvent(nil)
|
||||
|
||||
// Log the event to solace
|
||||
visibility := auditV1.Visibility_VISIBILITY_PRIVATE
|
||||
|
|
@ -265,8 +260,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
|||
ctx,
|
||||
event,
|
||||
visibility,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
NewRoutableIdentifier(objectIdentifier),
|
||||
))
|
||||
|
||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||
|
|
@ -304,8 +298,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
|||
ctx,
|
||||
event,
|
||||
visibility,
|
||||
nil,
|
||||
nil,
|
||||
RoutableSystemIdentifier,
|
||||
))
|
||||
|
||||
// Receive the event from solace
|
||||
|
|
@ -352,7 +345,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
// Instantiate test data
|
||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
|
||||
// Log the event to solace
|
||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||
|
|
@ -360,8 +353,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
|||
ctx,
|
||||
event,
|
||||
visibility,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
NewRoutableIdentifier(objectIdentifier),
|
||||
))
|
||||
|
||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||
|
|
@ -480,7 +472,7 @@ func TestLegacyAuditApi_ValidateAndSerialize_ValidationFailed(t *testing.T) {
|
|||
auditApi := LegacyAuditApi{validator: &protobufValidator}
|
||||
|
||||
event := NewSystemAuditEvent(nil)
|
||||
_, err := auditApi.ValidateAndSerialize(event, auditV1.Visibility_VISIBILITY_PUBLIC, nil, nil)
|
||||
_, err := auditApi.ValidateAndSerialize(event, auditV1.Visibility_VISIBILITY_PUBLIC, RoutableSystemIdentifier)
|
||||
assert.ErrorIs(t, err, expectedError)
|
||||
}
|
||||
|
||||
|
|
@ -494,43 +486,42 @@ func TestLegacyAuditApi_Log_ValidationFailed(t *testing.T) {
|
|||
auditApi := LegacyAuditApi{validator: &protobufValidator}
|
||||
|
||||
event := NewSystemAuditEvent(nil)
|
||||
err := auditApi.Log(context.Background(), event, auditV1.Visibility_VISIBILITY_PUBLIC, nil, nil)
|
||||
err := auditApi.Log(context.Background(), event, auditV1.Visibility_VISIBILITY_PUBLIC, RoutableSystemIdentifier)
|
||||
assert.ErrorIs(t, err, expectedError)
|
||||
}
|
||||
|
||||
func TestLegacyAuditApi_Log_NilEvent(t *testing.T) {
|
||||
auditApi := LegacyAuditApi{}
|
||||
err := auditApi.Log(context.Background(), nil, auditV1.Visibility_VISIBILITY_PUBLIC, nil, nil)
|
||||
err := auditApi.Log(context.Background(), nil, auditV1.Visibility_VISIBILITY_PUBLIC, RoutableSystemIdentifier)
|
||||
assert.ErrorIs(t, err, ErrEventNil)
|
||||
}
|
||||
|
||||
func TestLegacyAuditApi_ConvertAndSerializeIntoLegacyFormatInvalidObjectIdentifierType(t *testing.T) {
|
||||
customization := func(event *auditV1.AuditLogEntry,
|
||||
routingIdentifier *RoutingIdentifier,
|
||||
objectIdentifier *auditV1.ObjectIdentifier) {
|
||||
objectIdentifier.Type = 4
|
||||
objectIdentifier.Type = "invalid"
|
||||
}
|
||||
event, identifier, objectIdentifier := NewProjectAuditEvent(&customization)
|
||||
event, objectIdentifier := NewProjectAuditEvent(&customization)
|
||||
|
||||
validator := &ProtobufValidatorMock{}
|
||||
validator.On("Validate", mock.Anything).Return(nil)
|
||||
var protobufValidator ProtobufValidator = validator
|
||||
|
||||
auditApi := LegacyAuditApi{validator: &protobufValidator}
|
||||
_, err := auditApi.ValidateAndSerialize(event, auditV1.Visibility_VISIBILITY_PUBLIC, identifier, objectIdentifier)
|
||||
assert.ErrorIs(t, err, ErrUnsupportedObjectIdentifierType)
|
||||
_, err := auditApi.ValidateAndSerialize(event, auditV1.Visibility_VISIBILITY_PUBLIC, NewRoutableIdentifier(objectIdentifier))
|
||||
assert.ErrorIs(t, err, ErrUnsupportedRoutableType)
|
||||
}
|
||||
|
||||
func TestLegacyAuditApi_ConvertAndSerializeIntoLegacyFormat_NoResourceReference(t *testing.T) {
|
||||
event, _, _ := NewProjectAuditEvent(nil)
|
||||
func TestLegacyAuditApi_ConvertAndSerializeIntoLegacyFormat_NoObjectIdentifier(t *testing.T) {
|
||||
event, _ := NewProjectAuditEvent(nil)
|
||||
routableEvent := auditV1.RoutableAuditEvent{
|
||||
EventName: event.ProtoPayload.MethodName,
|
||||
Visibility: auditV1.Visibility_VISIBILITY_PUBLIC,
|
||||
ResourceReference: nil,
|
||||
Data: nil,
|
||||
EventName: event.ProtoPayload.MethodName,
|
||||
Visibility: auditV1.Visibility_VISIBILITY_PUBLIC,
|
||||
ObjectIdentifier: nil,
|
||||
Data: nil,
|
||||
}
|
||||
|
||||
auditApi := LegacyAuditApi{}
|
||||
_, err := auditApi.convertAndSerializeIntoLegacyFormat(event, &routableEvent)
|
||||
assert.ErrorIs(t, err, ErrUnsupportedResourceReferenceType)
|
||||
assert.ErrorIs(t, err, ErrObjectIdentifierNil)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,11 +32,10 @@ func (a *MockAuditApi) Log(
|
|||
_ context.Context,
|
||||
event *auditV1.AuditLogEntry,
|
||||
visibility auditV1.Visibility,
|
||||
routingIdentifier *RoutingIdentifier,
|
||||
objectIdentifier *auditV1.ObjectIdentifier,
|
||||
routableIdentifier *RoutableIdentifier,
|
||||
) error {
|
||||
|
||||
_, err := a.ValidateAndSerialize(event, visibility, routingIdentifier, objectIdentifier)
|
||||
_, err := a.ValidateAndSerialize(event, visibility, routableIdentifier)
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
@ -44,11 +43,10 @@ func (a *MockAuditApi) Log(
|
|||
func (a *MockAuditApi) ValidateAndSerialize(
|
||||
event *auditV1.AuditLogEntry,
|
||||
visibility auditV1.Visibility,
|
||||
routingIdentifier *RoutingIdentifier,
|
||||
objectIdentifier *auditV1.ObjectIdentifier,
|
||||
routableIdentifier *RoutableIdentifier,
|
||||
) (*CloudEvent, error) {
|
||||
|
||||
routableEvent, err := validateAndSerializePartially(a.validator, event, visibility, routingIdentifier, objectIdentifier)
|
||||
routableEvent, err := validateAndSerializePartially(a.validator, event, visibility, routableIdentifier)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -67,9 +65,8 @@ func (a *MockAuditApi) ValidateAndSerialize(
|
|||
dataContentType: "application/cloudevents+protobuf",
|
||||
dataType: fmt.Sprintf("%v", routableEvent.ProtoReflect().Descriptor().FullName()),
|
||||
// TODO check if this is correct
|
||||
subject: event.ProtoPayload.ResourceName,
|
||||
data: routableEventBytes,
|
||||
// TODO set trace fields
|
||||
subject: event.ProtoPayload.ResourceName,
|
||||
data: routableEventBytes,
|
||||
traceParent: nil,
|
||||
traceState: nil,
|
||||
}
|
||||
|
|
@ -78,6 +75,6 @@ func (a *MockAuditApi) ValidateAndSerialize(
|
|||
}
|
||||
|
||||
// Send implements AuditApi.Send
|
||||
func (a *MockAuditApi) Send(context.Context, *RoutingIdentifier, *CloudEvent) error {
|
||||
func (a *MockAuditApi) Send(context.Context, *RoutableIdentifier, *CloudEvent) error {
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,28 +15,29 @@ func TestMockAuditApi_Log(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
|
||||
// Instantiate test data
|
||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
routableObjectIdentifier := NewRoutableIdentifier(objectIdentifier)
|
||||
|
||||
// Test
|
||||
t.Run("Log", func(t *testing.T) {
|
||||
assert.Nil(t, (*auditApi).Log(
|
||||
context.Background(), event, auditV1.Visibility_VISIBILITY_PUBLIC, routingIdentifier, objectIdentifier))
|
||||
context.Background(), event, auditV1.Visibility_VISIBILITY_PUBLIC, routableObjectIdentifier))
|
||||
})
|
||||
|
||||
t.Run("ValidateAndSerialize", func(t *testing.T) {
|
||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||
cloudEvent, err := (*auditApi).ValidateAndSerialize(
|
||||
event, visibility, routingIdentifier, objectIdentifier)
|
||||
event, visibility, routableObjectIdentifier)
|
||||
|
||||
assert.NoError(t, err)
|
||||
|
||||
validateRoutableEventPayload(
|
||||
t, cloudEvent.data, routingIdentifier, objectIdentifier, event, event.ProtoPayload.MethodName, visibility)
|
||||
t, cloudEvent.data, objectIdentifier, event, event.ProtoPayload.MethodName, visibility)
|
||||
})
|
||||
|
||||
t.Run("ValidateAndSerialize event nil", func(t *testing.T) {
|
||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||
_, err := (*auditApi).ValidateAndSerialize(nil, visibility, routingIdentifier, objectIdentifier)
|
||||
_, err := (*auditApi).ValidateAndSerialize(nil, visibility, routableObjectIdentifier)
|
||||
|
||||
assert.ErrorIs(t, err, ErrEventNil)
|
||||
})
|
||||
|
|
@ -44,6 +45,6 @@ func TestMockAuditApi_Log(t *testing.T) {
|
|||
t.Run("Send", func(t *testing.T) {
|
||||
var cloudEvent = CloudEvent{}
|
||||
|
||||
assert.Nil(t, (*auditApi).Send(context.Background(), routingIdentifier, &cloudEvent))
|
||||
assert.Nil(t, (*auditApi).Send(context.Background(), routableObjectIdentifier, &cloudEvent))
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,24 +14,29 @@ import (
|
|||
// routableTopicNameResolver implements TopicNameResolver.
|
||||
// Resolves topic names by concatenating topic type prefixes with routing identifiers.
|
||||
type routableTopicNameResolver struct {
|
||||
folderTopicPrefix string
|
||||
organizationTopicPrefix string
|
||||
ProjectTopicPrefix string
|
||||
projectTopicPrefix string
|
||||
// If no identifier is provided for routing, it will be routed to a system topic
|
||||
systemTopicName string
|
||||
}
|
||||
|
||||
// Resolve implements TopicNameResolver.Resolve.
|
||||
func (r *routableTopicNameResolver) Resolve(routingIdentifier *RoutingIdentifier) (string, error) {
|
||||
func (r *routableTopicNameResolver) Resolve(routableIdentifier *RoutableIdentifier) (string, error) {
|
||||
|
||||
if routingIdentifier == nil {
|
||||
return r.systemTopicName, nil
|
||||
if routableIdentifier == nil {
|
||||
return "", ErrObjectIdentifierNil
|
||||
}
|
||||
|
||||
switch routingIdentifier.Type {
|
||||
case RoutingIdentifierTypeOrganization:
|
||||
return fmt.Sprintf("topic://%s/%s", r.organizationTopicPrefix, routingIdentifier.Identifier), nil
|
||||
case RoutingIdentifierTypeProject:
|
||||
return fmt.Sprintf("topic://%s/%s", r.ProjectTopicPrefix, routingIdentifier.Identifier), nil
|
||||
switch routableIdentifier.Type {
|
||||
case SingularTypeOrganization:
|
||||
return fmt.Sprintf("topic://%s/%s", r.organizationTopicPrefix, routableIdentifier.Identifier), nil
|
||||
case SingularTypeProject:
|
||||
return fmt.Sprintf("topic://%s/%s", r.projectTopicPrefix, routableIdentifier.Identifier), nil
|
||||
case SingularTypeFolder:
|
||||
return fmt.Sprintf("topic://%s/%s", r.folderTopicPrefix, routableIdentifier.Identifier), nil
|
||||
case SingularTypeSystem:
|
||||
return r.systemTopicName, nil
|
||||
default:
|
||||
return "", ErrUnsupportedObjectIdentifierType
|
||||
}
|
||||
|
|
@ -39,6 +44,7 @@ func (r *routableTopicNameResolver) Resolve(routingIdentifier *RoutingIdentifier
|
|||
|
||||
// topicNameConfig provides topic name information required for the topic name resolution.
|
||||
type topicNameConfig struct {
|
||||
FolderTopicPrefix string
|
||||
OrganizationTopicPrefix string
|
||||
ProjectTopicPrefix string
|
||||
SystemTopicName string
|
||||
|
|
@ -48,14 +54,14 @@ type topicNameConfig struct {
|
|||
// Warning: It is only there for local (compatibility) testing.
|
||||
// DO NOT USE IT!
|
||||
type routableAuditApi struct {
|
||||
messagingApi *messaging.MessagingApi
|
||||
messagingApi *messaging.Api
|
||||
topicNameResolver *TopicNameResolver
|
||||
validator *ProtobufValidator
|
||||
}
|
||||
|
||||
// NewRoutableAuditApi can be used to initialize the audit log api.
|
||||
func newRoutableAuditApi(
|
||||
messagingApi *messaging.MessagingApi,
|
||||
messagingApi *messaging.Api,
|
||||
topicNameConfig topicNameConfig,
|
||||
validator ProtobufValidator,
|
||||
) (*AuditApi, error) {
|
||||
|
|
@ -65,9 +71,23 @@ func newRoutableAuditApi(
|
|||
}
|
||||
|
||||
// Topic resolver
|
||||
if topicNameConfig.FolderTopicPrefix == "" {
|
||||
return nil, errors.New("folder topic prefix is required")
|
||||
}
|
||||
if topicNameConfig.OrganizationTopicPrefix == "" {
|
||||
return nil, errors.New("organization topic prefix is required")
|
||||
}
|
||||
if topicNameConfig.ProjectTopicPrefix == "" {
|
||||
return nil, errors.New("project topic prefix is required")
|
||||
}
|
||||
if topicNameConfig.SystemTopicName == "" {
|
||||
return nil, errors.New("system topic name is required")
|
||||
}
|
||||
|
||||
var topicNameResolver TopicNameResolver = &routableTopicNameResolver{
|
||||
folderTopicPrefix: topicNameConfig.FolderTopicPrefix,
|
||||
organizationTopicPrefix: topicNameConfig.OrganizationTopicPrefix,
|
||||
ProjectTopicPrefix: topicNameConfig.ProjectTopicPrefix,
|
||||
projectTopicPrefix: topicNameConfig.ProjectTopicPrefix,
|
||||
systemTopicName: topicNameConfig.SystemTopicName,
|
||||
}
|
||||
|
||||
|
|
@ -86,32 +106,29 @@ func (a *routableAuditApi) Log(
|
|||
ctx context.Context,
|
||||
event *auditV1.AuditLogEntry,
|
||||
visibility auditV1.Visibility,
|
||||
routingIdentifier *RoutingIdentifier,
|
||||
objectIdentifier *auditV1.ObjectIdentifier,
|
||||
routableIdentifier *RoutableIdentifier,
|
||||
) error {
|
||||
|
||||
cloudEvent, err := a.ValidateAndSerialize(event, visibility, routingIdentifier, objectIdentifier)
|
||||
cloudEvent, err := a.ValidateAndSerialize(event, visibility, routableIdentifier)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return a.Send(ctx, routingIdentifier, cloudEvent)
|
||||
return a.Send(ctx, routableIdentifier, cloudEvent)
|
||||
}
|
||||
|
||||
// ValidateAndSerialize implements AuditApi.ValidateAndSerialize
|
||||
func (a *routableAuditApi) ValidateAndSerialize(
|
||||
event *auditV1.AuditLogEntry,
|
||||
visibility auditV1.Visibility,
|
||||
routingIdentifier *RoutingIdentifier,
|
||||
objectIdentifier *auditV1.ObjectIdentifier,
|
||||
routableIdentifier *RoutableIdentifier,
|
||||
) (*CloudEvent, error) {
|
||||
|
||||
routableEvent, err := validateAndSerializePartially(
|
||||
a.validator,
|
||||
event,
|
||||
visibility,
|
||||
routingIdentifier,
|
||||
objectIdentifier)
|
||||
routableIdentifier)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
@ -144,9 +161,9 @@ func (a *routableAuditApi) ValidateAndSerialize(
|
|||
// Send implements AuditApi.Send
|
||||
func (a *routableAuditApi) Send(
|
||||
ctx context.Context,
|
||||
routingIdentifier *RoutingIdentifier,
|
||||
routableIdentifier *RoutableIdentifier,
|
||||
cloudEvent *CloudEvent,
|
||||
) error {
|
||||
|
||||
return send(a.topicNameResolver, a.messagingApi, ctx, routingIdentifier, cloudEvent)
|
||||
return send(a.topicNameResolver, a.messagingApi, ctx, routableIdentifier, cloudEvent)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
defer solaceContainer.Stop()
|
||||
|
||||
// Instantiate the messaging api
|
||||
messagingApi, err := messaging.NewAmqpMessagingApi(messaging.AmqpConfig{URL: solaceContainer.AmqpConnectionString})
|
||||
messagingApi, err := messaging.NewAmqpApi(messaging.AmqpConfig{URL: solaceContainer.AmqpConnectionString})
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Validator
|
||||
|
|
@ -40,10 +40,12 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
// Instantiate the audit api
|
||||
organizationTopicPrefix := "org"
|
||||
projectTopicPrefix := "project"
|
||||
folderTopicPrefix := "folder"
|
||||
systemTopicName := "topic://system/admin-events"
|
||||
auditApi, err := newRoutableAuditApi(
|
||||
messagingApi,
|
||||
topicNameConfig{
|
||||
FolderTopicPrefix: folderTopicPrefix,
|
||||
OrganizationTopicPrefix: organizationTopicPrefix,
|
||||
ProjectTopicPrefix: projectTopicPrefix,
|
||||
SystemTopicName: systemTopicName},
|
||||
|
|
@ -61,7 +63,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "org/*"))
|
||||
|
||||
// Instantiate test data
|
||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
|
||||
// Log the event to solace
|
||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||
|
|
@ -69,8 +71,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
ctx,
|
||||
event,
|
||||
visibility,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
NewRoutableIdentifier(objectIdentifier),
|
||||
))
|
||||
|
||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||
|
|
@ -80,7 +81,6 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
t,
|
||||
organizationTopicPrefix,
|
||||
message,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
event,
|
||||
"stackit.resourcemanager.v2.organization.created",
|
||||
|
|
@ -95,8 +95,8 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "org/*"))
|
||||
|
||||
// Instantiate test data
|
||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
topicName := fmt.Sprintf("org/%s", routingIdentifier.Identifier)
|
||||
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
topicName := fmt.Sprintf("org/%s", objectIdentifier.Identifier)
|
||||
assert.NoError(
|
||||
t,
|
||||
solaceContainer.TopicSubscriptionCreate(ctx, queueName, topicName))
|
||||
|
|
@ -108,8 +108,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
ctx,
|
||||
event,
|
||||
visibility,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
NewRoutableIdentifier(objectIdentifier),
|
||||
))
|
||||
|
||||
// Receive the event from solace
|
||||
|
|
@ -120,7 +119,6 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
t,
|
||||
organizationTopicPrefix,
|
||||
message,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
event,
|
||||
"stackit.resourcemanager.v2.organization.created",
|
||||
|
|
@ -134,10 +132,10 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
// Create the queue and topic subscription in solace
|
||||
queueName := "folder-event-public"
|
||||
assert.NoError(t, solaceContainer.QueueCreate(ctx, queueName))
|
||||
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "org/*"))
|
||||
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "folder/*"))
|
||||
|
||||
// Instantiate test data
|
||||
event, routingIdentifier, objectIdentifier := NewFolderAuditEvent(nil)
|
||||
event, objectIdentifier := NewFolderAuditEvent(nil)
|
||||
|
||||
// Log the event to solace
|
||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||
|
|
@ -145,8 +143,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
ctx,
|
||||
event,
|
||||
visibility,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
NewRoutableIdentifier(objectIdentifier),
|
||||
))
|
||||
|
||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||
|
|
@ -154,9 +151,8 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
|
||||
validateSentEvent(
|
||||
t,
|
||||
organizationTopicPrefix,
|
||||
folderTopicPrefix,
|
||||
message,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
event,
|
||||
"stackit.resourcemanager.v2.folder.created",
|
||||
|
|
@ -168,11 +164,11 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
|
||||
queueName := "folder-event-private"
|
||||
assert.NoError(t, solaceContainer.QueueCreate(ctx, queueName))
|
||||
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "org/*"))
|
||||
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "folder/*"))
|
||||
|
||||
// Instantiate test data
|
||||
event, routingIdentifier, objectIdentifier := NewFolderAuditEvent(nil)
|
||||
topicName := fmt.Sprintf("org/%s", routingIdentifier.Identifier)
|
||||
event, objectIdentifier := NewFolderAuditEvent(nil)
|
||||
topicName := fmt.Sprintf("folder/%s", objectIdentifier.Identifier)
|
||||
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, topicName))
|
||||
|
||||
// Log the event to solace
|
||||
|
|
@ -182,8 +178,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
ctx,
|
||||
event,
|
||||
visibility,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
NewRoutableIdentifier(objectIdentifier),
|
||||
))
|
||||
|
||||
// Receive the event from solace
|
||||
|
|
@ -192,9 +187,8 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
|
||||
validateSentEvent(
|
||||
t,
|
||||
organizationTopicPrefix,
|
||||
folderTopicPrefix,
|
||||
message,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
event,
|
||||
"stackit.resourcemanager.v2.folder.created",
|
||||
|
|
@ -210,7 +204,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "project/*"))
|
||||
|
||||
// Instantiate test data
|
||||
event, routingIdentifier, objectIdentifier := NewProjectAuditEvent(nil)
|
||||
event, objectIdentifier := NewProjectAuditEvent(nil)
|
||||
|
||||
// Log the event to solace
|
||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||
|
|
@ -219,8 +213,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
ctx,
|
||||
event,
|
||||
visibility,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
NewRoutableIdentifier(objectIdentifier),
|
||||
))
|
||||
|
||||
// Receive the event from solace
|
||||
|
|
@ -231,7 +224,6 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
t,
|
||||
projectTopicPrefix,
|
||||
message,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
event,
|
||||
"stackit.resourcemanager.v2.project.created",
|
||||
|
|
@ -246,7 +238,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "project/*"))
|
||||
|
||||
// Instantiate test data
|
||||
event, routingIdentifier, objectIdentifier := NewProjectAuditEvent(nil)
|
||||
event, objectIdentifier := NewProjectAuditEvent(nil)
|
||||
|
||||
// Log the event to solace
|
||||
visibility := auditV1.Visibility_VISIBILITY_PRIVATE
|
||||
|
|
@ -255,8 +247,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
ctx,
|
||||
event,
|
||||
visibility,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
NewRoutableIdentifier(objectIdentifier),
|
||||
))
|
||||
|
||||
// Receive the event from solace
|
||||
|
|
@ -267,7 +258,6 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
t,
|
||||
projectTopicPrefix,
|
||||
message,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
event,
|
||||
"stackit.resourcemanager.v2.project.created",
|
||||
|
|
@ -292,8 +282,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
ctx,
|
||||
event,
|
||||
visibility,
|
||||
nil,
|
||||
nil,
|
||||
RoutableSystemIdentifier,
|
||||
))
|
||||
|
||||
// Receive the event from solace
|
||||
|
|
@ -317,8 +306,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
validateRoutableEventPayload(
|
||||
t,
|
||||
message.Data[0],
|
||||
nil,
|
||||
nil,
|
||||
SystemIdentifier,
|
||||
event,
|
||||
"stackit.resourcemanager.v2.system.changed",
|
||||
visibility)
|
||||
|
|
@ -334,7 +322,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "org/*"))
|
||||
|
||||
// Instantiate test data
|
||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||
|
||||
// Log the event to solace
|
||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||
|
|
@ -342,8 +330,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
ctx,
|
||||
event,
|
||||
visibility,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
NewRoutableIdentifier(objectIdentifier),
|
||||
))
|
||||
|
||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||
|
|
@ -353,7 +340,6 @@ func TestRoutableAuditApi(t *testing.T) {
|
|||
t,
|
||||
organizationTopicPrefix,
|
||||
message,
|
||||
routingIdentifier,
|
||||
objectIdentifier,
|
||||
event,
|
||||
"stackit.resourcemanager.v2.organization.created",
|
||||
|
|
@ -365,7 +351,6 @@ func validateSentEvent(
|
|||
t *testing.T,
|
||||
topicPrefix string,
|
||||
message *amqp.Message,
|
||||
routingIdentifier *RoutingIdentifier,
|
||||
objectIdentifier *auditV1.ObjectIdentifier,
|
||||
event *auditV1.AuditLogEntry,
|
||||
eventName string,
|
||||
|
|
@ -374,7 +359,7 @@ func validateSentEvent(
|
|||
|
||||
// Check topic name
|
||||
assert.Equal(t,
|
||||
fmt.Sprintf("topic://%s/%s", topicPrefix, routingIdentifier.Identifier),
|
||||
fmt.Sprintf("topic://%s/%s", topicPrefix, objectIdentifier.Identifier),
|
||||
*message.Properties.To)
|
||||
|
||||
// Check cloud event properties
|
||||
|
|
@ -389,13 +374,12 @@ func validateSentEvent(
|
|||
|
||||
// Check deserialized message
|
||||
validateRoutableEventPayload(
|
||||
t, message.Data[0], routingIdentifier, objectIdentifier, event, eventName, visibility)
|
||||
t, message.Data[0], objectIdentifier, event, eventName, visibility)
|
||||
}
|
||||
|
||||
func validateRoutableEventPayload(
|
||||
t *testing.T,
|
||||
payload []byte,
|
||||
routingIdentifier *RoutingIdentifier,
|
||||
objectIdentifier *auditV1.ObjectIdentifier,
|
||||
event *auditV1.AuditLogEntry,
|
||||
eventName string,
|
||||
|
|
@ -409,28 +393,7 @@ func validateRoutableEventPayload(
|
|||
assert.Equal(t, eventName, routableAuditEvent.EventName)
|
||||
assert.Equal(t, visibility, routableAuditEvent.Visibility)
|
||||
|
||||
switch reference := routableAuditEvent.ResourceReference.(type) {
|
||||
case *auditV1.RoutableAuditEvent_ObjectIdentifier:
|
||||
assert.True(t, proto.Equal(objectIdentifier, reference.ObjectIdentifier))
|
||||
|
||||
switch routingIdentifier.Type {
|
||||
case RoutingIdentifierTypeOrganization:
|
||||
if objectIdentifier.Type == auditV1.ObjectType_OBJECT_TYPE_ORGANIZATION {
|
||||
assert.Equal(t, routingIdentifier.Identifier.String(), reference.ObjectIdentifier.Identifier)
|
||||
}
|
||||
case RoutingIdentifierTypeProject:
|
||||
assert.Equal(t, routingIdentifier.Identifier.String(), reference.ObjectIdentifier.Identifier)
|
||||
assert.Equal(t, auditV1.ObjectType_OBJECT_TYPE_PROJECT, reference.ObjectIdentifier.Type)
|
||||
default:
|
||||
assert.Fail(t, "Routing identifier type not expected")
|
||||
}
|
||||
case *auditV1.RoutableAuditEvent_ObjectName:
|
||||
assert.Nil(t, objectIdentifier)
|
||||
assert.Nil(t, routingIdentifier)
|
||||
assert.Equal(t, auditV1.ObjectName_OBJECT_NAME_SYSTEM, reference.ObjectName)
|
||||
default:
|
||||
assert.Fail(t, "Object name not expected")
|
||||
}
|
||||
assert.True(t, proto.Equal(objectIdentifier, routableAuditEvent.ObjectIdentifier))
|
||||
|
||||
var auditEvent auditV1.AuditLogEntry
|
||||
switch data := routableAuditEvent.Data.(type) {
|
||||
|
|
@ -446,7 +409,7 @@ func validateRoutableEventPayload(
|
|||
|
||||
func TestRoutableTopicNameResolver_Resolve_UnsupportedIdentifierType(t *testing.T) {
|
||||
resolver := routableTopicNameResolver{}
|
||||
_, err := resolver.Resolve(&RoutingIdentifier{Type: 2})
|
||||
_, err := resolver.Resolve(NewRoutableIdentifier(&auditV1.ObjectIdentifier{Type: "unsupported"}))
|
||||
assert.ErrorIs(t, err, ErrUnsupportedObjectIdentifierType)
|
||||
}
|
||||
|
||||
|
|
@ -466,7 +429,7 @@ func TestRoutableAuditApi_ValidateAndSerialize_ValidationFailed(t *testing.T) {
|
|||
auditApi := routableAuditApi{validator: &protobufValidator}
|
||||
|
||||
event := NewSystemAuditEvent(nil)
|
||||
_, err := auditApi.ValidateAndSerialize(event, auditV1.Visibility_VISIBILITY_PUBLIC, nil, nil)
|
||||
_, err := auditApi.ValidateAndSerialize(event, auditV1.Visibility_VISIBILITY_PUBLIC, RoutableSystemIdentifier)
|
||||
assert.ErrorIs(t, err, expectedError)
|
||||
}
|
||||
|
||||
|
|
@ -480,12 +443,12 @@ func TestRoutableAuditApi_Log_ValidationFailed(t *testing.T) {
|
|||
auditApi := routableAuditApi{validator: &protobufValidator}
|
||||
|
||||
event := NewSystemAuditEvent(nil)
|
||||
err := auditApi.Log(context.Background(), event, auditV1.Visibility_VISIBILITY_PUBLIC, nil, nil)
|
||||
err := auditApi.Log(context.Background(), event, auditV1.Visibility_VISIBILITY_PUBLIC, RoutableSystemIdentifier)
|
||||
assert.ErrorIs(t, err, expectedError)
|
||||
}
|
||||
|
||||
func TestRoutableAuditApi_Log_NilEvent(t *testing.T) {
|
||||
auditApi := routableAuditApi{}
|
||||
err := auditApi.Log(context.Background(), nil, auditV1.Visibility_VISIBILITY_PUBLIC, nil, nil)
|
||||
err := auditApi.Log(context.Background(), nil, auditV1.Visibility_VISIBILITY_PUBLIC, RoutableSystemIdentifier)
|
||||
assert.ErrorIs(t, err, ErrEventNil)
|
||||
}
|
||||
|
|
|
|||
53
audit/api/api_routable_types.go
Normal file
53
audit/api/api_routable_types.go
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
package api
|
||||
|
||||
const (
|
||||
SingularTypeSystem SingularType = "system"
|
||||
SingularTypeOrganization SingularType = "organization"
|
||||
SingularTypeFolder SingularType = "folder"
|
||||
SingularTypeProject SingularType = "project"
|
||||
|
||||
PluralTypeTest PluralType = "test"
|
||||
PluralTypeSystem PluralType = "system"
|
||||
PluralTypeOrganization PluralType = "organizations"
|
||||
PluralTypeFolder PluralType = "folders"
|
||||
PluralTypeProject PluralType = "projects"
|
||||
)
|
||||
|
||||
func AsPluralType(value string) PluralType {
|
||||
return PluralType(value)
|
||||
}
|
||||
|
||||
func SingularTypeFromPlural(pluralType PluralType) (SingularType, error) {
|
||||
switch pluralType {
|
||||
case PluralTypeOrganization:
|
||||
return SingularTypeOrganization, nil
|
||||
case PluralTypeFolder:
|
||||
return SingularTypeFolder, nil
|
||||
case PluralTypeProject:
|
||||
return SingularTypeProject, nil
|
||||
case PluralTypeSystem:
|
||||
return SingularTypeSystem, nil
|
||||
default:
|
||||
return "", ErrUnknownPluralType
|
||||
}
|
||||
}
|
||||
|
||||
func AsSingularType(value string) SingularType {
|
||||
return SingularType(value)
|
||||
}
|
||||
|
||||
func IsSupportedSingularType(singularType SingularType) error {
|
||||
switch singularType {
|
||||
case SingularTypeOrganization:
|
||||
fallthrough
|
||||
case SingularTypeFolder:
|
||||
fallthrough
|
||||
case SingularTypeProject:
|
||||
fallthrough
|
||||
case SingularTypeSystem:
|
||||
return nil
|
||||
default:
|
||||
return ErrUnknownSingularType
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -15,11 +15,9 @@ import (
|
|||
func NewOrganizationAuditEvent(
|
||||
customization *func(
|
||||
*auditV1.AuditLogEntry,
|
||||
*RoutingIdentifier,
|
||||
*auditV1.ObjectIdentifier,
|
||||
)) (
|
||||
*auditV1.AuditLogEntry,
|
||||
*RoutingIdentifier,
|
||||
*auditV1.ObjectIdentifier,
|
||||
) {
|
||||
|
||||
|
|
@ -36,11 +34,11 @@ func NewOrganizationAuditEvent(
|
|||
labels := make(map[string]string)
|
||||
labels["label1"] = "value1"
|
||||
auditEvent := &auditV1.AuditLogEntry{
|
||||
LogName: fmt.Sprintf("organizations/%s/logs/admin-activity", identifier),
|
||||
LogName: fmt.Sprintf("%s/%s/logs/%s", PluralTypeOrganization, identifier, EventTypeAdminActivity),
|
||||
ProtoPayload: &auditV1.AuditLog{
|
||||
ServiceName: "resource-manager",
|
||||
MethodName: "stackit.resourcemanager.v2.organization.created",
|
||||
ResourceName: fmt.Sprintf("organizations/%s", identifier),
|
||||
ResourceName: fmt.Sprintf("%s/%s", PluralTypeOrganization, identifier),
|
||||
AuthenticationInfo: &auditV1.AuthenticationInfo{
|
||||
PrincipalId: uuid.NewString(),
|
||||
PrincipalEmail: "user@example.com",
|
||||
|
|
@ -48,7 +46,7 @@ func NewOrganizationAuditEvent(
|
|||
ServiceAccountDelegationInfo: nil,
|
||||
},
|
||||
AuthorizationInfo: []*auditV1.AuthorizationInfo{{
|
||||
Resource: fmt.Sprintf("organizations/%s", identifier),
|
||||
Resource: fmt.Sprintf("%s/%s", PluralTypeOrganization, identifier),
|
||||
Permission: &permission,
|
||||
Granted: &permissionGranted,
|
||||
}},
|
||||
|
|
@ -91,31 +89,24 @@ func NewOrganizationAuditEvent(
|
|||
TraceState: nil,
|
||||
}
|
||||
|
||||
routingIdentifier := &RoutingIdentifier{
|
||||
Identifier: identifier,
|
||||
Type: RoutingIdentifierTypeOrganization,
|
||||
}
|
||||
|
||||
objectIdentifier := &auditV1.ObjectIdentifier{
|
||||
Identifier: identifier.String(),
|
||||
Type: auditV1.ObjectType_OBJECT_TYPE_ORGANIZATION,
|
||||
Type: string(SingularTypeOrganization),
|
||||
}
|
||||
|
||||
if customization != nil {
|
||||
(*customization)(auditEvent, routingIdentifier, objectIdentifier)
|
||||
(*customization)(auditEvent, objectIdentifier)
|
||||
}
|
||||
|
||||
return auditEvent, routingIdentifier, objectIdentifier
|
||||
return auditEvent, objectIdentifier
|
||||
}
|
||||
|
||||
func NewFolderAuditEvent(
|
||||
customization *func(
|
||||
*auditV1.AuditLogEntry,
|
||||
*RoutingIdentifier,
|
||||
*auditV1.ObjectIdentifier,
|
||||
)) (
|
||||
*auditV1.AuditLogEntry,
|
||||
*RoutingIdentifier,
|
||||
*auditV1.ObjectIdentifier,
|
||||
) {
|
||||
|
||||
|
|
@ -132,11 +123,11 @@ func NewFolderAuditEvent(
|
|||
labels := make(map[string]string)
|
||||
labels["label1"] = "value1"
|
||||
auditEvent := &auditV1.AuditLogEntry{
|
||||
LogName: fmt.Sprintf("folders/%s/logs/admin-activity", identifier),
|
||||
LogName: fmt.Sprintf("%s/%s/logs/%s", PluralTypeFolder, identifier, EventTypeAdminActivity),
|
||||
ProtoPayload: &auditV1.AuditLog{
|
||||
ServiceName: "resource-manager",
|
||||
MethodName: "stackit.resourcemanager.v2.folder.created",
|
||||
ResourceName: fmt.Sprintf("folders/%s", identifier),
|
||||
ResourceName: fmt.Sprintf("%s/%s", PluralTypeFolder, identifier),
|
||||
AuthenticationInfo: &auditV1.AuthenticationInfo{
|
||||
PrincipalId: uuid.NewString(),
|
||||
PrincipalEmail: "user@example.com",
|
||||
|
|
@ -144,7 +135,7 @@ func NewFolderAuditEvent(
|
|||
ServiceAccountDelegationInfo: nil,
|
||||
},
|
||||
AuthorizationInfo: []*auditV1.AuthorizationInfo{{
|
||||
Resource: fmt.Sprintf("folders/%s", identifier),
|
||||
Resource: fmt.Sprintf("%s/%s", PluralTypeFolder, identifier),
|
||||
Permission: &permission,
|
||||
Granted: &permissionGranted,
|
||||
}},
|
||||
|
|
@ -187,31 +178,24 @@ func NewFolderAuditEvent(
|
|||
TraceState: nil,
|
||||
}
|
||||
|
||||
routingIdentifier := &RoutingIdentifier{
|
||||
Identifier: identifier,
|
||||
Type: RoutingIdentifierTypeOrganization,
|
||||
}
|
||||
|
||||
objectIdentifier := &auditV1.ObjectIdentifier{
|
||||
Identifier: identifier.String(),
|
||||
Type: auditV1.ObjectType_OBJECT_TYPE_FOLDER,
|
||||
Type: string(SingularTypeFolder),
|
||||
}
|
||||
|
||||
if customization != nil {
|
||||
(*customization)(auditEvent, routingIdentifier, objectIdentifier)
|
||||
(*customization)(auditEvent, objectIdentifier)
|
||||
}
|
||||
|
||||
return auditEvent, routingIdentifier, objectIdentifier
|
||||
return auditEvent, objectIdentifier
|
||||
}
|
||||
|
||||
func NewProjectAuditEvent(
|
||||
customization *func(
|
||||
*auditV1.AuditLogEntry,
|
||||
*RoutingIdentifier,
|
||||
*auditV1.ObjectIdentifier,
|
||||
)) (
|
||||
*auditV1.AuditLogEntry,
|
||||
*RoutingIdentifier,
|
||||
*auditV1.ObjectIdentifier,
|
||||
) {
|
||||
|
||||
|
|
@ -228,11 +212,11 @@ func NewProjectAuditEvent(
|
|||
labels := make(map[string]string)
|
||||
labels["label1"] = "value1"
|
||||
auditEvent := &auditV1.AuditLogEntry{
|
||||
LogName: fmt.Sprintf("projects/%s/logs/admin-activity", identifier),
|
||||
LogName: fmt.Sprintf("%s/%s/logs/%s", PluralTypeProject, identifier, EventTypeAdminActivity),
|
||||
ProtoPayload: &auditV1.AuditLog{
|
||||
ServiceName: "resource-manager",
|
||||
MethodName: "stackit.resourcemanager.v2.project.created",
|
||||
ResourceName: fmt.Sprintf("projects/%s", identifier),
|
||||
ResourceName: fmt.Sprintf("%s/%s", PluralTypeProject, identifier),
|
||||
AuthenticationInfo: &auditV1.AuthenticationInfo{
|
||||
PrincipalId: uuid.NewString(),
|
||||
PrincipalEmail: "user@example.com",
|
||||
|
|
@ -240,7 +224,7 @@ func NewProjectAuditEvent(
|
|||
ServiceAccountDelegationInfo: nil,
|
||||
},
|
||||
AuthorizationInfo: []*auditV1.AuthorizationInfo{{
|
||||
Resource: fmt.Sprintf("projects/%s", identifier),
|
||||
Resource: fmt.Sprintf("%s/%s", PluralTypeProject, identifier),
|
||||
Permission: &permission,
|
||||
Granted: &permissionGranted,
|
||||
}},
|
||||
|
|
@ -283,27 +267,22 @@ func NewProjectAuditEvent(
|
|||
TraceState: nil,
|
||||
}
|
||||
|
||||
routingIdentifier := &RoutingIdentifier{
|
||||
Identifier: identifier,
|
||||
Type: RoutingIdentifierTypeProject,
|
||||
}
|
||||
|
||||
objectIdentifier := &auditV1.ObjectIdentifier{
|
||||
Identifier: identifier.String(),
|
||||
Type: auditV1.ObjectType_OBJECT_TYPE_PROJECT,
|
||||
Type: string(SingularTypeProject),
|
||||
}
|
||||
|
||||
if customization != nil {
|
||||
(*customization)(auditEvent, routingIdentifier, objectIdentifier)
|
||||
(*customization)(auditEvent, objectIdentifier)
|
||||
}
|
||||
|
||||
return auditEvent, routingIdentifier, objectIdentifier
|
||||
return auditEvent, objectIdentifier
|
||||
}
|
||||
|
||||
func NewSystemAuditEvent(
|
||||
customization *func(*auditV1.AuditLogEntry)) *auditV1.AuditLogEntry {
|
||||
|
||||
identifier := uuid.New()
|
||||
identifier := uuid.Nil
|
||||
requestId := fmt.Sprintf("%s/1", identifier)
|
||||
claims, _ := structpb.NewStruct(map[string]interface{}{})
|
||||
request, _ := structpb.NewStruct(map[string]interface{}{})
|
||||
|
|
@ -317,11 +296,11 @@ func NewSystemAuditEvent(
|
|||
serviceAccountName := fmt.Sprintf("projects/%s/serviceAccounts/%s", identifier, serviceAccountId)
|
||||
delegationPrincipal := auditV1.ServiceAccountDelegationInfo{Authority: &auditV1.ServiceAccountDelegationInfo_SystemPrincipal_{}}
|
||||
auditEvent := &auditV1.AuditLogEntry{
|
||||
LogName: fmt.Sprintf("projects/%s/logs/system-event", identifier),
|
||||
LogName: fmt.Sprintf("%s/%s/logs/%s", PluralTypeSystem, identifier, EventTypeSystemEvent),
|
||||
ProtoPayload: &auditV1.AuditLog{
|
||||
ServiceName: "resource-manager",
|
||||
MethodName: "stackit.resourcemanager.v2.system.changed",
|
||||
ResourceName: fmt.Sprintf("projects/%s", identifier),
|
||||
ResourceName: fmt.Sprintf("%s/%s", PluralTypeSystem, identifier),
|
||||
AuthenticationInfo: &auditV1.AuthenticationInfo{
|
||||
PrincipalId: serviceAccountId,
|
||||
PrincipalEmail: "service-account@sa.stackit.cloud",
|
||||
|
|
@ -329,7 +308,7 @@ func NewSystemAuditEvent(
|
|||
ServiceAccountDelegationInfo: []*auditV1.ServiceAccountDelegationInfo{&delegationPrincipal},
|
||||
},
|
||||
AuthorizationInfo: []*auditV1.AuthorizationInfo{{
|
||||
Resource: fmt.Sprintf("projects/%s", identifier),
|
||||
Resource: fmt.Sprintf("%s/%s", PluralTypeSystem, identifier),
|
||||
Permission: nil,
|
||||
Granted: nil,
|
||||
}},
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ import (
|
|||
// Default connection timeout for the AMQP connection
|
||||
const connectionTimeoutSeconds = 10
|
||||
|
||||
// MessagingApi is an abstraction for a messaging system that can be used to send
|
||||
// Api is an abstraction for a messaging system that can be used to send
|
||||
// audit logs to the audit log system.
|
||||
type MessagingApi interface {
|
||||
type Api interface {
|
||||
|
||||
// Send method will send the given data to the specified topic synchronously.
|
||||
// Parameters:
|
||||
|
|
@ -61,28 +61,28 @@ type AmqpSender interface {
|
|||
Close(ctx context.Context) error
|
||||
}
|
||||
|
||||
// AmqpMessagingApi implements MessagingApi.
|
||||
type AmqpMessagingApi struct {
|
||||
// AmqpApi implements Api.
|
||||
type AmqpApi struct {
|
||||
config AmqpConfig
|
||||
connection *amqp.Conn
|
||||
session *AmqpSession
|
||||
}
|
||||
|
||||
func NewAmqpMessagingApi(amqpConfig AmqpConfig) (*MessagingApi, error) {
|
||||
amqpApi := &AmqpMessagingApi{config: amqpConfig}
|
||||
func NewAmqpApi(amqpConfig AmqpConfig) (*Api, error) {
|
||||
amqpApi := &AmqpApi{config: amqpConfig}
|
||||
|
||||
err := amqpApi.connect()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var messagingApi MessagingApi = amqpApi
|
||||
var messagingApi Api = amqpApi
|
||||
return &messagingApi, nil
|
||||
}
|
||||
|
||||
// connect opens a new connection and session to the AMQP messaging system.
|
||||
// The connection attempt will be cancelled after connectionTimeoutSeconds.
|
||||
func (a *AmqpMessagingApi) connect() error {
|
||||
func (a *AmqpApi) connect() error {
|
||||
slog.Info("connecting to messaging system")
|
||||
|
||||
// Set credentials if specified
|
||||
|
|
@ -122,9 +122,9 @@ func (a *AmqpMessagingApi) connect() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Send implements MessagingApi.Send.
|
||||
// Send implements Api.Send.
|
||||
// If errors occur the connection to the messaging system will be closed and re-established.
|
||||
func (a *AmqpMessagingApi) Send(ctx context.Context, topic string, data []byte, contentType string, applicationProperties map[string]any) error {
|
||||
func (a *AmqpApi) Send(ctx context.Context, topic string, data []byte, contentType string, applicationProperties map[string]any) error {
|
||||
err := a.trySend(ctx, topic, data, contentType, applicationProperties)
|
||||
if err == nil {
|
||||
return nil
|
||||
|
|
@ -142,7 +142,7 @@ func (a *AmqpMessagingApi) Send(ctx context.Context, topic string, data []byte,
|
|||
}
|
||||
|
||||
// trySend actually sends the given data as amqp.Message to the messaging system.
|
||||
func (a *AmqpMessagingApi) trySend(ctx context.Context, topic string, data []byte, contentType string, applicationProperties map[string]any) error {
|
||||
func (a *AmqpApi) trySend(ctx context.Context, topic string, data []byte, contentType string, applicationProperties map[string]any) error {
|
||||
if !strings.HasPrefix(topic, AmqpTopicPrefix) {
|
||||
return fmt.Errorf(
|
||||
"topic %q name lacks mandatory prefix %q",
|
||||
|
|
@ -179,7 +179,7 @@ func (a *AmqpMessagingApi) trySend(ctx context.Context, topic string, data []byt
|
|||
}
|
||||
|
||||
// resetConnection closes the current session and connection and reconnects to the messaging system.
|
||||
func (a *AmqpMessagingApi) resetConnection(ctx context.Context) error {
|
||||
func (a *AmqpApi) resetConnection(ctx context.Context) error {
|
||||
_ = (*a.session).Close(ctx)
|
||||
err := a.connection.Close()
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -45,11 +45,11 @@ func (m *AmqpSenderMock) Close(ctx context.Context) error {
|
|||
}
|
||||
|
||||
func Test_NewAmqpMessagingApi(t *testing.T) {
|
||||
_, err := NewAmqpMessagingApi(AmqpConfig{URL: "not-handled-protocol://localhost:5672"})
|
||||
_, err := NewAmqpApi(AmqpConfig{URL: "not-handled-protocol://localhost:5672"})
|
||||
assert.EqualError(t, err, "unsupported scheme \"not-handled-protocol\"")
|
||||
}
|
||||
|
||||
func TestAmqpMessagingApi_Send(t *testing.T) {
|
||||
func Test_AmqpMessagingApi_Send(t *testing.T) {
|
||||
// Specify test timeout
|
||||
ctx, cancelFn := context.WithTimeout(context.Background(), 120*time.Second)
|
||||
defer cancelFn()
|
||||
|
|
@ -62,7 +62,7 @@ func TestAmqpMessagingApi_Send(t *testing.T) {
|
|||
t.Run("Missing topic prefix", func(t *testing.T) {
|
||||
defer solaceContainer.StopOnError()
|
||||
|
||||
api, err := NewAmqpMessagingApi(AmqpConfig{URL: solaceContainer.AmqpConnectionString})
|
||||
api, err := NewAmqpApi(AmqpConfig{URL: solaceContainer.AmqpConnectionString})
|
||||
assert.NoError(t, err)
|
||||
|
||||
err = (*api).Send(ctx, "topic-name", []byte{}, "application/json", make(map[string]any))
|
||||
|
|
@ -80,7 +80,7 @@ func TestAmqpMessagingApi_Send(t *testing.T) {
|
|||
topicName := fmt.Sprintf("topic://auditlog/%s", "amqp-no-new-sender")
|
||||
assert.NoError(t, solaceContainer.ValidateTopicName(topicSubscriptionTopicPattern, topicName))
|
||||
|
||||
api := &AmqpMessagingApi{config: AmqpConfig{URL: solaceContainer.AmqpConnectionString}}
|
||||
api := &AmqpApi{config: AmqpConfig{URL: solaceContainer.AmqpConnectionString}}
|
||||
err := api.connect()
|
||||
assert.NoError(t, err)
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ func TestAmqpMessagingApi_Send(t *testing.T) {
|
|||
topicName := fmt.Sprintf("topic://auditlog/%s", "amqp-sender-error")
|
||||
assert.NoError(t, solaceContainer.ValidateTopicName(topicSubscriptionTopicPattern, topicName))
|
||||
|
||||
api := &AmqpMessagingApi{config: AmqpConfig{URL: solaceContainer.AmqpConnectionString}}
|
||||
api := &AmqpApi{config: AmqpConfig{URL: solaceContainer.AmqpConnectionString}}
|
||||
err := api.connect()
|
||||
assert.NoError(t, err)
|
||||
|
||||
|
|
|
|||
|
|
@ -116,9 +116,10 @@ type AuditLogEntry struct {
|
|||
|
||||
// The resource name of the log to which this log entry belongs.
|
||||
//
|
||||
// Format: <type>/<identifier>/logs/<eventType>
|
||||
// Format: <pluralType>/<identifier>/logs/<eventType>
|
||||
// Where:
|
||||
//
|
||||
// Plural-Types: One from the list of supported data types
|
||||
// Event-Types: admin-activity, system-event, policy-denied, data-access
|
||||
//
|
||||
// Examples:
|
||||
|
|
@ -299,10 +300,16 @@ type AuditLog struct {
|
|||
//
|
||||
// Required: true
|
||||
ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
|
||||
// TODO renaming into operation?
|
||||
// TODO rename into operation?
|
||||
// The name of the service method or operation.
|
||||
//
|
||||
// Format: stackit.<product>.<version>.<type>.<operation>
|
||||
// Format: stackit.<product>.<version>.<singularType>.<operation>
|
||||
// Where:
|
||||
//
|
||||
// Product: The name of the service without dashes in lowercase
|
||||
// Version: The API version
|
||||
// Singular-Type: One from the list of supported data types
|
||||
// Operation: The name of the operation without dashes in lowercase
|
||||
//
|
||||
// Examples:
|
||||
//
|
||||
|
|
@ -315,9 +322,11 @@ type AuditLog struct {
|
|||
// The resource or collection that is the target of the operation.
|
||||
// The name is a scheme-less URI, not including the API service name.
|
||||
//
|
||||
// Format: <type>/<id>[/locations/<region-zone>][/<details>]
|
||||
// Format: <pluralType>/<id>[/locations/<region-zone>][/<details>]
|
||||
// Where:
|
||||
//
|
||||
// Plural-Type: One from the list of supported data types
|
||||
// Id: The identifier of the object
|
||||
// Region-Zone: Optional region and zone id. If both, separated with a - (dash). Alternatively _ (underscore).
|
||||
// Details: Optional "<key>/<id>" pairs
|
||||
//
|
||||
|
|
@ -499,7 +508,7 @@ type AuthenticationInfo struct {
|
|||
// The name of the service account used to create or exchange
|
||||
// credentials for authenticating the service account making the request.
|
||||
//
|
||||
// Format: projects/<id>/serviceAccounts/<account>
|
||||
// Format: projects/<id>/serviceAccounts/<accountId>
|
||||
//
|
||||
// Examples:
|
||||
//
|
||||
|
|
@ -585,9 +594,11 @@ type AuthorizationInfo struct {
|
|||
|
||||
// The resource being accessed, as a REST-style string.
|
||||
//
|
||||
// Format: <type>/<id>[/locations/<region-zone>][/<details>]
|
||||
// Format: <pluralType>/<id>[/locations/<region-zone>][/<details>]
|
||||
// Where:
|
||||
//
|
||||
// Plural-Type: One from the list of supported data types
|
||||
// Id: The identifier of the object
|
||||
// Region-Zone: Optional region and zone id. If both, separated with a - (dash). Alternatively _ (underscore).
|
||||
// Details: Optional "<key>/<id>" pairs
|
||||
//
|
||||
|
|
@ -671,8 +682,7 @@ func (x *AuthorizationInfo) GetGranted() bool {
|
|||
// This message defines the standard attribute vocabulary for STACKIT APIs.
|
||||
//
|
||||
// An attribute is a piece of metadata that describes an activity on a network
|
||||
// service. For example, the size of an HTTP request, or the status code of
|
||||
// an HTTP response.
|
||||
// service.
|
||||
type AttributeContext struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
|
@ -728,7 +738,7 @@ type RequestMetadata struct {
|
|||
// Examples:
|
||||
//
|
||||
// "OpenAPI-Generator/1.0.0/go"
|
||||
// -> The request was made by the STACKIT SDK GO client or STACKIT CLI
|
||||
// -> The request was made by the STACKIT SDK GO client, STACKIT CLI or Terraform provider
|
||||
// "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
|
||||
// -> The request was made by a web browser.
|
||||
//
|
||||
|
|
@ -804,6 +814,11 @@ type ResponseStatus struct {
|
|||
|
||||
// The http or gRPC status code.
|
||||
//
|
||||
// Examples:
|
||||
//
|
||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
|
||||
// https://grpc.github.io/grpc/core/md_doc_statuscodes.html
|
||||
//
|
||||
// Required: true
|
||||
Code *wrapperspb.Int32Value `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
|
||||
// Short description of the error
|
||||
|
|
@ -1241,6 +1256,7 @@ func (x *AttributeContext_Request) GetAuth() *AttributeContext_Auth {
|
|||
|
||||
// This message defines attributes for a typical network response. It
|
||||
// generally models semantics of an HTTP response.
|
||||
// TODO do we need another status code attribute in the Response?
|
||||
type AttributeContext_Response struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
|
@ -1249,18 +1265,18 @@ type AttributeContext_Response struct {
|
|||
// The HTTP response size in bytes.
|
||||
//
|
||||
// Required: false
|
||||
Size *wrapperspb.Int64Value `protobuf:"bytes,2,opt,name=size,proto3,oneof" json:"size,omitempty"`
|
||||
Size *wrapperspb.Int64Value `protobuf:"bytes,1,opt,name=size,proto3,oneof" json:"size,omitempty"`
|
||||
// The HTTP response headers. If multiple headers share the same key, they
|
||||
// must be merged according to HTTP spec. All header keys must be
|
||||
// lowercased, because HTTP header keys are case-insensitive.
|
||||
//
|
||||
// Required: true
|
||||
Headers map[string]string `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
Headers map[string]string `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// The timestamp when the "destination" service generates the first byte of
|
||||
// the response.
|
||||
//
|
||||
// Required: true
|
||||
Time *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=time,proto3" json:"time,omitempty"`
|
||||
Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=time,proto3" json:"time,omitempty"`
|
||||
}
|
||||
|
||||
func (x *AttributeContext_Response) Reset() {
|
||||
|
|
@ -1455,305 +1471,304 @@ var file_audit_v1_audit_event_proto_rawDesc = []byte{
|
|||
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77,
|
||||
0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x61,
|
||||
0x75, 0x64, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x06, 0x0a, 0x0d, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f,
|
||||
0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x77, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x5c, 0xba, 0x48, 0x59, 0xc8, 0x01, 0x01,
|
||||
0x72, 0x54, 0x32, 0x52, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x2b, 0x2f, 0x5b, 0x61, 0x2d, 0x7a,
|
||||
0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x2b, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x28, 0x3f, 0x3a, 0x61,
|
||||
0x64, 0x6d, 0x69, 0x6e, 0x2d, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x7c, 0x73, 0x79,
|
||||
0x73, 0x74, 0x65, 0x6d, 0x2d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x7c, 0x70, 0x6f, 0x6c, 0x69, 0x63,
|
||||
0x79, 0x2d, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x7c, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x61, 0x63,
|
||||
0x63, 0x65, 0x73, 0x73, 0x29, 0x24, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12,
|
||||
0x3f, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8,
|
||||
0x01, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
|
||||
0x12, 0x4b, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x2e, 0xba, 0x48, 0x2b, 0xc8, 0x01, 0x01, 0x72, 0x26, 0x32, 0x24, 0x5e,
|
||||
0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b,
|
||||
0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x2b, 0x2f, 0x5b, 0x30, 0x2d, 0x39,
|
||||
0x5d, 0x2b, 0x24, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, 0x43, 0x0a,
|
||||
0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e,
|
||||
0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f,
|
||||
0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65,
|
||||
0x6c, 0x73, 0x12, 0x33, 0x0a, 0x0e, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72,
|
||||
0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73,
|
||||
0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
|
||||
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0xb2, 0x01,
|
||||
0x02, 0x38, 0x01, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3e,
|
||||
0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x15, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x53,
|
||||
0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82,
|
||||
0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x52,
|
||||
0x0a, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x08,
|
||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xba, 0x48, 0x27, 0x72, 0x25, 0x32, 0x23, 0x5e, 0x5b, 0x30,
|
||||
0x2d, 0x39, 0x5d, 0x2b, 0x2d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2d, 0x5b,
|
||||
0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2d, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24,
|
||||
0x48, 0x01, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x88,
|
||||
0x01, 0x01, 0x12, 0x65, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74,
|
||||
0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3f, 0xba, 0x48, 0x3c, 0x72, 0x3a, 0x32, 0x38,
|
||||
0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x3d, 0x5b, 0x61, 0x2d,
|
||||
0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x28, 0x3f, 0x3a, 0x2c, 0x5b, 0x61, 0x2d,
|
||||
0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x3d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d,
|
||||
0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x29, 0x2a, 0x48, 0x02, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x63,
|
||||
0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62,
|
||||
0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
|
||||
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x3a, 0x02, 0x38, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x74, 0x72, 0x61, 0x63,
|
||||
0x65, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x74, 0x72, 0x61,
|
||||
0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x89, 0x07, 0x0a, 0x08, 0x41, 0x75, 0x64,
|
||||
0x69, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x2d, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07,
|
||||
0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x63, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x42, 0xba, 0x48, 0x3f, 0xc8, 0x01,
|
||||
0x01, 0x72, 0x3a, 0x32, 0x38, 0x5e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x69, 0x74, 0x5c, 0x2e, 0x5b,
|
||||
0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x5c, 0x2e, 0x76, 0x5b, 0x31, 0x2d, 0x39, 0x5d,
|
||||
0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2a, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d,
|
||||
0x2b, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x52, 0x0a, 0x6d,
|
||||
0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x8e, 0x01, 0x0a, 0x0d, 0x72, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x42, 0x69, 0xba, 0x48, 0x66, 0xc8, 0x01, 0x01, 0x72, 0x61, 0x32, 0x5f, 0x5e, 0x5b, 0x61,
|
||||
0x2d, 0x7a, 0x5d, 0x2b, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x2b, 0x28,
|
||||
0x3f, 0x3a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x28, 0x3f, 0x3a,
|
||||
0x28, 0x3f, 0x3a, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x28, 0x3f, 0x3a, 0x2d,
|
||||
0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x29, 0x3f, 0x29, 0x7c, 0x5f, 0x29, 0x29,
|
||||
0x3f, 0x28, 0x3f, 0x3a, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2f, 0x5b,
|
||||
0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x2b, 0x29, 0x2a, 0x24, 0x52, 0x0c, 0x72, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x55, 0x0a, 0x13, 0x61, 0x75,
|
||||
0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66,
|
||||
0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x12, 0x61,
|
||||
0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x12, 0x4a, 0x0a, 0x12, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e,
|
||||
0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
|
||||
0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x61, 0x75, 0x74, 0x68,
|
||||
0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4c, 0x0a,
|
||||
0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
|
||||
0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x07, 0x72,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53,
|
||||
0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x07, 0x72,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x12, 0x57, 0x0a, 0x12, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49,
|
||||
0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02,
|
||||
0x28, 0x00, 0x48, 0x00, 0x52, 0x10, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x08, 0x72, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f,
|
||||
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74,
|
||||
0x72, 0x75, 0x63, 0x74, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x72, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
|
||||
0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63,
|
||||
0x74, 0x48, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x88, 0x01, 0x01,
|
||||
0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6d, 0x65, 0x74, 0x61,
|
||||
0x64, 0x61, 0x74, 0x61, 0x22, 0xf4, 0x02, 0x0a, 0x12, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74,
|
||||
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x0c, 0x70,
|
||||
0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70,
|
||||
0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0f, 0x70, 0x72,
|
||||
0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x0d, 0xba, 0x48, 0x0a, 0xc8, 0x01, 0x01, 0x72, 0x05, 0x10, 0x01, 0x18,
|
||||
0xff, 0x01, 0x52, 0x0e, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x45, 0x6d, 0x61,
|
||||
0x69, 0x6c, 0x12, 0x6f, 0x0a, 0x14, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x42, 0x38, 0xba, 0x48, 0x35, 0x72, 0x33, 0x32, 0x31, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x2b,
|
||||
0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x2b, 0x2f, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x5b, 0x61, 0x2d, 0x7a,
|
||||
0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x2b, 0x24, 0x48, 0x00, 0x52, 0x12, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65,
|
||||
0x88, 0x01, 0x01, 0x12, 0x6d, 0x0a, 0x1f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61,
|
||||
0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x1c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xa3, 0x02, 0x0a, 0x11,
|
||||
0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x12, 0x85, 0x01, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x69, 0xba, 0x48, 0x66, 0xc8, 0x01, 0x01, 0x72, 0x61, 0x32, 0x5f,
|
||||
0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x2b, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d,
|
||||
0x5d, 0x2b, 0x28, 0x3f, 0x3a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
|
||||
0x28, 0x3f, 0x3a, 0x28, 0x3f, 0x3a, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x28,
|
||||
0x3f, 0x3a, 0x2d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x29, 0x3f, 0x29, 0x7c,
|
||||
0x5f, 0x29, 0x29, 0x3f, 0x28, 0x3f, 0x3a, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d,
|
||||
0x2b, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x2b, 0x29, 0x2a, 0x24, 0x52,
|
||||
0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0a, 0x70, 0x65, 0x72,
|
||||
0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xba,
|
||||
0x48, 0x24, 0x72, 0x22, 0x32, 0x20, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x2d, 0x5d, 0x2b, 0x28, 0x3f,
|
||||
0x3a, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x2d, 0x5d, 0x2b, 0x29, 0x2a, 0x5c, 0x2e, 0x5b, 0x61,
|
||||
0x2d, 0x7a, 0x2d, 0x5d, 0x2b, 0x24, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74,
|
||||
0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e,
|
||||
0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69,
|
||||
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65,
|
||||
0x64, 0x22, 0xa8, 0x08, 0x0a, 0x10, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43,
|
||||
0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x1a, 0xa8, 0x01, 0x0a, 0x04, 0x41, 0x75, 0x74, 0x68, 0x12,
|
||||
0x49, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x42, 0x2b, 0xba, 0x48, 0x28, 0xc8, 0x01, 0x01, 0x72, 0x23, 0x32, 0x21, 0x5e, 0x5b,
|
||||
0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x25, 0x2e, 0x5d, 0x2b, 0x2f, 0x5b,
|
||||
0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x25, 0x2e, 0x5d, 0x2b, 0x24, 0x52,
|
||||
0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75,
|
||||
0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61,
|
||||
0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x06, 0x63, 0x6c, 0x61, 0x69,
|
||||
0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63,
|
||||
0x74, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x06, 0x63, 0x6c, 0x61, 0x69, 0x6d,
|
||||
0x73, 0x1a, 0xc6, 0x04, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a,
|
||||
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x88,
|
||||
0x01, 0x01, 0x12, 0x22, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06,
|
||||
0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x51, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,
|
||||
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74,
|
||||
0x65, 0x78, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64,
|
||||
0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01,
|
||||
0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x0a, 0x04, 0x70, 0x61, 0x74,
|
||||
0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72,
|
||||
0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1e, 0x0a, 0x04, 0x68, 0x6f, 0x73,
|
||||
0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72,
|
||||
0x02, 0x10, 0x01, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x73, 0x63, 0x68,
|
||||
0x65, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01,
|
||||
0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x5c, 0x0a,
|
||||
0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x41, 0xba, 0x48,
|
||||
0x3e, 0x72, 0x3c, 0x32, 0x3a, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39,
|
||||
0x5d, 0x2b, 0x3d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x28,
|
||||
0x3f, 0x3a, 0x26, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x3d,
|
||||
0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x29, 0x2a, 0x24, 0x48,
|
||||
0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x04, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
|
||||
0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0xb2, 0x01, 0x02,
|
||||
0x38, 0x01, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8,
|
||||
0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
|
||||
0x12, 0x3b, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f,
|
||||
0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62,
|
||||
0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x42,
|
||||
0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x1a, 0x3a, 0x0a,
|
||||
0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64,
|
||||
0x42, 0x08, 0x0a, 0x06, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x1a, 0x9f, 0x02, 0x0a, 0x08, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x06,
|
||||
0x0a, 0x0d, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
|
||||
0x77, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x42, 0x5c, 0xba, 0x48, 0x59, 0xc8, 0x01, 0x01, 0x72, 0x54, 0x32, 0x52, 0x5e, 0x5b, 0x61,
|
||||
0x2d, 0x7a, 0x5d, 0x2b, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x2b, 0x2f,
|
||||
0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x28, 0x3f, 0x3a, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2d, 0x61, 0x63,
|
||||
0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x7c, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2d, 0x65, 0x76,
|
||||
0x65, 0x6e, 0x74, 0x7c, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2d, 0x64, 0x65, 0x6e, 0x69, 0x65,
|
||||
0x64, 0x7c, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x29, 0x24, 0x52,
|
||||
0x07, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x12, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74,
|
||||
0x4c, 0x6f, 0x67, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x4b, 0x0a, 0x09, 0x69, 0x6e, 0x73,
|
||||
0x65, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xba, 0x48,
|
||||
0x2b, 0xc8, 0x01, 0x01, 0x72, 0x26, 0x32, 0x24, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2f,
|
||||
0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d,
|
||||
0x39, 0x2d, 0x5d, 0x2b, 0x2f, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x52, 0x08, 0x69, 0x6e,
|
||||
0x73, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, 0x43, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73,
|
||||
0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2e,
|
||||
0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x06, 0xba, 0x48, 0x03,
|
||||
0xc8, 0x01, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x33, 0x0a, 0x0e, 0x63,
|
||||
0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0d,
|
||||
0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01,
|
||||
0x12, 0x45, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42,
|
||||
0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0xb2, 0x01, 0x02, 0x38, 0x01, 0x52, 0x09, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3e, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72,
|
||||
0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x61, 0x75, 0x64, 0x69,
|
||||
0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79,
|
||||
0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x73,
|
||||
0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x52, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65,
|
||||
0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xba,
|
||||
0x48, 0x27, 0x72, 0x25, 0x32, 0x23, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2d, 0x5b, 0x61,
|
||||
0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d,
|
||||
0x2b, 0x2d, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x48, 0x01, 0x52, 0x0b, 0x74, 0x72, 0x61,
|
||||
0x63, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x65, 0x0a, 0x0b, 0x74,
|
||||
0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09,
|
||||
0x42, 0x3f, 0xba, 0x48, 0x3c, 0x72, 0x3a, 0x32, 0x38, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a,
|
||||
0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x3d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39,
|
||||
0x5d, 0x2b, 0x28, 0x3f, 0x3a, 0x2c, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39,
|
||||
0x5d, 0x2b, 0x3d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x29,
|
||||
0x2a, 0x48, 0x02, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x88,
|
||||
0x01, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x11, 0x0a,
|
||||
0x0f, 0x5f, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64,
|
||||
0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e,
|
||||
0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74,
|
||||
0x65, 0x22, 0x89, 0x07, 0x0a, 0x08, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x2d,
|
||||
0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01,
|
||||
0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x63, 0x0a,
|
||||
0x0b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x42, 0x42, 0xba, 0x48, 0x3f, 0xc8, 0x01, 0x01, 0x72, 0x3a, 0x32, 0x38, 0x5e, 0x73,
|
||||
0x74, 0x61, 0x63, 0x6b, 0x69, 0x74, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d,
|
||||
0x2b, 0x5c, 0x2e, 0x76, 0x5b, 0x31, 0x2d, 0x39, 0x5d, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2a, 0x5c,
|
||||
0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a,
|
||||
0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, 0x61,
|
||||
0x6d, 0x65, 0x12, 0x8e, 0x01, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x69, 0xba, 0x48, 0x66, 0xc8,
|
||||
0x01, 0x01, 0x72, 0x61, 0x32, 0x5f, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x2b, 0x2f, 0x5b, 0x61,
|
||||
0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x2b, 0x28, 0x3f, 0x3a, 0x2f, 0x6c, 0x6f, 0x63, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x28, 0x3f, 0x3a, 0x28, 0x3f, 0x3a, 0x5b, 0x61, 0x2d, 0x7a,
|
||||
0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x28, 0x3f, 0x3a, 0x2d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39,
|
||||
0x5d, 0x2b, 0x29, 0x3f, 0x29, 0x7c, 0x5f, 0x29, 0x29, 0x3f, 0x28, 0x3f, 0x3a, 0x2f, 0x5b, 0x61,
|
||||
0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d,
|
||||
0x5d, 0x2b, 0x29, 0x2a, 0x24, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x12, 0x55, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x1c, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68,
|
||||
0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x06,
|
||||
0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x12, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69,
|
||||
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4a, 0x0a, 0x12, 0x61, 0x75,
|
||||
0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
|
||||
0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x52, 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4c, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x19, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03,
|
||||
0xc8, 0x01, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61,
|
||||
0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x06,
|
||||
0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x38, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x18, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01,
|
||||
0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x57, 0x0a, 0x12, 0x6e, 0x75, 0x6d,
|
||||
0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18,
|
||||
0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, 0x28, 0x00, 0x48, 0x00, 0x52, 0x04, 0x73,
|
||||
0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x52, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,
|
||||
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e,
|
||||
0x75, 0x65, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, 0x28, 0x00, 0x48, 0x00, 0x52, 0x10, 0x6e,
|
||||
0x75, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x88,
|
||||
0x01, 0x01, 0x12, 0x3b, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x0a,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x06, 0xba,
|
||||
0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x38, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x01, 0x52, 0x08, 0x6d, 0x65,
|
||||
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x6e, 0x75,
|
||||
0x6d, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73,
|
||||
0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xf4, 0x02,
|
||||
0x0a, 0x12, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61,
|
||||
0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8,
|
||||
0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61,
|
||||
0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c,
|
||||
0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xba, 0x48,
|
||||
0x0a, 0xc8, 0x01, 0x01, 0x72, 0x05, 0x10, 0x01, 0x18, 0xff, 0x01, 0x52, 0x0e, 0x70, 0x72, 0x69,
|
||||
0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x6f, 0x0a, 0x14, 0x73,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x38, 0xba, 0x48, 0x35, 0x72, 0x33,
|
||||
0x32, 0x31, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x2b, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d,
|
||||
0x39, 0x2d, 0x5d, 0x2b, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x73, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d,
|
||||
0x5d, 0x2b, 0x24, 0x48, 0x00, 0x52, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x6d, 0x0a, 0x1f,
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f,
|
||||
0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18,
|
||||
0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44,
|
||||
0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x1c, 0x73,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x17, 0x0a, 0x15, 0x5f,
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x22, 0xa3, 0x02, 0x0a, 0x11, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
|
||||
0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x85, 0x01, 0x0a, 0x08, 0x72,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x69, 0xba,
|
||||
0x48, 0x66, 0xc8, 0x01, 0x01, 0x72, 0x61, 0x32, 0x5f, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x2b,
|
||||
0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x2b, 0x28, 0x3f, 0x3a, 0x2f, 0x6c,
|
||||
0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x28, 0x3f, 0x3a, 0x28, 0x3f, 0x3a, 0x5b,
|
||||
0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x28, 0x3f, 0x3a, 0x2d, 0x5b, 0x61, 0x2d, 0x7a,
|
||||
0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x29, 0x3f, 0x29, 0x7c, 0x5f, 0x29, 0x29, 0x3f, 0x28, 0x3f, 0x3a,
|
||||
0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30,
|
||||
0x2d, 0x39, 0x2d, 0x5d, 0x2b, 0x29, 0x2a, 0x24, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xba, 0x48, 0x24, 0x72, 0x22, 0x32, 0x20, 0x5e,
|
||||
0x5b, 0x61, 0x2d, 0x7a, 0x2d, 0x5d, 0x2b, 0x28, 0x3f, 0x3a, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a,
|
||||
0x2d, 0x5d, 0x2b, 0x29, 0x2a, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x2d, 0x5d, 0x2b, 0x24, 0x48,
|
||||
0x00, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01,
|
||||
0x12, 0x1d, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x08, 0x48, 0x01, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x42,
|
||||
0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0a,
|
||||
0x0a, 0x08, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x22, 0xa8, 0x08, 0x0a, 0x10, 0x41,
|
||||
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x1a,
|
||||
0xa8, 0x01, 0x0a, 0x04, 0x41, 0x75, 0x74, 0x68, 0x12, 0x49, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e,
|
||||
0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xba, 0x48, 0x28,
|
||||
0xc8, 0x01, 0x01, 0x72, 0x23, 0x32, 0x21, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30,
|
||||
0x2d, 0x39, 0x2d, 0x25, 0x2e, 0x5d, 0x2b, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30,
|
||||
0x2d, 0x39, 0x2d, 0x25, 0x2e, 0x5d, 0x2b, 0x24, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69,
|
||||
0x70, 0x61, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73,
|
||||
0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65,
|
||||
0x73, 0x12, 0x37, 0x0a, 0x06, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8,
|
||||
0x01, 0x01, 0x52, 0x06, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x1a, 0xc6, 0x04, 0x0a, 0x07, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x06, 0x6d,
|
||||
0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07,
|
||||
0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12,
|
||||
0x51, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x2f, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72,
|
||||
0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65,
|
||||
0x72, 0x73, 0x12, 0x1e, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
|
||||
0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61,
|
||||
0x74, 0x68, 0x12, 0x1e, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
|
||||
0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x68, 0x6f,
|
||||
0x73, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06,
|
||||
0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x5c, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x41, 0xba, 0x48, 0x3e, 0x72, 0x3c, 0x32, 0x3a, 0x5e, 0x5b,
|
||||
0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x3d, 0x5b, 0x61, 0x2d, 0x7a,
|
||||
0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x28, 0x3f, 0x3a, 0x26, 0x5b, 0x61, 0x2d, 0x7a,
|
||||
0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x3d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a,
|
||||
0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x29, 0x2a, 0x24, 0x48, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72,
|
||||
0x79, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0b,
|
||||
0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0xb2, 0x01, 0x02, 0x38, 0x01, 0x52, 0x04, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x12, 0x26, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x09, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52,
|
||||
0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x3b, 0x0a, 0x04, 0x61, 0x75, 0x74,
|
||||
0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74,
|
||||
0x65, 0x78, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61,
|
||||
0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01,
|
||||
0x01, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x3b, 0x0a, 0x04, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
|
||||
0x74, 0x61, 0x6d, 0x70, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0xb2, 0x01, 0x02, 0x38,
|
||||
0x01, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65,
|
||||
0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
|
||||
0x02, 0x38, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0xde, 0x01, 0x0a,
|
||||
0x0f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
|
||||
0x12, 0x27, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x70, 0x01, 0x52,
|
||||
0x08, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x70, 0x12, 0x47, 0x0a, 0x1a, 0x63, 0x61, 0x6c,
|
||||
0x6c, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65,
|
||||
0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba,
|
||||
0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x17, 0x63, 0x61, 0x6c, 0x6c, 0x65,
|
||||
0x72, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65,
|
||||
0x6e, 0x74, 0x12, 0x59, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x74,
|
||||
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22,
|
||||
0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62,
|
||||
0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0xab, 0x01,
|
||||
0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x12, 0x3b, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b,
|
||||
0x65, 0x78, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01,
|
||||
0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
|
||||
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
|
||||
0x38, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x71, 0x75,
|
||||
0x65, 0x72, 0x79, 0x1a, 0x9f, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x3d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b,
|
||||
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, 0xba, 0x48, 0x07,
|
||||
0xc8, 0x01, 0x01, 0x1a, 0x02, 0x28, 0x00, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1d, 0x0a,
|
||||
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,
|
||||
0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x07,
|
||||
0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e,
|
||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
|
||||
0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42,
|
||||
0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xba, 0x04, 0x0a, 0x1c,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x63, 0x0a, 0x10,
|
||||
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53,
|
||||
0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x48, 0x00,
|
||||
0x52, 0x0f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61,
|
||||
0x6c, 0x12, 0x5a, 0x0a, 0x0d, 0x69, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70,
|
||||
0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x2e, 0x49, 0x64, 0x70, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x48, 0x00, 0x52,
|
||||
0x0c, 0x69, 0x64, 0x70, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x1a, 0x6f, 0x0a,
|
||||
0x0f, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c,
|
||||
0x12, 0x47, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61,
|
||||
0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72,
|
||||
0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x65,
|
||||
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0xd3,
|
||||
0x01, 0x0a, 0x0c, 0x49, 0x64, 0x70, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12,
|
||||
0x2d, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10,
|
||||
0x01, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x36,
|
||||
0x0a, 0x0f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x65, 0x6d, 0x61, 0x69,
|
||||
0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xba, 0x48, 0x0a, 0xc8, 0x01, 0x01, 0x72,
|
||||
0x05, 0x10, 0x01, 0x18, 0xff, 0x01, 0x52, 0x0e, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61,
|
||||
0x6c, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x47, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x88, 0x01, 0x01, 0x42,
|
||||
0x13, 0x0a, 0x11, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61,
|
||||
0x64, 0x61, 0x74, 0x61, 0x42, 0x12, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74,
|
||||
0x79, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x2a, 0x93, 0x01, 0x0a, 0x0b, 0x4c, 0x6f, 0x67,
|
||||
0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50,
|
||||
0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46,
|
||||
0x41, 0x55, 0x4c, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10,
|
||||
0x64, 0x12, 0x09, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xc8, 0x01, 0x12, 0x0b, 0x0a, 0x06,
|
||||
0x4e, 0x4f, 0x54, 0x49, 0x43, 0x45, 0x10, 0xac, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x57, 0x41, 0x52,
|
||||
0x4e, 0x49, 0x4e, 0x47, 0x10, 0x90, 0x03, 0x12, 0x0a, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52,
|
||||
0x10, 0xf4, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x52, 0x49, 0x54, 0x49, 0x43, 0x41, 0x4c, 0x10,
|
||||
0xd8, 0x04, 0x12, 0x0a, 0x0a, 0x05, 0x41, 0x4c, 0x45, 0x52, 0x54, 0x10, 0xbc, 0x05, 0x12, 0x0e,
|
||||
0x0a, 0x09, 0x45, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x4e, 0x43, 0x59, 0x10, 0xa0, 0x06, 0x42, 0x81,
|
||||
0x01, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x63, 0x68, 0x77, 0x61, 0x72, 0x7a, 0x2e, 0x73,
|
||||
0x74, 0x61, 0x63, 0x6b, 0x69, 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x42,
|
||||
0x0f, 0x41, 0x75, 0x64, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x50, 0x01, 0x5a, 0x0f, 0x2e, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x3b, 0x61, 0x75, 0x64, 0x69,
|
||||
0x74, 0x56, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x41, 0x75, 0x64, 0x69,
|
||||
0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x41, 0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0xe2,
|
||||
0x02, 0x14, 0x41, 0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
|
||||
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x41, 0x75, 0x64, 0x69, 0x74, 0x3a, 0x3a,
|
||||
0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xba, 0x48, 0x04,
|
||||
0x22, 0x02, 0x28, 0x00, 0x48, 0x00, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12,
|
||||
0x52, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x30, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72,
|
||||
0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64,
|
||||
0x65, 0x72, 0x73, 0x12, 0x3b, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0b, 0xba,
|
||||
0x48, 0x08, 0xc8, 0x01, 0x01, 0xb2, 0x01, 0x02, 0x38, 0x01, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x07, 0x0a, 0x05,
|
||||
0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0xde, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x27, 0x0a, 0x09, 0x63, 0x61, 0x6c,
|
||||
0x6c, 0x65, 0x72, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48,
|
||||
0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x70, 0x01, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72,
|
||||
0x49, 0x70, 0x12, 0x47, 0x0a, 0x1a, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x70,
|
||||
0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02,
|
||||
0x10, 0x01, 0x52, 0x17, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69,
|
||||
0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x59, 0x0a, 0x12, 0x72,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
|
||||
0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74,
|
||||
0x65, 0x78, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x06, 0xba, 0x48, 0x03,
|
||||
0xc8, 0x01, 0x01, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72,
|
||||
0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x04, 0x63, 0x6f, 0x64,
|
||||
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x1a, 0x02, 0x28, 0x00,
|
||||
0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
|
||||
0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73,
|
||||
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52,
|
||||
0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73,
|
||||
0x73, 0x61, 0x67, 0x65, 0x22, 0xba, 0x04, 0x0a, 0x1c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x63, 0x0a, 0x10, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f,
|
||||
0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x36, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x72,
|
||||
0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x79, 0x73, 0x74, 0x65,
|
||||
0x6d, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x5a, 0x0a, 0x0d, 0x69, 0x64,
|
||||
0x70, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x33, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x49, 0x64, 0x70, 0x50, 0x72, 0x69,
|
||||
0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0c, 0x69, 0x64, 0x70, 0x50, 0x72, 0x69,
|
||||
0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x1a, 0x6f, 0x0a, 0x0f, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
|
||||
0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x47, 0x0a, 0x10, 0x73, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0f,
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x88,
|
||||
0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d,
|
||||
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0xd3, 0x01, 0x0a, 0x0c, 0x49, 0x64, 0x70, 0x50,
|
||||
0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x2d, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6e,
|
||||
0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a,
|
||||
0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6e,
|
||||
0x63, 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0f, 0x70, 0x72, 0x69, 0x6e, 0x63,
|
||||
0x69, 0x70, 0x61, 0x6c, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x42, 0x0d, 0xba, 0x48, 0x0a, 0xc8, 0x01, 0x01, 0x72, 0x05, 0x10, 0x01, 0x18, 0xff, 0x01, 0x52,
|
||||
0x0e, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12,
|
||||
0x47, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
|
||||
0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75,
|
||||
0x63, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x65, 0x74,
|
||||
0x61, 0x64, 0x61, 0x74, 0x61, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x73, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x12, 0x0a,
|
||||
0x09, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08,
|
||||
0x01, 0x2a, 0x93, 0x01, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74,
|
||||
0x79, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,
|
||||
0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x01, 0x12,
|
||||
0x09, 0x0a, 0x05, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x64, 0x12, 0x09, 0x0a, 0x04, 0x49, 0x4e,
|
||||
0x46, 0x4f, 0x10, 0xc8, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x4e, 0x4f, 0x54, 0x49, 0x43, 0x45, 0x10,
|
||||
0xac, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x90, 0x03,
|
||||
0x12, 0x0a, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0xf4, 0x03, 0x12, 0x0d, 0x0a, 0x08,
|
||||
0x43, 0x52, 0x49, 0x54, 0x49, 0x43, 0x41, 0x4c, 0x10, 0xd8, 0x04, 0x12, 0x0a, 0x0a, 0x05, 0x41,
|
||||
0x4c, 0x45, 0x52, 0x54, 0x10, 0xbc, 0x05, 0x12, 0x0e, 0x0a, 0x09, 0x45, 0x4d, 0x45, 0x52, 0x47,
|
||||
0x45, 0x4e, 0x43, 0x59, 0x10, 0xa0, 0x06, 0x42, 0x81, 0x01, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e,
|
||||
0x73, 0x63, 0x68, 0x77, 0x61, 0x72, 0x7a, 0x2e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x69, 0x74, 0x2e,
|
||||
0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x41, 0x75, 0x64, 0x69, 0x74, 0x45,
|
||||
0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x0f, 0x2e, 0x2f, 0x61,
|
||||
0x75, 0x64, 0x69, 0x74, 0x3b, 0x61, 0x75, 0x64, 0x69, 0x74, 0x56, 0x31, 0xa2, 0x02, 0x03, 0x41,
|
||||
0x58, 0x58, 0xaa, 0x02, 0x08, 0x41, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08,
|
||||
0x41, 0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x41, 0x75, 0x64, 0x69, 0x74,
|
||||
0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
|
||||
0x02, 0x09, 0x41, 0x75, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
@ -1833,7 +1848,6 @@ func file_audit_v1_audit_event_proto_init() {
|
|||
if File_audit_v1_audit_event_proto != nil {
|
||||
return
|
||||
}
|
||||
file_audit_v1_common_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_audit_v1_audit_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*AuditLogEntry); i {
|
||||
|
|
|
|||
|
|
@ -1,285 +0,0 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.1
|
||||
// protoc (unknown)
|
||||
// source: audit/v1/common.proto
|
||||
|
||||
package auditV1
|
||||
|
||||
import (
|
||||
_ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type ObjectName int32
|
||||
|
||||
const (
|
||||
ObjectName_OBJECT_NAME_UNSPECIFIED ObjectName = 0
|
||||
// If the action happens on system level and doesn't relate to a known ObjectType.
|
||||
ObjectName_OBJECT_NAME_SYSTEM ObjectName = 1
|
||||
)
|
||||
|
||||
// Enum value maps for ObjectName.
|
||||
var (
|
||||
ObjectName_name = map[int32]string{
|
||||
0: "OBJECT_NAME_UNSPECIFIED",
|
||||
1: "OBJECT_NAME_SYSTEM",
|
||||
}
|
||||
ObjectName_value = map[string]int32{
|
||||
"OBJECT_NAME_UNSPECIFIED": 0,
|
||||
"OBJECT_NAME_SYSTEM": 1,
|
||||
}
|
||||
)
|
||||
|
||||
func (x ObjectName) Enum() *ObjectName {
|
||||
p := new(ObjectName)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x ObjectName) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (ObjectName) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_audit_v1_common_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (ObjectName) Type() protoreflect.EnumType {
|
||||
return &file_audit_v1_common_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x ObjectName) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ObjectName.Descriptor instead.
|
||||
func (ObjectName) EnumDescriptor() ([]byte, []int) {
|
||||
return file_audit_v1_common_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// The type of the object the audit event refers to.
|
||||
// Relevant for type-detection and lookups in the routing.
|
||||
type ObjectType int32
|
||||
|
||||
const (
|
||||
ObjectType_OBJECT_TYPE_UNSPECIFIED ObjectType = 0
|
||||
ObjectType_OBJECT_TYPE_ORGANIZATION ObjectType = 1
|
||||
ObjectType_OBJECT_TYPE_FOLDER ObjectType = 2
|
||||
ObjectType_OBJECT_TYPE_PROJECT ObjectType = 3
|
||||
)
|
||||
|
||||
// Enum value maps for ObjectType.
|
||||
var (
|
||||
ObjectType_name = map[int32]string{
|
||||
0: "OBJECT_TYPE_UNSPECIFIED",
|
||||
1: "OBJECT_TYPE_ORGANIZATION",
|
||||
2: "OBJECT_TYPE_FOLDER",
|
||||
3: "OBJECT_TYPE_PROJECT",
|
||||
}
|
||||
ObjectType_value = map[string]int32{
|
||||
"OBJECT_TYPE_UNSPECIFIED": 0,
|
||||
"OBJECT_TYPE_ORGANIZATION": 1,
|
||||
"OBJECT_TYPE_FOLDER": 2,
|
||||
"OBJECT_TYPE_PROJECT": 3,
|
||||
}
|
||||
)
|
||||
|
||||
func (x ObjectType) Enum() *ObjectType {
|
||||
p := new(ObjectType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x ObjectType) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (ObjectType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_audit_v1_common_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (ObjectType) Type() protoreflect.EnumType {
|
||||
return &file_audit_v1_common_proto_enumTypes[1]
|
||||
}
|
||||
|
||||
func (x ObjectType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ObjectType.Descriptor instead.
|
||||
func (ObjectType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_audit_v1_common_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
type ObjectIdentifier struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Identifier of the respective entity (e.g. Identifier of an organization)
|
||||
Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
|
||||
// Type of the respective entity relevant for routing
|
||||
Type ObjectType `protobuf:"varint,2,opt,name=type,proto3,enum=audit.v1.ObjectType" json:"type,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ObjectIdentifier) Reset() {
|
||||
*x = ObjectIdentifier{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_audit_v1_common_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ObjectIdentifier) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ObjectIdentifier) ProtoMessage() {}
|
||||
|
||||
func (x *ObjectIdentifier) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_audit_v1_common_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ObjectIdentifier.ProtoReflect.Descriptor instead.
|
||||
func (*ObjectIdentifier) Descriptor() ([]byte, []int) {
|
||||
return file_audit_v1_common_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ObjectIdentifier) GetIdentifier() string {
|
||||
if x != nil {
|
||||
return x.Identifier
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ObjectIdentifier) GetType() ObjectType {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return ObjectType_OBJECT_TYPE_UNSPECIFIED
|
||||
}
|
||||
|
||||
var File_audit_v1_common_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_audit_v1_common_proto_rawDesc = []byte{
|
||||
0x0a, 0x15, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
|
||||
0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76,
|
||||
0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f,
|
||||
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x76,
|
||||
0x0a, 0x10, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69,
|
||||
0x65, 0x72, 0x12, 0x2b, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x72, 0x03,
|
||||
0xb0, 0x01, 0x01, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12,
|
||||
0x35, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e,
|
||||
0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54,
|
||||
0x79, 0x70, 0x65, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, 0x01,
|
||||
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x2a, 0x41, 0x0a, 0x0a, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4e,
|
||||
0x41, 0x4d, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
|
||||
0x00, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4e, 0x41, 0x4d, 0x45,
|
||||
0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x10, 0x01, 0x2a, 0x78, 0x0a, 0x0a, 0x4f, 0x62, 0x6a,
|
||||
0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x4f, 0x42, 0x4a, 0x45, 0x43,
|
||||
0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
|
||||
0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54,
|
||||
0x59, 0x50, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e,
|
||||
0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50,
|
||||
0x45, 0x5f, 0x46, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x42,
|
||||
0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43,
|
||||
0x54, 0x10, 0x03, 0x42, 0x7d, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x63, 0x68, 0x77, 0x61,
|
||||
0x72, 0x7a, 0x2e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x69, 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74,
|
||||
0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x50, 0x01, 0x5a, 0x0f, 0x2e, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x3b, 0x61, 0x75, 0x64, 0x69,
|
||||
0x74, 0x56, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x41, 0x75, 0x64, 0x69,
|
||||
0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x41, 0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0xe2,
|
||||
0x02, 0x14, 0x41, 0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
|
||||
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x41, 0x75, 0x64, 0x69, 0x74, 0x3a, 0x3a,
|
||||
0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_audit_v1_common_proto_rawDescOnce sync.Once
|
||||
file_audit_v1_common_proto_rawDescData = file_audit_v1_common_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_audit_v1_common_proto_rawDescGZIP() []byte {
|
||||
file_audit_v1_common_proto_rawDescOnce.Do(func() {
|
||||
file_audit_v1_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_audit_v1_common_proto_rawDescData)
|
||||
})
|
||||
return file_audit_v1_common_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_audit_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_audit_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_audit_v1_common_proto_goTypes = []interface{}{
|
||||
(ObjectName)(0), // 0: audit.v1.ObjectName
|
||||
(ObjectType)(0), // 1: audit.v1.ObjectType
|
||||
(*ObjectIdentifier)(nil), // 2: audit.v1.ObjectIdentifier
|
||||
}
|
||||
var file_audit_v1_common_proto_depIdxs = []int32{
|
||||
1, // 0: audit.v1.ObjectIdentifier.type:type_name -> audit.v1.ObjectType
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_audit_v1_common_proto_init() }
|
||||
func file_audit_v1_common_proto_init() {
|
||||
if File_audit_v1_common_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_audit_v1_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ObjectIdentifier); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_audit_v1_common_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_audit_v1_common_proto_goTypes,
|
||||
DependencyIndexes: file_audit_v1_common_proto_depIdxs,
|
||||
EnumInfos: file_audit_v1_common_proto_enumTypes,
|
||||
MessageInfos: file_audit_v1_common_proto_msgTypes,
|
||||
}.Build()
|
||||
File_audit_v1_common_proto = out.File
|
||||
file_audit_v1_common_proto_rawDesc = nil
|
||||
file_audit_v1_common_proto_goTypes = nil
|
||||
file_audit_v1_common_proto_depIdxs = nil
|
||||
}
|
||||
|
|
@ -1,140 +0,0 @@
|
|||
// Code generated by protoc-gen-validate. DO NOT EDIT.
|
||||
// source: audit/v1/common.proto
|
||||
|
||||
package auditV1
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/mail"
|
||||
"net/url"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"google.golang.org/protobuf/types/known/anypb"
|
||||
)
|
||||
|
||||
// ensure the imports are used
|
||||
var (
|
||||
_ = bytes.MinRead
|
||||
_ = errors.New("")
|
||||
_ = fmt.Print
|
||||
_ = utf8.UTFMax
|
||||
_ = (*regexp.Regexp)(nil)
|
||||
_ = (*strings.Reader)(nil)
|
||||
_ = net.IPv4len
|
||||
_ = time.Duration(0)
|
||||
_ = (*url.URL)(nil)
|
||||
_ = (*mail.Address)(nil)
|
||||
_ = anypb.Any{}
|
||||
_ = sort.Sort
|
||||
)
|
||||
|
||||
// Validate checks the field values on ObjectIdentifier with the rules defined
|
||||
// in the proto definition for this message. If any rules are violated, the
|
||||
// first error encountered is returned, or nil if there are no violations.
|
||||
func (m *ObjectIdentifier) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on ObjectIdentifier with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the result is a list of violation errors wrapped in
|
||||
// ObjectIdentifierMultiError, or nil if none found.
|
||||
func (m *ObjectIdentifier) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *ObjectIdentifier) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
// no validation rules for Identifier
|
||||
|
||||
// no validation rules for Type
|
||||
|
||||
if len(errors) > 0 {
|
||||
return ObjectIdentifierMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ObjectIdentifierMultiError is an error wrapping multiple validation errors
|
||||
// returned by ObjectIdentifier.ValidateAll() if the designated constraints
|
||||
// aren't met.
|
||||
type ObjectIdentifierMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m ObjectIdentifierMultiError) Error() string {
|
||||
var msgs []string
|
||||
for _, err := range m {
|
||||
msgs = append(msgs, err.Error())
|
||||
}
|
||||
return strings.Join(msgs, "; ")
|
||||
}
|
||||
|
||||
// AllErrors returns a list of validation violation errors.
|
||||
func (m ObjectIdentifierMultiError) AllErrors() []error { return m }
|
||||
|
||||
// ObjectIdentifierValidationError is the validation error returned by
|
||||
// ObjectIdentifier.Validate if the designated constraints aren't met.
|
||||
type ObjectIdentifierValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e ObjectIdentifierValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e ObjectIdentifierValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e ObjectIdentifierValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e ObjectIdentifierValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e ObjectIdentifierValidationError) ErrorName() string { return "ObjectIdentifierValidationError" }
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e ObjectIdentifierValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sObjectIdentifier.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = ObjectIdentifierValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = ObjectIdentifierValidationError{}
|
||||
|
|
@ -72,6 +72,66 @@ func (Visibility) EnumDescriptor() ([]byte, []int) {
|
|||
return file_audit_v1_routable_event_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// Identifier of an object.
|
||||
//
|
||||
// For system events, the nil UUID must be used: 00000000-0000-0000-0000-000000000000.
|
||||
type ObjectIdentifier struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Identifier of the respective entity (e.g. Identifier of an organization)
|
||||
Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
|
||||
// Entity data type relevant for routing - one of the list of supported singular types.
|
||||
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ObjectIdentifier) Reset() {
|
||||
*x = ObjectIdentifier{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_audit_v1_routable_event_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ObjectIdentifier) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ObjectIdentifier) ProtoMessage() {}
|
||||
|
||||
func (x *ObjectIdentifier) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_audit_v1_routable_event_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ObjectIdentifier.ProtoReflect.Descriptor instead.
|
||||
func (*ObjectIdentifier) Descriptor() ([]byte, []int) {
|
||||
return file_audit_v1_routable_event_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ObjectIdentifier) GetIdentifier() string {
|
||||
if x != nil {
|
||||
return x.Identifier
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ObjectIdentifier) GetType() string {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type EncryptedData struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
|
@ -90,7 +150,7 @@ type EncryptedData struct {
|
|||
func (x *EncryptedData) Reset() {
|
||||
*x = EncryptedData{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_audit_v1_routable_event_proto_msgTypes[0]
|
||||
mi := &file_audit_v1_routable_event_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -103,7 +163,7 @@ func (x *EncryptedData) String() string {
|
|||
func (*EncryptedData) ProtoMessage() {}
|
||||
|
||||
func (x *EncryptedData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_audit_v1_routable_event_proto_msgTypes[0]
|
||||
mi := &file_audit_v1_routable_event_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -116,7 +176,7 @@ func (x *EncryptedData) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use EncryptedData.ProtoReflect.Descriptor instead.
|
||||
func (*EncryptedData) Descriptor() ([]byte, []int) {
|
||||
return file_audit_v1_routable_event_proto_rawDescGZIP(), []int{0}
|
||||
return file_audit_v1_routable_event_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *EncryptedData) GetData() []byte {
|
||||
|
|
@ -161,7 +221,7 @@ type UnencryptedData struct {
|
|||
func (x *UnencryptedData) Reset() {
|
||||
*x = UnencryptedData{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_audit_v1_routable_event_proto_msgTypes[1]
|
||||
mi := &file_audit_v1_routable_event_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -174,7 +234,7 @@ func (x *UnencryptedData) String() string {
|
|||
func (*UnencryptedData) ProtoMessage() {}
|
||||
|
||||
func (x *UnencryptedData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_audit_v1_routable_event_proto_msgTypes[1]
|
||||
mi := &file_audit_v1_routable_event_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -187,7 +247,7 @@ func (x *UnencryptedData) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use UnencryptedData.ProtoReflect.Descriptor instead.
|
||||
func (*UnencryptedData) Descriptor() ([]byte, []int) {
|
||||
return file_audit_v1_routable_event_proto_rawDescGZIP(), []int{1}
|
||||
return file_audit_v1_routable_event_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *UnencryptedData) GetData() []byte {
|
||||
|
|
@ -209,18 +269,23 @@ type RoutableAuditEvent struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Functional event name with pattern <TYPE>_<ACTION>, e.g. ORGANIZATION_CREATED
|
||||
// Will be copied over by the SDK from the AuditEvent
|
||||
// TODO rename to operation_name (equivalent to AuditLog.method_name)
|
||||
// Functional event name with pattern
|
||||
//
|
||||
// Format: stackit.<product>.<version>.<type>.<operation>
|
||||
//
|
||||
// Examples:
|
||||
//
|
||||
// "stackit.resourcemanager.v1.organization.created"
|
||||
// "stackit.authorization.v2.organization.moved"
|
||||
// "stackit.authorization.v2.folder.moved"
|
||||
EventName string `protobuf:"bytes,1,opt,name=event_name,json=eventName,proto3" json:"event_name,omitempty"`
|
||||
// Visibility relevant for differentiating between internal and public events
|
||||
Visibility Visibility `protobuf:"varint,2,opt,name=visibility,proto3,enum=audit.v1.Visibility" json:"visibility,omitempty"`
|
||||
// Identifier the audit log event refers to
|
||||
// Identifier the audit log event refers to.
|
||||
//
|
||||
// Types that are assignable to ResourceReference:
|
||||
//
|
||||
// *RoutableAuditEvent_ObjectName
|
||||
// *RoutableAuditEvent_ObjectIdentifier
|
||||
ResourceReference isRoutableAuditEvent_ResourceReference `protobuf_oneof:"resource_reference"`
|
||||
// System events, will not be routed to the end-user.
|
||||
ObjectIdentifier *ObjectIdentifier `protobuf:"bytes,3,opt,name=object_identifier,json=objectIdentifier,proto3" json:"object_identifier,omitempty"`
|
||||
// The actual audit event is transferred in one of the attributes below
|
||||
//
|
||||
// Types that are assignable to Data:
|
||||
|
|
@ -233,7 +298,7 @@ type RoutableAuditEvent struct {
|
|||
func (x *RoutableAuditEvent) Reset() {
|
||||
*x = RoutableAuditEvent{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_audit_v1_routable_event_proto_msgTypes[2]
|
||||
mi := &file_audit_v1_routable_event_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -246,7 +311,7 @@ func (x *RoutableAuditEvent) String() string {
|
|||
func (*RoutableAuditEvent) ProtoMessage() {}
|
||||
|
||||
func (x *RoutableAuditEvent) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_audit_v1_routable_event_proto_msgTypes[2]
|
||||
mi := &file_audit_v1_routable_event_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -259,7 +324,7 @@ func (x *RoutableAuditEvent) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use RoutableAuditEvent.ProtoReflect.Descriptor instead.
|
||||
func (*RoutableAuditEvent) Descriptor() ([]byte, []int) {
|
||||
return file_audit_v1_routable_event_proto_rawDescGZIP(), []int{2}
|
||||
return file_audit_v1_routable_event_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *RoutableAuditEvent) GetEventName() string {
|
||||
|
|
@ -276,22 +341,8 @@ func (x *RoutableAuditEvent) GetVisibility() Visibility {
|
|||
return Visibility_VISIBILITY_UNSPECIFIED
|
||||
}
|
||||
|
||||
func (m *RoutableAuditEvent) GetResourceReference() isRoutableAuditEvent_ResourceReference {
|
||||
if m != nil {
|
||||
return m.ResourceReference
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *RoutableAuditEvent) GetObjectName() ObjectName {
|
||||
if x, ok := x.GetResourceReference().(*RoutableAuditEvent_ObjectName); ok {
|
||||
return x.ObjectName
|
||||
}
|
||||
return ObjectName_OBJECT_NAME_UNSPECIFIED
|
||||
}
|
||||
|
||||
func (x *RoutableAuditEvent) GetObjectIdentifier() *ObjectIdentifier {
|
||||
if x, ok := x.GetResourceReference().(*RoutableAuditEvent_ObjectIdentifier); ok {
|
||||
if x != nil {
|
||||
return x.ObjectIdentifier
|
||||
}
|
||||
return nil
|
||||
|
|
@ -318,35 +369,16 @@ func (x *RoutableAuditEvent) GetEncryptedData() *EncryptedData {
|
|||
return nil
|
||||
}
|
||||
|
||||
type isRoutableAuditEvent_ResourceReference interface {
|
||||
isRoutableAuditEvent_ResourceReference()
|
||||
}
|
||||
|
||||
type RoutableAuditEvent_ObjectName struct {
|
||||
// If it is a technical event not related to an organization, folder or project
|
||||
// Will NOT be routed to the end-user, only for internal analysis ->
|
||||
// Clarify what do in the router
|
||||
ObjectName ObjectName `protobuf:"varint,3,opt,name=object_name,json=objectName,proto3,enum=audit.v1.ObjectName,oneof"`
|
||||
}
|
||||
|
||||
type RoutableAuditEvent_ObjectIdentifier struct {
|
||||
ObjectIdentifier *ObjectIdentifier `protobuf:"bytes,4,opt,name=object_identifier,json=objectIdentifier,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*RoutableAuditEvent_ObjectName) isRoutableAuditEvent_ResourceReference() {}
|
||||
|
||||
func (*RoutableAuditEvent_ObjectIdentifier) isRoutableAuditEvent_ResourceReference() {}
|
||||
|
||||
type isRoutableAuditEvent_Data interface {
|
||||
isRoutableAuditEvent_Data()
|
||||
}
|
||||
|
||||
type RoutableAuditEvent_UnencryptedData struct {
|
||||
UnencryptedData *UnencryptedData `protobuf:"bytes,5,opt,name=unencrypted_data,json=unencryptedData,proto3,oneof"`
|
||||
UnencryptedData *UnencryptedData `protobuf:"bytes,4,opt,name=unencrypted_data,json=unencryptedData,proto3,oneof"`
|
||||
}
|
||||
|
||||
type RoutableAuditEvent_EncryptedData struct {
|
||||
EncryptedData *EncryptedData `protobuf:"bytes,6,opt,name=encrypted_data,json=encryptedData,proto3,oneof"`
|
||||
EncryptedData *EncryptedData `protobuf:"bytes,5,opt,name=encrypted_data,json=encryptedData,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*RoutableAuditEvent_UnencryptedData) isRoutableAuditEvent_Data() {}
|
||||
|
|
@ -360,73 +392,73 @@ var file_audit_v1_routable_event_proto_rawDesc = []byte{
|
|||
0x62, 0x6c, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x08, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76,
|
||||
0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2f, 0x76, 0x31,
|
||||
0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, 0x01,
|
||||
0x0a, 0x0d, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12,
|
||||
0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x0a, 0xba,
|
||||
0x48, 0x07, 0xc8, 0x01, 0x01, 0x7a, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12,
|
||||
0x2f, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x79, 0x70, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02,
|
||||
0x10, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x54, 0x79, 0x70, 0x65,
|
||||
0x12, 0x39, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61,
|
||||
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48,
|
||||
0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70,
|
||||
0x74, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x28, 0x0a, 0x0b, 0x6b,
|
||||
0x65, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
|
||||
0x42, 0x07, 0xba, 0x48, 0x04, 0x1a, 0x02, 0x28, 0x01, 0x52, 0x0a, 0x6b, 0x65, 0x79, 0x56, 0x65,
|
||||
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x62, 0x0a, 0x0f, 0x55, 0x6e, 0x65, 0x6e, 0x63, 0x72, 0x79,
|
||||
0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x7a, 0x02,
|
||||
0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42,
|
||||
0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x54, 0x79, 0x70, 0x65, 0x22, 0xf4, 0x03, 0x0a, 0x12, 0x52, 0x6f,
|
||||
0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x75, 0x64, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74,
|
||||
0x12, 0x61, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x42, 0xba, 0x48, 0x3f, 0xc8, 0x01, 0x01, 0x72, 0x3a, 0x32, 0x38,
|
||||
0x5e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x69, 0x74, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d,
|
||||
0x39, 0x5d, 0x2b, 0x5c, 0x2e, 0x76, 0x5b, 0x31, 0x2d, 0x39, 0x5d, 0x5b, 0x30, 0x2d, 0x39, 0x5d,
|
||||
0x2a, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x5c, 0x2e, 0x5b, 0x61,
|
||||
0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74,
|
||||
0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x42, 0x0b, 0xba,
|
||||
0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69,
|
||||
0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x37, 0x0a, 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
|
||||
0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x75,
|
||||
0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d,
|
||||
0x65, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12,
|
||||
0x49, 0x0a, 0x11, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,
|
||||
0x66, 0x69, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x75, 0x64,
|
||||
0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x65, 0x6e,
|
||||
0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
|
||||
0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x10, 0x75, 0x6e,
|
||||
0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x55, 0x6e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x48,
|
||||
0x01, 0x52, 0x0f, 0x75, 0x6e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61,
|
||||
0x74, 0x61, 0x12, 0x40, 0x0a, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f,
|
||||
0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x75, 0x64,
|
||||
0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44,
|
||||
0x61, 0x74, 0x61, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64,
|
||||
0x44, 0x61, 0x74, 0x61, 0x42, 0x1b, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08,
|
||||
0x01, 0x42, 0x0d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01,
|
||||
0x2a, 0x57, 0x0a, 0x0a, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a,
|
||||
0x0a, 0x16, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53,
|
||||
0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49,
|
||||
0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10,
|
||||
0x01, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f,
|
||||
0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x02, 0x42, 0x84, 0x01, 0x0a, 0x1c, 0x63, 0x6f,
|
||||
0x6d, 0x2e, 0x73, 0x63, 0x68, 0x77, 0x61, 0x72, 0x7a, 0x2e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x69,
|
||||
0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x12, 0x52, 0x6f, 0x75, 0x74,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
|
||||
0x5a, 0x0f, 0x2e, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x3b, 0x61, 0x75, 0x64, 0x69, 0x74, 0x56,
|
||||
0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x41, 0x75, 0x64, 0x69, 0x74, 0x2e,
|
||||
0x56, 0x31, 0xca, 0x02, 0x08, 0x41, 0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14,
|
||||
0x41, 0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
|
||||
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x41, 0x75, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5f, 0x0a, 0x10, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
|
||||
0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x0a, 0x69, 0x64,
|
||||
0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b,
|
||||
0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0a, 0x69, 0x64, 0x65,
|
||||
0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10,
|
||||
0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xc5, 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x63, 0x72,
|
||||
0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74,
|
||||
0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x7a,
|
||||
0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x0d, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x54, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x12, 0x65, 0x6e,
|
||||
0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02,
|
||||
0x10, 0x01, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x73,
|
||||
0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x28, 0x0a, 0x0b, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x65, 0x72,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xba, 0x48, 0x04, 0x1a,
|
||||
0x02, 0x28, 0x01, 0x52, 0x0a, 0x6b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22,
|
||||
0x62, 0x0a, 0x0f, 0x55, 0x6e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61,
|
||||
0x74, 0x61, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
|
||||
0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x7a, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61,
|
||||
0x74, 0x61, 0x12, 0x2f, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74,
|
||||
0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01,
|
||||
0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x54,
|
||||
0x79, 0x70, 0x65, 0x22, 0xa4, 0x03, 0x0a, 0x12, 0x52, 0x6f, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x41, 0x75, 0x64, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x61, 0x0a, 0x0a, 0x65, 0x76,
|
||||
0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x42,
|
||||
0xba, 0x48, 0x3f, 0xc8, 0x01, 0x01, 0x72, 0x3a, 0x32, 0x38, 0x5e, 0x73, 0x74, 0x61, 0x63, 0x6b,
|
||||
0x69, 0x74, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x5c, 0x2e, 0x76,
|
||||
0x5b, 0x31, 0x2d, 0x39, 0x5d, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2a, 0x5c, 0x2e, 0x5b, 0x61, 0x2d,
|
||||
0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d,
|
||||
0x2b, 0x24, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a,
|
||||
0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x0e, 0x32, 0x14, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x73,
|
||||
0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82,
|
||||
0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
|
||||
0x12, 0x4f, 0x0a, 0x11, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74,
|
||||
0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x75,
|
||||
0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x65,
|
||||
0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52,
|
||||
0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65,
|
||||
0x72, 0x12, 0x46, 0x0a, 0x10, 0x75, 0x6e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64,
|
||||
0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x75,
|
||||
0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
|
||||
0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f, 0x75, 0x6e, 0x65, 0x6e, 0x63, 0x72,
|
||||
0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0e, 0x65, 0x6e, 0x63,
|
||||
0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x17, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63,
|
||||
0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x6e,
|
||||
0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x42, 0x0d, 0x0a, 0x04, 0x64,
|
||||
0x61, 0x74, 0x61, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x2a, 0x57, 0x0a, 0x0a, 0x56, 0x69,
|
||||
0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x53, 0x49,
|
||||
0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
|
||||
0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49,
|
||||
0x54, 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x56,
|
||||
0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54,
|
||||
0x45, 0x10, 0x02, 0x42, 0x84, 0x01, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x63, 0x68, 0x77,
|
||||
0x61, 0x72, 0x7a, 0x2e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x69, 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69,
|
||||
0x74, 0x2e, 0x76, 0x31, 0x42, 0x12, 0x52, 0x6f, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x76,
|
||||
0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x0f, 0x2e, 0x2f, 0x61, 0x75,
|
||||
0x64, 0x69, 0x74, 0x3b, 0x61, 0x75, 0x64, 0x69, 0x74, 0x56, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58,
|
||||
0x58, 0xaa, 0x02, 0x08, 0x41, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x41,
|
||||
0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x41, 0x75, 0x64, 0x69, 0x74, 0x5c,
|
||||
0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
|
||||
0x09, 0x41, 0x75, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
@ -442,26 +474,24 @@ func file_audit_v1_routable_event_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_audit_v1_routable_event_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_audit_v1_routable_event_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_audit_v1_routable_event_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_audit_v1_routable_event_proto_goTypes = []interface{}{
|
||||
(Visibility)(0), // 0: audit.v1.Visibility
|
||||
(*EncryptedData)(nil), // 1: audit.v1.EncryptedData
|
||||
(*UnencryptedData)(nil), // 2: audit.v1.UnencryptedData
|
||||
(*RoutableAuditEvent)(nil), // 3: audit.v1.RoutableAuditEvent
|
||||
(ObjectName)(0), // 4: audit.v1.ObjectName
|
||||
(*ObjectIdentifier)(nil), // 5: audit.v1.ObjectIdentifier
|
||||
(*ObjectIdentifier)(nil), // 1: audit.v1.ObjectIdentifier
|
||||
(*EncryptedData)(nil), // 2: audit.v1.EncryptedData
|
||||
(*UnencryptedData)(nil), // 3: audit.v1.UnencryptedData
|
||||
(*RoutableAuditEvent)(nil), // 4: audit.v1.RoutableAuditEvent
|
||||
}
|
||||
var file_audit_v1_routable_event_proto_depIdxs = []int32{
|
||||
0, // 0: audit.v1.RoutableAuditEvent.visibility:type_name -> audit.v1.Visibility
|
||||
4, // 1: audit.v1.RoutableAuditEvent.object_name:type_name -> audit.v1.ObjectName
|
||||
5, // 2: audit.v1.RoutableAuditEvent.object_identifier:type_name -> audit.v1.ObjectIdentifier
|
||||
2, // 3: audit.v1.RoutableAuditEvent.unencrypted_data:type_name -> audit.v1.UnencryptedData
|
||||
1, // 4: audit.v1.RoutableAuditEvent.encrypted_data:type_name -> audit.v1.EncryptedData
|
||||
5, // [5:5] is the sub-list for method output_type
|
||||
5, // [5:5] is the sub-list for method input_type
|
||||
5, // [5:5] is the sub-list for extension type_name
|
||||
5, // [5:5] is the sub-list for extension extendee
|
||||
0, // [0:5] is the sub-list for field type_name
|
||||
1, // 1: audit.v1.RoutableAuditEvent.object_identifier:type_name -> audit.v1.ObjectIdentifier
|
||||
3, // 2: audit.v1.RoutableAuditEvent.unencrypted_data:type_name -> audit.v1.UnencryptedData
|
||||
2, // 3: audit.v1.RoutableAuditEvent.encrypted_data:type_name -> audit.v1.EncryptedData
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_audit_v1_routable_event_proto_init() }
|
||||
|
|
@ -469,10 +499,9 @@ func file_audit_v1_routable_event_proto_init() {
|
|||
if File_audit_v1_routable_event_proto != nil {
|
||||
return
|
||||
}
|
||||
file_audit_v1_common_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_audit_v1_routable_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*EncryptedData); i {
|
||||
switch v := v.(*ObjectIdentifier); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
|
@ -484,7 +513,7 @@ func file_audit_v1_routable_event_proto_init() {
|
|||
}
|
||||
}
|
||||
file_audit_v1_routable_event_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UnencryptedData); i {
|
||||
switch v := v.(*EncryptedData); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
|
@ -496,6 +525,18 @@ func file_audit_v1_routable_event_proto_init() {
|
|||
}
|
||||
}
|
||||
file_audit_v1_routable_event_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UnencryptedData); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_audit_v1_routable_event_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RoutableAuditEvent); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
|
@ -508,9 +549,7 @@ func file_audit_v1_routable_event_proto_init() {
|
|||
}
|
||||
}
|
||||
}
|
||||
file_audit_v1_routable_event_proto_msgTypes[2].OneofWrappers = []interface{}{
|
||||
(*RoutableAuditEvent_ObjectName)(nil),
|
||||
(*RoutableAuditEvent_ObjectIdentifier)(nil),
|
||||
file_audit_v1_routable_event_proto_msgTypes[3].OneofWrappers = []interface{}{
|
||||
(*RoutableAuditEvent_UnencryptedData)(nil),
|
||||
(*RoutableAuditEvent_EncryptedData)(nil),
|
||||
}
|
||||
|
|
@ -520,7 +559,7 @@ func file_audit_v1_routable_event_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_audit_v1_routable_event_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 3,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -35,6 +35,110 @@ var (
|
|||
_ = sort.Sort
|
||||
)
|
||||
|
||||
// Validate checks the field values on ObjectIdentifier with the rules defined
|
||||
// in the proto definition for this message. If any rules are violated, the
|
||||
// first error encountered is returned, or nil if there are no violations.
|
||||
func (m *ObjectIdentifier) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on ObjectIdentifier with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the result is a list of violation errors wrapped in
|
||||
// ObjectIdentifierMultiError, or nil if none found.
|
||||
func (m *ObjectIdentifier) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *ObjectIdentifier) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
// no validation rules for Identifier
|
||||
|
||||
// no validation rules for Type
|
||||
|
||||
if len(errors) > 0 {
|
||||
return ObjectIdentifierMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ObjectIdentifierMultiError is an error wrapping multiple validation errors
|
||||
// returned by ObjectIdentifier.ValidateAll() if the designated constraints
|
||||
// aren't met.
|
||||
type ObjectIdentifierMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m ObjectIdentifierMultiError) Error() string {
|
||||
var msgs []string
|
||||
for _, err := range m {
|
||||
msgs = append(msgs, err.Error())
|
||||
}
|
||||
return strings.Join(msgs, "; ")
|
||||
}
|
||||
|
||||
// AllErrors returns a list of validation violation errors.
|
||||
func (m ObjectIdentifierMultiError) AllErrors() []error { return m }
|
||||
|
||||
// ObjectIdentifierValidationError is the validation error returned by
|
||||
// ObjectIdentifier.Validate if the designated constraints aren't met.
|
||||
type ObjectIdentifierValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e ObjectIdentifierValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e ObjectIdentifierValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e ObjectIdentifierValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e ObjectIdentifierValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e ObjectIdentifierValidationError) ErrorName() string { return "ObjectIdentifierValidationError" }
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e ObjectIdentifierValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sObjectIdentifier.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = ObjectIdentifierValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = ObjectIdentifierValidationError{}
|
||||
|
||||
// Validate checks the field values on EncryptedData with the rules defined in
|
||||
// the proto definition for this message. If any rules are violated, the first
|
||||
// error encountered is returned, or nil if there are no violations.
|
||||
|
|
@ -273,63 +377,35 @@ func (m *RoutableAuditEvent) validate(all bool) error {
|
|||
|
||||
// no validation rules for Visibility
|
||||
|
||||
switch v := m.ResourceReference.(type) {
|
||||
case *RoutableAuditEvent_ObjectName:
|
||||
if v == nil {
|
||||
err := RoutableAuditEventValidationError{
|
||||
field: "ResourceReference",
|
||||
reason: "oneof value cannot be a typed-nil",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
// no validation rules for ObjectName
|
||||
case *RoutableAuditEvent_ObjectIdentifier:
|
||||
if v == nil {
|
||||
err := RoutableAuditEventValidationError{
|
||||
field: "ResourceReference",
|
||||
reason: "oneof value cannot be a typed-nil",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if all {
|
||||
switch v := interface{}(m.GetObjectIdentifier()).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, RoutableAuditEventValidationError{
|
||||
field: "ObjectIdentifier",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, RoutableAuditEventValidationError{
|
||||
field: "ObjectIdentifier",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(m.GetObjectIdentifier()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return RoutableAuditEventValidationError{
|
||||
if all {
|
||||
switch v := interface{}(m.GetObjectIdentifier()).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, RoutableAuditEventValidationError{
|
||||
field: "ObjectIdentifier",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, RoutableAuditEventValidationError{
|
||||
field: "ObjectIdentifier",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(m.GetObjectIdentifier()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return RoutableAuditEventValidationError{
|
||||
field: "ObjectIdentifier",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
_ = v // ensures v is used
|
||||
}
|
||||
|
||||
switch v := m.Data.(type) {
|
||||
case *RoutableAuditEvent_UnencryptedData:
|
||||
if v == nil {
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@ import "google/protobuf/struct.proto";
|
|||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
|
||||
import "audit/v1/common.proto";
|
||||
|
||||
package audit.v1;
|
||||
|
||||
option go_package = "./audit;auditV1";
|
||||
|
|
@ -23,8 +21,9 @@ message AuditLogEntry {
|
|||
|
||||
// The resource name of the log to which this log entry belongs.
|
||||
//
|
||||
// Format: <type>/<identifier>/logs/<eventType>
|
||||
// Format: <pluralType>/<identifier>/logs/<eventType>
|
||||
// Where:
|
||||
// Plural-Types: One from the list of supported data types
|
||||
// Event-Types: admin-activity, system-event, policy-denied, data-access
|
||||
//
|
||||
// Examples:
|
||||
|
|
@ -175,7 +174,12 @@ message AuditLog {
|
|||
// TODO rename into operation?
|
||||
// The name of the service method or operation.
|
||||
//
|
||||
// Format: stackit.<product>.<version>.<type>.<operation>
|
||||
// Format: stackit.<product>.<version>.<singularType>.<operation>
|
||||
// Where:
|
||||
// Product: The name of the service without dashes in lowercase
|
||||
// Version: The API version
|
||||
// Singular-Type: One from the list of supported data types
|
||||
// Operation: The name of the operation without dashes in lowercase
|
||||
//
|
||||
// Examples:
|
||||
// "stackit.resourcemanager.v1.organization.created"
|
||||
|
|
@ -191,8 +195,10 @@ message AuditLog {
|
|||
// The resource or collection that is the target of the operation.
|
||||
// The name is a scheme-less URI, not including the API service name.
|
||||
//
|
||||
// Format: <type>/<id>[/locations/<region-zone>][/<details>]
|
||||
// Format: <pluralType>/<id>[/locations/<region-zone>][/<details>]
|
||||
// Where:
|
||||
// Plural-Type: One from the list of supported data types
|
||||
// Id: The identifier of the object
|
||||
// Region-Zone: Optional region and zone id. If both, separated with a - (dash). Alternatively _ (underscore).
|
||||
// Details: Optional "<key>/<id>" pairs
|
||||
//
|
||||
|
|
@ -293,7 +299,7 @@ message AuthenticationInfo {
|
|||
// The name of the service account used to create or exchange
|
||||
// credentials for authenticating the service account making the request.
|
||||
//
|
||||
// Format: projects/<id>/serviceAccounts/<account>
|
||||
// Format: projects/<id>/serviceAccounts/<accountId>
|
||||
//
|
||||
// Examples:
|
||||
// "projects/29b2c56f-f712-4a9c-845b-f0907158e53c/serviceAccounts/a606dc68-8b97-421b-89a9-116bcbd004df"
|
||||
|
|
@ -318,8 +324,10 @@ message AuthorizationInfo {
|
|||
|
||||
// The resource being accessed, as a REST-style string.
|
||||
//
|
||||
// Format: <type>/<id>[/locations/<region-zone>][/<details>]
|
||||
// Format: <pluralType>/<id>[/locations/<region-zone>][/<details>]
|
||||
// Where:
|
||||
// Plural-Type: One from the list of supported data types
|
||||
// Id: The identifier of the object
|
||||
// Region-Zone: Optional region and zone id. If both, separated with a - (dash). Alternatively _ (underscore).
|
||||
// Details: Optional "<key>/<id>" pairs
|
||||
//
|
||||
|
|
@ -564,7 +572,7 @@ message RequestMetadata {
|
|||
//
|
||||
// Examples:
|
||||
// "OpenAPI-Generator/1.0.0/go"
|
||||
// -> The request was made by the STACKIT SDK GO client or STACKIT CLI
|
||||
// -> The request was made by the STACKIT SDK GO client, STACKIT CLI or Terraform provider
|
||||
// "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
|
||||
// -> The request was made by a web browser.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
syntax = "proto3";
|
||||
|
||||
import "buf/validate/validate.proto";
|
||||
|
||||
package audit.v1;
|
||||
|
||||
option go_package = "./audit;auditV1";
|
||||
option java_multiple_files = true;
|
||||
option java_package = "com.schwarz.stackit.audit.v1";
|
||||
|
||||
enum ObjectName {
|
||||
OBJECT_NAME_UNSPECIFIED = 0;
|
||||
// If the action happens on system level and doesn't relate to a known ObjectType.
|
||||
OBJECT_NAME_SYSTEM = 1;
|
||||
}
|
||||
|
||||
// The type of the object the audit event refers to.
|
||||
// Relevant for type-detection and lookups in the routing.
|
||||
enum ObjectType {
|
||||
OBJECT_TYPE_UNSPECIFIED = 0;
|
||||
OBJECT_TYPE_ORGANIZATION = 1;
|
||||
OBJECT_TYPE_FOLDER = 2;
|
||||
OBJECT_TYPE_PROJECT = 3;
|
||||
}
|
||||
|
||||
message ObjectIdentifier {
|
||||
// Identifier of the respective entity (e.g. Identifier of an organization)
|
||||
string identifier = 1 [(buf.validate.field).required = true, (buf.validate.field).string.uuid = true];
|
||||
|
||||
// Type of the respective entity relevant for routing
|
||||
ObjectType type = 2 [(buf.validate.field).required = true, (buf.validate.field).enum.defined_only = true];
|
||||
}
|
||||
|
|
@ -2,8 +2,6 @@ syntax = "proto3";
|
|||
|
||||
import "buf/validate/validate.proto";
|
||||
|
||||
import "audit/v1/common.proto";
|
||||
|
||||
package audit.v1;
|
||||
|
||||
option go_package = "./audit;auditV1";
|
||||
|
|
@ -18,6 +16,17 @@ enum Visibility {
|
|||
VISIBILITY_PRIVATE = 2;
|
||||
}
|
||||
|
||||
// Identifier of an object.
|
||||
//
|
||||
// For system events, the nil UUID must be used: 00000000-0000-0000-0000-000000000000.
|
||||
message ObjectIdentifier {
|
||||
// Identifier of the respective entity (e.g. Identifier of an organization)
|
||||
string identifier = 1 [(buf.validate.field).required = true, (buf.validate.field).string.uuid = true];
|
||||
|
||||
// Entity data type relevant for routing - one of the list of supported singular types.
|
||||
string type = 2 [(buf.validate.field).required = true, (buf.validate.field).string.min_len = 1];
|
||||
}
|
||||
|
||||
message EncryptedData {
|
||||
// Encrypted serialized protobuf content (the actual audit event)
|
||||
bytes data = 1 [(buf.validate.field).required = true, (buf.validate.field).bytes.min_len = 1];
|
||||
|
|
@ -42,8 +51,15 @@ message UnencryptedData {
|
|||
|
||||
message RoutableAuditEvent {
|
||||
|
||||
// Functional event name with pattern <TYPE>_<ACTION>, e.g. ORGANIZATION_CREATED
|
||||
// Will be copied over by the SDK from the AuditEvent
|
||||
// TODO rename to operation_name (equivalent to AuditLog.method_name)
|
||||
// Functional event name with pattern
|
||||
//
|
||||
// Format: stackit.<product>.<version>.<type>.<operation>
|
||||
//
|
||||
// Examples:
|
||||
// "stackit.resourcemanager.v1.organization.created"
|
||||
// "stackit.authorization.v2.organization.moved"
|
||||
// "stackit.authorization.v2.folder.moved"
|
||||
string event_name = 1 [
|
||||
(buf.validate.field).required = true,
|
||||
(buf.validate.field).string.pattern = "^stackit\\.[a-z0-9]+\\.v[1-9][0-9]*\\.[a-z0-9]+\\.[a-z0-9]+$"
|
||||
|
|
@ -52,20 +68,15 @@ message RoutableAuditEvent {
|
|||
// Visibility relevant for differentiating between internal and public events
|
||||
Visibility visibility = 2 [(buf.validate.field).required = true, (buf.validate.field).enum.defined_only = true];
|
||||
|
||||
// Identifier the audit log event refers to
|
||||
oneof resource_reference {
|
||||
option (buf.validate.oneof).required = true;
|
||||
// If it is a technical event not related to an organization, folder or project
|
||||
// Will NOT be routed to the end-user, only for internal analysis ->
|
||||
// Clarify what do in the router
|
||||
ObjectName object_name = 3;
|
||||
ObjectIdentifier object_identifier = 4;
|
||||
}
|
||||
// Identifier the audit log event refers to.
|
||||
//
|
||||
// System events, will not be routed to the end-user.
|
||||
ObjectIdentifier object_identifier = 3 [(buf.validate.field).required = true];
|
||||
|
||||
// The actual audit event is transferred in one of the attributes below
|
||||
oneof data {
|
||||
option (buf.validate.oneof).required = true;
|
||||
UnencryptedData unencrypted_data = 5;
|
||||
EncryptedData encrypted_data = 6;
|
||||
UnencryptedData unencrypted_data = 4;
|
||||
EncryptedData encrypted_data = 5;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue