mirror of
https://dev.azure.com/schwarzit/schwarzit.stackit-public/_git/audit-go
synced 2026-02-18 21:51:55 +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 { ... }
|
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
|
### Customization
|
||||||
|
|
||||||
#### os.Stdout logging
|
#### os.Stdout logging
|
||||||
|
|
|
||||||
105
audit/api/api.go
105
audit/api/api.go
|
|
@ -2,14 +2,28 @@ package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"github.com/google/uuid"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
auditV1 "dev.azure.com/schwarzit/schwarzit.stackit-core-platform/common-audit.git/gen/go/audit/v1"
|
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"
|
"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.
|
// AuditApi is the interface to log audit events.
|
||||||
//
|
//
|
||||||
// It provides a Log method that can be used to validate and directly send events.
|
// It provides a Log method that can be used to validate and directly send events.
|
||||||
|
|
@ -24,32 +38,26 @@ type AuditApi interface {
|
||||||
// Parameters:
|
// Parameters:
|
||||||
// * ctx - the context object
|
// * ctx - the context object
|
||||||
// * event - the auditV1.AuditEvent
|
// * event - the auditV1.AuditEvent
|
||||||
// * visibility - route the event only internally or to the customer (not evaluated in the legacy solution)
|
// * visibility - route the event only internally or to the customer (no routing in the legacy solution)
|
||||||
// * routingIdentifier - the identifier for the AMQP-Topic selection (optional)
|
// * routableIdentifier - the identifier of the object
|
||||||
// * 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
|
|
||||||
//
|
//
|
||||||
// It may return one of the following errors:
|
// It may return one of the following errors:
|
||||||
/*
|
//
|
||||||
- ErrEventNil - if event is nil
|
// - ErrUnknownSingularType - if the routableIdentifier type is unknown
|
||||||
- ErrObjectIdentifierVisibilityMismatch - if object identifier and visibility are not in a valid state
|
// - ErrUnknownPluralType - if the routableIdentifier type is unknown
|
||||||
- ErrRoutableIdentifierMissing - if routing identifier type and object identifier type do not match
|
// - ErrEventNil - if event is nil
|
||||||
- ErrRoutableIdentifierTypeMismatch - if routing identifier type and object identifier types are not compatible
|
// - ErrObjectIdentifierNil - if the object identifier is nil
|
||||||
- ErrUnsupportedObjectIdentifierType - if an unsupported object identifier type was provided
|
// - ErrObjectIdentifierVisibilityMismatch - if object identifier and visibility are not in a valid state
|
||||||
- ErrUnsupportedResourceReferenceType - if an unsupported resource reference type was provided
|
// - ErrUnsupportedObjectIdentifierType - if an unsupported object identifier type was provided
|
||||||
- protovalidate.ValidationError - if schema validation errors have been detected
|
// - ErrAttributeIdentifierInvalid - if identifier in a checked attribute and the object identifier do not match
|
||||||
- protobuf serialization errors - if the event couldn't be serialized
|
// - 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(
|
Log(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
event *auditV1.AuditLogEntry,
|
event *auditV1.AuditLogEntry,
|
||||||
visibility auditV1.Visibility,
|
visibility auditV1.Visibility,
|
||||||
routingIdentifier *RoutingIdentifier,
|
routableIdentifier *RoutableIdentifier,
|
||||||
objectIdentifier *auditV1.ObjectIdentifier,
|
|
||||||
) error
|
) error
|
||||||
|
|
||||||
// ValidateAndSerialize validates and serializes the event into a byte representation.
|
// ValidateAndSerialize validates and serializes the event into a byte representation.
|
||||||
|
|
@ -57,15 +65,21 @@ type AuditApi interface {
|
||||||
ValidateAndSerialize(
|
ValidateAndSerialize(
|
||||||
event *auditV1.AuditLogEntry,
|
event *auditV1.AuditLogEntry,
|
||||||
visibility auditV1.Visibility,
|
visibility auditV1.Visibility,
|
||||||
routingIdentifier *RoutingIdentifier,
|
routableIdentifier *RoutableIdentifier,
|
||||||
objectIdentifier *auditV1.ObjectIdentifier,
|
|
||||||
) (*CloudEvent, error)
|
) (*CloudEvent, error)
|
||||||
|
|
||||||
// Send the serialized content as byte array to the audit log system.
|
// 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(
|
Send(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
routingIdentifier *RoutingIdentifier,
|
routableIdentifier *RoutableIdentifier,
|
||||||
serializedPayload *CloudEvent,
|
cloudEvent *CloudEvent,
|
||||||
) error
|
) error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -139,25 +153,32 @@ type CloudEvent struct {
|
||||||
traceState *string
|
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
|
// TopicNameResolver is an abstraction for dynamic topic name resolution
|
||||||
// based on event data or api parameters.
|
// based on event data or api parameters.
|
||||||
type TopicNameResolver interface {
|
type TopicNameResolver interface {
|
||||||
|
|
||||||
// Resolve returns a topic name for the given routing identifier
|
// Resolve returns a topic name for the given object identifier
|
||||||
Resolve(routingIdentifier *RoutingIdentifier) (string, error)
|
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"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/google/uuid"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"dev.azure.com/schwarzit/schwarzit.stackit-core-platform/common-audit.git/audit/messaging"
|
"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"
|
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
|
// ContentTypeCloudEventsProtobuf the cloudevents protobuf content-type sent in metadata of messages
|
||||||
const ContentTypeCloudEventsProtobuf = "application/cloudevents+protobuf"
|
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
|
// ErrEventNil indicates that the event was nil
|
||||||
var ErrEventNil = errors.New("event is 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.
|
// ErrObjectIdentifierVisibilityMismatch indicates that a reference mismatch was detected.
|
||||||
//
|
//
|
||||||
// Valid combinations are:
|
// Valid combinations are:
|
||||||
// * Visibility: Public, ObjectIdentifier: <value>
|
// * Visibility: Public, ObjectIdentifier: <type>
|
||||||
// * Visibility: Private, ObjectIdentifier: <value | nil> -> If ObjectIdentifier is nil,
|
// * Visibility: Private, ObjectIdentifier: <type | system>
|
||||||
// the ObjectReference in the message will be ObjectName_OBJECT_NAME_SYSTEM
|
|
||||||
var ErrObjectIdentifierVisibilityMismatch = errors.New("object reference visibility mismatch")
|
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.
|
// ErrUnsupportedObjectIdentifierType indicates that an unsupported object identifier type has been provided.
|
||||||
var ErrUnsupportedObjectIdentifierType = errors.New("unsupported object identifier type")
|
var ErrUnsupportedObjectIdentifierType = errors.New("unsupported object identifier type")
|
||||||
|
|
||||||
// ErrUnsupportedResourceReferenceType indicates that an unsupported reference type has been provided.
|
// ErrAttributeTypeInvalid indicates that an invalid type has been provided.
|
||||||
var ErrUnsupportedResourceReferenceType = errors.New("unsupported resource reference type")
|
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
|
// ErrTopicNameResolverNil states that the topic name resolve is nil
|
||||||
var ErrTopicNameResolverNil = errors.New("topic name resolver 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
|
// ErrMessagingApiNil states that the messaging api is nil
|
||||||
var ErrMessagingApiNil = errors.New("messaging api nil")
|
var ErrMessagingApiNil = errors.New("messaging api nil")
|
||||||
|
|
||||||
// ErrSerializedPayloadNil states that the give serialized payload is nil
|
// ErrCloudEventNil states that the given cloud event is nil
|
||||||
var ErrSerializedPayloadNil = errors.New("serialized payload nil")
|
var ErrCloudEventNil = errors.New("cloud event nil")
|
||||||
|
|
||||||
func validateAndSerializePartially(
|
func validateAndSerializePartially(
|
||||||
validator *ProtobufValidator,
|
validator *ProtobufValidator,
|
||||||
event *auditV1.AuditLogEntry,
|
event *auditV1.AuditLogEntry,
|
||||||
visibility auditV1.Visibility,
|
visibility auditV1.Visibility,
|
||||||
routingIdentifier *RoutingIdentifier,
|
routableIdentifier *RoutableIdentifier,
|
||||||
objectIdentifier *auditV1.ObjectIdentifier,
|
|
||||||
) (*auditV1.RoutableAuditEvent, error) {
|
) (*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 {
|
if event == nil {
|
||||||
return nil, ErrEventNil
|
return nil, ErrEventNil
|
||||||
}
|
}
|
||||||
|
if routableIdentifier == nil {
|
||||||
|
return nil, ErrObjectIdentifierNil
|
||||||
|
}
|
||||||
|
|
||||||
// Validate the actual event
|
// Validate the actual event
|
||||||
err := (*validator).Validate(event)
|
err := (*validator).Validate(event)
|
||||||
|
|
@ -68,34 +78,25 @@ func validateAndSerializePartially(
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure that an object identifier is set if the event is public
|
// Ensure that a valid object identifier is set if the event is public
|
||||||
if objectIdentifier == nil && visibility == auditV1.Visibility_VISIBILITY_PUBLIC {
|
if isSystemIdentifier(routableIdentifier) && visibility == auditV1.Visibility_VISIBILITY_PUBLIC {
|
||||||
return nil, ErrObjectIdentifierVisibilityMismatch
|
return nil, ErrObjectIdentifierVisibilityMismatch
|
||||||
}
|
}
|
||||||
|
|
||||||
// Routing identifier not set but object identifier with routable identifier
|
// Check that provided identifier type is supported
|
||||||
if routingIdentifier == nil && objectIdentifier != nil &&
|
if err := IsSupportedSingularType(routableIdentifier.Type); err != nil {
|
||||||
visibility != auditV1.Visibility_VISIBILITY_PRIVATE {
|
if errors.Is(err, ErrUnknownSingularType) {
|
||||||
|
return nil, ErrUnsupportedRoutableType
|
||||||
return nil, ErrRoutableIdentifierMissing
|
}
|
||||||
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Routing identifier type and object identifier types are not compatible
|
// Check identifier consistency across event attributes
|
||||||
if routingIdentifier != nil &&
|
if err := areIdentifiersIdentical(routableIdentifier, event.LogName); err != nil {
|
||||||
objectIdentifier != nil &&
|
return nil, err
|
||||||
objectIdentifier.Type == auditV1.ObjectType_OBJECT_TYPE_FOLDER &&
|
|
||||||
routingIdentifier.Type != RoutingIdentifierTypeOrganization {
|
|
||||||
|
|
||||||
return nil, ErrRoutableIdentifierTypeMismatch
|
|
||||||
}
|
}
|
||||||
|
if err := areIdentifiersIdentical(routableIdentifier, event.ProtoPayload.ResourceName); err != nil {
|
||||||
// Routing identifier type and object identifier do not match
|
return nil, err
|
||||||
if routingIdentifier != nil &&
|
|
||||||
objectIdentifier != nil &&
|
|
||||||
objectIdentifier.Type != auditV1.ObjectType_OBJECT_TYPE_FOLDER &&
|
|
||||||
routingIdentifier.Identifier.String() != objectIdentifier.Identifier {
|
|
||||||
|
|
||||||
return nil, ErrRoutableIdentifierMismatch
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test serialization even if the data is dropped later while logging to the legacy solution
|
// Test serialization even if the data is dropped later while logging to the legacy solution
|
||||||
|
|
@ -110,18 +111,10 @@ func validateAndSerializePartially(
|
||||||
}
|
}
|
||||||
|
|
||||||
routableEvent := auditV1.RoutableAuditEvent{
|
routableEvent := auditV1.RoutableAuditEvent{
|
||||||
EventName: event.ProtoPayload.MethodName,
|
EventName: event.ProtoPayload.MethodName,
|
||||||
Visibility: visibility,
|
ObjectIdentifier: routableIdentifier.ToObjectIdentifier(),
|
||||||
Data: &auditV1.RoutableAuditEvent_UnencryptedData{UnencryptedData: &payload},
|
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}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
err = (*validator).Validate(&routableEvent)
|
err = (*validator).Validate(&routableEvent)
|
||||||
|
|
@ -135,12 +128,13 @@ func validateAndSerializePartially(
|
||||||
// Send implements AuditApi.Send
|
// Send implements AuditApi.Send
|
||||||
func send(
|
func send(
|
||||||
topicNameResolver *TopicNameResolver,
|
topicNameResolver *TopicNameResolver,
|
||||||
messagingApi *messaging.MessagingApi,
|
messagingApi *messaging.Api,
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
routingIdentifier *RoutingIdentifier,
|
routableIdentifier *RoutableIdentifier,
|
||||||
cloudEvent *CloudEvent,
|
cloudEvent *CloudEvent,
|
||||||
) error {
|
) error {
|
||||||
|
|
||||||
|
// Check that given objects are not nil
|
||||||
if topicNameResolver == nil {
|
if topicNameResolver == nil {
|
||||||
return ErrTopicNameResolverNil
|
return ErrTopicNameResolverNil
|
||||||
}
|
}
|
||||||
|
|
@ -148,10 +142,21 @@ func send(
|
||||||
return ErrMessagingApiNil
|
return ErrMessagingApiNil
|
||||||
}
|
}
|
||||||
if cloudEvent == nil {
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
@ -167,10 +172,10 @@ func send(
|
||||||
applicationAttributes["cloudEvents:type"] = cloudEvent.dataType
|
applicationAttributes["cloudEvents:type"] = cloudEvent.dataType
|
||||||
applicationAttributes["cloudEvents:subject"] = cloudEvent.subject
|
applicationAttributes["cloudEvents:subject"] = cloudEvent.subject
|
||||||
if cloudEvent.traceParent != nil {
|
if cloudEvent.traceParent != nil {
|
||||||
applicationAttributes["cloudEvents:traceparent"] = cloudEvent.traceParent
|
applicationAttributes["cloudEvents:traceparent"] = *cloudEvent.traceParent
|
||||||
}
|
}
|
||||||
if cloudEvent.traceState != nil {
|
if cloudEvent.traceState != nil {
|
||||||
applicationAttributes["cloudEvents:tracestate"] = cloudEvent.traceState
|
applicationAttributes["cloudEvents:tracestate"] = *cloudEvent.traceState
|
||||||
}
|
}
|
||||||
|
|
||||||
return (*messagingApi).Send(
|
return (*messagingApi).Send(
|
||||||
|
|
@ -180,3 +185,37 @@ func send(
|
||||||
(*cloudEvent).dataContentType,
|
(*cloudEvent).dataContentType,
|
||||||
applicationAttributes)
|
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"
|
"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"
|
auditV1 "dev.azure.com/schwarzit/schwarzit.stackit-core-platform/common-audit.git/gen/go/audit/v1"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/bufbuild/protovalidate-go"
|
"github.com/bufbuild/protovalidate-go"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
|
@ -43,8 +46,8 @@ type TopicNameResolverMock struct {
|
||||||
mock.Mock
|
mock.Mock
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *TopicNameResolverMock) Resolve(routingIdentifier *RoutingIdentifier) (string, error) {
|
func (m *TopicNameResolverMock) Resolve(routableIdentifier *RoutableIdentifier) (string, error) {
|
||||||
args := m.Called(routingIdentifier)
|
args := m.Called(routableIdentifier)
|
||||||
return args.String(0), args.Error(1)
|
return args.String(0), args.Error(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -60,7 +63,7 @@ func Test_ValidateAndSerializePartially_EventNil(t *testing.T) {
|
||||||
validator := NewValidator(t)
|
validator := NewValidator(t)
|
||||||
|
|
||||||
_, err := validateAndSerializePartially(
|
_, err := validateAndSerializePartially(
|
||||||
&validator, nil, auditV1.Visibility_VISIBILITY_PUBLIC, nil, nil)
|
&validator, nil, auditV1.Visibility_VISIBILITY_PUBLIC, nil)
|
||||||
|
|
||||||
assert.ErrorIs(t, err, ErrEventNil)
|
assert.ErrorIs(t, err, ErrEventNil)
|
||||||
}
|
}
|
||||||
|
|
@ -68,11 +71,11 @@ func Test_ValidateAndSerializePartially_EventNil(t *testing.T) {
|
||||||
func Test_ValidateAndSerializePartially_AuditEventValidationFailed(t *testing.T) {
|
func Test_ValidateAndSerializePartially_AuditEventValidationFailed(t *testing.T) {
|
||||||
validator := NewValidator(t)
|
validator := NewValidator(t)
|
||||||
|
|
||||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||||
event.LogName = ""
|
event.LogName = ""
|
||||||
|
|
||||||
_, err := validateAndSerializePartially(
|
_, 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]")
|
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) {
|
func Test_ValidateAndSerializePartially_RoutableEventValidationFailed(t *testing.T) {
|
||||||
validator := NewValidator(t)
|
validator := NewValidator(t)
|
||||||
|
|
||||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||||
_, err := validateAndSerializePartially(&validator, event, 3, routingIdentifier, objectIdentifier)
|
_, 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]")
|
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)
|
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(
|
_, 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)
|
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(
|
_, 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) {
|
t.Run("Visibility private - object identifier set", 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) {
|
|
||||||
routableEvent, err := validateAndSerializePartially(
|
routableEvent, err := validateAndSerializePartially(
|
||||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, routingIdentifier, objectIdentifier)
|
&validator, event, auditV1.Visibility_VISIBILITY_PRIVATE, NewRoutableIdentifier(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)
|
|
||||||
|
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.NotNil(t, routableEvent)
|
assert.NotNil(t, routableEvent)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_ValidateAndSerializePartially_IdentifierTypeMismatch(t *testing.T) {
|
func Test_ValidateAndSerializePartially_CheckVisibility_SystemEvent(t *testing.T) {
|
||||||
validator := NewValidator(t)
|
validator := NewValidator(t)
|
||||||
|
|
||||||
event, routingIdentifier, objectIdentifier := NewFolderAuditEvent(nil)
|
event := NewSystemAuditEvent(nil)
|
||||||
routingIdentifier.Type = RoutingIdentifierTypeProject
|
|
||||||
|
|
||||||
_, err := validateAndSerializePartially(
|
t.Run("Visibility public - object identifier nil", func(t *testing.T) {
|
||||||
&validator, event, auditV1.Visibility_VISIBILITY_PUBLIC, routingIdentifier, objectIdentifier)
|
_, 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)
|
validator := NewValidator(t)
|
||||||
|
|
||||||
event, routingIdentifier, objectIdentifier := NewProjectAuditEvent(nil)
|
event, objectIdentifier := NewFolderAuditEvent(nil)
|
||||||
routingIdentifier.Identifier = uuid.New()
|
objectIdentifier.Type = "invalid"
|
||||||
|
|
||||||
_, err := validateAndSerializePartially(
|
_, 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) {
|
func Test_ValidateAndSerializePartially_SystemEvent(t *testing.T) {
|
||||||
|
|
@ -183,16 +257,11 @@ func Test_ValidateAndSerializePartially_SystemEvent(t *testing.T) {
|
||||||
event := NewSystemAuditEvent(nil)
|
event := NewSystemAuditEvent(nil)
|
||||||
|
|
||||||
routableEvent, err := validateAndSerializePartially(
|
routableEvent, err := validateAndSerializePartially(
|
||||||
&validator, event, auditV1.Visibility_VISIBILITY_PRIVATE, nil, nil)
|
&validator, event, auditV1.Visibility_VISIBILITY_PRIVATE, RoutableSystemIdentifier)
|
||||||
|
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
assert.Equal(t, event.LogName, fmt.Sprintf("system/%s/logs/%s", SystemIdentifier.Identifier, EventTypeSystemEvent))
|
||||||
switch reference := routableEvent.ResourceReference.(type) {
|
assert.True(t, proto.Equal(routableEvent.ObjectIdentifier, SystemIdentifier))
|
||||||
case *auditV1.RoutableAuditEvent_ObjectName:
|
|
||||||
assert.Equal(t, auditV1.ObjectName_OBJECT_NAME_SYSTEM, reference.ObjectName)
|
|
||||||
default:
|
|
||||||
assert.Fail(t, "unexpected resource reference")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_Send_TopicNameResolverNil(t *testing.T) {
|
func Test_Send_TopicNameResolverNil(t *testing.T) {
|
||||||
|
|
@ -209,8 +278,8 @@ func Test_Send_TopicNameResolutionError(t *testing.T) {
|
||||||
|
|
||||||
var cloudEvent = CloudEvent{}
|
var cloudEvent = CloudEvent{}
|
||||||
|
|
||||||
var messagingApi messaging.MessagingApi = &messaging.AmqpMessagingApi{}
|
var messagingApi messaging.Api = &messaging.AmqpApi{}
|
||||||
err := send(&topicNameResolver, &messagingApi, context.Background(), nil, &cloudEvent)
|
err := send(&topicNameResolver, &messagingApi, context.Background(), RoutableSystemIdentifier, &cloudEvent)
|
||||||
assert.ErrorIs(t, err, expectedError)
|
assert.ErrorIs(t, err, expectedError)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -220,11 +289,31 @@ func Test_Send_MessagingApiNil(t *testing.T) {
|
||||||
assert.ErrorIs(t, err, ErrMessagingApiNil)
|
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 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)
|
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) {
|
func Test_Send(t *testing.T) {
|
||||||
|
|
@ -234,9 +323,91 @@ func Test_Send(t *testing.T) {
|
||||||
|
|
||||||
messagingApiMock := MessagingApiMock{}
|
messagingApiMock := MessagingApiMock{}
|
||||||
messagingApiMock.On("Send", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil)
|
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{}
|
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))
|
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
|
// Resolve implements TopicNameResolver.Resolve
|
||||||
func (r *LegacyTopicNameResolver) Resolve(*RoutingIdentifier) (string, error) {
|
func (r *LegacyTopicNameResolver) Resolve(*RoutableIdentifier) (string, error) {
|
||||||
return r.topicName, nil
|
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
|
// Note: The implementation will be deprecated and replaced with the "routableAuditApi" once the new audit log routing is implemented
|
||||||
type LegacyAuditApi struct {
|
type LegacyAuditApi struct {
|
||||||
messagingApi *messaging.MessagingApi
|
messagingApi *messaging.Api
|
||||||
topicNameResolver *TopicNameResolver
|
topicNameResolver *TopicNameResolver
|
||||||
validator *ProtobufValidator
|
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
|
// Note: The NewLegacyAuditApi method will be deprecated and replaced with "newRoutableAuditApi" once the new audit log routing is implemented
|
||||||
func NewLegacyAuditApi(
|
func NewLegacyAuditApi(
|
||||||
messagingApi *messaging.MessagingApi,
|
messagingApi *messaging.Api,
|
||||||
topicNameConfig LegacyTopicNameConfig,
|
topicNameConfig LegacyTopicNameConfig,
|
||||||
validator ProtobufValidator,
|
validator ProtobufValidator,
|
||||||
) (*AuditApi, error) {
|
) (*AuditApi, error) {
|
||||||
|
|
@ -56,6 +56,9 @@ func NewLegacyAuditApi(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Topic resolver
|
// Topic resolver
|
||||||
|
if topicNameConfig.TopicName == "" {
|
||||||
|
return nil, errors.New("topic name is required")
|
||||||
|
}
|
||||||
var topicNameResolver TopicNameResolver = &LegacyTopicNameResolver{topicName: topicNameConfig.TopicName}
|
var topicNameResolver TopicNameResolver = &LegacyTopicNameResolver{topicName: topicNameConfig.TopicName}
|
||||||
|
|
||||||
// Audit api
|
// Audit api
|
||||||
|
|
@ -73,16 +76,15 @@ func (a *LegacyAuditApi) Log(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
event *auditV1.AuditLogEntry,
|
event *auditV1.AuditLogEntry,
|
||||||
visibility auditV1.Visibility,
|
visibility auditV1.Visibility,
|
||||||
routingIdentifier *RoutingIdentifier,
|
routableIdentifier *RoutableIdentifier,
|
||||||
objectIdentifier *auditV1.ObjectIdentifier,
|
|
||||||
) error {
|
) error {
|
||||||
|
|
||||||
cloudEvent, err := a.ValidateAndSerialize(event, visibility, routingIdentifier, objectIdentifier)
|
cloudEvent, err := a.ValidateAndSerialize(event, visibility, routableIdentifier)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return a.Send(ctx, routingIdentifier, cloudEvent)
|
return a.Send(ctx, routableIdentifier, cloudEvent)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ValidateAndSerialize implements AuditApi.ValidateAndSerialize.
|
// ValidateAndSerialize implements AuditApi.ValidateAndSerialize.
|
||||||
|
|
@ -90,11 +92,10 @@ func (a *LegacyAuditApi) Log(
|
||||||
func (a *LegacyAuditApi) ValidateAndSerialize(
|
func (a *LegacyAuditApi) ValidateAndSerialize(
|
||||||
event *auditV1.AuditLogEntry,
|
event *auditV1.AuditLogEntry,
|
||||||
visibility auditV1.Visibility,
|
visibility auditV1.Visibility,
|
||||||
routingIdentifier *RoutingIdentifier,
|
routableIdentifier *RoutableIdentifier,
|
||||||
objectIdentifier *auditV1.ObjectIdentifier,
|
|
||||||
) (*CloudEvent, error) {
|
) (*CloudEvent, error) {
|
||||||
|
|
||||||
routableEvent, err := validateAndSerializePartially(a.validator, event, visibility, routingIdentifier, objectIdentifier)
|
routableEvent, err := validateAndSerializePartially(a.validator, event, visibility, routableIdentifier)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
@ -132,11 +133,11 @@ func (a *LegacyAuditApi) ValidateAndSerialize(
|
||||||
// Send implements AuditApi.Send
|
// Send implements AuditApi.Send
|
||||||
func (a *LegacyAuditApi) Send(
|
func (a *LegacyAuditApi) Send(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
routingIdentifier *RoutingIdentifier,
|
routableIdentifier *RoutableIdentifier,
|
||||||
cloudEvent *CloudEvent,
|
cloudEvent *CloudEvent,
|
||||||
) error {
|
) 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
|
// 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
|
// Context and event type
|
||||||
var messageContext *LegacyAuditEventContext
|
var messageContext *LegacyAuditEventContext
|
||||||
var eventType string
|
var eventType string
|
||||||
switch ref := routableEvent.GetResourceReference().(type) {
|
switch routableEvent.ObjectIdentifier.Type {
|
||||||
case *auditV1.RoutableAuditEvent_ObjectIdentifier:
|
case string(SingularTypeProject):
|
||||||
eventType = "ADMIN_ACTIVITY"
|
eventType = "ADMIN_ACTIVITY"
|
||||||
if ref.ObjectIdentifier.Type == auditV1.ObjectType_OBJECT_TYPE_ORGANIZATION {
|
messageContext = &LegacyAuditEventContext{
|
||||||
messageContext = &LegacyAuditEventContext{
|
OrganizationId: nil,
|
||||||
OrganizationId: &ref.ObjectIdentifier.Identifier,
|
FolderId: nil,
|
||||||
FolderId: nil,
|
ProjectId: &routableEvent.ObjectIdentifier.Identifier,
|
||||||
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
|
|
||||||
}
|
}
|
||||||
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"
|
eventType = "SYSTEM_EVENT"
|
||||||
messageContext = nil
|
messageContext = nil
|
||||||
default:
|
default:
|
||||||
return nil, ErrUnsupportedResourceReferenceType
|
return nil, ErrUnsupportedObjectIdentifierType
|
||||||
}
|
}
|
||||||
|
|
||||||
var visibility string
|
var visibility string
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
||||||
defer solaceContainer.Stop()
|
defer solaceContainer.Stop()
|
||||||
|
|
||||||
// Instantiate the messaging api
|
// 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)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
// Validator
|
// Validator
|
||||||
|
|
@ -65,7 +65,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
// Instantiate test data
|
// Instantiate test data
|
||||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||||
|
|
||||||
// Log the event to solace
|
// Log the event to solace
|
||||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||||
|
|
@ -73,8 +73,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
||||||
ctx,
|
ctx,
|
||||||
event,
|
event,
|
||||||
visibility,
|
visibility,
|
||||||
routingIdentifier,
|
NewRoutableIdentifier(objectIdentifier),
|
||||||
objectIdentifier,
|
|
||||||
))
|
))
|
||||||
|
|
||||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||||
|
|
@ -103,7 +102,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
// Instantiate test data
|
// Instantiate test data
|
||||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||||
|
|
||||||
// Log the event to solace
|
// Log the event to solace
|
||||||
visibility := auditV1.Visibility_VISIBILITY_PRIVATE
|
visibility := auditV1.Visibility_VISIBILITY_PRIVATE
|
||||||
|
|
@ -111,8 +110,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
||||||
ctx,
|
ctx,
|
||||||
event,
|
event,
|
||||||
visibility,
|
visibility,
|
||||||
routingIdentifier,
|
NewRoutableIdentifier(objectIdentifier),
|
||||||
objectIdentifier,
|
|
||||||
))
|
))
|
||||||
|
|
||||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||||
|
|
@ -142,7 +140,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
// Instantiate test data
|
// Instantiate test data
|
||||||
event, routingIdentifier, objectIdentifier := NewFolderAuditEvent(nil)
|
event, objectIdentifier := NewFolderAuditEvent(nil)
|
||||||
|
|
||||||
// Log the event to solace
|
// Log the event to solace
|
||||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||||
|
|
@ -150,8 +148,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
||||||
ctx,
|
ctx,
|
||||||
event,
|
event,
|
||||||
visibility,
|
visibility,
|
||||||
routingIdentifier,
|
NewRoutableIdentifier(objectIdentifier),
|
||||||
objectIdentifier,
|
|
||||||
))
|
))
|
||||||
|
|
||||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||||
|
|
@ -180,7 +177,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
// Instantiate test data
|
// Instantiate test data
|
||||||
event, routingIdentifier, objectIdentifier := NewFolderAuditEvent(nil)
|
event, objectIdentifier := NewFolderAuditEvent(nil)
|
||||||
|
|
||||||
// Log the event to solace
|
// Log the event to solace
|
||||||
visibility := auditV1.Visibility_VISIBILITY_PRIVATE
|
visibility := auditV1.Visibility_VISIBILITY_PRIVATE
|
||||||
|
|
@ -188,8 +185,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
||||||
ctx,
|
ctx,
|
||||||
event,
|
event,
|
||||||
visibility,
|
visibility,
|
||||||
routingIdentifier,
|
NewRoutableIdentifier(objectIdentifier),
|
||||||
objectIdentifier,
|
|
||||||
))
|
))
|
||||||
|
|
||||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||||
|
|
@ -219,7 +215,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
// Instantiate test data
|
// Instantiate test data
|
||||||
event, routingIdentifier, objectIdentifier := NewProjectAuditEvent(nil)
|
event, objectIdentifier := NewProjectAuditEvent(nil)
|
||||||
|
|
||||||
// Log the event to solace
|
// Log the event to solace
|
||||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||||
|
|
@ -227,8 +223,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
||||||
ctx,
|
ctx,
|
||||||
event,
|
event,
|
||||||
visibility,
|
visibility,
|
||||||
routingIdentifier,
|
NewRoutableIdentifier(objectIdentifier),
|
||||||
objectIdentifier,
|
|
||||||
))
|
))
|
||||||
|
|
||||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||||
|
|
@ -257,7 +252,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
// Instantiate test data
|
// Instantiate test data
|
||||||
event, routingIdentifier, objectIdentifier := NewProjectAuditEvent(nil)
|
event, objectIdentifier := NewProjectAuditEvent(nil)
|
||||||
|
|
||||||
// Log the event to solace
|
// Log the event to solace
|
||||||
visibility := auditV1.Visibility_VISIBILITY_PRIVATE
|
visibility := auditV1.Visibility_VISIBILITY_PRIVATE
|
||||||
|
|
@ -265,8 +260,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
||||||
ctx,
|
ctx,
|
||||||
event,
|
event,
|
||||||
visibility,
|
visibility,
|
||||||
routingIdentifier,
|
NewRoutableIdentifier(objectIdentifier),
|
||||||
objectIdentifier,
|
|
||||||
))
|
))
|
||||||
|
|
||||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||||
|
|
@ -304,8 +298,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
||||||
ctx,
|
ctx,
|
||||||
event,
|
event,
|
||||||
visibility,
|
visibility,
|
||||||
nil,
|
RoutableSystemIdentifier,
|
||||||
nil,
|
|
||||||
))
|
))
|
||||||
|
|
||||||
// Receive the event from solace
|
// Receive the event from solace
|
||||||
|
|
@ -352,7 +345,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
// Instantiate test data
|
// Instantiate test data
|
||||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||||
|
|
||||||
// Log the event to solace
|
// Log the event to solace
|
||||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||||
|
|
@ -360,8 +353,7 @@ func TestLegacyAuditApi(t *testing.T) {
|
||||||
ctx,
|
ctx,
|
||||||
event,
|
event,
|
||||||
visibility,
|
visibility,
|
||||||
routingIdentifier,
|
NewRoutableIdentifier(objectIdentifier),
|
||||||
objectIdentifier,
|
|
||||||
))
|
))
|
||||||
|
|
||||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||||
|
|
@ -480,7 +472,7 @@ func TestLegacyAuditApi_ValidateAndSerialize_ValidationFailed(t *testing.T) {
|
||||||
auditApi := LegacyAuditApi{validator: &protobufValidator}
|
auditApi := LegacyAuditApi{validator: &protobufValidator}
|
||||||
|
|
||||||
event := NewSystemAuditEvent(nil)
|
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)
|
assert.ErrorIs(t, err, expectedError)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -494,43 +486,42 @@ func TestLegacyAuditApi_Log_ValidationFailed(t *testing.T) {
|
||||||
auditApi := LegacyAuditApi{validator: &protobufValidator}
|
auditApi := LegacyAuditApi{validator: &protobufValidator}
|
||||||
|
|
||||||
event := NewSystemAuditEvent(nil)
|
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)
|
assert.ErrorIs(t, err, expectedError)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestLegacyAuditApi_Log_NilEvent(t *testing.T) {
|
func TestLegacyAuditApi_Log_NilEvent(t *testing.T) {
|
||||||
auditApi := LegacyAuditApi{}
|
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)
|
assert.ErrorIs(t, err, ErrEventNil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestLegacyAuditApi_ConvertAndSerializeIntoLegacyFormatInvalidObjectIdentifierType(t *testing.T) {
|
func TestLegacyAuditApi_ConvertAndSerializeIntoLegacyFormatInvalidObjectIdentifierType(t *testing.T) {
|
||||||
customization := func(event *auditV1.AuditLogEntry,
|
customization := func(event *auditV1.AuditLogEntry,
|
||||||
routingIdentifier *RoutingIdentifier,
|
|
||||||
objectIdentifier *auditV1.ObjectIdentifier) {
|
objectIdentifier *auditV1.ObjectIdentifier) {
|
||||||
objectIdentifier.Type = 4
|
objectIdentifier.Type = "invalid"
|
||||||
}
|
}
|
||||||
event, identifier, objectIdentifier := NewProjectAuditEvent(&customization)
|
event, objectIdentifier := NewProjectAuditEvent(&customization)
|
||||||
|
|
||||||
validator := &ProtobufValidatorMock{}
|
validator := &ProtobufValidatorMock{}
|
||||||
validator.On("Validate", mock.Anything).Return(nil)
|
validator.On("Validate", mock.Anything).Return(nil)
|
||||||
var protobufValidator ProtobufValidator = validator
|
var protobufValidator ProtobufValidator = validator
|
||||||
|
|
||||||
auditApi := LegacyAuditApi{validator: &protobufValidator}
|
auditApi := LegacyAuditApi{validator: &protobufValidator}
|
||||||
_, err := auditApi.ValidateAndSerialize(event, auditV1.Visibility_VISIBILITY_PUBLIC, identifier, objectIdentifier)
|
_, err := auditApi.ValidateAndSerialize(event, auditV1.Visibility_VISIBILITY_PUBLIC, NewRoutableIdentifier(objectIdentifier))
|
||||||
assert.ErrorIs(t, err, ErrUnsupportedObjectIdentifierType)
|
assert.ErrorIs(t, err, ErrUnsupportedRoutableType)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestLegacyAuditApi_ConvertAndSerializeIntoLegacyFormat_NoResourceReference(t *testing.T) {
|
func TestLegacyAuditApi_ConvertAndSerializeIntoLegacyFormat_NoObjectIdentifier(t *testing.T) {
|
||||||
event, _, _ := NewProjectAuditEvent(nil)
|
event, _ := NewProjectAuditEvent(nil)
|
||||||
routableEvent := auditV1.RoutableAuditEvent{
|
routableEvent := auditV1.RoutableAuditEvent{
|
||||||
EventName: event.ProtoPayload.MethodName,
|
EventName: event.ProtoPayload.MethodName,
|
||||||
Visibility: auditV1.Visibility_VISIBILITY_PUBLIC,
|
Visibility: auditV1.Visibility_VISIBILITY_PUBLIC,
|
||||||
ResourceReference: nil,
|
ObjectIdentifier: nil,
|
||||||
Data: nil,
|
Data: nil,
|
||||||
}
|
}
|
||||||
|
|
||||||
auditApi := LegacyAuditApi{}
|
auditApi := LegacyAuditApi{}
|
||||||
_, err := auditApi.convertAndSerializeIntoLegacyFormat(event, &routableEvent)
|
_, 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,
|
_ context.Context,
|
||||||
event *auditV1.AuditLogEntry,
|
event *auditV1.AuditLogEntry,
|
||||||
visibility auditV1.Visibility,
|
visibility auditV1.Visibility,
|
||||||
routingIdentifier *RoutingIdentifier,
|
routableIdentifier *RoutableIdentifier,
|
||||||
objectIdentifier *auditV1.ObjectIdentifier,
|
|
||||||
) error {
|
) error {
|
||||||
|
|
||||||
_, err := a.ValidateAndSerialize(event, visibility, routingIdentifier, objectIdentifier)
|
_, err := a.ValidateAndSerialize(event, visibility, routableIdentifier)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -44,11 +43,10 @@ func (a *MockAuditApi) Log(
|
||||||
func (a *MockAuditApi) ValidateAndSerialize(
|
func (a *MockAuditApi) ValidateAndSerialize(
|
||||||
event *auditV1.AuditLogEntry,
|
event *auditV1.AuditLogEntry,
|
||||||
visibility auditV1.Visibility,
|
visibility auditV1.Visibility,
|
||||||
routingIdentifier *RoutingIdentifier,
|
routableIdentifier *RoutableIdentifier,
|
||||||
objectIdentifier *auditV1.ObjectIdentifier,
|
|
||||||
) (*CloudEvent, error) {
|
) (*CloudEvent, error) {
|
||||||
|
|
||||||
routableEvent, err := validateAndSerializePartially(a.validator, event, visibility, routingIdentifier, objectIdentifier)
|
routableEvent, err := validateAndSerializePartially(a.validator, event, visibility, routableIdentifier)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
@ -67,9 +65,8 @@ func (a *MockAuditApi) ValidateAndSerialize(
|
||||||
dataContentType: "application/cloudevents+protobuf",
|
dataContentType: "application/cloudevents+protobuf",
|
||||||
dataType: fmt.Sprintf("%v", routableEvent.ProtoReflect().Descriptor().FullName()),
|
dataType: fmt.Sprintf("%v", routableEvent.ProtoReflect().Descriptor().FullName()),
|
||||||
// TODO check if this is correct
|
// TODO check if this is correct
|
||||||
subject: event.ProtoPayload.ResourceName,
|
subject: event.ProtoPayload.ResourceName,
|
||||||
data: routableEventBytes,
|
data: routableEventBytes,
|
||||||
// TODO set trace fields
|
|
||||||
traceParent: nil,
|
traceParent: nil,
|
||||||
traceState: nil,
|
traceState: nil,
|
||||||
}
|
}
|
||||||
|
|
@ -78,6 +75,6 @@ func (a *MockAuditApi) ValidateAndSerialize(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send implements AuditApi.Send
|
// Send implements AuditApi.Send
|
||||||
func (a *MockAuditApi) Send(context.Context, *RoutingIdentifier, *CloudEvent) error {
|
func (a *MockAuditApi) Send(context.Context, *RoutableIdentifier, *CloudEvent) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,28 +15,29 @@ func TestMockAuditApi_Log(t *testing.T) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
// Instantiate test data
|
// Instantiate test data
|
||||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||||
|
routableObjectIdentifier := NewRoutableIdentifier(objectIdentifier)
|
||||||
|
|
||||||
// Test
|
// Test
|
||||||
t.Run("Log", func(t *testing.T) {
|
t.Run("Log", func(t *testing.T) {
|
||||||
assert.Nil(t, (*auditApi).Log(
|
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) {
|
t.Run("ValidateAndSerialize", func(t *testing.T) {
|
||||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||||
cloudEvent, err := (*auditApi).ValidateAndSerialize(
|
cloudEvent, err := (*auditApi).ValidateAndSerialize(
|
||||||
event, visibility, routingIdentifier, objectIdentifier)
|
event, visibility, routableObjectIdentifier)
|
||||||
|
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
validateRoutableEventPayload(
|
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) {
|
t.Run("ValidateAndSerialize event nil", func(t *testing.T) {
|
||||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||||
_, err := (*auditApi).ValidateAndSerialize(nil, visibility, routingIdentifier, objectIdentifier)
|
_, err := (*auditApi).ValidateAndSerialize(nil, visibility, routableObjectIdentifier)
|
||||||
|
|
||||||
assert.ErrorIs(t, err, ErrEventNil)
|
assert.ErrorIs(t, err, ErrEventNil)
|
||||||
})
|
})
|
||||||
|
|
@ -44,6 +45,6 @@ func TestMockAuditApi_Log(t *testing.T) {
|
||||||
t.Run("Send", func(t *testing.T) {
|
t.Run("Send", func(t *testing.T) {
|
||||||
var cloudEvent = CloudEvent{}
|
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.
|
// routableTopicNameResolver implements TopicNameResolver.
|
||||||
// Resolves topic names by concatenating topic type prefixes with routing identifiers.
|
// Resolves topic names by concatenating topic type prefixes with routing identifiers.
|
||||||
type routableTopicNameResolver struct {
|
type routableTopicNameResolver struct {
|
||||||
|
folderTopicPrefix string
|
||||||
organizationTopicPrefix string
|
organizationTopicPrefix string
|
||||||
ProjectTopicPrefix string
|
projectTopicPrefix string
|
||||||
// If no identifier is provided for routing, it will be routed to a system topic
|
// If no identifier is provided for routing, it will be routed to a system topic
|
||||||
systemTopicName string
|
systemTopicName string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resolve implements TopicNameResolver.Resolve.
|
// Resolve implements TopicNameResolver.Resolve.
|
||||||
func (r *routableTopicNameResolver) Resolve(routingIdentifier *RoutingIdentifier) (string, error) {
|
func (r *routableTopicNameResolver) Resolve(routableIdentifier *RoutableIdentifier) (string, error) {
|
||||||
|
|
||||||
if routingIdentifier == nil {
|
if routableIdentifier == nil {
|
||||||
return r.systemTopicName, nil
|
return "", ErrObjectIdentifierNil
|
||||||
}
|
}
|
||||||
|
|
||||||
switch routingIdentifier.Type {
|
switch routableIdentifier.Type {
|
||||||
case RoutingIdentifierTypeOrganization:
|
case SingularTypeOrganization:
|
||||||
return fmt.Sprintf("topic://%s/%s", r.organizationTopicPrefix, routingIdentifier.Identifier), nil
|
return fmt.Sprintf("topic://%s/%s", r.organizationTopicPrefix, routableIdentifier.Identifier), nil
|
||||||
case RoutingIdentifierTypeProject:
|
case SingularTypeProject:
|
||||||
return fmt.Sprintf("topic://%s/%s", r.ProjectTopicPrefix, routingIdentifier.Identifier), nil
|
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:
|
default:
|
||||||
return "", ErrUnsupportedObjectIdentifierType
|
return "", ErrUnsupportedObjectIdentifierType
|
||||||
}
|
}
|
||||||
|
|
@ -39,6 +44,7 @@ func (r *routableTopicNameResolver) Resolve(routingIdentifier *RoutingIdentifier
|
||||||
|
|
||||||
// topicNameConfig provides topic name information required for the topic name resolution.
|
// topicNameConfig provides topic name information required for the topic name resolution.
|
||||||
type topicNameConfig struct {
|
type topicNameConfig struct {
|
||||||
|
FolderTopicPrefix string
|
||||||
OrganizationTopicPrefix string
|
OrganizationTopicPrefix string
|
||||||
ProjectTopicPrefix string
|
ProjectTopicPrefix string
|
||||||
SystemTopicName string
|
SystemTopicName string
|
||||||
|
|
@ -48,14 +54,14 @@ type topicNameConfig struct {
|
||||||
// Warning: It is only there for local (compatibility) testing.
|
// Warning: It is only there for local (compatibility) testing.
|
||||||
// DO NOT USE IT!
|
// DO NOT USE IT!
|
||||||
type routableAuditApi struct {
|
type routableAuditApi struct {
|
||||||
messagingApi *messaging.MessagingApi
|
messagingApi *messaging.Api
|
||||||
topicNameResolver *TopicNameResolver
|
topicNameResolver *TopicNameResolver
|
||||||
validator *ProtobufValidator
|
validator *ProtobufValidator
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewRoutableAuditApi can be used to initialize the audit log api.
|
// NewRoutableAuditApi can be used to initialize the audit log api.
|
||||||
func newRoutableAuditApi(
|
func newRoutableAuditApi(
|
||||||
messagingApi *messaging.MessagingApi,
|
messagingApi *messaging.Api,
|
||||||
topicNameConfig topicNameConfig,
|
topicNameConfig topicNameConfig,
|
||||||
validator ProtobufValidator,
|
validator ProtobufValidator,
|
||||||
) (*AuditApi, error) {
|
) (*AuditApi, error) {
|
||||||
|
|
@ -65,9 +71,23 @@ func newRoutableAuditApi(
|
||||||
}
|
}
|
||||||
|
|
||||||
// Topic resolver
|
// 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{
|
var topicNameResolver TopicNameResolver = &routableTopicNameResolver{
|
||||||
|
folderTopicPrefix: topicNameConfig.FolderTopicPrefix,
|
||||||
organizationTopicPrefix: topicNameConfig.OrganizationTopicPrefix,
|
organizationTopicPrefix: topicNameConfig.OrganizationTopicPrefix,
|
||||||
ProjectTopicPrefix: topicNameConfig.ProjectTopicPrefix,
|
projectTopicPrefix: topicNameConfig.ProjectTopicPrefix,
|
||||||
systemTopicName: topicNameConfig.SystemTopicName,
|
systemTopicName: topicNameConfig.SystemTopicName,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -86,32 +106,29 @@ func (a *routableAuditApi) Log(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
event *auditV1.AuditLogEntry,
|
event *auditV1.AuditLogEntry,
|
||||||
visibility auditV1.Visibility,
|
visibility auditV1.Visibility,
|
||||||
routingIdentifier *RoutingIdentifier,
|
routableIdentifier *RoutableIdentifier,
|
||||||
objectIdentifier *auditV1.ObjectIdentifier,
|
|
||||||
) error {
|
) error {
|
||||||
|
|
||||||
cloudEvent, err := a.ValidateAndSerialize(event, visibility, routingIdentifier, objectIdentifier)
|
cloudEvent, err := a.ValidateAndSerialize(event, visibility, routableIdentifier)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return a.Send(ctx, routingIdentifier, cloudEvent)
|
return a.Send(ctx, routableIdentifier, cloudEvent)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ValidateAndSerialize implements AuditApi.ValidateAndSerialize
|
// ValidateAndSerialize implements AuditApi.ValidateAndSerialize
|
||||||
func (a *routableAuditApi) ValidateAndSerialize(
|
func (a *routableAuditApi) ValidateAndSerialize(
|
||||||
event *auditV1.AuditLogEntry,
|
event *auditV1.AuditLogEntry,
|
||||||
visibility auditV1.Visibility,
|
visibility auditV1.Visibility,
|
||||||
routingIdentifier *RoutingIdentifier,
|
routableIdentifier *RoutableIdentifier,
|
||||||
objectIdentifier *auditV1.ObjectIdentifier,
|
|
||||||
) (*CloudEvent, error) {
|
) (*CloudEvent, error) {
|
||||||
|
|
||||||
routableEvent, err := validateAndSerializePartially(
|
routableEvent, err := validateAndSerializePartially(
|
||||||
a.validator,
|
a.validator,
|
||||||
event,
|
event,
|
||||||
visibility,
|
visibility,
|
||||||
routingIdentifier,
|
routableIdentifier)
|
||||||
objectIdentifier)
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
@ -144,9 +161,9 @@ func (a *routableAuditApi) ValidateAndSerialize(
|
||||||
// Send implements AuditApi.Send
|
// Send implements AuditApi.Send
|
||||||
func (a *routableAuditApi) Send(
|
func (a *routableAuditApi) Send(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
routingIdentifier *RoutingIdentifier,
|
routableIdentifier *RoutableIdentifier,
|
||||||
cloudEvent *CloudEvent,
|
cloudEvent *CloudEvent,
|
||||||
) error {
|
) 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()
|
defer solaceContainer.Stop()
|
||||||
|
|
||||||
// Instantiate the messaging api
|
// 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)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
// Validator
|
// Validator
|
||||||
|
|
@ -40,10 +40,12 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
// Instantiate the audit api
|
// Instantiate the audit api
|
||||||
organizationTopicPrefix := "org"
|
organizationTopicPrefix := "org"
|
||||||
projectTopicPrefix := "project"
|
projectTopicPrefix := "project"
|
||||||
|
folderTopicPrefix := "folder"
|
||||||
systemTopicName := "topic://system/admin-events"
|
systemTopicName := "topic://system/admin-events"
|
||||||
auditApi, err := newRoutableAuditApi(
|
auditApi, err := newRoutableAuditApi(
|
||||||
messagingApi,
|
messagingApi,
|
||||||
topicNameConfig{
|
topicNameConfig{
|
||||||
|
FolderTopicPrefix: folderTopicPrefix,
|
||||||
OrganizationTopicPrefix: organizationTopicPrefix,
|
OrganizationTopicPrefix: organizationTopicPrefix,
|
||||||
ProjectTopicPrefix: projectTopicPrefix,
|
ProjectTopicPrefix: projectTopicPrefix,
|
||||||
SystemTopicName: systemTopicName},
|
SystemTopicName: systemTopicName},
|
||||||
|
|
@ -61,7 +63,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "org/*"))
|
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "org/*"))
|
||||||
|
|
||||||
// Instantiate test data
|
// Instantiate test data
|
||||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||||
|
|
||||||
// Log the event to solace
|
// Log the event to solace
|
||||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||||
|
|
@ -69,8 +71,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
ctx,
|
ctx,
|
||||||
event,
|
event,
|
||||||
visibility,
|
visibility,
|
||||||
routingIdentifier,
|
NewRoutableIdentifier(objectIdentifier),
|
||||||
objectIdentifier,
|
|
||||||
))
|
))
|
||||||
|
|
||||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||||
|
|
@ -80,7 +81,6 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
t,
|
t,
|
||||||
organizationTopicPrefix,
|
organizationTopicPrefix,
|
||||||
message,
|
message,
|
||||||
routingIdentifier,
|
|
||||||
objectIdentifier,
|
objectIdentifier,
|
||||||
event,
|
event,
|
||||||
"stackit.resourcemanager.v2.organization.created",
|
"stackit.resourcemanager.v2.organization.created",
|
||||||
|
|
@ -95,8 +95,8 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "org/*"))
|
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "org/*"))
|
||||||
|
|
||||||
// Instantiate test data
|
// Instantiate test data
|
||||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||||
topicName := fmt.Sprintf("org/%s", routingIdentifier.Identifier)
|
topicName := fmt.Sprintf("org/%s", objectIdentifier.Identifier)
|
||||||
assert.NoError(
|
assert.NoError(
|
||||||
t,
|
t,
|
||||||
solaceContainer.TopicSubscriptionCreate(ctx, queueName, topicName))
|
solaceContainer.TopicSubscriptionCreate(ctx, queueName, topicName))
|
||||||
|
|
@ -108,8 +108,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
ctx,
|
ctx,
|
||||||
event,
|
event,
|
||||||
visibility,
|
visibility,
|
||||||
routingIdentifier,
|
NewRoutableIdentifier(objectIdentifier),
|
||||||
objectIdentifier,
|
|
||||||
))
|
))
|
||||||
|
|
||||||
// Receive the event from solace
|
// Receive the event from solace
|
||||||
|
|
@ -120,7 +119,6 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
t,
|
t,
|
||||||
organizationTopicPrefix,
|
organizationTopicPrefix,
|
||||||
message,
|
message,
|
||||||
routingIdentifier,
|
|
||||||
objectIdentifier,
|
objectIdentifier,
|
||||||
event,
|
event,
|
||||||
"stackit.resourcemanager.v2.organization.created",
|
"stackit.resourcemanager.v2.organization.created",
|
||||||
|
|
@ -134,10 +132,10 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
// Create the queue and topic subscription in solace
|
// Create the queue and topic subscription in solace
|
||||||
queueName := "folder-event-public"
|
queueName := "folder-event-public"
|
||||||
assert.NoError(t, solaceContainer.QueueCreate(ctx, queueName))
|
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
|
// Instantiate test data
|
||||||
event, routingIdentifier, objectIdentifier := NewFolderAuditEvent(nil)
|
event, objectIdentifier := NewFolderAuditEvent(nil)
|
||||||
|
|
||||||
// Log the event to solace
|
// Log the event to solace
|
||||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||||
|
|
@ -145,8 +143,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
ctx,
|
ctx,
|
||||||
event,
|
event,
|
||||||
visibility,
|
visibility,
|
||||||
routingIdentifier,
|
NewRoutableIdentifier(objectIdentifier),
|
||||||
objectIdentifier,
|
|
||||||
))
|
))
|
||||||
|
|
||||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||||
|
|
@ -154,9 +151,8 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
|
|
||||||
validateSentEvent(
|
validateSentEvent(
|
||||||
t,
|
t,
|
||||||
organizationTopicPrefix,
|
folderTopicPrefix,
|
||||||
message,
|
message,
|
||||||
routingIdentifier,
|
|
||||||
objectIdentifier,
|
objectIdentifier,
|
||||||
event,
|
event,
|
||||||
"stackit.resourcemanager.v2.folder.created",
|
"stackit.resourcemanager.v2.folder.created",
|
||||||
|
|
@ -168,11 +164,11 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
|
|
||||||
queueName := "folder-event-private"
|
queueName := "folder-event-private"
|
||||||
assert.NoError(t, solaceContainer.QueueCreate(ctx, queueName))
|
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
|
// Instantiate test data
|
||||||
event, routingIdentifier, objectIdentifier := NewFolderAuditEvent(nil)
|
event, objectIdentifier := NewFolderAuditEvent(nil)
|
||||||
topicName := fmt.Sprintf("org/%s", routingIdentifier.Identifier)
|
topicName := fmt.Sprintf("folder/%s", objectIdentifier.Identifier)
|
||||||
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, topicName))
|
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, topicName))
|
||||||
|
|
||||||
// Log the event to solace
|
// Log the event to solace
|
||||||
|
|
@ -182,8 +178,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
ctx,
|
ctx,
|
||||||
event,
|
event,
|
||||||
visibility,
|
visibility,
|
||||||
routingIdentifier,
|
NewRoutableIdentifier(objectIdentifier),
|
||||||
objectIdentifier,
|
|
||||||
))
|
))
|
||||||
|
|
||||||
// Receive the event from solace
|
// Receive the event from solace
|
||||||
|
|
@ -192,9 +187,8 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
|
|
||||||
validateSentEvent(
|
validateSentEvent(
|
||||||
t,
|
t,
|
||||||
organizationTopicPrefix,
|
folderTopicPrefix,
|
||||||
message,
|
message,
|
||||||
routingIdentifier,
|
|
||||||
objectIdentifier,
|
objectIdentifier,
|
||||||
event,
|
event,
|
||||||
"stackit.resourcemanager.v2.folder.created",
|
"stackit.resourcemanager.v2.folder.created",
|
||||||
|
|
@ -210,7 +204,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "project/*"))
|
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "project/*"))
|
||||||
|
|
||||||
// Instantiate test data
|
// Instantiate test data
|
||||||
event, routingIdentifier, objectIdentifier := NewProjectAuditEvent(nil)
|
event, objectIdentifier := NewProjectAuditEvent(nil)
|
||||||
|
|
||||||
// Log the event to solace
|
// Log the event to solace
|
||||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||||
|
|
@ -219,8 +213,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
ctx,
|
ctx,
|
||||||
event,
|
event,
|
||||||
visibility,
|
visibility,
|
||||||
routingIdentifier,
|
NewRoutableIdentifier(objectIdentifier),
|
||||||
objectIdentifier,
|
|
||||||
))
|
))
|
||||||
|
|
||||||
// Receive the event from solace
|
// Receive the event from solace
|
||||||
|
|
@ -231,7 +224,6 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
t,
|
t,
|
||||||
projectTopicPrefix,
|
projectTopicPrefix,
|
||||||
message,
|
message,
|
||||||
routingIdentifier,
|
|
||||||
objectIdentifier,
|
objectIdentifier,
|
||||||
event,
|
event,
|
||||||
"stackit.resourcemanager.v2.project.created",
|
"stackit.resourcemanager.v2.project.created",
|
||||||
|
|
@ -246,7 +238,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "project/*"))
|
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "project/*"))
|
||||||
|
|
||||||
// Instantiate test data
|
// Instantiate test data
|
||||||
event, routingIdentifier, objectIdentifier := NewProjectAuditEvent(nil)
|
event, objectIdentifier := NewProjectAuditEvent(nil)
|
||||||
|
|
||||||
// Log the event to solace
|
// Log the event to solace
|
||||||
visibility := auditV1.Visibility_VISIBILITY_PRIVATE
|
visibility := auditV1.Visibility_VISIBILITY_PRIVATE
|
||||||
|
|
@ -255,8 +247,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
ctx,
|
ctx,
|
||||||
event,
|
event,
|
||||||
visibility,
|
visibility,
|
||||||
routingIdentifier,
|
NewRoutableIdentifier(objectIdentifier),
|
||||||
objectIdentifier,
|
|
||||||
))
|
))
|
||||||
|
|
||||||
// Receive the event from solace
|
// Receive the event from solace
|
||||||
|
|
@ -267,7 +258,6 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
t,
|
t,
|
||||||
projectTopicPrefix,
|
projectTopicPrefix,
|
||||||
message,
|
message,
|
||||||
routingIdentifier,
|
|
||||||
objectIdentifier,
|
objectIdentifier,
|
||||||
event,
|
event,
|
||||||
"stackit.resourcemanager.v2.project.created",
|
"stackit.resourcemanager.v2.project.created",
|
||||||
|
|
@ -292,8 +282,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
ctx,
|
ctx,
|
||||||
event,
|
event,
|
||||||
visibility,
|
visibility,
|
||||||
nil,
|
RoutableSystemIdentifier,
|
||||||
nil,
|
|
||||||
))
|
))
|
||||||
|
|
||||||
// Receive the event from solace
|
// Receive the event from solace
|
||||||
|
|
@ -317,8 +306,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
validateRoutableEventPayload(
|
validateRoutableEventPayload(
|
||||||
t,
|
t,
|
||||||
message.Data[0],
|
message.Data[0],
|
||||||
nil,
|
SystemIdentifier,
|
||||||
nil,
|
|
||||||
event,
|
event,
|
||||||
"stackit.resourcemanager.v2.system.changed",
|
"stackit.resourcemanager.v2.system.changed",
|
||||||
visibility)
|
visibility)
|
||||||
|
|
@ -334,7 +322,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "org/*"))
|
assert.NoError(t, solaceContainer.TopicSubscriptionCreate(ctx, queueName, "org/*"))
|
||||||
|
|
||||||
// Instantiate test data
|
// Instantiate test data
|
||||||
event, routingIdentifier, objectIdentifier := NewOrganizationAuditEvent(nil)
|
event, objectIdentifier := NewOrganizationAuditEvent(nil)
|
||||||
|
|
||||||
// Log the event to solace
|
// Log the event to solace
|
||||||
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
visibility := auditV1.Visibility_VISIBILITY_PUBLIC
|
||||||
|
|
@ -342,8 +330,7 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
ctx,
|
ctx,
|
||||||
event,
|
event,
|
||||||
visibility,
|
visibility,
|
||||||
routingIdentifier,
|
NewRoutableIdentifier(objectIdentifier),
|
||||||
objectIdentifier,
|
|
||||||
))
|
))
|
||||||
|
|
||||||
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
message, err := solaceContainer.NextMessageFromQueue(ctx, queueName, true)
|
||||||
|
|
@ -353,7 +340,6 @@ func TestRoutableAuditApi(t *testing.T) {
|
||||||
t,
|
t,
|
||||||
organizationTopicPrefix,
|
organizationTopicPrefix,
|
||||||
message,
|
message,
|
||||||
routingIdentifier,
|
|
||||||
objectIdentifier,
|
objectIdentifier,
|
||||||
event,
|
event,
|
||||||
"stackit.resourcemanager.v2.organization.created",
|
"stackit.resourcemanager.v2.organization.created",
|
||||||
|
|
@ -365,7 +351,6 @@ func validateSentEvent(
|
||||||
t *testing.T,
|
t *testing.T,
|
||||||
topicPrefix string,
|
topicPrefix string,
|
||||||
message *amqp.Message,
|
message *amqp.Message,
|
||||||
routingIdentifier *RoutingIdentifier,
|
|
||||||
objectIdentifier *auditV1.ObjectIdentifier,
|
objectIdentifier *auditV1.ObjectIdentifier,
|
||||||
event *auditV1.AuditLogEntry,
|
event *auditV1.AuditLogEntry,
|
||||||
eventName string,
|
eventName string,
|
||||||
|
|
@ -374,7 +359,7 @@ func validateSentEvent(
|
||||||
|
|
||||||
// Check topic name
|
// Check topic name
|
||||||
assert.Equal(t,
|
assert.Equal(t,
|
||||||
fmt.Sprintf("topic://%s/%s", topicPrefix, routingIdentifier.Identifier),
|
fmt.Sprintf("topic://%s/%s", topicPrefix, objectIdentifier.Identifier),
|
||||||
*message.Properties.To)
|
*message.Properties.To)
|
||||||
|
|
||||||
// Check cloud event properties
|
// Check cloud event properties
|
||||||
|
|
@ -389,13 +374,12 @@ func validateSentEvent(
|
||||||
|
|
||||||
// Check deserialized message
|
// Check deserialized message
|
||||||
validateRoutableEventPayload(
|
validateRoutableEventPayload(
|
||||||
t, message.Data[0], routingIdentifier, objectIdentifier, event, eventName, visibility)
|
t, message.Data[0], objectIdentifier, event, eventName, visibility)
|
||||||
}
|
}
|
||||||
|
|
||||||
func validateRoutableEventPayload(
|
func validateRoutableEventPayload(
|
||||||
t *testing.T,
|
t *testing.T,
|
||||||
payload []byte,
|
payload []byte,
|
||||||
routingIdentifier *RoutingIdentifier,
|
|
||||||
objectIdentifier *auditV1.ObjectIdentifier,
|
objectIdentifier *auditV1.ObjectIdentifier,
|
||||||
event *auditV1.AuditLogEntry,
|
event *auditV1.AuditLogEntry,
|
||||||
eventName string,
|
eventName string,
|
||||||
|
|
@ -409,28 +393,7 @@ func validateRoutableEventPayload(
|
||||||
assert.Equal(t, eventName, routableAuditEvent.EventName)
|
assert.Equal(t, eventName, routableAuditEvent.EventName)
|
||||||
assert.Equal(t, visibility, routableAuditEvent.Visibility)
|
assert.Equal(t, visibility, routableAuditEvent.Visibility)
|
||||||
|
|
||||||
switch reference := routableAuditEvent.ResourceReference.(type) {
|
assert.True(t, proto.Equal(objectIdentifier, routableAuditEvent.ObjectIdentifier))
|
||||||
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")
|
|
||||||
}
|
|
||||||
|
|
||||||
var auditEvent auditV1.AuditLogEntry
|
var auditEvent auditV1.AuditLogEntry
|
||||||
switch data := routableAuditEvent.Data.(type) {
|
switch data := routableAuditEvent.Data.(type) {
|
||||||
|
|
@ -446,7 +409,7 @@ func validateRoutableEventPayload(
|
||||||
|
|
||||||
func TestRoutableTopicNameResolver_Resolve_UnsupportedIdentifierType(t *testing.T) {
|
func TestRoutableTopicNameResolver_Resolve_UnsupportedIdentifierType(t *testing.T) {
|
||||||
resolver := routableTopicNameResolver{}
|
resolver := routableTopicNameResolver{}
|
||||||
_, err := resolver.Resolve(&RoutingIdentifier{Type: 2})
|
_, err := resolver.Resolve(NewRoutableIdentifier(&auditV1.ObjectIdentifier{Type: "unsupported"}))
|
||||||
assert.ErrorIs(t, err, ErrUnsupportedObjectIdentifierType)
|
assert.ErrorIs(t, err, ErrUnsupportedObjectIdentifierType)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -466,7 +429,7 @@ func TestRoutableAuditApi_ValidateAndSerialize_ValidationFailed(t *testing.T) {
|
||||||
auditApi := routableAuditApi{validator: &protobufValidator}
|
auditApi := routableAuditApi{validator: &protobufValidator}
|
||||||
|
|
||||||
event := NewSystemAuditEvent(nil)
|
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)
|
assert.ErrorIs(t, err, expectedError)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -480,12 +443,12 @@ func TestRoutableAuditApi_Log_ValidationFailed(t *testing.T) {
|
||||||
auditApi := routableAuditApi{validator: &protobufValidator}
|
auditApi := routableAuditApi{validator: &protobufValidator}
|
||||||
|
|
||||||
event := NewSystemAuditEvent(nil)
|
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)
|
assert.ErrorIs(t, err, expectedError)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRoutableAuditApi_Log_NilEvent(t *testing.T) {
|
func TestRoutableAuditApi_Log_NilEvent(t *testing.T) {
|
||||||
auditApi := routableAuditApi{}
|
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)
|
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(
|
func NewOrganizationAuditEvent(
|
||||||
customization *func(
|
customization *func(
|
||||||
*auditV1.AuditLogEntry,
|
*auditV1.AuditLogEntry,
|
||||||
*RoutingIdentifier,
|
|
||||||
*auditV1.ObjectIdentifier,
|
*auditV1.ObjectIdentifier,
|
||||||
)) (
|
)) (
|
||||||
*auditV1.AuditLogEntry,
|
*auditV1.AuditLogEntry,
|
||||||
*RoutingIdentifier,
|
|
||||||
*auditV1.ObjectIdentifier,
|
*auditV1.ObjectIdentifier,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
@ -36,11 +34,11 @@ func NewOrganizationAuditEvent(
|
||||||
labels := make(map[string]string)
|
labels := make(map[string]string)
|
||||||
labels["label1"] = "value1"
|
labels["label1"] = "value1"
|
||||||
auditEvent := &auditV1.AuditLogEntry{
|
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{
|
ProtoPayload: &auditV1.AuditLog{
|
||||||
ServiceName: "resource-manager",
|
ServiceName: "resource-manager",
|
||||||
MethodName: "stackit.resourcemanager.v2.organization.created",
|
MethodName: "stackit.resourcemanager.v2.organization.created",
|
||||||
ResourceName: fmt.Sprintf("organizations/%s", identifier),
|
ResourceName: fmt.Sprintf("%s/%s", PluralTypeOrganization, identifier),
|
||||||
AuthenticationInfo: &auditV1.AuthenticationInfo{
|
AuthenticationInfo: &auditV1.AuthenticationInfo{
|
||||||
PrincipalId: uuid.NewString(),
|
PrincipalId: uuid.NewString(),
|
||||||
PrincipalEmail: "user@example.com",
|
PrincipalEmail: "user@example.com",
|
||||||
|
|
@ -48,7 +46,7 @@ func NewOrganizationAuditEvent(
|
||||||
ServiceAccountDelegationInfo: nil,
|
ServiceAccountDelegationInfo: nil,
|
||||||
},
|
},
|
||||||
AuthorizationInfo: []*auditV1.AuthorizationInfo{{
|
AuthorizationInfo: []*auditV1.AuthorizationInfo{{
|
||||||
Resource: fmt.Sprintf("organizations/%s", identifier),
|
Resource: fmt.Sprintf("%s/%s", PluralTypeOrganization, identifier),
|
||||||
Permission: &permission,
|
Permission: &permission,
|
||||||
Granted: &permissionGranted,
|
Granted: &permissionGranted,
|
||||||
}},
|
}},
|
||||||
|
|
@ -91,31 +89,24 @@ func NewOrganizationAuditEvent(
|
||||||
TraceState: nil,
|
TraceState: nil,
|
||||||
}
|
}
|
||||||
|
|
||||||
routingIdentifier := &RoutingIdentifier{
|
|
||||||
Identifier: identifier,
|
|
||||||
Type: RoutingIdentifierTypeOrganization,
|
|
||||||
}
|
|
||||||
|
|
||||||
objectIdentifier := &auditV1.ObjectIdentifier{
|
objectIdentifier := &auditV1.ObjectIdentifier{
|
||||||
Identifier: identifier.String(),
|
Identifier: identifier.String(),
|
||||||
Type: auditV1.ObjectType_OBJECT_TYPE_ORGANIZATION,
|
Type: string(SingularTypeOrganization),
|
||||||
}
|
}
|
||||||
|
|
||||||
if customization != nil {
|
if customization != nil {
|
||||||
(*customization)(auditEvent, routingIdentifier, objectIdentifier)
|
(*customization)(auditEvent, objectIdentifier)
|
||||||
}
|
}
|
||||||
|
|
||||||
return auditEvent, routingIdentifier, objectIdentifier
|
return auditEvent, objectIdentifier
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewFolderAuditEvent(
|
func NewFolderAuditEvent(
|
||||||
customization *func(
|
customization *func(
|
||||||
*auditV1.AuditLogEntry,
|
*auditV1.AuditLogEntry,
|
||||||
*RoutingIdentifier,
|
|
||||||
*auditV1.ObjectIdentifier,
|
*auditV1.ObjectIdentifier,
|
||||||
)) (
|
)) (
|
||||||
*auditV1.AuditLogEntry,
|
*auditV1.AuditLogEntry,
|
||||||
*RoutingIdentifier,
|
|
||||||
*auditV1.ObjectIdentifier,
|
*auditV1.ObjectIdentifier,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
@ -132,11 +123,11 @@ func NewFolderAuditEvent(
|
||||||
labels := make(map[string]string)
|
labels := make(map[string]string)
|
||||||
labels["label1"] = "value1"
|
labels["label1"] = "value1"
|
||||||
auditEvent := &auditV1.AuditLogEntry{
|
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{
|
ProtoPayload: &auditV1.AuditLog{
|
||||||
ServiceName: "resource-manager",
|
ServiceName: "resource-manager",
|
||||||
MethodName: "stackit.resourcemanager.v2.folder.created",
|
MethodName: "stackit.resourcemanager.v2.folder.created",
|
||||||
ResourceName: fmt.Sprintf("folders/%s", identifier),
|
ResourceName: fmt.Sprintf("%s/%s", PluralTypeFolder, identifier),
|
||||||
AuthenticationInfo: &auditV1.AuthenticationInfo{
|
AuthenticationInfo: &auditV1.AuthenticationInfo{
|
||||||
PrincipalId: uuid.NewString(),
|
PrincipalId: uuid.NewString(),
|
||||||
PrincipalEmail: "user@example.com",
|
PrincipalEmail: "user@example.com",
|
||||||
|
|
@ -144,7 +135,7 @@ func NewFolderAuditEvent(
|
||||||
ServiceAccountDelegationInfo: nil,
|
ServiceAccountDelegationInfo: nil,
|
||||||
},
|
},
|
||||||
AuthorizationInfo: []*auditV1.AuthorizationInfo{{
|
AuthorizationInfo: []*auditV1.AuthorizationInfo{{
|
||||||
Resource: fmt.Sprintf("folders/%s", identifier),
|
Resource: fmt.Sprintf("%s/%s", PluralTypeFolder, identifier),
|
||||||
Permission: &permission,
|
Permission: &permission,
|
||||||
Granted: &permissionGranted,
|
Granted: &permissionGranted,
|
||||||
}},
|
}},
|
||||||
|
|
@ -187,31 +178,24 @@ func NewFolderAuditEvent(
|
||||||
TraceState: nil,
|
TraceState: nil,
|
||||||
}
|
}
|
||||||
|
|
||||||
routingIdentifier := &RoutingIdentifier{
|
|
||||||
Identifier: identifier,
|
|
||||||
Type: RoutingIdentifierTypeOrganization,
|
|
||||||
}
|
|
||||||
|
|
||||||
objectIdentifier := &auditV1.ObjectIdentifier{
|
objectIdentifier := &auditV1.ObjectIdentifier{
|
||||||
Identifier: identifier.String(),
|
Identifier: identifier.String(),
|
||||||
Type: auditV1.ObjectType_OBJECT_TYPE_FOLDER,
|
Type: string(SingularTypeFolder),
|
||||||
}
|
}
|
||||||
|
|
||||||
if customization != nil {
|
if customization != nil {
|
||||||
(*customization)(auditEvent, routingIdentifier, objectIdentifier)
|
(*customization)(auditEvent, objectIdentifier)
|
||||||
}
|
}
|
||||||
|
|
||||||
return auditEvent, routingIdentifier, objectIdentifier
|
return auditEvent, objectIdentifier
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewProjectAuditEvent(
|
func NewProjectAuditEvent(
|
||||||
customization *func(
|
customization *func(
|
||||||
*auditV1.AuditLogEntry,
|
*auditV1.AuditLogEntry,
|
||||||
*RoutingIdentifier,
|
|
||||||
*auditV1.ObjectIdentifier,
|
*auditV1.ObjectIdentifier,
|
||||||
)) (
|
)) (
|
||||||
*auditV1.AuditLogEntry,
|
*auditV1.AuditLogEntry,
|
||||||
*RoutingIdentifier,
|
|
||||||
*auditV1.ObjectIdentifier,
|
*auditV1.ObjectIdentifier,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
@ -228,11 +212,11 @@ func NewProjectAuditEvent(
|
||||||
labels := make(map[string]string)
|
labels := make(map[string]string)
|
||||||
labels["label1"] = "value1"
|
labels["label1"] = "value1"
|
||||||
auditEvent := &auditV1.AuditLogEntry{
|
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{
|
ProtoPayload: &auditV1.AuditLog{
|
||||||
ServiceName: "resource-manager",
|
ServiceName: "resource-manager",
|
||||||
MethodName: "stackit.resourcemanager.v2.project.created",
|
MethodName: "stackit.resourcemanager.v2.project.created",
|
||||||
ResourceName: fmt.Sprintf("projects/%s", identifier),
|
ResourceName: fmt.Sprintf("%s/%s", PluralTypeProject, identifier),
|
||||||
AuthenticationInfo: &auditV1.AuthenticationInfo{
|
AuthenticationInfo: &auditV1.AuthenticationInfo{
|
||||||
PrincipalId: uuid.NewString(),
|
PrincipalId: uuid.NewString(),
|
||||||
PrincipalEmail: "user@example.com",
|
PrincipalEmail: "user@example.com",
|
||||||
|
|
@ -240,7 +224,7 @@ func NewProjectAuditEvent(
|
||||||
ServiceAccountDelegationInfo: nil,
|
ServiceAccountDelegationInfo: nil,
|
||||||
},
|
},
|
||||||
AuthorizationInfo: []*auditV1.AuthorizationInfo{{
|
AuthorizationInfo: []*auditV1.AuthorizationInfo{{
|
||||||
Resource: fmt.Sprintf("projects/%s", identifier),
|
Resource: fmt.Sprintf("%s/%s", PluralTypeProject, identifier),
|
||||||
Permission: &permission,
|
Permission: &permission,
|
||||||
Granted: &permissionGranted,
|
Granted: &permissionGranted,
|
||||||
}},
|
}},
|
||||||
|
|
@ -283,27 +267,22 @@ func NewProjectAuditEvent(
|
||||||
TraceState: nil,
|
TraceState: nil,
|
||||||
}
|
}
|
||||||
|
|
||||||
routingIdentifier := &RoutingIdentifier{
|
|
||||||
Identifier: identifier,
|
|
||||||
Type: RoutingIdentifierTypeProject,
|
|
||||||
}
|
|
||||||
|
|
||||||
objectIdentifier := &auditV1.ObjectIdentifier{
|
objectIdentifier := &auditV1.ObjectIdentifier{
|
||||||
Identifier: identifier.String(),
|
Identifier: identifier.String(),
|
||||||
Type: auditV1.ObjectType_OBJECT_TYPE_PROJECT,
|
Type: string(SingularTypeProject),
|
||||||
}
|
}
|
||||||
|
|
||||||
if customization != nil {
|
if customization != nil {
|
||||||
(*customization)(auditEvent, routingIdentifier, objectIdentifier)
|
(*customization)(auditEvent, objectIdentifier)
|
||||||
}
|
}
|
||||||
|
|
||||||
return auditEvent, routingIdentifier, objectIdentifier
|
return auditEvent, objectIdentifier
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSystemAuditEvent(
|
func NewSystemAuditEvent(
|
||||||
customization *func(*auditV1.AuditLogEntry)) *auditV1.AuditLogEntry {
|
customization *func(*auditV1.AuditLogEntry)) *auditV1.AuditLogEntry {
|
||||||
|
|
||||||
identifier := uuid.New()
|
identifier := uuid.Nil
|
||||||
requestId := fmt.Sprintf("%s/1", identifier)
|
requestId := fmt.Sprintf("%s/1", identifier)
|
||||||
claims, _ := structpb.NewStruct(map[string]interface{}{})
|
claims, _ := structpb.NewStruct(map[string]interface{}{})
|
||||||
request, _ := 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)
|
serviceAccountName := fmt.Sprintf("projects/%s/serviceAccounts/%s", identifier, serviceAccountId)
|
||||||
delegationPrincipal := auditV1.ServiceAccountDelegationInfo{Authority: &auditV1.ServiceAccountDelegationInfo_SystemPrincipal_{}}
|
delegationPrincipal := auditV1.ServiceAccountDelegationInfo{Authority: &auditV1.ServiceAccountDelegationInfo_SystemPrincipal_{}}
|
||||||
auditEvent := &auditV1.AuditLogEntry{
|
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{
|
ProtoPayload: &auditV1.AuditLog{
|
||||||
ServiceName: "resource-manager",
|
ServiceName: "resource-manager",
|
||||||
MethodName: "stackit.resourcemanager.v2.system.changed",
|
MethodName: "stackit.resourcemanager.v2.system.changed",
|
||||||
ResourceName: fmt.Sprintf("projects/%s", identifier),
|
ResourceName: fmt.Sprintf("%s/%s", PluralTypeSystem, identifier),
|
||||||
AuthenticationInfo: &auditV1.AuthenticationInfo{
|
AuthenticationInfo: &auditV1.AuthenticationInfo{
|
||||||
PrincipalId: serviceAccountId,
|
PrincipalId: serviceAccountId,
|
||||||
PrincipalEmail: "service-account@sa.stackit.cloud",
|
PrincipalEmail: "service-account@sa.stackit.cloud",
|
||||||
|
|
@ -329,7 +308,7 @@ func NewSystemAuditEvent(
|
||||||
ServiceAccountDelegationInfo: []*auditV1.ServiceAccountDelegationInfo{&delegationPrincipal},
|
ServiceAccountDelegationInfo: []*auditV1.ServiceAccountDelegationInfo{&delegationPrincipal},
|
||||||
},
|
},
|
||||||
AuthorizationInfo: []*auditV1.AuthorizationInfo{{
|
AuthorizationInfo: []*auditV1.AuthorizationInfo{{
|
||||||
Resource: fmt.Sprintf("projects/%s", identifier),
|
Resource: fmt.Sprintf("%s/%s", PluralTypeSystem, identifier),
|
||||||
Permission: nil,
|
Permission: nil,
|
||||||
Granted: nil,
|
Granted: nil,
|
||||||
}},
|
}},
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,9 @@ import (
|
||||||
// Default connection timeout for the AMQP connection
|
// Default connection timeout for the AMQP connection
|
||||||
const connectionTimeoutSeconds = 10
|
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.
|
// 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.
|
// Send method will send the given data to the specified topic synchronously.
|
||||||
// Parameters:
|
// Parameters:
|
||||||
|
|
@ -61,28 +61,28 @@ type AmqpSender interface {
|
||||||
Close(ctx context.Context) error
|
Close(ctx context.Context) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// AmqpMessagingApi implements MessagingApi.
|
// AmqpApi implements Api.
|
||||||
type AmqpMessagingApi struct {
|
type AmqpApi struct {
|
||||||
config AmqpConfig
|
config AmqpConfig
|
||||||
connection *amqp.Conn
|
connection *amqp.Conn
|
||||||
session *AmqpSession
|
session *AmqpSession
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewAmqpMessagingApi(amqpConfig AmqpConfig) (*MessagingApi, error) {
|
func NewAmqpApi(amqpConfig AmqpConfig) (*Api, error) {
|
||||||
amqpApi := &AmqpMessagingApi{config: amqpConfig}
|
amqpApi := &AmqpApi{config: amqpConfig}
|
||||||
|
|
||||||
err := amqpApi.connect()
|
err := amqpApi.connect()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
var messagingApi MessagingApi = amqpApi
|
var messagingApi Api = amqpApi
|
||||||
return &messagingApi, nil
|
return &messagingApi, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// connect opens a new connection and session to the AMQP messaging system.
|
// connect opens a new connection and session to the AMQP messaging system.
|
||||||
// The connection attempt will be cancelled after connectionTimeoutSeconds.
|
// The connection attempt will be cancelled after connectionTimeoutSeconds.
|
||||||
func (a *AmqpMessagingApi) connect() error {
|
func (a *AmqpApi) connect() error {
|
||||||
slog.Info("connecting to messaging system")
|
slog.Info("connecting to messaging system")
|
||||||
|
|
||||||
// Set credentials if specified
|
// Set credentials if specified
|
||||||
|
|
@ -122,9 +122,9 @@ func (a *AmqpMessagingApi) connect() error {
|
||||||
return nil
|
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.
|
// 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)
|
err := a.trySend(ctx, topic, data, contentType, applicationProperties)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return 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.
|
// 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) {
|
if !strings.HasPrefix(topic, AmqpTopicPrefix) {
|
||||||
return fmt.Errorf(
|
return fmt.Errorf(
|
||||||
"topic %q name lacks mandatory prefix %q",
|
"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.
|
// 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)
|
_ = (*a.session).Close(ctx)
|
||||||
err := a.connection.Close()
|
err := a.connection.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -45,11 +45,11 @@ func (m *AmqpSenderMock) Close(ctx context.Context) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_NewAmqpMessagingApi(t *testing.T) {
|
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\"")
|
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
|
// Specify test timeout
|
||||||
ctx, cancelFn := context.WithTimeout(context.Background(), 120*time.Second)
|
ctx, cancelFn := context.WithTimeout(context.Background(), 120*time.Second)
|
||||||
defer cancelFn()
|
defer cancelFn()
|
||||||
|
|
@ -62,7 +62,7 @@ func TestAmqpMessagingApi_Send(t *testing.T) {
|
||||||
t.Run("Missing topic prefix", func(t *testing.T) {
|
t.Run("Missing topic prefix", func(t *testing.T) {
|
||||||
defer solaceContainer.StopOnError()
|
defer solaceContainer.StopOnError()
|
||||||
|
|
||||||
api, err := NewAmqpMessagingApi(AmqpConfig{URL: solaceContainer.AmqpConnectionString})
|
api, err := NewAmqpApi(AmqpConfig{URL: solaceContainer.AmqpConnectionString})
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
err = (*api).Send(ctx, "topic-name", []byte{}, "application/json", make(map[string]any))
|
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")
|
topicName := fmt.Sprintf("topic://auditlog/%s", "amqp-no-new-sender")
|
||||||
assert.NoError(t, solaceContainer.ValidateTopicName(topicSubscriptionTopicPattern, topicName))
|
assert.NoError(t, solaceContainer.ValidateTopicName(topicSubscriptionTopicPattern, topicName))
|
||||||
|
|
||||||
api := &AmqpMessagingApi{config: AmqpConfig{URL: solaceContainer.AmqpConnectionString}}
|
api := &AmqpApi{config: AmqpConfig{URL: solaceContainer.AmqpConnectionString}}
|
||||||
err := api.connect()
|
err := api.connect()
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
|
@ -122,7 +122,7 @@ func TestAmqpMessagingApi_Send(t *testing.T) {
|
||||||
topicName := fmt.Sprintf("topic://auditlog/%s", "amqp-sender-error")
|
topicName := fmt.Sprintf("topic://auditlog/%s", "amqp-sender-error")
|
||||||
assert.NoError(t, solaceContainer.ValidateTopicName(topicSubscriptionTopicPattern, topicName))
|
assert.NoError(t, solaceContainer.ValidateTopicName(topicSubscriptionTopicPattern, topicName))
|
||||||
|
|
||||||
api := &AmqpMessagingApi{config: AmqpConfig{URL: solaceContainer.AmqpConnectionString}}
|
api := &AmqpApi{config: AmqpConfig{URL: solaceContainer.AmqpConnectionString}}
|
||||||
err := api.connect()
|
err := api.connect()
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -116,9 +116,10 @@ type AuditLogEntry struct {
|
||||||
|
|
||||||
// The resource name of the log to which this log entry belongs.
|
// The resource name of the log to which this log entry belongs.
|
||||||
//
|
//
|
||||||
// Format: <type>/<identifier>/logs/<eventType>
|
// Format: <pluralType>/<identifier>/logs/<eventType>
|
||||||
// Where:
|
// Where:
|
||||||
//
|
//
|
||||||
|
// Plural-Types: One from the list of supported data types
|
||||||
// Event-Types: admin-activity, system-event, policy-denied, data-access
|
// Event-Types: admin-activity, system-event, policy-denied, data-access
|
||||||
//
|
//
|
||||||
// Examples:
|
// Examples:
|
||||||
|
|
@ -299,10 +300,16 @@ type AuditLog struct {
|
||||||
//
|
//
|
||||||
// Required: true
|
// Required: true
|
||||||
ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
|
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.
|
// 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:
|
// Examples:
|
||||||
//
|
//
|
||||||
|
|
@ -315,9 +322,11 @@ type AuditLog struct {
|
||||||
// The resource or collection that is the target of the operation.
|
// The resource or collection that is the target of the operation.
|
||||||
// The name is a scheme-less URI, not including the API service name.
|
// 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:
|
// 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).
|
// Region-Zone: Optional region and zone id. If both, separated with a - (dash). Alternatively _ (underscore).
|
||||||
// Details: Optional "<key>/<id>" pairs
|
// Details: Optional "<key>/<id>" pairs
|
||||||
//
|
//
|
||||||
|
|
@ -499,7 +508,7 @@ type AuthenticationInfo struct {
|
||||||
// The name of the service account used to create or exchange
|
// The name of the service account used to create or exchange
|
||||||
// credentials for authenticating the service account making the request.
|
// credentials for authenticating the service account making the request.
|
||||||
//
|
//
|
||||||
// Format: projects/<id>/serviceAccounts/<account>
|
// Format: projects/<id>/serviceAccounts/<accountId>
|
||||||
//
|
//
|
||||||
// Examples:
|
// Examples:
|
||||||
//
|
//
|
||||||
|
|
@ -585,9 +594,11 @@ type AuthorizationInfo struct {
|
||||||
|
|
||||||
// The resource being accessed, as a REST-style string.
|
// The resource being accessed, as a REST-style string.
|
||||||
//
|
//
|
||||||
// Format: <type>/<id>[/locations/<region-zone>][/<details>]
|
// Format: <pluralType>/<id>[/locations/<region-zone>][/<details>]
|
||||||
// Where:
|
// 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).
|
// Region-Zone: Optional region and zone id. If both, separated with a - (dash). Alternatively _ (underscore).
|
||||||
// Details: Optional "<key>/<id>" pairs
|
// Details: Optional "<key>/<id>" pairs
|
||||||
//
|
//
|
||||||
|
|
@ -671,8 +682,7 @@ func (x *AuthorizationInfo) GetGranted() bool {
|
||||||
// This message defines the standard attribute vocabulary for STACKIT APIs.
|
// This message defines the standard attribute vocabulary for STACKIT APIs.
|
||||||
//
|
//
|
||||||
// An attribute is a piece of metadata that describes an activity on a network
|
// 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
|
// service.
|
||||||
// an HTTP response.
|
|
||||||
type AttributeContext struct {
|
type AttributeContext struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
|
@ -728,7 +738,7 @@ type RequestMetadata struct {
|
||||||
// Examples:
|
// Examples:
|
||||||
//
|
//
|
||||||
// "OpenAPI-Generator/1.0.0/go"
|
// "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"
|
// "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.
|
// -> The request was made by a web browser.
|
||||||
//
|
//
|
||||||
|
|
@ -804,6 +814,11 @@ type ResponseStatus struct {
|
||||||
|
|
||||||
// The http or gRPC status code.
|
// 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
|
// Required: true
|
||||||
Code *wrapperspb.Int32Value `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
|
Code *wrapperspb.Int32Value `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
|
||||||
// Short description of the error
|
// 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
|
// This message defines attributes for a typical network response. It
|
||||||
// generally models semantics of an HTTP response.
|
// generally models semantics of an HTTP response.
|
||||||
|
// TODO do we need another status code attribute in the Response?
|
||||||
type AttributeContext_Response struct {
|
type AttributeContext_Response struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
|
@ -1249,18 +1265,18 @@ type AttributeContext_Response struct {
|
||||||
// The HTTP response size in bytes.
|
// The HTTP response size in bytes.
|
||||||
//
|
//
|
||||||
// Required: false
|
// 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
|
// The HTTP response headers. If multiple headers share the same key, they
|
||||||
// must be merged according to HTTP spec. All header keys must be
|
// must be merged according to HTTP spec. All header keys must be
|
||||||
// lowercased, because HTTP header keys are case-insensitive.
|
// lowercased, because HTTP header keys are case-insensitive.
|
||||||
//
|
//
|
||||||
// Required: true
|
// 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 timestamp when the "destination" service generates the first byte of
|
||||||
// the response.
|
// the response.
|
||||||
//
|
//
|
||||||
// Required: true
|
// 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() {
|
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,
|
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,
|
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,
|
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,
|
0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x06,
|
||||||
0x75, 0x64, 0x69, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70,
|
0x0a, 0x0d, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 0x06, 0x0a, 0x0d, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f,
|
0x77, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x77, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61,
|
0x09, 0x42, 0x5c, 0xba, 0x48, 0x59, 0xc8, 0x01, 0x01, 0x72, 0x54, 0x32, 0x52, 0x5e, 0x5b, 0x61,
|
||||||
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x5c, 0xba, 0x48, 0x59, 0xc8, 0x01, 0x01,
|
0x2d, 0x7a, 0x5d, 0x2b, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x2b, 0x2f,
|
||||||
0x72, 0x54, 0x32, 0x52, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x2b, 0x2f, 0x5b, 0x61, 0x2d, 0x7a,
|
0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x28, 0x3f, 0x3a, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2d, 0x61, 0x63,
|
||||||
0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x2b, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x28, 0x3f, 0x3a, 0x61,
|
0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x7c, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2d, 0x65, 0x76,
|
||||||
0x64, 0x6d, 0x69, 0x6e, 0x2d, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x7c, 0x73, 0x79,
|
0x65, 0x6e, 0x74, 0x7c, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2d, 0x64, 0x65, 0x6e, 0x69, 0x65,
|
||||||
0x73, 0x74, 0x65, 0x6d, 0x2d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x7c, 0x70, 0x6f, 0x6c, 0x69, 0x63,
|
0x64, 0x7c, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x29, 0x24, 0x52,
|
||||||
0x79, 0x2d, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x7c, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x61, 0x63,
|
0x07, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x63, 0x65, 0x73, 0x73, 0x29, 0x24, 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12,
|
0x6f, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||||
0x3f, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
|
0x12, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76,
|
0x4c, 0x6f, 0x67, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f,
|
||||||
0x31, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8,
|
0x74, 0x6f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x4b, 0x0a, 0x09, 0x69, 0x6e, 0x73,
|
||||||
0x01, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
|
0x65, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xba, 0x48,
|
||||||
0x12, 0x4b, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20,
|
0x2b, 0xc8, 0x01, 0x01, 0x72, 0x26, 0x32, 0x24, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2f,
|
||||||
0x01, 0x28, 0x09, 0x42, 0x2e, 0xba, 0x48, 0x2b, 0xc8, 0x01, 0x01, 0x72, 0x26, 0x32, 0x24, 0x5e,
|
0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d,
|
||||||
0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b,
|
0x39, 0x2d, 0x5d, 0x2b, 0x2f, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x52, 0x08, 0x69, 0x6e,
|
||||||
0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x2b, 0x2f, 0x5b, 0x30, 0x2d, 0x39,
|
0x73, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, 0x43, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73,
|
||||||
0x5d, 0x2b, 0x24, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x49, 0x64, 0x12, 0x43, 0x0a,
|
0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76,
|
||||||
0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e,
|
0x31, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2e,
|
||||||
0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f,
|
0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x06, 0xba, 0x48, 0x03,
|
||||||
0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74,
|
0xc8, 0x01, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x33, 0x0a, 0x0e, 0x63,
|
||||||
0x72, 0x79, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65,
|
0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20,
|
||||||
0x6c, 0x73, 0x12, 0x33, 0x0a, 0x0e, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f,
|
0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0d,
|
||||||
0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72,
|
0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01,
|
||||||
0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69,
|
0x12, 0x45, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20,
|
||||||
0x6f, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73,
|
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||||
0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
|
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42,
|
||||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
|
0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0xb2, 0x01, 0x02, 0x38, 0x01, 0x52, 0x09, 0x74, 0x69,
|
||||||
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0xb2, 0x01,
|
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3e, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72,
|
||||||
0x02, 0x38, 0x01, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3e,
|
0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x61, 0x75, 0x64, 0x69,
|
||||||
0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e,
|
0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79,
|
||||||
0x32, 0x15, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x53,
|
0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x73,
|
||||||
0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82,
|
0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x52, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65,
|
||||||
0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x52,
|
0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xba,
|
||||||
0x0a, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x08,
|
0x48, 0x27, 0x72, 0x25, 0x32, 0x23, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2d, 0x5b, 0x61,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xba, 0x48, 0x27, 0x72, 0x25, 0x32, 0x23, 0x5e, 0x5b, 0x30,
|
0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d,
|
||||||
0x2d, 0x39, 0x5d, 0x2b, 0x2d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2d, 0x5b,
|
0x2b, 0x2d, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x48, 0x01, 0x52, 0x0b, 0x74, 0x72, 0x61,
|
||||||
0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2d, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24,
|
0x63, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x65, 0x0a, 0x0b, 0x74,
|
||||||
0x48, 0x01, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x88,
|
0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x01, 0x01, 0x12, 0x65, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74,
|
0x42, 0x3f, 0xba, 0x48, 0x3c, 0x72, 0x3a, 0x32, 0x38, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a,
|
||||||
0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3f, 0xba, 0x48, 0x3c, 0x72, 0x3a, 0x32, 0x38,
|
0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x3d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39,
|
||||||
0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x3d, 0x5b, 0x61, 0x2d,
|
0x5d, 0x2b, 0x28, 0x3f, 0x3a, 0x2c, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39,
|
||||||
0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x28, 0x3f, 0x3a, 0x2c, 0x5b, 0x61, 0x2d,
|
0x5d, 0x2b, 0x3d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x29,
|
||||||
0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x3d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d,
|
0x2a, 0x48, 0x02, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x88,
|
||||||
0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x29, 0x2a, 0x48, 0x02, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x63,
|
0x01, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72,
|
||||||
0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62,
|
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||||
0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
|
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
|
0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x11, 0x0a,
|
||||||
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
0x0f, 0x5f, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64,
|
||||||
0x3a, 0x02, 0x38, 0x01, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61,
|
0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e,
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x74, 0x72, 0x61, 0x63,
|
0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74,
|
||||||
0x65, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x74, 0x72, 0x61,
|
0x65, 0x22, 0x89, 0x07, 0x0a, 0x08, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x2d,
|
||||||
0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x89, 0x07, 0x0a, 0x08, 0x41, 0x75, 0x64,
|
0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
|
||||||
0x69, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x2d, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01,
|
||||||
0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07,
|
0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x63, 0x0a,
|
||||||
0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
0x0b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||||
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x63, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x6e,
|
0x28, 0x09, 0x42, 0x42, 0xba, 0x48, 0x3f, 0xc8, 0x01, 0x01, 0x72, 0x3a, 0x32, 0x38, 0x5e, 0x73,
|
||||||
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x42, 0xba, 0x48, 0x3f, 0xc8, 0x01,
|
0x74, 0x61, 0x63, 0x6b, 0x69, 0x74, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d,
|
||||||
0x01, 0x72, 0x3a, 0x32, 0x38, 0x5e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x69, 0x74, 0x5c, 0x2e, 0x5b,
|
0x2b, 0x5c, 0x2e, 0x76, 0x5b, 0x31, 0x2d, 0x39, 0x5d, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2a, 0x5c,
|
||||||
0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x5c, 0x2e, 0x76, 0x5b, 0x31, 0x2d, 0x39, 0x5d,
|
0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a,
|
||||||
0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2a, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d,
|
0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, 0x61,
|
||||||
0x2b, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x52, 0x0a, 0x6d,
|
0x6d, 0x65, 0x12, 0x8e, 0x01, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
|
||||||
0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x8e, 0x01, 0x0a, 0x0d, 0x72, 0x65,
|
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x69, 0xba, 0x48, 0x66, 0xc8,
|
||||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
0x01, 0x01, 0x72, 0x61, 0x32, 0x5f, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x2b, 0x2f, 0x5b, 0x61,
|
||||||
0x09, 0x42, 0x69, 0xba, 0x48, 0x66, 0xc8, 0x01, 0x01, 0x72, 0x61, 0x32, 0x5f, 0x5e, 0x5b, 0x61,
|
0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x2b, 0x28, 0x3f, 0x3a, 0x2f, 0x6c, 0x6f, 0x63, 0x61,
|
||||||
0x2d, 0x7a, 0x5d, 0x2b, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x2b, 0x28,
|
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x28, 0x3f, 0x3a, 0x28, 0x3f, 0x3a, 0x5b, 0x61, 0x2d, 0x7a,
|
||||||
0x3f, 0x3a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x28, 0x3f, 0x3a,
|
0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x28, 0x3f, 0x3a, 0x2d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39,
|
||||||
0x28, 0x3f, 0x3a, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x28, 0x3f, 0x3a, 0x2d,
|
0x5d, 0x2b, 0x29, 0x3f, 0x29, 0x7c, 0x5f, 0x29, 0x29, 0x3f, 0x28, 0x3f, 0x3a, 0x2f, 0x5b, 0x61,
|
||||||
0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x29, 0x3f, 0x29, 0x7c, 0x5f, 0x29, 0x29,
|
0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d,
|
||||||
0x3f, 0x28, 0x3f, 0x3a, 0x2f, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x2f, 0x5b,
|
0x5d, 0x2b, 0x29, 0x2a, 0x24, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e,
|
||||||
0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x2b, 0x29, 0x2a, 0x24, 0x52, 0x0c, 0x72, 0x65,
|
0x61, 0x6d, 0x65, 0x12, 0x55, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63,
|
||||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x55, 0x0a, 0x13, 0x61, 0x75,
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
|
||||||
0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66,
|
0x32, 0x1c, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68,
|
||||||
0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e,
|
0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x06,
|
||||||
0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
|
0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x12, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69,
|
||||||
0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x12, 0x61,
|
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4a, 0x0a, 0x12, 0x61, 0x75,
|
||||||
0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66,
|
0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
|
||||||
0x6f, 0x12, 0x4a, 0x0a, 0x12, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69,
|
0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76,
|
||||||
0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e,
|
0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
|
||||||
0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
|
0x6e, 0x66, 0x6f, 0x52, 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69,
|
||||||
0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x61, 0x75, 0x74, 0x68,
|
0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4c, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4c, 0x0a,
|
0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
|
||||||
0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
0x32, 0x19, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75,
|
||||||
0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e,
|
0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03,
|
||||||
0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
|
0xc8, 0x01, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61,
|
||||||
0x74, 0x61, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75,
|
0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18,
|
||||||
0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x07, 0x72,
|
0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67,
|
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x06,
|
||||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53,
|
0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||||
0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x07, 0x72,
|
0x38, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
0x18, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76,
|
0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01,
|
||||||
0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x57, 0x0a, 0x12, 0x6e, 0x75, 0x6d,
|
||||||
0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18,
|
||||||
0x12, 0x57, 0x0a, 0x12, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||||
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, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c,
|
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,
|
0x75, 0x65, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, 0x28, 0x00, 0x48, 0x00, 0x52, 0x10, 0x6e,
|
||||||
0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12, 0x52, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,
|
0x75, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x88,
|
||||||
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e,
|
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,
|
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,
|
0x65, 0x78, 0x74, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01,
|
||||||
0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01,
|
0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72,
|
||||||
0x01, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x3b, 0x0a, 0x04, 0x74, 0x69,
|
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
|
||||||
0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
||||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
|
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
|
||||||
0x74, 0x61, 0x6d, 0x70, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0xb2, 0x01, 0x02, 0x38,
|
0x38, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x71, 0x75,
|
||||||
0x01, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65,
|
0x65, 0x72, 0x79, 0x1a, 0x9f, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||||
0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
0x12, 0x3d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b,
|
||||||
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, 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,
|
0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xba, 0x48, 0x04,
|
||||||
0xc8, 0x01, 0x01, 0x1a, 0x02, 0x28, 0x00, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1d, 0x0a,
|
0x22, 0x02, 0x28, 0x00, 0x48, 0x00, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x12,
|
||||||
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,
|
0x52, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
|
||||||
0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x07,
|
0x32, 0x30, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72,
|
||||||
0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e,
|
0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x52, 0x65, 0x73,
|
||||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74,
|
||||||
0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42,
|
0x72, 0x79, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64,
|
||||||
0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xba, 0x04, 0x0a, 0x1c,
|
0x65, 0x72, 0x73, 0x12, 0x3b, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65,
|
0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x63, 0x0a, 0x10,
|
0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0b, 0xba,
|
||||||
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c,
|
0x48, 0x08, 0xc8, 0x01, 0x01, 0xb2, 0x01, 0x02, 0x38, 0x01, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76,
|
0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||||
0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
|
||||||
0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53,
|
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x48, 0x00,
|
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x07, 0x0a, 0x05,
|
||||||
0x52, 0x0f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61,
|
0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0xde, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
0x6c, 0x12, 0x5a, 0x0a, 0x0d, 0x69, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70,
|
0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x27, 0x0a, 0x09, 0x63, 0x61, 0x6c,
|
||||||
0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74,
|
0x6c, 0x65, 0x72, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48,
|
||||||
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75,
|
0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x70, 0x01, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72,
|
||||||
0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f,
|
0x49, 0x70, 0x12, 0x47, 0x0a, 0x1a, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x70,
|
||||||
0x2e, 0x49, 0x64, 0x70, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x48, 0x00, 0x52,
|
0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74,
|
||||||
0x0c, 0x69, 0x64, 0x70, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x1a, 0x6f, 0x0a,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02,
|
||||||
0x0f, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c,
|
0x10, 0x01, 0x52, 0x17, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x69,
|
||||||
0x12, 0x47, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61,
|
0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x59, 0x0a, 0x12, 0x72,
|
||||||
0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f,
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
|
||||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72,
|
0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e,
|
||||||
0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x65,
|
0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74,
|
||||||
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x73, 0x65,
|
0x65, 0x78, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x06, 0xba, 0x48, 0x03,
|
||||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0xd3,
|
0xc8, 0x01, 0x01, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72,
|
||||||
0x01, 0x0a, 0x0c, 0x49, 0x64, 0x70, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12,
|
0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0xab, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
0x2d, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18,
|
0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x04, 0x63, 0x6f, 0x64,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10,
|
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||||
0x01, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x36,
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56,
|
||||||
0x0a, 0x0f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x65, 0x6d, 0x61, 0x69,
|
0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x1a, 0x02, 0x28, 0x00,
|
||||||
0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xba, 0x48, 0x0a, 0xc8, 0x01, 0x01, 0x72,
|
0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||||
0x05, 0x10, 0x01, 0x18, 0xff, 0x01, 0x52, 0x0e, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61,
|
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
|
||||||
0x6c, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x47, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73,
|
||||||
0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
|
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||||
0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52,
|
||||||
0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x65, 0x72,
|
0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73,
|
||||||
0x76, 0x69, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x88, 0x01, 0x01, 0x42,
|
0x73, 0x61, 0x67, 0x65, 0x22, 0xba, 0x04, 0x0a, 0x1c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||||
0x13, 0x0a, 0x11, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61,
|
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f,
|
||||||
0x64, 0x61, 0x74, 0x61, 0x42, 0x12, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74,
|
0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x63, 0x0a, 0x10, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f,
|
||||||
0x79, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x2a, 0x93, 0x01, 0x0a, 0x0b, 0x4c, 0x6f, 0x67,
|
0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||||
0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50,
|
0x36, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||||
0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46,
|
0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74,
|
||||||
0x41, 0x55, 0x4c, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10,
|
0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x72,
|
||||||
0x64, 0x12, 0x09, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0xc8, 0x01, 0x12, 0x0b, 0x0a, 0x06,
|
0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x79, 0x73, 0x74, 0x65,
|
||||||
0x4e, 0x4f, 0x54, 0x49, 0x43, 0x45, 0x10, 0xac, 0x02, 0x12, 0x0c, 0x0a, 0x07, 0x57, 0x41, 0x52,
|
0x6d, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x5a, 0x0a, 0x0d, 0x69, 0x64,
|
||||||
0x4e, 0x49, 0x4e, 0x47, 0x10, 0x90, 0x03, 0x12, 0x0a, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52,
|
0x70, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x10, 0xf4, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x52, 0x49, 0x54, 0x49, 0x43, 0x41, 0x4c, 0x10,
|
0x0b, 0x32, 0x33, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72,
|
||||||
0xd8, 0x04, 0x12, 0x0a, 0x0a, 0x05, 0x41, 0x4c, 0x45, 0x52, 0x54, 0x10, 0xbc, 0x05, 0x12, 0x0e,
|
0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67,
|
||||||
0x0a, 0x09, 0x45, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x4e, 0x43, 0x59, 0x10, 0xa0, 0x06, 0x42, 0x81,
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x49, 0x64, 0x70, 0x50, 0x72, 0x69,
|
||||||
0x01, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x63, 0x68, 0x77, 0x61, 0x72, 0x7a, 0x2e, 0x73,
|
0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0c, 0x69, 0x64, 0x70, 0x50, 0x72, 0x69,
|
||||||
0x74, 0x61, 0x63, 0x6b, 0x69, 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x42,
|
0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x1a, 0x6f, 0x0a, 0x0f, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
|
||||||
0x0f, 0x41, 0x75, 0x64, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f,
|
0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x47, 0x0a, 0x10, 0x73, 0x65, 0x72,
|
||||||
0x50, 0x01, 0x5a, 0x0f, 0x2e, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x3b, 0x61, 0x75, 0x64, 0x69,
|
0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20,
|
||||||
0x74, 0x56, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x41, 0x75, 0x64, 0x69,
|
0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||||
0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x41, 0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0xe2,
|
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0f,
|
||||||
0x02, 0x14, 0x41, 0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
|
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x88,
|
||||||
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x41, 0x75, 0x64, 0x69, 0x74, 0x3a, 0x3a,
|
0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d,
|
||||||
0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
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 (
|
var (
|
||||||
|
|
@ -1833,7 +1848,6 @@ func file_audit_v1_audit_event_proto_init() {
|
||||||
if File_audit_v1_audit_event_proto != nil {
|
if File_audit_v1_audit_event_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
file_audit_v1_common_proto_init()
|
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_audit_v1_audit_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_audit_v1_audit_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*AuditLogEntry); i {
|
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}
|
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 {
|
type EncryptedData struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
|
@ -90,7 +150,7 @@ type EncryptedData struct {
|
||||||
func (x *EncryptedData) Reset() {
|
func (x *EncryptedData) Reset() {
|
||||||
*x = EncryptedData{}
|
*x = EncryptedData{}
|
||||||
if protoimpl.UnsafeEnabled {
|
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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -103,7 +163,7 @@ func (x *EncryptedData) String() string {
|
||||||
func (*EncryptedData) ProtoMessage() {}
|
func (*EncryptedData) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *EncryptedData) ProtoReflect() protoreflect.Message {
|
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 {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -116,7 +176,7 @@ func (x *EncryptedData) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use EncryptedData.ProtoReflect.Descriptor instead.
|
// Deprecated: Use EncryptedData.ProtoReflect.Descriptor instead.
|
||||||
func (*EncryptedData) Descriptor() ([]byte, []int) {
|
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 {
|
func (x *EncryptedData) GetData() []byte {
|
||||||
|
|
@ -161,7 +221,7 @@ type UnencryptedData struct {
|
||||||
func (x *UnencryptedData) Reset() {
|
func (x *UnencryptedData) Reset() {
|
||||||
*x = UnencryptedData{}
|
*x = UnencryptedData{}
|
||||||
if protoimpl.UnsafeEnabled {
|
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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -174,7 +234,7 @@ func (x *UnencryptedData) String() string {
|
||||||
func (*UnencryptedData) ProtoMessage() {}
|
func (*UnencryptedData) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *UnencryptedData) ProtoReflect() protoreflect.Message {
|
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 {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -187,7 +247,7 @@ func (x *UnencryptedData) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use UnencryptedData.ProtoReflect.Descriptor instead.
|
// Deprecated: Use UnencryptedData.ProtoReflect.Descriptor instead.
|
||||||
func (*UnencryptedData) Descriptor() ([]byte, []int) {
|
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 {
|
func (x *UnencryptedData) GetData() []byte {
|
||||||
|
|
@ -209,18 +269,23 @@ type RoutableAuditEvent struct {
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
// Functional event name with pattern <TYPE>_<ACTION>, e.g. ORGANIZATION_CREATED
|
// TODO rename to operation_name (equivalent to AuditLog.method_name)
|
||||||
// Will be copied over by the SDK from the AuditEvent
|
// 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"`
|
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 relevant for differentiating between internal and public events
|
||||||
Visibility Visibility `protobuf:"varint,2,opt,name=visibility,proto3,enum=audit.v1.Visibility" json:"visibility,omitempty"`
|
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:
|
// 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"`
|
||||||
// *RoutableAuditEvent_ObjectName
|
|
||||||
// *RoutableAuditEvent_ObjectIdentifier
|
|
||||||
ResourceReference isRoutableAuditEvent_ResourceReference `protobuf_oneof:"resource_reference"`
|
|
||||||
// The actual audit event is transferred in one of the attributes below
|
// The actual audit event is transferred in one of the attributes below
|
||||||
//
|
//
|
||||||
// Types that are assignable to Data:
|
// Types that are assignable to Data:
|
||||||
|
|
@ -233,7 +298,7 @@ type RoutableAuditEvent struct {
|
||||||
func (x *RoutableAuditEvent) Reset() {
|
func (x *RoutableAuditEvent) Reset() {
|
||||||
*x = RoutableAuditEvent{}
|
*x = RoutableAuditEvent{}
|
||||||
if protoimpl.UnsafeEnabled {
|
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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -246,7 +311,7 @@ func (x *RoutableAuditEvent) String() string {
|
||||||
func (*RoutableAuditEvent) ProtoMessage() {}
|
func (*RoutableAuditEvent) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *RoutableAuditEvent) ProtoReflect() protoreflect.Message {
|
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 {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -259,7 +324,7 @@ func (x *RoutableAuditEvent) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use RoutableAuditEvent.ProtoReflect.Descriptor instead.
|
// Deprecated: Use RoutableAuditEvent.ProtoReflect.Descriptor instead.
|
||||||
func (*RoutableAuditEvent) Descriptor() ([]byte, []int) {
|
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 {
|
func (x *RoutableAuditEvent) GetEventName() string {
|
||||||
|
|
@ -276,22 +341,8 @@ func (x *RoutableAuditEvent) GetVisibility() Visibility {
|
||||||
return Visibility_VISIBILITY_UNSPECIFIED
|
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 {
|
func (x *RoutableAuditEvent) GetObjectIdentifier() *ObjectIdentifier {
|
||||||
if x, ok := x.GetResourceReference().(*RoutableAuditEvent_ObjectIdentifier); ok {
|
if x != nil {
|
||||||
return x.ObjectIdentifier
|
return x.ObjectIdentifier
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
@ -318,35 +369,16 @@ func (x *RoutableAuditEvent) GetEncryptedData() *EncryptedData {
|
||||||
return nil
|
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 {
|
type isRoutableAuditEvent_Data interface {
|
||||||
isRoutableAuditEvent_Data()
|
isRoutableAuditEvent_Data()
|
||||||
}
|
}
|
||||||
|
|
||||||
type RoutableAuditEvent_UnencryptedData struct {
|
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 {
|
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() {}
|
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,
|
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,
|
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,
|
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,
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5f, 0x0a, 0x10, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74,
|
||||||
0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, 0x01,
|
0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x0a, 0x69, 0x64,
|
||||||
0x0a, 0x0d, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12,
|
0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b,
|
||||||
0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x0a, 0xba,
|
0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x0a, 0x69, 0x64, 0x65,
|
||||||
0x48, 0x07, 0xc8, 0x01, 0x01, 0x7a, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12,
|
0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
|
||||||
0x2f, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x79, 0x70, 0x65,
|
0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02,
|
0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xc5, 0x01, 0x0a, 0x0d, 0x45, 0x6e, 0x63, 0x72,
|
||||||
0x10, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x54, 0x79, 0x70, 0x65,
|
0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74,
|
||||||
0x12, 0x39, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61,
|
0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x7a,
|
||||||
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48,
|
0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x0d, 0x70, 0x72, 0x6f,
|
||||||
0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70,
|
0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x74, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x28, 0x0a, 0x0b, 0x6b,
|
0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x72,
|
||||||
0x65, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
|
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x54, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x12, 0x65, 0x6e,
|
||||||
0x42, 0x07, 0xba, 0x48, 0x04, 0x1a, 0x02, 0x28, 0x01, 0x52, 0x0a, 0x6b, 0x65, 0x79, 0x56, 0x65,
|
0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
|
||||||
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x62, 0x0a, 0x0f, 0x55, 0x6e, 0x65, 0x6e, 0x63, 0x72, 0x79,
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02,
|
||||||
0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
|
0x10, 0x01, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x73,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x7a, 0x02,
|
0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x28, 0x0a, 0x0b, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x65, 0x72,
|
||||||
0x10, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74,
|
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xba, 0x48, 0x04, 0x1a,
|
||||||
0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42,
|
0x02, 0x28, 0x01, 0x52, 0x0a, 0x6b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22,
|
||||||
0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f,
|
0x62, 0x0a, 0x0f, 0x55, 0x6e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61,
|
||||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x54, 0x79, 0x70, 0x65, 0x22, 0xf4, 0x03, 0x0a, 0x12, 0x52, 0x6f,
|
0x74, 0x61, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
|
||||||
0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x75, 0x64, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74,
|
0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01, 0x01, 0x7a, 0x02, 0x10, 0x01, 0x52, 0x04, 0x64, 0x61,
|
||||||
0x12, 0x61, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
|
0x74, 0x61, 0x12, 0x2f, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x42, 0xba, 0x48, 0x3f, 0xc8, 0x01, 0x01, 0x72, 0x3a, 0x32, 0x38,
|
0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xba, 0x48, 0x07, 0xc8, 0x01,
|
||||||
0x5e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x69, 0x74, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d,
|
0x01, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x54,
|
||||||
0x39, 0x5d, 0x2b, 0x5c, 0x2e, 0x76, 0x5b, 0x31, 0x2d, 0x39, 0x5d, 0x5b, 0x30, 0x2d, 0x39, 0x5d,
|
0x79, 0x70, 0x65, 0x22, 0xa4, 0x03, 0x0a, 0x12, 0x52, 0x6f, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65,
|
||||||
0x2a, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x5c, 0x2e, 0x5b, 0x61,
|
0x41, 0x75, 0x64, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x61, 0x0a, 0x0a, 0x65, 0x76,
|
||||||
0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4e,
|
0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x42,
|
||||||
0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74,
|
0xba, 0x48, 0x3f, 0xc8, 0x01, 0x01, 0x72, 0x3a, 0x32, 0x38, 0x5e, 0x73, 0x74, 0x61, 0x63, 0x6b,
|
||||||
0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e,
|
0x69, 0x74, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x5c, 0x2e, 0x76,
|
||||||
0x76, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x42, 0x0b, 0xba,
|
0x5b, 0x31, 0x2d, 0x39, 0x5d, 0x5b, 0x30, 0x2d, 0x39, 0x5d, 0x2a, 0x5c, 0x2e, 0x5b, 0x61, 0x2d,
|
||||||
0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69,
|
0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x5c, 0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d,
|
||||||
0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x37, 0x0a, 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
|
0x2b, 0x24, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a,
|
||||||
0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x75,
|
0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d,
|
0x0e, 0x32, 0x14, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x73,
|
||||||
0x65, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12,
|
0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82,
|
||||||
0x49, 0x0a, 0x11, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,
|
0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
|
||||||
0x66, 0x69, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x75, 0x64,
|
0x12, 0x4f, 0x0a, 0x11, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74,
|
||||||
0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x65, 0x6e,
|
0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x75,
|
||||||
0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
|
0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x65,
|
||||||
0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x10, 0x75, 0x6e,
|
0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52,
|
||||||
0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05,
|
0x10, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65,
|
||||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e,
|
0x72, 0x12, 0x46, 0x0a, 0x10, 0x75, 0x6e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64,
|
||||||
0x55, 0x6e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x48,
|
0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x75,
|
||||||
0x01, 0x52, 0x0f, 0x75, 0x6e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61,
|
0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
|
||||||
0x74, 0x61, 0x12, 0x40, 0x0a, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f,
|
0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f, 0x75, 0x6e, 0x65, 0x6e, 0x63, 0x72,
|
||||||
0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x75, 0x64,
|
0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0e, 0x65, 0x6e, 0x63,
|
||||||
0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44,
|
0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||||
0x61, 0x74, 0x61, 0x48, 0x01, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64,
|
0x0b, 0x32, 0x17, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63,
|
||||||
0x44, 0x61, 0x74, 0x61, 0x42, 0x1b, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x6e,
|
||||||
0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08,
|
0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x42, 0x0d, 0x0a, 0x04, 0x64,
|
||||||
0x01, 0x42, 0x0d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01,
|
0x61, 0x74, 0x61, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x2a, 0x57, 0x0a, 0x0a, 0x56, 0x69,
|
||||||
0x2a, 0x57, 0x0a, 0x0a, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a,
|
0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x53, 0x49,
|
||||||
0x0a, 0x16, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53,
|
0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
|
||||||
0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49,
|
0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49,
|
||||||
0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10,
|
0x54, 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x56,
|
||||||
0x01, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f,
|
0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54,
|
||||||
0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x02, 0x42, 0x84, 0x01, 0x0a, 0x1c, 0x63, 0x6f,
|
0x45, 0x10, 0x02, 0x42, 0x84, 0x01, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x63, 0x68, 0x77,
|
||||||
0x6d, 0x2e, 0x73, 0x63, 0x68, 0x77, 0x61, 0x72, 0x7a, 0x2e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x69,
|
0x61, 0x72, 0x7a, 0x2e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x69, 0x74, 0x2e, 0x61, 0x75, 0x64, 0x69,
|
||||||
0x74, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x12, 0x52, 0x6f, 0x75, 0x74,
|
0x74, 0x2e, 0x76, 0x31, 0x42, 0x12, 0x52, 0x6f, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x76,
|
||||||
0x61, 0x62, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
|
0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x0f, 0x2e, 0x2f, 0x61, 0x75,
|
||||||
0x5a, 0x0f, 0x2e, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x3b, 0x61, 0x75, 0x64, 0x69, 0x74, 0x56,
|
0x64, 0x69, 0x74, 0x3b, 0x61, 0x75, 0x64, 0x69, 0x74, 0x56, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58,
|
||||||
0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x41, 0x75, 0x64, 0x69, 0x74, 0x2e,
|
0x58, 0xaa, 0x02, 0x08, 0x41, 0x75, 0x64, 0x69, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x41,
|
||||||
0x56, 0x31, 0xca, 0x02, 0x08, 0x41, 0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14,
|
0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x41, 0x75, 0x64, 0x69, 0x74, 0x5c,
|
||||||
0x41, 0x75, 0x64, 0x69, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
|
0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
|
||||||
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x41, 0x75, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31,
|
0x09, 0x41, 0x75, 0x64, 0x69, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
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_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{}{
|
var file_audit_v1_routable_event_proto_goTypes = []interface{}{
|
||||||
(Visibility)(0), // 0: audit.v1.Visibility
|
(Visibility)(0), // 0: audit.v1.Visibility
|
||||||
(*EncryptedData)(nil), // 1: audit.v1.EncryptedData
|
(*ObjectIdentifier)(nil), // 1: audit.v1.ObjectIdentifier
|
||||||
(*UnencryptedData)(nil), // 2: audit.v1.UnencryptedData
|
(*EncryptedData)(nil), // 2: audit.v1.EncryptedData
|
||||||
(*RoutableAuditEvent)(nil), // 3: audit.v1.RoutableAuditEvent
|
(*UnencryptedData)(nil), // 3: audit.v1.UnencryptedData
|
||||||
(ObjectName)(0), // 4: audit.v1.ObjectName
|
(*RoutableAuditEvent)(nil), // 4: audit.v1.RoutableAuditEvent
|
||||||
(*ObjectIdentifier)(nil), // 5: audit.v1.ObjectIdentifier
|
|
||||||
}
|
}
|
||||||
var file_audit_v1_routable_event_proto_depIdxs = []int32{
|
var file_audit_v1_routable_event_proto_depIdxs = []int32{
|
||||||
0, // 0: audit.v1.RoutableAuditEvent.visibility:type_name -> audit.v1.Visibility
|
0, // 0: audit.v1.RoutableAuditEvent.visibility:type_name -> audit.v1.Visibility
|
||||||
4, // 1: audit.v1.RoutableAuditEvent.object_name:type_name -> audit.v1.ObjectName
|
1, // 1: audit.v1.RoutableAuditEvent.object_identifier:type_name -> audit.v1.ObjectIdentifier
|
||||||
5, // 2: 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.unencrypted_data:type_name -> audit.v1.UnencryptedData
|
2, // 3: audit.v1.RoutableAuditEvent.encrypted_data:type_name -> audit.v1.EncryptedData
|
||||||
1, // 4: audit.v1.RoutableAuditEvent.encrypted_data:type_name -> audit.v1.EncryptedData
|
4, // [4:4] is the sub-list for method output_type
|
||||||
5, // [5:5] is the sub-list for method output_type
|
4, // [4:4] is the sub-list for method input_type
|
||||||
5, // [5:5] is the sub-list for method input_type
|
4, // [4:4] is the sub-list for extension type_name
|
||||||
5, // [5:5] is the sub-list for extension type_name
|
4, // [4:4] is the sub-list for extension extendee
|
||||||
5, // [5:5] is the sub-list for extension extendee
|
0, // [0:4] is the sub-list for field type_name
|
||||||
0, // [0:5] is the sub-list for field type_name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_audit_v1_routable_event_proto_init() }
|
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 {
|
if File_audit_v1_routable_event_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
file_audit_v1_common_proto_init()
|
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_audit_v1_routable_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
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:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
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{} {
|
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:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
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{} {
|
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 {
|
switch v := v.(*RoutableAuditEvent); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
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{}{
|
file_audit_v1_routable_event_proto_msgTypes[3].OneofWrappers = []interface{}{
|
||||||
(*RoutableAuditEvent_ObjectName)(nil),
|
|
||||||
(*RoutableAuditEvent_ObjectIdentifier)(nil),
|
|
||||||
(*RoutableAuditEvent_UnencryptedData)(nil),
|
(*RoutableAuditEvent_UnencryptedData)(nil),
|
||||||
(*RoutableAuditEvent_EncryptedData)(nil),
|
(*RoutableAuditEvent_EncryptedData)(nil),
|
||||||
}
|
}
|
||||||
|
|
@ -520,7 +559,7 @@ func file_audit_v1_routable_event_proto_init() {
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_audit_v1_routable_event_proto_rawDesc,
|
RawDescriptor: file_audit_v1_routable_event_proto_rawDesc,
|
||||||
NumEnums: 1,
|
NumEnums: 1,
|
||||||
NumMessages: 3,
|
NumMessages: 4,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,110 @@ var (
|
||||||
_ = sort.Sort
|
_ = 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
|
// 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
|
// the proto definition for this message. If any rules are violated, the first
|
||||||
// error encountered is returned, or nil if there are no violations.
|
// 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
|
// no validation rules for Visibility
|
||||||
|
|
||||||
switch v := m.ResourceReference.(type) {
|
if all {
|
||||||
case *RoutableAuditEvent_ObjectName:
|
switch v := interface{}(m.GetObjectIdentifier()).(type) {
|
||||||
if v == nil {
|
case interface{ ValidateAll() error }:
|
||||||
err := RoutableAuditEventValidationError{
|
if err := v.ValidateAll(); err != nil {
|
||||||
field: "ResourceReference",
|
errors = append(errors, RoutableAuditEventValidationError{
|
||||||
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{
|
|
||||||
field: "ObjectIdentifier",
|
field: "ObjectIdentifier",
|
||||||
reason: "embedded message failed validation",
|
reason: "embedded message failed validation",
|
||||||
cause: err,
|
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) {
|
switch v := m.Data.(type) {
|
||||||
case *RoutableAuditEvent_UnencryptedData:
|
case *RoutableAuditEvent_UnencryptedData:
|
||||||
if v == nil {
|
if v == nil {
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,6 @@ import "google/protobuf/struct.proto";
|
||||||
import "google/protobuf/timestamp.proto";
|
import "google/protobuf/timestamp.proto";
|
||||||
import "google/protobuf/wrappers.proto";
|
import "google/protobuf/wrappers.proto";
|
||||||
|
|
||||||
import "audit/v1/common.proto";
|
|
||||||
|
|
||||||
package audit.v1;
|
package audit.v1;
|
||||||
|
|
||||||
option go_package = "./audit;auditV1";
|
option go_package = "./audit;auditV1";
|
||||||
|
|
@ -23,8 +21,9 @@ message AuditLogEntry {
|
||||||
|
|
||||||
// The resource name of the log to which this log entry belongs.
|
// The resource name of the log to which this log entry belongs.
|
||||||
//
|
//
|
||||||
// Format: <type>/<identifier>/logs/<eventType>
|
// Format: <pluralType>/<identifier>/logs/<eventType>
|
||||||
// Where:
|
// Where:
|
||||||
|
// Plural-Types: One from the list of supported data types
|
||||||
// Event-Types: admin-activity, system-event, policy-denied, data-access
|
// Event-Types: admin-activity, system-event, policy-denied, data-access
|
||||||
//
|
//
|
||||||
// Examples:
|
// Examples:
|
||||||
|
|
@ -175,7 +174,12 @@ message AuditLog {
|
||||||
// TODO rename into operation?
|
// TODO rename into operation?
|
||||||
// The name of the service method or 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:
|
// Examples:
|
||||||
// "stackit.resourcemanager.v1.organization.created"
|
// "stackit.resourcemanager.v1.organization.created"
|
||||||
|
|
@ -191,8 +195,10 @@ message AuditLog {
|
||||||
// The resource or collection that is the target of the operation.
|
// The resource or collection that is the target of the operation.
|
||||||
// The name is a scheme-less URI, not including the API service name.
|
// 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:
|
// 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).
|
// Region-Zone: Optional region and zone id. If both, separated with a - (dash). Alternatively _ (underscore).
|
||||||
// Details: Optional "<key>/<id>" pairs
|
// Details: Optional "<key>/<id>" pairs
|
||||||
//
|
//
|
||||||
|
|
@ -293,7 +299,7 @@ message AuthenticationInfo {
|
||||||
// The name of the service account used to create or exchange
|
// The name of the service account used to create or exchange
|
||||||
// credentials for authenticating the service account making the request.
|
// credentials for authenticating the service account making the request.
|
||||||
//
|
//
|
||||||
// Format: projects/<id>/serviceAccounts/<account>
|
// Format: projects/<id>/serviceAccounts/<accountId>
|
||||||
//
|
//
|
||||||
// Examples:
|
// Examples:
|
||||||
// "projects/29b2c56f-f712-4a9c-845b-f0907158e53c/serviceAccounts/a606dc68-8b97-421b-89a9-116bcbd004df"
|
// "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.
|
// The resource being accessed, as a REST-style string.
|
||||||
//
|
//
|
||||||
// Format: <type>/<id>[/locations/<region-zone>][/<details>]
|
// Format: <pluralType>/<id>[/locations/<region-zone>][/<details>]
|
||||||
// Where:
|
// 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).
|
// Region-Zone: Optional region and zone id. If both, separated with a - (dash). Alternatively _ (underscore).
|
||||||
// Details: Optional "<key>/<id>" pairs
|
// Details: Optional "<key>/<id>" pairs
|
||||||
//
|
//
|
||||||
|
|
@ -564,7 +572,7 @@ message RequestMetadata {
|
||||||
//
|
//
|
||||||
// Examples:
|
// Examples:
|
||||||
// "OpenAPI-Generator/1.0.0/go"
|
// "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"
|
// "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.
|
// -> 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 "buf/validate/validate.proto";
|
||||||
|
|
||||||
import "audit/v1/common.proto";
|
|
||||||
|
|
||||||
package audit.v1;
|
package audit.v1;
|
||||||
|
|
||||||
option go_package = "./audit;auditV1";
|
option go_package = "./audit;auditV1";
|
||||||
|
|
@ -18,6 +16,17 @@ enum Visibility {
|
||||||
VISIBILITY_PRIVATE = 2;
|
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 {
|
message EncryptedData {
|
||||||
// Encrypted serialized protobuf content (the actual audit event)
|
// Encrypted serialized protobuf content (the actual audit event)
|
||||||
bytes data = 1 [(buf.validate.field).required = true, (buf.validate.field).bytes.min_len = 1];
|
bytes data = 1 [(buf.validate.field).required = true, (buf.validate.field).bytes.min_len = 1];
|
||||||
|
|
@ -42,8 +51,15 @@ message UnencryptedData {
|
||||||
|
|
||||||
message RoutableAuditEvent {
|
message RoutableAuditEvent {
|
||||||
|
|
||||||
// Functional event name with pattern <TYPE>_<ACTION>, e.g. ORGANIZATION_CREATED
|
// TODO rename to operation_name (equivalent to AuditLog.method_name)
|
||||||
// Will be copied over by the SDK from the AuditEvent
|
// 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 [
|
string event_name = 1 [
|
||||||
(buf.validate.field).required = true,
|
(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]+$"
|
(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 relevant for differentiating between internal and public events
|
||||||
Visibility visibility = 2 [(buf.validate.field).required = true, (buf.validate.field).enum.defined_only = true];
|
Visibility visibility = 2 [(buf.validate.field).required = true, (buf.validate.field).enum.defined_only = true];
|
||||||
|
|
||||||
// Identifier the audit log event refers to
|
// Identifier the audit log event refers to.
|
||||||
oneof resource_reference {
|
//
|
||||||
option (buf.validate.oneof).required = true;
|
// System events, will not be routed to the end-user.
|
||||||
// If it is a technical event not related to an organization, folder or project
|
ObjectIdentifier object_identifier = 3 [(buf.validate.field).required = true];
|
||||||
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The actual audit event is transferred in one of the attributes below
|
// The actual audit event is transferred in one of the attributes below
|
||||||
oneof data {
|
oneof data {
|
||||||
option (buf.validate.oneof).required = true;
|
option (buf.validate.oneof).required = true;
|
||||||
UnencryptedData unencrypted_data = 5;
|
UnencryptedData unencrypted_data = 4;
|
||||||
EncryptedData encrypted_data = 6;
|
EncryptedData encrypted_data = 5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue