Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat: audit log name parent (#11759)

p0ny547f4e2309dd
diff --git a/frontend/src/types/proto/store/audit_log.ts b/frontend/src/types/proto/store/audit_log.ts
index d945727167..5c2be91689 100644
--- a/frontend/src/types/proto/store/audit_log.ts
+++ b/frontend/src/types/proto/store/audit_log.ts
@@ -6,6 +6,13 @@ import { Status } from "../google/rpc/status";
export const protobufPackage = "bytebase.store";
export interface AuditLog {
+ /**
+ * The project or workspace the audit log belongs to.
+ * Formats:
+ * - projects/{project}
+ * - workspaces/{workspace}
+ */
+ parent: string;
/** e.g. /bytebase.v1.SQLService/Query */
method: string;
/**
@@ -102,31 +109,34 @@ export function auditLog_SeverityToJSON(object: AuditLog_Severity): string {
}
function createBaseAuditLog(): AuditLog {
- return { method: "", resource: "", user: "", severity: 0, request: "", response: "", status: undefined };
+ return { parent: "", method: "", resource: "", user: "", severity: 0, request: "", response: "", status: undefined };
}
export const AuditLog = {
encode(message: AuditLog, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.parent !== "") {
+ writer.uint32(10).string(message.parent);
+ }
if (message.method !== "") {
- writer.uint32(10).string(message.method);
+ writer.uint32(18).string(message.method);
}
if (message.resource !== "") {
- writer.uint32(18).string(message.resource);
+ writer.uint32(26).string(message.resource);
}
if (message.user !== "") {
- writer.uint32(26).string(message.user);
+ writer.uint32(34).string(message.user);
}
if (message.severity !== 0) {
- writer.uint32(32).int32(message.severity);
+ writer.uint32(40).int32(message.severity);
}
if (message.request !== "") {
- writer.uint32(42).string(message.request);
+ writer.uint32(50).string(message.request);
}
if (message.response !== "") {
- writer.uint32(50).string(message.response);
+ writer.uint32(58).string(message.response);
}
if (message.status !== undefined) {
- Status.encode(message.status, writer.uint32(58).fork()).ldelim();
+ Status.encode(message.status, writer.uint32(66).fork()).ldelim();
}
return writer;
},
@@ -143,48 +153,55 @@ export const AuditLog = {
break;
}
- message.method = reader.string();
+ message.parent = reader.string();
continue;
case 2:
if (tag !== 18) {
break;
}
- message.resource = reader.string();
+ message.method = reader.string();
continue;
case 3:
if (tag !== 26) {
break;
}
- message.user = reader.string();
+ message.resource = reader.string();
continue;
case 4:
- if (tag !== 32) {
+ if (tag !== 34) {
break;
}
- message.severity = reader.int32() as any;
+ message.user = reader.string();
continue;
case 5:
- if (tag !== 42) {
+ if (tag !== 40) {
break;
}
- message.request = reader.string();
+ message.severity = reader.int32() as any;
continue;
case 6:
if (tag !== 50) {
break;
}
- message.response = reader.string();
+ message.request = reader.string();
continue;
case 7:
if (tag !== 58) {
break;
}
+ message.response = reader.string();
+ continue;
+ case 8:
+ if (tag !== 66) {
+ break;
+ }
+
message.status = Status.decode(reader, reader.uint32());
continue;
}
@@ -198,6 +215,7 @@ export const AuditLog = {
fromJSON(object: any): AuditLog {
return {
+ parent: isSet(object.parent) ? globalThis.String(object.parent) : "",
method: isSet(object.method) ? globalThis.String(object.method) : "",
resource: isSet(object.resource) ? globalThis.String(object.resource) : "",
user: isSet(object.user) ? globalThis.String(object.user) : "",
@@ -210,6 +228,9 @@ export const AuditLog = {
toJSON(message: AuditLog): unknown {
const obj: any = {};
+ if (message.parent !== "") {
+ obj.parent = message.parent;
+ }
if (message.method !== "") {
obj.method = message.method;
}
@@ -239,6 +260,7 @@ export const AuditLog = {
},
fromPartial(object: DeepPartial<AuditLog>): AuditLog {
const message = createBaseAuditLog();
+ message.parent = object.parent ?? "";
message.method = object.method ?? "";
message.resource = object.resource ?? "";
message.user = object.user ?? "";
diff --git a/frontend/src/types/proto/v1/audit_log_service.ts b/frontend/src/types/proto/v1/audit_log_service.ts
index 9acaf763b5..cc065b0207 100644
--- a/frontend/src/types/proto/v1/audit_log_service.ts
+++ b/frontend/src/types/proto/v1/audit_log_service.ts
@@ -43,7 +43,9 @@ export interface SearchAuditLogsResponse {
export interface AuditLog {
/**
* The name of the log.
- * Format: logs/{uid}
+ * Formats:
+ * - projects/{project}/auditLogs/{uid}
+ * - workspaces/{workspace}/auditLogs/{uid}
*/
name: string;
createTime:
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 44dbf9753a..f0763cf796 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -8159,7 +8159,9 @@ components:
type: string
description: |-
The name of the log.
- Format: logs/{uid}
+ Formats:
+ - projects/{project}/auditLogs/{uid}
+ - workspaces/{workspace}/auditLogs/{uid}
createTime:
readOnly: true
type: string
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index 4946faab69..89a8acc2a8 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -616,6 +616,7 @@ convert to the expected struct there.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The project or workspace the audit log belongs to. Formats: - projects/{project} - workspaces/{workspace} |
| method | [string](#string) | | e.g. /bytebase.v1.SQLService/Query |
| resource | [string](#string) | | resource name projects/{project} |
| user | [string](#string) | | Format: users/[email protected] |
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index c7d51d1547..74fb3cd8cb 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -1888,6 +1888,16 @@ If `true`, other fields are available. </p></td>
</thead>
<tbody>
+ <tr>
+ <td>parent</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The project or workspace the audit log belongs to.
+Formats:
+- projects/{project}
+- workspaces/{workspace} </p></td>
+ </tr>
+
<tr>
<td>method</td>
<td><a href="#string">string</a></td>
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index aaebcf3b3f..504057bf68 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -1009,7 +1009,7 @@ DATABASE_CONNECTION is the anomaly type for database connection, e.g. the databa
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the log. Format: logs/{uid} |
+| name | [string](#string) | | The name of the log. Formats: - projects/{project}/auditLogs/{uid} - workspaces/{workspace}/auditLogs/{uid} |
| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
| user | [string](#string) | | Format: users/[email protected] |
| method | [string](#string) | | e.g. `/bytebase.v1.SQLService/Query`, `bb.project.repository.push` |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index b52ca68c96..8125a68d15 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -3535,7 +3535,9 @@ e.g. the database schema had been changed without bytebase migration.</p></td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>The name of the log.
-Format: logs/{uid} </p></td>
+Formats:
+- projects/{project}/auditLogs/{uid}
+- workspaces/{workspace}/auditLogs/{uid} </p></td>
</tr>
<tr>
diff --git a/proto/generated-go/store/audit_log.pb.go b/proto/generated-go/store/audit_log.pb.go
index 8dba9c80bd..bc03651ddf 100644
--- a/proto/generated-go/store/audit_log.pb.go
+++ b/proto/generated-go/store/audit_log.pb.go
@@ -93,20 +93,25 @@ type AuditLog struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
+ // The project or workspace the audit log belongs to.
+ // Formats:
+ // - projects/{project}
+ // - workspaces/{workspace}
+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// e.g. /bytebase.v1.SQLService/Query
- Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
+ Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
// resource name
// projects/{project}
- Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"`
+ Resource string `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
// Format: users/[email protected]
- User string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"`
- Severity AuditLog_Severity `protobuf:"varint,4,opt,name=severity,proto3,enum=bytebase.store.AuditLog_Severity" json:"severity,omitempty"`
+ User string `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
+ Severity AuditLog_Severity `protobuf:"varint,5,opt,name=severity,proto3,enum=bytebase.store.AuditLog_Severity" json:"severity,omitempty"`
// Marshalled request.
- Request string `protobuf:"bytes,5,opt,name=request,proto3" json:"request,omitempty"`
+ Request string `protobuf:"bytes,6,opt,name=request,proto3" json:"request,omitempty"`
// Marshalled response.
// Some fields are omitted because they are too large or contain sensitive information.
- Response string `protobuf:"bytes,6,opt,name=response,proto3" json:"response,omitempty"`
- Status *status.Status `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"`
+ Response string `protobuf:"bytes,7,opt,name=response,proto3" json:"response,omitempty"`
+ Status *status.Status `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"`
}
func (x *AuditLog) Reset() {
@@ -141,6 +146,13 @@ func (*AuditLog) Descriptor() ([]byte, []int) {
return file_store_audit_log_proto_rawDescGZIP(), []int{0}
}
+func (x *AuditLog) GetParent() string {
+ if x != nil {
+ return x.Parent
+ }
+ return ""
+}
+
func (x *AuditLog) GetMethod() string {
if x != nil {
return x.Method
@@ -197,31 +209,33 @@ var file_store_audit_log_proto_rawDesc = []byte{
0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x22, 0xed, 0x02, 0x0a, 0x08, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x16, 0x0a,
- 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d,
- 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74,
- 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f,
- 0x67, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65,
- 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18,
- 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a,
- 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74,
- 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06,
- 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x78, 0x0a, 0x08, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69,
- 0x74, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12,
- 0x09, 0x0a, 0x05, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e,
- 0x46, 0x4f, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x54, 0x49, 0x43, 0x45, 0x10, 0x03,
- 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x09, 0x0a,
- 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x49, 0x54,
- 0x49, 0x43, 0x41, 0x4c, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x45, 0x52, 0x54, 0x10,
- 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x4e, 0x43, 0x59, 0x10, 0x08,
- 0x42, 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f,
- 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x22, 0x85, 0x03, 0x0a, 0x08, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x16, 0x0a,
+ 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70,
+ 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1a, 0x0a,
+ 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65,
+ 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x3d, 0x0a,
+ 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65,
+ 0x2e, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69,
+ 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07,
+ 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e,
+ 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x78,
+ 0x0a, 0x08, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45,
+ 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x45, 0x42, 0x55, 0x47,
+ 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06,
+ 0x4e, 0x4f, 0x54, 0x49, 0x43, 0x45, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e,
+ 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05,
+ 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x49, 0x54, 0x49, 0x43, 0x41, 0x4c, 0x10, 0x06, 0x12, 0x09,
+ 0x0a, 0x05, 0x41, 0x4c, 0x45, 0x52, 0x54, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x4d, 0x45,
+ 0x52, 0x47, 0x45, 0x4e, 0x43, 0x59, 0x10, 0x08, 0x42, 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65,
+ 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/proto/generated-go/v1/audit_log_service.pb.go b/proto/generated-go/v1/audit_log_service.pb.go
index efdb6f8c42..0c6cf790e2 100644
--- a/proto/generated-go/v1/audit_log_service.pb.go
+++ b/proto/generated-go/v1/audit_log_service.pb.go
@@ -236,7 +236,9 @@ type AuditLog struct {
unknownFields protoimpl.UnknownFields
// The name of the log.
- // Format: logs/{uid}
+ // Formats:
+ // - projects/{project}/auditLogs/{uid}
+ // - workspaces/{workspace}/auditLogs/{uid}
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Format: users/[email protected]
diff --git a/proto/store/audit_log.proto b/proto/store/audit_log.proto
index 60726e79ae..ba9ca3877b 100644
--- a/proto/store/audit_log.proto
+++ b/proto/store/audit_log.proto
@@ -7,26 +7,32 @@ import "google/rpc/status.proto";
option go_package = "generated-go/store";
message AuditLog {
+ // The project or workspace the audit log belongs to.
+ // Formats:
+ // - projects/{project}
+ // - workspaces/{workspace}
+ string parent = 1;
+
// e.g. /bytebase.v1.SQLService/Query
- string method = 1;
+ string method = 2;
// resource name
// projects/{project}
- string resource = 2;
+ string resource = 3;
// Format: users/[email protected]
- string user = 3;
+ string user = 4;
- Severity severity = 4;
+ Severity severity = 5;
// Marshalled request.
- string request = 5;
+ string request = 6;
// Marshalled response.
// Some fields are omitted because they are too large or contain sensitive information.
- string response = 6;
+ string response = 7;
- google.rpc.Status status = 7;
+ google.rpc.Status status = 8;
enum Severity {
DEFAULT = 0;
diff --git a/proto/v1/audit_log_service.proto b/proto/v1/audit_log_service.proto
index bbbbebffaf..67110df51c 100644
--- a/proto/v1/audit_log_service.proto
+++ b/proto/v1/audit_log_service.proto
@@ -47,7 +47,9 @@ message SearchAuditLogsResponse {
message AuditLog {
// The name of the log.
- // Format: logs/{uid}
+ // Formats:
+ // - projects/{project}/auditLogs/{uid}
+ // - workspaces/{workspace}/auditLogs/{uid}
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];