audit-go/proto/audit/v1/common.proto
Christian Schaible dff37867e5 Add event source, region and container reference to audit event and
replace wrapping protobuf message type with cloud event wrapper
2024-07-18 14:09:07 +02:00

32 lines
No EOL
996 B
Protocol Buffer

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];
}