Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat(audit): policy delta (#12931)
Azusain99bcfd2c1ebf
diff --git a/frontend/src/types/proto/v1/audit_log_service.ts b/frontend/src/types/proto/v1/audit_log_service.tsindex 3222a11934..c7107717bb 100644--- a/frontend/src/types/proto/v1/audit_log_service.ts+++ b/frontend/src/types/proto/v1/audit_log_service.ts@@ -1,9 +1,11 @@/* eslint-disable */import Long from "long";import _m0 from "protobufjs/minimal";+import { Any } from "../google/protobuf/any";import { Timestamp } from "../google/protobuf/timestamp";import { Status } from "../google/rpc/status";import { ExportFormat, exportFormatFromJSON, exportFormatToJSON, exportFormatToNumber } from "./common";+import { PolicyDelta } from "./iam_policy";export const protobufPackage = "bytebase.v1";@@ -100,7 +102,11 @@ export interface AuditLog {* Some fields are omitted because they are too large or contain sensitive information.*/response: string;- status: Status | undefined;+ status:+ | Status+ | undefined;+ /** service-specific data about the request, response, and other activities. */+ serviceData: Any | undefined;}export enum AuditLog_Severity {@@ -204,6 +210,10 @@ export function auditLog_SeverityToNumber(object: AuditLog_Severity): number {}}+export interface AuditData {+ policyDelta: PolicyDelta | undefined;+}+function createBaseSearchAuditLogsRequest(): SearchAuditLogsRequest {return { filter: "", orderBy: "", pageSize: 0, pageToken: "" };}@@ -541,6 +551,7 @@ function createBaseAuditLog(): AuditLog {request: "",response: "",status: undefined,+ serviceData: undefined,};}@@ -573,6 +584,9 @@ export const AuditLog = {if (message.status !== undefined) {Status.encode(message.status, writer.uint32(74).fork()).ldelim();}+ if (message.serviceData !== undefined) {+ Any.encode(message.serviceData, writer.uint32(82).fork()).ldelim();+ }return writer;},@@ -646,6 +660,13 @@ export const AuditLog = {message.status = Status.decode(reader, reader.uint32());continue;+ case 10:+ if (tag !== 82) {+ break;+ }++ message.serviceData = Any.decode(reader, reader.uint32());+ continue;}if ((tag & 7) === 4 || tag === 0) {break;@@ -666,6 +687,7 @@ export const AuditLog = {request: isSet(object.request) ? globalThis.String(object.request) : "",response: isSet(object.response) ? globalThis.String(object.response) : "",status: isSet(object.status) ? Status.fromJSON(object.status) : undefined,+ serviceData: isSet(object.serviceData) ? Any.fromJSON(object.serviceData) : undefined,};},@@ -698,6 +720,9 @@ export const AuditLog = {if (message.status !== undefined) {obj.status = Status.toJSON(message.status);}+ if (message.serviceData !== undefined) {+ obj.serviceData = Any.toJSON(message.serviceData);+ }return obj;},@@ -717,6 +742,68 @@ export const AuditLog = {message.status = (object.status !== undefined && object.status !== null)? Status.fromPartial(object.status): undefined;+ message.serviceData = (object.serviceData !== undefined && object.serviceData !== null)+ ? Any.fromPartial(object.serviceData)+ : undefined;+ return message;+ },+};++function createBaseAuditData(): AuditData {+ return { policyDelta: undefined };+}++export const AuditData = {+ encode(message: AuditData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.policyDelta !== undefined) {+ PolicyDelta.encode(message.policyDelta, writer.uint32(10).fork()).ldelim();+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): AuditData {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseAuditData();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.policyDelta = PolicyDelta.decode(reader, reader.uint32());+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): AuditData {+ return { policyDelta: isSet(object.policyDelta) ? PolicyDelta.fromJSON(object.policyDelta) : undefined };+ },++ toJSON(message: AuditData): unknown {+ const obj: any = {};+ if (message.policyDelta !== undefined) {+ obj.policyDelta = PolicyDelta.toJSON(message.policyDelta);+ }+ return obj;+ },++ create(base?: DeepPartial<AuditData>): AuditData {+ return AuditData.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<AuditData>): AuditData {+ const message = createBaseAuditData();+ message.policyDelta = (object.policyDelta !== undefined && object.policyDelta !== null)+ ? PolicyDelta.fromPartial(object.policyDelta)+ : undefined;return message;},};diff --git a/frontend/src/types/proto/v1/iam_policy.ts b/frontend/src/types/proto/v1/iam_policy.tsindex 548e3514f9..7fecac4d78 100644--- a/frontend/src/types/proto/v1/iam_policy.ts+++ b/frontend/src/types/proto/v1/iam_policy.ts@@ -67,6 +67,84 @@ export interface Binding {parsedExpr: ParsedExpr | undefined;}+/** The difference delta between two policies. */+export interface PolicyDelta {+ /** The delta for Bindings between two policies. */+ bindingDeltas: BindingDelta[];+}++/**+ * One delta entry for Binding. Each individual change (only one member in each+ * entry) to a binding will be a separate entry.+ */+export interface BindingDelta {+ /** The action that was performed on a Binding. */+ action: BindingDelta_Action;+ /**+ * Role that is assigned to `members`.+ * For example, `roles/projectOwner`.+ */+ role: string;+ /** Follows the same format of Binding.members. */+ member: string;+ /** The condition that is associated with this binding. */+ condition: Expr | undefined;+}++/** The type of action performed on a Binding in a policy. */+export enum BindingDelta_Action {+ ACTION_UNSPECIFIED = "ACTION_UNSPECIFIED",+ ADD = "ADD",+ REMOVE = "REMOVE",+ UNRECOGNIZED = "UNRECOGNIZED",+}++export function bindingDelta_ActionFromJSON(object: any): BindingDelta_Action {+ switch (object) {+ case 0:+ case "ACTION_UNSPECIFIED":+ return BindingDelta_Action.ACTION_UNSPECIFIED;+ case 1:+ case "ADD":+ return BindingDelta_Action.ADD;+ case 2:+ case "REMOVE":+ return BindingDelta_Action.REMOVE;+ case -1:+ case "UNRECOGNIZED":+ default:+ return BindingDelta_Action.UNRECOGNIZED;+ }+}++export function bindingDelta_ActionToJSON(object: BindingDelta_Action): string {+ switch (object) {+ case BindingDelta_Action.ACTION_UNSPECIFIED:+ return "ACTION_UNSPECIFIED";+ case BindingDelta_Action.ADD:+ return "ADD";+ case BindingDelta_Action.REMOVE:+ return "REMOVE";+ case BindingDelta_Action.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export function bindingDelta_ActionToNumber(object: BindingDelta_Action): number {+ switch (object) {+ case BindingDelta_Action.ACTION_UNSPECIFIED:+ return 0;+ case BindingDelta_Action.ADD:+ return 1;+ case BindingDelta_Action.REMOVE:+ return 2;+ case BindingDelta_Action.UNRECOGNIZED:+ default:+ return -1;+ }+}+function createBaseGetIamPolicyRequest(): GetIamPolicyRequest {return { resource: "" };}@@ -397,6 +475,175 @@ export const Binding = {},};+function createBasePolicyDelta(): PolicyDelta {+ return { bindingDeltas: [] };+}++export const PolicyDelta = {+ encode(message: PolicyDelta, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ for (const v of message.bindingDeltas) {+ BindingDelta.encode(v!, writer.uint32(10).fork()).ldelim();+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): PolicyDelta {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBasePolicyDelta();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.bindingDeltas.push(BindingDelta.decode(reader, reader.uint32()));+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): PolicyDelta {+ return {+ bindingDeltas: globalThis.Array.isArray(object?.bindingDeltas)+ ? object.bindingDeltas.map((e: any) => BindingDelta.fromJSON(e))+ : [],+ };+ },++ toJSON(message: PolicyDelta): unknown {+ const obj: any = {};+ if (message.bindingDeltas?.length) {+ obj.bindingDeltas = message.bindingDeltas.map((e) => BindingDelta.toJSON(e));+ }+ return obj;+ },++ create(base?: DeepPartial<PolicyDelta>): PolicyDelta {+ return PolicyDelta.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<PolicyDelta>): PolicyDelta {+ const message = createBasePolicyDelta();+ message.bindingDeltas = object.bindingDeltas?.map((e) => BindingDelta.fromPartial(e)) || [];+ return message;+ },+};++function createBaseBindingDelta(): BindingDelta {+ return { action: BindingDelta_Action.ACTION_UNSPECIFIED, role: "", member: "", condition: undefined };+}++export const BindingDelta = {+ encode(message: BindingDelta, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.action !== BindingDelta_Action.ACTION_UNSPECIFIED) {+ writer.uint32(8).int32(bindingDelta_ActionToNumber(message.action));+ }+ if (message.role !== "") {+ writer.uint32(18).string(message.role);+ }+ if (message.member !== "") {+ writer.uint32(26).string(message.member);+ }+ if (message.condition !== undefined) {+ Expr.encode(message.condition, writer.uint32(34).fork()).ldelim();+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): BindingDelta {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseBindingDelta();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 8) {+ break;+ }++ message.action = bindingDelta_ActionFromJSON(reader.int32());+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.role = reader.string();+ continue;+ case 3:+ if (tag !== 26) {+ break;+ }++ message.member = reader.string();+ continue;+ case 4:+ if (tag !== 34) {+ break;+ }++ message.condition = Expr.decode(reader, reader.uint32());+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): BindingDelta {+ return {+ action: isSet(object.action)+ ? bindingDelta_ActionFromJSON(object.action)+ : BindingDelta_Action.ACTION_UNSPECIFIED,+ role: isSet(object.role) ? globalThis.String(object.role) : "",+ member: isSet(object.member) ? globalThis.String(object.member) : "",+ condition: isSet(object.condition) ? Expr.fromJSON(object.condition) : undefined,+ };+ },++ toJSON(message: BindingDelta): unknown {+ const obj: any = {};+ if (message.action !== BindingDelta_Action.ACTION_UNSPECIFIED) {+ obj.action = bindingDelta_ActionToJSON(message.action);+ }+ if (message.role !== "") {+ obj.role = message.role;+ }+ if (message.member !== "") {+ obj.member = message.member;+ }+ if (message.condition !== undefined) {+ obj.condition = Expr.toJSON(message.condition);+ }+ return obj;+ },++ create(base?: DeepPartial<BindingDelta>): BindingDelta {+ return BindingDelta.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<BindingDelta>): BindingDelta {+ const message = createBaseBindingDelta();+ message.action = object.action ?? BindingDelta_Action.ACTION_UNSPECIFIED;+ message.role = object.role ?? "";+ message.member = object.member ?? "";+ message.condition = (object.condition !== undefined && object.condition !== null)+ ? Expr.fromPartial(object.condition)+ : undefined;+ return message;+ },+};+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;export type DeepPartial<T> = T extends Builtin ? Tdiff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 313265542c..bb83c9537d 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -8738,6 +8738,10 @@ components:Some fields are omitted because they are too large or contain sensitive information.status:$ref: '#/components/schemas/Status'+ serviceData:+ allOf:+ - $ref: '#/components/schemas/GoogleProtobufAny'+ description: service-specific data about the request, response, and other activities.BatchCancelPlanCheckRunsRequest:type: objectproperties:diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 013e1fc7e5..dd94236886 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -45,7 +45,18 @@- [State](#bytebase-v1-State)- [VCSType](#bytebase-v1-VCSType)+- [v1/iam_policy.proto](#v1_iam_policy-proto)+ - [Binding](#bytebase-v1-Binding)+ - [BindingDelta](#bytebase-v1-BindingDelta)+ - [GetIamPolicyRequest](#bytebase-v1-GetIamPolicyRequest)+ - [IamPolicy](#bytebase-v1-IamPolicy)+ - [PolicyDelta](#bytebase-v1-PolicyDelta)+ - [SetIamPolicyRequest](#bytebase-v1-SetIamPolicyRequest)++ - [BindingDelta.Action](#bytebase-v1-BindingDelta-Action)+- [v1/audit_log_service.proto](#v1_audit_log_service-proto)+ - [AuditData](#bytebase-v1-AuditData)- [AuditLog](#bytebase-v1-AuditLog)- [ExportAuditLogsRequest](#bytebase-v1-ExportAuditLogsRequest)- [ExportAuditLogsResponse](#bytebase-v1-ExportAuditLogsResponse)@@ -262,12 +273,6 @@- [EnvironmentService](#bytebase-v1-EnvironmentService)-- [v1/iam_policy.proto](#v1_iam_policy-proto)- - [Binding](#bytebase-v1-Binding)- - [GetIamPolicyRequest](#bytebase-v1-GetIamPolicyRequest)- - [IamPolicy](#bytebase-v1-IamPolicy)- - [SetIamPolicyRequest](#bytebase-v1-SetIamPolicyRequest)-- [v1/idp_service.proto](#v1_idp_service-proto)- [CreateIdentityProviderRequest](#bytebase-v1-CreateIdentityProviderRequest)- [DeleteIdentityProviderRequest](#bytebase-v1-DeleteIdentityProviderRequest)@@ -1220,6 +1225,135 @@ DATABASE_CONNECTION is the anomaly type for database connection, e.g. the databa+<a name="v1_iam_policy-proto"></a>+<p align="right"><a href="#top">Top</a></p>++## v1/iam_policy.proto++++<a name="bytebase-v1-Binding"></a>++### Binding++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| role | [string](#string) | | The role that is assigned to the members. Format: roles/{role} |+| members | [string](#string) | repeated | Specifies the principals requesting access for a Bytebase resource. For users, the member should be: user:{email} For groups, the member should be: group:{email} |+| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this binding. If the condition evaluates to true, then this binding applies to the current request. If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. |+| parsed_expr | [google.api.expr.v1alpha1.ParsedExpr](#google-api-expr-v1alpha1-ParsedExpr) | | The parsed expression of the condition. |+++++++<a name="bytebase-v1-BindingDelta"></a>++### BindingDelta+One delta entry for Binding. Each individual change (only one member in each+entry) to a binding will be a separate entry.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| action | [BindingDelta.Action](#bytebase-v1-BindingDelta-Action) | | The action that was performed on a Binding. |+| role | [string](#string) | | Role that is assigned to `members`. For example, `roles/projectOwner`. |+| member | [string](#string) | | Follows the same format of Binding.members. |+| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this binding. |+++++++<a name="bytebase-v1-GetIamPolicyRequest"></a>++### GetIamPolicyRequest++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| resource | [string](#string) | | The name of the resource to get the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |+++++++<a name="bytebase-v1-IamPolicy"></a>++### IamPolicy++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| bindings | [Binding](#bytebase-v1-Binding) | repeated | Collection of binding. A binding binds one or more project members to a single project role. |+| etag | [string](#string) | | The current etag of the policy. If an etag is provided and does not match the current etag of the poliy, the call will be blocked and an ABORTED error will be returned. |+++++++<a name="bytebase-v1-PolicyDelta"></a>++### PolicyDelta+The difference delta between two policies.+++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| binding_deltas | [BindingDelta](#bytebase-v1-BindingDelta) | repeated | The delta for Bindings between two policies. |+++++++<a name="bytebase-v1-SetIamPolicyRequest"></a>++### SetIamPolicyRequest++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| resource | [string](#string) | | The name of the resource to set the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |+| policy | [IamPolicy](#bytebase-v1-IamPolicy) | | |+| etag | [string](#string) | | The current etag of the policy. |+++++++++<a name="bytebase-v1-BindingDelta-Action"></a>++### BindingDelta.Action+The type of action performed on a Binding in a policy.++| Name | Number | Description |+| ---- | ------ | ----------- |+| ACTION_UNSPECIFIED | 0 | |+| ADD | 1 | |+| REMOVE | 2 | |++++++++++<a name="v1_audit_log_service-proto"></a><p align="right"><a href="#top">Top</a></p>@@ -1227,6 +1361,21 @@ DATABASE_CONNECTION is the anomaly type for database connection, e.g. the databa+<a name="bytebase-v1-AuditData"></a>++### AuditData++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| policy_delta | [PolicyDelta](#bytebase-v1-PolicyDelta) | | |++++++<a name="bytebase-v1-AuditLog"></a>### AuditLog@@ -1244,6 +1393,7 @@ DATABASE_CONNECTION is the anomaly type for database connection, e.g. the databa| request | [string](#string) | | JSON-encoded request. || response | [string](#string) | | JSON-encoded response. Some fields are omitted because they are too large or contain sensitive information. || status | [google.rpc.Status](#google-rpc-Status) | | |+| service_data | [google.protobuf.Any](#google-protobuf-Any) | | service-specific data about the request, response, and other activities. |@@ -4543,88 +4693,6 @@ The environment's `name` field is used to identify the environment to update-<a name="v1_iam_policy-proto"></a>-<p align="right"><a href="#top">Top</a></p>--## v1/iam_policy.proto----<a name="bytebase-v1-Binding"></a>--### Binding----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| role | [string](#string) | | The role that is assigned to the members. Format: roles/{role} |-| members | [string](#string) | repeated | Specifies the principals requesting access for a Bytebase resource. For users, the member should be: user:{email} For groups, the member should be: group:{email} |-| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this binding. If the condition evaluates to true, then this binding applies to the current request. If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. |-| parsed_expr | [google.api.expr.v1alpha1.ParsedExpr](#google-api-expr-v1alpha1-ParsedExpr) | | The parsed expression of the condition. |-------<a name="bytebase-v1-GetIamPolicyRequest"></a>--### GetIamPolicyRequest----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| resource | [string](#string) | | The name of the resource to get the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |-------<a name="bytebase-v1-IamPolicy"></a>--### IamPolicy----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| bindings | [Binding](#bytebase-v1-Binding) | repeated | Collection of binding. A binding binds one or more project members to a single project role. |-| etag | [string](#string) | | The current etag of the policy. If an etag is provided and does not match the current etag of the poliy, the call will be blocked and an ABORTED error will be returned. |-------<a name="bytebase-v1-SetIamPolicyRequest"></a>--### SetIamPolicyRequest----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| resource | [string](#string) | | The name of the resource to set the IAM policy. Format: projects/{project} Format: workspaces/{workspace} |-| policy | [IamPolicy](#bytebase-v1-IamPolicy) | | |-| etag | [string](#string) | | The current etag of the policy. |---------------<a name="v1_idp_service-proto"></a><p align="right"><a href="#top">Top</a></p>diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex c6ddc617ec..8533faf1e5 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -334,10 +334,53 @@</li>+ <li>+ <a href="#v1%2fiam_policy.proto">v1/iam_policy.proto</a>+ <ul>++ <li>+ <a href="#bytebase.v1.Binding"><span class="badge">M</span>Binding</a>+ </li>++ <li>+ <a href="#bytebase.v1.BindingDelta"><span class="badge">M</span>BindingDelta</a>+ </li>++ <li>+ <a href="#bytebase.v1.GetIamPolicyRequest"><span class="badge">M</span>GetIamPolicyRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.IamPolicy"><span class="badge">M</span>IamPolicy</a>+ </li>++ <li>+ <a href="#bytebase.v1.PolicyDelta"><span class="badge">M</span>PolicyDelta</a>+ </li>++ <li>+ <a href="#bytebase.v1.SetIamPolicyRequest"><span class="badge">M</span>SetIamPolicyRequest</a>+ </li>+++ <li>+ <a href="#bytebase.v1.BindingDelta.Action"><span class="badge">E</span>BindingDelta.Action</a>+ </li>++++ </ul>+ </li>++<li><a href="#v1%2faudit_log_service.proto">v1/audit_log_service.proto</a><ul>+ <li>+ <a href="#bytebase.v1.AuditData"><span class="badge">M</span>AuditData</a>+ </li>+<li><a href="#bytebase.v1.AuditLog"><span class="badge">M</span>AuditLog</a></li>@@ -1165,33 +1208,6 @@</li>- <li>- <a href="#v1%2fiam_policy.proto">v1/iam_policy.proto</a>- <ul>-- <li>- <a href="#bytebase.v1.Binding"><span class="badge">M</span>Binding</a>- </li>-- <li>- <a href="#bytebase.v1.GetIamPolicyRequest"><span class="badge">M</span>GetIamPolicyRequest</a>- </li>-- <li>- <a href="#bytebase.v1.IamPolicy"><span class="badge">M</span>IamPolicy</a>- </li>-- <li>- <a href="#bytebase.v1.SetIamPolicyRequest"><span class="badge">M</span>SetIamPolicyRequest</a>- </li>----- </ul>- </li>--<li><a href="#v1%2fidp_service.proto">v1/idp_service.proto</a><ul>@@ -4182,12 +4198,299 @@ e.g. the database schema had been changed without bytebase migration.</p></td>+ <div class="file-heading">+ <h2 id="v1/iam_policy.proto">v1/iam_policy.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.v1.Binding">Binding</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>role</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The role that is assigned to the members.+Format: roles/{role} </p></td>+ </tr>++ <tr>+ <td>members</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>Specifies the principals requesting access for a Bytebase resource.+For users, the member should be: user:{email}+For groups, the member should be: group:{email} </p></td>+ </tr>++ <tr>+ <td>condition</td>+ <td><a href="#google.type.Expr">google.type.Expr</a></td>+ <td></td>+ <td><p>The condition that is associated with this binding.+If the condition evaluates to true, then this binding applies to the current request.+If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. </p></td>+ </tr>++ <tr>+ <td>parsed_expr</td>+ <td><a href="#google.api.expr.v1alpha1.ParsedExpr">google.api.expr.v1alpha1.ParsedExpr</a></td>+ <td></td>+ <td><p>The parsed expression of the condition. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.BindingDelta">BindingDelta</h3>+ <p>One delta entry for Binding. Each individual change (only one member in each</p><p>entry) to a binding will be a separate entry.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>action</td>+ <td><a href="#bytebase.v1.BindingDelta.Action">BindingDelta.Action</a></td>+ <td></td>+ <td><p>The action that was performed on a Binding. </p></td>+ </tr>++ <tr>+ <td>role</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Role that is assigned to `members`.+For example, `roles/projectOwner`. </p></td>+ </tr>++ <tr>+ <td>member</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Follows the same format of Binding.members. </p></td>+ </tr>++ <tr>+ <td>condition</td>+ <td><a href="#google.type.Expr">google.type.Expr</a></td>+ <td></td>+ <td><p>The condition that is associated with this binding. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.GetIamPolicyRequest">GetIamPolicyRequest</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>resource</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the resource to get the IAM policy.+Format: projects/{project}+Format: workspaces/{workspace} </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.IamPolicy">IamPolicy</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>bindings</td>+ <td><a href="#bytebase.v1.Binding">Binding</a></td>+ <td>repeated</td>+ <td><p>Collection of binding.+A binding binds one or more project members to a single project role. </p></td>+ </tr>++ <tr>+ <td>etag</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The current etag of the policy.+If an etag is provided and does not match the current etag of the poliy,+the call will be blocked and an ABORTED error will be returned. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.PolicyDelta">PolicyDelta</h3>+ <p>The difference delta between two policies.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>binding_deltas</td>+ <td><a href="#bytebase.v1.BindingDelta">BindingDelta</a></td>+ <td>repeated</td>+ <td><p>The delta for Bindings between two policies. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.SetIamPolicyRequest">SetIamPolicyRequest</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>resource</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the resource to set the IAM policy.+Format: projects/{project}+Format: workspaces/{workspace} </p></td>+ </tr>++ <tr>+ <td>policy</td>+ <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>etag</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The current etag of the policy. </p></td>+ </tr>++ </tbody>+ </table>++++++++ <h3 id="bytebase.v1.BindingDelta.Action">BindingDelta.Action</h3>+ <p>The type of action performed on a Binding in a policy.</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>ACTION_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>ADD</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>REMOVE</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>+++++++<div class="file-heading"><h2 id="v1/audit_log_service.proto">v1/audit_log_service.proto</h2><a href="#title">Top</a></div><p></p>+ <h3 id="bytebase.v1.AuditData">AuditData</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>policy_delta</td>+ <td><a href="#bytebase.v1.PolicyDelta">PolicyDelta</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.v1.AuditLog">AuditLog</h3><p></p>@@ -4265,6 +4568,13 @@ Some fields are omitted because they are too large or contain sensitive informat<td><p> </p></td></tr>+ <tr>+ <td>service_data</td>+ <td><a href="#google.protobuf.Any">google.protobuf.Any</a></td>+ <td></td>+ <td><p>service-specific data about the request, response, and other activities. </p></td>+ </tr>+</tbody></table>@@ -13317,170 +13627,6 @@ Format: environments/{environment} </p></td>- <div class="file-heading">- <h2 id="v1/iam_policy.proto">v1/iam_policy.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.v1.Binding">Binding</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>role</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The role that is assigned to the members.-Format: roles/{role} </p></td>- </tr>-- <tr>- <td>members</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>Specifies the principals requesting access for a Bytebase resource.-For users, the member should be: user:{email}-For groups, the member should be: group:{email} </p></td>- </tr>-- <tr>- <td>condition</td>- <td><a href="#google.type.Expr">google.type.Expr</a></td>- <td></td>- <td><p>The condition that is associated with this binding.-If the condition evaluates to true, then this binding applies to the current request.-If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. </p></td>- </tr>-- <tr>- <td>parsed_expr</td>- <td><a href="#google.api.expr.v1alpha1.ParsedExpr">google.api.expr.v1alpha1.ParsedExpr</a></td>- <td></td>- <td><p>The parsed expression of the condition. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.GetIamPolicyRequest">GetIamPolicyRequest</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>resource</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the resource to get the IAM policy.-Format: projects/{project}-Format: workspaces/{workspace} </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.IamPolicy">IamPolicy</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>bindings</td>- <td><a href="#bytebase.v1.Binding">Binding</a></td>- <td>repeated</td>- <td><p>Collection of binding.-A binding binds one or more project members to a single project role. </p></td>- </tr>-- <tr>- <td>etag</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The current etag of the policy.-If an etag is provided and does not match the current etag of the poliy,-the call will be blocked and an ABORTED error will be returned. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.SetIamPolicyRequest">SetIamPolicyRequest</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>resource</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the resource to set the IAM policy.-Format: projects/{project}-Format: workspaces/{workspace} </p></td>- </tr>-- <tr>- <td>policy</td>- <td><a href="#bytebase.v1.IamPolicy">IamPolicy</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>etag</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The current etag of the policy. </p></td>- </tr>-- </tbody>- </table>-------------<div class="file-heading"><h2 id="v1/idp_service.proto">v1/idp_service.proto</h2><a href="#title">Top</a></div>diff --git a/proto/generated-go/v1/audit_log_service.pb.go b/proto/generated-go/v1/audit_log_service.pb.goindex 711ef4d1f2..ce167b6a46 100644--- a/proto/generated-go/v1/audit_log_service.pb.go+++ b/proto/generated-go/v1/audit_log_service.pb.go@@ -11,6 +11,7 @@ import (status "google.golang.org/genproto/googleapis/rpc/status"protoreflect "google.golang.org/protobuf/reflect/protoreflect"protoimpl "google.golang.org/protobuf/runtime/protoimpl"+ anypb "google.golang.org/protobuf/types/known/anypb"timestamppb "google.golang.org/protobuf/types/known/timestamppb"reflect "reflect"sync "sync"@@ -382,6 +383,8 @@ type AuditLog struct {// Some fields are omitted because they are too large or contain sensitive information.Response string `protobuf:"bytes,8,opt,name=response,proto3" json:"response,omitempty"`Status *status.Status `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"`+ // service-specific data about the request, response, and other activities.+ ServiceData *anypb.Any `protobuf:"bytes,10,opt,name=service_data,json=serviceData,proto3" json:"service_data,omitempty"`}func (x *AuditLog) Reset() {@@ -479,6 +482,60 @@ func (x *AuditLog) GetStatus() *status.Status {return nil}+func (x *AuditLog) GetServiceData() *anypb.Any {+ if x != nil {+ return x.ServiceData+ }+ return nil+}++type AuditData struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ PolicyDelta *PolicyDelta `protobuf:"bytes,1,opt,name=policy_delta,json=policyDelta,proto3" json:"policy_delta,omitempty"`+}++func (x *AuditData) Reset() {+ *x = AuditData{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_audit_log_service_proto_msgTypes[5]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *AuditData) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*AuditData) ProtoMessage() {}++func (x *AuditData) ProtoReflect() protoreflect.Message {+ mi := &file_v1_audit_log_service_proto_msgTypes[5]+ 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 AuditData.ProtoReflect.Descriptor instead.+func (*AuditData) Descriptor() ([]byte, []int) {+ return file_v1_audit_log_service_proto_rawDescGZIP(), []int{5}+}++func (x *AuditData) GetPolicyDelta() *PolicyDelta {+ if x != nil {+ return x.PolicyDelta+ }+ return nil+}+var File_v1_audit_log_service_proto protoreflect.FileDescriptorvar file_v1_audit_log_service_proto_rawDesc = []byte{@@ -488,13 +545,16 @@ var file_v1_audit_log_service_proto_rawDesc = []byte{0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69,- 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 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, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c,- 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f,- 0x74, 0x6f, 0x1a, 0x13, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,- 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d,- 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x61,+ 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,+ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72,+ 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 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, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63,+ 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x76,+ 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,+ 0x74, 0x6f, 0x1a, 0x0f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72,+ 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x76, 0x31, 0x2f, 0x69, 0x61, 0x6d, 0x5f, 0x70, 0x6f, 0x6c, 0x69,+ 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x61,0x72, 0x63, 0x68, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75,0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20,0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6f,@@ -522,7 +582,7 @@ var file_v1_audit_log_service_proto_rawDesc = []byte{0x78, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65,0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,- 0x22, 0xc7, 0x03, 0x0a, 0x08, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a,+ 0x22, 0x80, 0x04, 0x0a, 0x08, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a,0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01,0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74,0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,@@ -543,33 +603,41 @@ var file_v1_audit_log_service_proto_rawDesc = []byte{0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x09,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, 0x32, 0x95, 0x02, 0x0a, 0x0f, 0x41,- 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e,- 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67,- 0x73, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,- 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52,- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x75, 0x64, 0x69, 0x74,- 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x90, 0xea,- 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75,- 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x81,- 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f,- 0x67, 0x73, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x73,- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x75, 0x64, 0x69,- 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x90,- 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76,- 0x31, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x3a, 0x65, 0x78, 0x70, 0x6f,- 0x72, 0x74, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d,- 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x12, 0x37, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61,+ 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x73, 0x65,+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 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, 0x22, 0x48, 0x0a, 0x09, 0x41, 0x75, 0x64, 0x69, 0x74, 0x44, 0x61, 0x74, 0x61,+ 0x12, 0x3b, 0x0a, 0x0c, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61,+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x6c, 0x74, 0x61,+ 0x52, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x32, 0x95, 0x02,+ 0x0a, 0x0f, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,+ 0x65, 0x12, 0x7e, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x75, 0x64, 0x69, 0x74,+ 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f,+ 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x75,+ 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,+ 0x20, 0x90, 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, 0x31,+ 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63,+ 0x68, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x75, 0x64, 0x69,+ 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c,+ 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x41,+ 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,+ 0x22, 0x23, 0x90, 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22,+ 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x3a, 0x65,+ 0x78, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,+ 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,}var (@@ -585,7 +653,7 @@ func file_v1_audit_log_service_proto_rawDescGZIP() []byte {}var file_v1_audit_log_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)-var file_v1_audit_log_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5)+var file_v1_audit_log_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)var file_v1_audit_log_service_proto_goTypes = []any{(AuditLog_Severity)(0), // 0: bytebase.v1.AuditLog.Severity(*SearchAuditLogsRequest)(nil), // 1: bytebase.v1.SearchAuditLogsRequest@@ -593,25 +661,30 @@ var file_v1_audit_log_service_proto_goTypes = []any{(*ExportAuditLogsRequest)(nil), // 3: bytebase.v1.ExportAuditLogsRequest(*ExportAuditLogsResponse)(nil), // 4: bytebase.v1.ExportAuditLogsResponse(*AuditLog)(nil), // 5: bytebase.v1.AuditLog- (ExportFormat)(0), // 6: bytebase.v1.ExportFormat- (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp- (*status.Status)(nil), // 8: google.rpc.Status+ (*AuditData)(nil), // 6: bytebase.v1.AuditData+ (ExportFormat)(0), // 7: bytebase.v1.ExportFormat+ (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp+ (*status.Status)(nil), // 9: google.rpc.Status+ (*anypb.Any)(nil), // 10: google.protobuf.Any+ (*PolicyDelta)(nil), // 11: bytebase.v1.PolicyDelta}var file_v1_audit_log_service_proto_depIdxs = []int32{- 5, // 0: bytebase.v1.SearchAuditLogsResponse.audit_logs:type_name -> bytebase.v1.AuditLog- 6, // 1: bytebase.v1.ExportAuditLogsRequest.format:type_name -> bytebase.v1.ExportFormat- 7, // 2: bytebase.v1.AuditLog.create_time:type_name -> google.protobuf.Timestamp- 0, // 3: bytebase.v1.AuditLog.severity:type_name -> bytebase.v1.AuditLog.Severity- 8, // 4: bytebase.v1.AuditLog.status:type_name -> google.rpc.Status- 1, // 5: bytebase.v1.AuditLogService.SearchAuditLogs:input_type -> bytebase.v1.SearchAuditLogsRequest- 3, // 6: bytebase.v1.AuditLogService.ExportAuditLogs:input_type -> bytebase.v1.ExportAuditLogsRequest- 2, // 7: bytebase.v1.AuditLogService.SearchAuditLogs:output_type -> bytebase.v1.SearchAuditLogsResponse- 4, // 8: bytebase.v1.AuditLogService.ExportAuditLogs:output_type -> bytebase.v1.ExportAuditLogsResponse- 7, // [7:9] is the sub-list for method output_type- 5, // [5:7] is the sub-list for method input_type- 5, // [5:5] is the sub-list for extension type_name- 5, // [5:5] is the sub-list for extension extendee- 0, // [0:5] is the sub-list for field type_name+ 5, // 0: bytebase.v1.SearchAuditLogsResponse.audit_logs:type_name -> bytebase.v1.AuditLog+ 7, // 1: bytebase.v1.ExportAuditLogsRequest.format:type_name -> bytebase.v1.ExportFormat+ 8, // 2: bytebase.v1.AuditLog.create_time:type_name -> google.protobuf.Timestamp+ 0, // 3: bytebase.v1.AuditLog.severity:type_name -> bytebase.v1.AuditLog.Severity+ 9, // 4: bytebase.v1.AuditLog.status:type_name -> google.rpc.Status+ 10, // 5: bytebase.v1.AuditLog.service_data:type_name -> google.protobuf.Any+ 11, // 6: bytebase.v1.AuditData.policy_delta:type_name -> bytebase.v1.PolicyDelta+ 1, // 7: bytebase.v1.AuditLogService.SearchAuditLogs:input_type -> bytebase.v1.SearchAuditLogsRequest+ 3, // 8: bytebase.v1.AuditLogService.ExportAuditLogs:input_type -> bytebase.v1.ExportAuditLogsRequest+ 2, // 9: bytebase.v1.AuditLogService.SearchAuditLogs:output_type -> bytebase.v1.SearchAuditLogsResponse+ 4, // 10: bytebase.v1.AuditLogService.ExportAuditLogs:output_type -> bytebase.v1.ExportAuditLogsResponse+ 9, // [9:11] is the sub-list for method output_type+ 7, // [7:9] is the sub-list for method input_type+ 7, // [7:7] is the sub-list for extension type_name+ 7, // [7:7] is the sub-list for extension extendee+ 0, // [0:7] is the sub-list for field type_name}func init() { file_v1_audit_log_service_proto_init() }@@ -621,6 +694,7 @@ func file_v1_audit_log_service_proto_init() {}file_v1_annotation_proto_init()file_v1_common_proto_init()+ file_v1_iam_policy_proto_init()if !protoimpl.UnsafeEnabled {file_v1_audit_log_service_proto_msgTypes[0].Exporter = func(v any, i int) any {switch v := v.(*SearchAuditLogsRequest); i {@@ -682,6 +756,18 @@ func file_v1_audit_log_service_proto_init() {return nil}}+ file_v1_audit_log_service_proto_msgTypes[5].Exporter = func(v any, i int) any {+ switch v := v.(*AuditData); 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{@@ -689,7 +775,7 @@ func file_v1_audit_log_service_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_v1_audit_log_service_proto_rawDesc,NumEnums: 1,- NumMessages: 5,+ NumMessages: 6,NumExtensions: 0,NumServices: 1,},diff --git a/proto/generated-go/v1/iam_policy.pb.go b/proto/generated-go/v1/iam_policy.pb.goindex 2e283229e6..9b599f0741 100644--- a/proto/generated-go/v1/iam_policy.pb.go+++ b/proto/generated-go/v1/iam_policy.pb.go@@ -23,6 +23,56 @@ const (_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20))+// The type of action performed on a Binding in a policy.+type BindingDelta_Action int32++const (+ BindingDelta_ACTION_UNSPECIFIED BindingDelta_Action = 0+ BindingDelta_ADD BindingDelta_Action = 1+ BindingDelta_REMOVE BindingDelta_Action = 2+)++// Enum value maps for BindingDelta_Action.+var (+ BindingDelta_Action_name = map[int32]string{+ 0: "ACTION_UNSPECIFIED",+ 1: "ADD",+ 2: "REMOVE",+ }+ BindingDelta_Action_value = map[string]int32{+ "ACTION_UNSPECIFIED": 0,+ "ADD": 1,+ "REMOVE": 2,+ }+)++func (x BindingDelta_Action) Enum() *BindingDelta_Action {+ p := new(BindingDelta_Action)+ *p = x+ return p+}++func (x BindingDelta_Action) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (BindingDelta_Action) Descriptor() protoreflect.EnumDescriptor {+ return file_v1_iam_policy_proto_enumTypes[0].Descriptor()+}++func (BindingDelta_Action) Type() protoreflect.EnumType {+ return &file_v1_iam_policy_proto_enumTypes[0]+}++func (x BindingDelta_Action) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use BindingDelta_Action.Descriptor instead.+func (BindingDelta_Action) EnumDescriptor() ([]byte, []int) {+ return file_v1_iam_policy_proto_rawDescGZIP(), []int{5, 0}+}+type GetIamPolicyRequest struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -280,6 +330,133 @@ func (x *Binding) GetParsedExpr() *v1alpha1.ParsedExpr {return nil}+// The difference delta between two policies.+type PolicyDelta struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The delta for Bindings between two policies.+ BindingDeltas []*BindingDelta `protobuf:"bytes,1,rep,name=binding_deltas,json=bindingDeltas,proto3" json:"binding_deltas,omitempty"`+}++func (x *PolicyDelta) Reset() {+ *x = PolicyDelta{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_iam_policy_proto_msgTypes[4]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *PolicyDelta) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*PolicyDelta) ProtoMessage() {}++func (x *PolicyDelta) ProtoReflect() protoreflect.Message {+ mi := &file_v1_iam_policy_proto_msgTypes[4]+ 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 PolicyDelta.ProtoReflect.Descriptor instead.+func (*PolicyDelta) Descriptor() ([]byte, []int) {+ return file_v1_iam_policy_proto_rawDescGZIP(), []int{4}+}++func (x *PolicyDelta) GetBindingDeltas() []*BindingDelta {+ if x != nil {+ return x.BindingDeltas+ }+ return nil+}++// One delta entry for Binding. Each individual change (only one member in each+// entry) to a binding will be a separate entry.+type BindingDelta struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The action that was performed on a Binding.+ Action BindingDelta_Action `protobuf:"varint,1,opt,name=action,proto3,enum=bytebase.v1.BindingDelta_Action" json:"action,omitempty"`+ // Role that is assigned to `members`.+ // For example, `roles/projectOwner`.+ Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`+ // Follows the same format of Binding.members.+ Member string `protobuf:"bytes,3,opt,name=member,proto3" json:"member,omitempty"`+ // The condition that is associated with this binding.+ Condition *expr.Expr `protobuf:"bytes,4,opt,name=condition,proto3" json:"condition,omitempty"`+}++func (x *BindingDelta) Reset() {+ *x = BindingDelta{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_iam_policy_proto_msgTypes[5]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *BindingDelta) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*BindingDelta) ProtoMessage() {}++func (x *BindingDelta) ProtoReflect() protoreflect.Message {+ mi := &file_v1_iam_policy_proto_msgTypes[5]+ 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 BindingDelta.ProtoReflect.Descriptor instead.+func (*BindingDelta) Descriptor() ([]byte, []int) {+ return file_v1_iam_policy_proto_rawDescGZIP(), []int{5}+}++func (x *BindingDelta) GetAction() BindingDelta_Action {+ if x != nil {+ return x.Action+ }+ return BindingDelta_ACTION_UNSPECIFIED+}++func (x *BindingDelta) GetRole() string {+ if x != nil {+ return x.Role+ }+ return ""+}++func (x *BindingDelta) GetMember() string {+ if x != nil {+ return x.Member+ }+ return ""+}++func (x *BindingDelta) GetCondition() *expr.Expr {+ if x != nil {+ return x.Condition+ }+ return nil+}+var File_v1_iam_policy_proto protoreflect.FileDescriptorvar file_v1_iam_policy_proto_rawDesc = []byte{@@ -319,7 +496,26 @@ var file_v1_iam_policy_proto_rawDesc = []byte{0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e,0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61,0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x0a,- 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65,+ 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x22, 0x4f, 0x0a, 0x0b, 0x50, 0x6f,+ 0x6c, 0x69, 0x63, 0x79, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0e, 0x62, 0x69, 0x6e,+ 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,+ 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,+ 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x0d, 0x62, 0x69,+ 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x22, 0xdc, 0x01, 0x0a, 0x0c,+ 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x06,+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x62,+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69,+ 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06,+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02,+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65,+ 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62,+ 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18,+ 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74,+ 0x79, 0x70, 0x65, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74,+ 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a,+ 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,+ 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x44, 0x44, 0x10, 0x01, 0x12, 0x0a,+ 0x0a, 0x06, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x10, 0x02, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65,0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70,0x72, 0x6f, 0x74, 0x6f, 0x33,}@@ -336,25 +532,32 @@ func file_v1_iam_policy_proto_rawDescGZIP() []byte {return file_v1_iam_policy_proto_rawDescData}-var file_v1_iam_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 4)+var file_v1_iam_policy_proto_enumTypes = make([]protoimpl.EnumInfo, 1)+var file_v1_iam_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 6)var file_v1_iam_policy_proto_goTypes = []any{- (*GetIamPolicyRequest)(nil), // 0: bytebase.v1.GetIamPolicyRequest- (*SetIamPolicyRequest)(nil), // 1: bytebase.v1.SetIamPolicyRequest- (*IamPolicy)(nil), // 2: bytebase.v1.IamPolicy- (*Binding)(nil), // 3: bytebase.v1.Binding- (*expr.Expr)(nil), // 4: google.type.Expr- (*v1alpha1.ParsedExpr)(nil), // 5: google.api.expr.v1alpha1.ParsedExpr+ (BindingDelta_Action)(0), // 0: bytebase.v1.BindingDelta.Action+ (*GetIamPolicyRequest)(nil), // 1: bytebase.v1.GetIamPolicyRequest+ (*SetIamPolicyRequest)(nil), // 2: bytebase.v1.SetIamPolicyRequest+ (*IamPolicy)(nil), // 3: bytebase.v1.IamPolicy+ (*Binding)(nil), // 4: bytebase.v1.Binding+ (*PolicyDelta)(nil), // 5: bytebase.v1.PolicyDelta+ (*BindingDelta)(nil), // 6: bytebase.v1.BindingDelta+ (*expr.Expr)(nil), // 7: google.type.Expr+ (*v1alpha1.ParsedExpr)(nil), // 8: google.api.expr.v1alpha1.ParsedExpr}var file_v1_iam_policy_proto_depIdxs = []int32{- 2, // 0: bytebase.v1.SetIamPolicyRequest.policy:type_name -> bytebase.v1.IamPolicy- 3, // 1: bytebase.v1.IamPolicy.bindings:type_name -> bytebase.v1.Binding- 4, // 2: bytebase.v1.Binding.condition:type_name -> google.type.Expr- 5, // 3: bytebase.v1.Binding.parsed_expr:type_name -> google.api.expr.v1alpha1.ParsedExpr- 4, // [4:4] is the sub-list for method output_type- 4, // [4:4] is the sub-list for method input_type- 4, // [4:4] is the sub-list for extension type_name- 4, // [4:4] is the sub-list for extension extendee- 0, // [0:4] is the sub-list for field type_name+ 3, // 0: bytebase.v1.SetIamPolicyRequest.policy:type_name -> bytebase.v1.IamPolicy+ 4, // 1: bytebase.v1.IamPolicy.bindings:type_name -> bytebase.v1.Binding+ 7, // 2: bytebase.v1.Binding.condition:type_name -> google.type.Expr+ 8, // 3: bytebase.v1.Binding.parsed_expr:type_name -> google.api.expr.v1alpha1.ParsedExpr+ 6, // 4: bytebase.v1.PolicyDelta.binding_deltas:type_name -> bytebase.v1.BindingDelta+ 0, // 5: bytebase.v1.BindingDelta.action:type_name -> bytebase.v1.BindingDelta.Action+ 7, // 6: bytebase.v1.BindingDelta.condition:type_name -> google.type.Expr+ 7, // [7:7] is the sub-list for method output_type+ 7, // [7:7] is the sub-list for method input_type+ 7, // [7:7] is the sub-list for extension type_name+ 7, // [7:7] is the sub-list for extension extendee+ 0, // [0:7] is the sub-list for field type_name}func init() { file_v1_iam_policy_proto_init() }@@ -411,19 +614,44 @@ func file_v1_iam_policy_proto_init() {return nil}}+ file_v1_iam_policy_proto_msgTypes[4].Exporter = func(v any, i int) any {+ switch v := v.(*PolicyDelta); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_iam_policy_proto_msgTypes[5].Exporter = func(v any, i int) any {+ switch v := v.(*BindingDelta); 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_v1_iam_policy_proto_rawDesc,- NumEnums: 0,- NumMessages: 4,+ NumEnums: 1,+ NumMessages: 6,NumExtensions: 0,NumServices: 0,},GoTypes: file_v1_iam_policy_proto_goTypes,DependencyIndexes: file_v1_iam_policy_proto_depIdxs,+ EnumInfos: file_v1_iam_policy_proto_enumTypes,MessageInfos: file_v1_iam_policy_proto_msgTypes,}.Build()File_v1_iam_policy_proto = out.Filediff --git a/proto/v1/audit_log_service.proto b/proto/v1/audit_log_service.protoindex f99cea5d99..c31152a6b0 100644--- a/proto/v1/audit_log_service.proto+++ b/proto/v1/audit_log_service.proto@@ -4,10 +4,12 @@ package bytebase.v1;import "google/api/annotations.proto";import "google/api/field_behavior.proto";+import "google/protobuf/any.proto";import "google/protobuf/timestamp.proto";import "google/rpc/status.proto";import "v1/annotation.proto";import "v1/common.proto";+import "v1/iam_policy.proto";option go_package = "generated-go/v1";@@ -114,6 +116,9 @@ message AuditLog {google.rpc.Status status = 9;+ // service-specific data about the request, response, and other activities.+ google.protobuf.Any service_data = 10;+enum Severity {DEFAULT = 0;DEBUG = 1;@@ -126,3 +131,7 @@ message AuditLog {EMERGENCY = 8;}}++message AuditData {+ PolicyDelta policy_delta = 1;+}diff --git a/proto/v1/iam_policy.proto b/proto/v1/iam_policy.protoindex 568cfb05d0..7df75e73b1 100644--- a/proto/v1/iam_policy.proto+++ b/proto/v1/iam_policy.proto@@ -56,3 +56,33 @@ message Binding {// The parsed expression of the condition.google.api.expr.v1alpha1.ParsedExpr parsed_expr = 4 [(google.api.field_behavior) = OUTPUT_ONLY];}++// The difference delta between two policies.+message PolicyDelta {+ // The delta for Bindings between two policies.+ repeated BindingDelta binding_deltas = 1;+}++// One delta entry for Binding. Each individual change (only one member in each+// entry) to a binding will be a separate entry.+message BindingDelta {+ // The type of action performed on a Binding in a policy.+ enum Action {+ ACTION_UNSPECIFIED = 0;+ ADD = 1;+ REMOVE = 2;+ }++ // The action that was performed on a Binding.+ Action action = 1;++ // Role that is assigned to `members`.+ // For example, `roles/projectOwner`.+ string role = 2;++ // Follows the same format of Binding.members.+ string member = 3;++ // The condition that is associated with this binding.+ google.type.Expr condition = 4;+}