Skip to content

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

chore: update iam proto (#12096)

ecmadao039e8bce13d1
diff --git a/backend/api/v1/project_service.go b/backend/api/v1/project_service.go
index 067c82c3fa..215ce58dcc 100644
--- a/backend/api/v1/project_service.go
+++ b/backend/api/v1/project_service.go
@@ -1771,6 +1771,7 @@ func convertToIamPolicy(iamPolicy *store.IAMPolicyMessage) (*v1pb.IamPolicy, err
}, nil
}
+// nolint
// convertToIAMPolicyMessage will convert the IAM policy to IAM policy message.
func (s *ProjectService) convertToIAMPolicyMessage(ctx context.Context, iamPolicy *v1pb.IamPolicy) (*store.IAMPolicyMessage, error) {
var bindings []*store.PolicyBinding
@@ -1780,21 +1781,24 @@ func (s *ProjectService) convertToIAMPolicyMessage(ctx context.Context, iamPolic
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, err.Error())
}
+
for _, member := range binding.Members {
- email := ""
- if member == api.AllUsers {
- email = api.AllUsers
- } else {
- email = strings.TrimPrefix(member, "user:")
- }
- user, err := s.store.GetUserByEmail(ctx, email)
- if err != nil {
- return nil, status.Errorf(codes.Internal, err.Error())
- }
- if user == nil {
- return nil, status.Errorf(codes.NotFound, "user %q not found", member)
+ if strings.HasPrefix(member, "user:") || member == api.AllUsers {
+ email := member
+ if strings.HasPrefix(member, "user:") {
+ email = strings.TrimPrefix(member, "user:")
+ }
+ user, err := s.store.GetUserByEmail(ctx, email)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, err.Error())
+ }
+ if user == nil {
+ return nil, status.Errorf(codes.NotFound, "user %q not found", member)
+ }
+ users = append(users, user)
+ } else if strings.HasPrefix(member, "group:") {
+ // TODO: implement
}
- users = append(users, user)
}
bindings = append(bindings, &store.PolicyBinding{
diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.ts
index 3a50d70585..3185d3cbac 100644
--- a/frontend/src/types/proto/google/protobuf/descriptor.ts
+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts
@@ -8,11 +8,6 @@ export const protobufPackage = "google.protobuf";
export enum Edition {
/** EDITION_UNKNOWN - A placeholder for an unknown edition value. */
EDITION_UNKNOWN = "EDITION_UNKNOWN",
- /**
- * EDITION_LEGACY - A placeholder edition for specifying default behaviors *before* a feature
- * was first introduced. This is effectively an "infinite past".
- */
- EDITION_LEGACY = "EDITION_LEGACY",
/**
* EDITION_PROTO2 - Legacy syntax "editions". These pre-date editions, but behave much like
* distinct editions. These can't be used to specify the edition of proto
@@ -27,7 +22,6 @@ export enum Edition {
* comparison.
*/
EDITION_2023 = "EDITION_2023",
- EDITION_2024 = "EDITION_2024",
/**
* EDITION_1_TEST_ONLY - Placeholder editions for testing feature resolution. These should not be
* used or relyed on outside of tests.
@@ -37,12 +31,6 @@ export enum Edition {
EDITION_99997_TEST_ONLY = "EDITION_99997_TEST_ONLY",
EDITION_99998_TEST_ONLY = "EDITION_99998_TEST_ONLY",
EDITION_99999_TEST_ONLY = "EDITION_99999_TEST_ONLY",
- /**
- * EDITION_MAX - Placeholder for specifying unbounded edition support. This should only
- * ever be used by plugins that can expect to never require any changes to
- * support a new edition.
- */
- EDITION_MAX = "EDITION_MAX",
UNRECOGNIZED = "UNRECOGNIZED",
}
@@ -51,9 +39,6 @@ export function editionFromJSON(object: any): Edition {
case 0:
case "EDITION_UNKNOWN":
return Edition.EDITION_UNKNOWN;
- case 900:
- case "EDITION_LEGACY":
- return Edition.EDITION_LEGACY;
case 998:
case "EDITION_PROTO2":
return Edition.EDITION_PROTO2;
@@ -63,9 +48,6 @@ export function editionFromJSON(object: any): Edition {
case 1000:
case "EDITION_2023":
return Edition.EDITION_2023;
- case 1001:
- case "EDITION_2024":
- return Edition.EDITION_2024;
case 1:
case "EDITION_1_TEST_ONLY":
return Edition.EDITION_1_TEST_ONLY;
@@ -81,9 +63,6 @@ export function editionFromJSON(object: any): Edition {
case 99999:
case "EDITION_99999_TEST_ONLY":
return Edition.EDITION_99999_TEST_ONLY;
- case 2147483647:
- case "EDITION_MAX":
- return Edition.EDITION_MAX;
case -1:
case "UNRECOGNIZED":
default:
@@ -95,16 +74,12 @@ export function editionToJSON(object: Edition): string {
switch (object) {
case Edition.EDITION_UNKNOWN:
return "EDITION_UNKNOWN";
- case Edition.EDITION_LEGACY:
- return "EDITION_LEGACY";
case Edition.EDITION_PROTO2:
return "EDITION_PROTO2";
case Edition.EDITION_PROTO3:
return "EDITION_PROTO3";
case Edition.EDITION_2023:
return "EDITION_2023";
- case Edition.EDITION_2024:
- return "EDITION_2024";
case Edition.EDITION_1_TEST_ONLY:
return "EDITION_1_TEST_ONLY";
case Edition.EDITION_2_TEST_ONLY:
@@ -115,8 +90,6 @@ export function editionToJSON(object: Edition): string {
return "EDITION_99998_TEST_ONLY";
case Edition.EDITION_99999_TEST_ONLY:
return "EDITION_99999_TEST_ONLY";
- case Edition.EDITION_MAX:
- return "EDITION_MAX";
case Edition.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
@@ -127,16 +100,12 @@ export function editionToNumber(object: Edition): number {
switch (object) {
case Edition.EDITION_UNKNOWN:
return 0;
- case Edition.EDITION_LEGACY:
- return 900;
case Edition.EDITION_PROTO2:
return 998;
case Edition.EDITION_PROTO3:
return 999;
case Edition.EDITION_2023:
return 1000;
- case Edition.EDITION_2024:
- return 1001;
case Edition.EDITION_1_TEST_ONLY:
return 1;
case Edition.EDITION_2_TEST_ONLY:
@@ -147,8 +116,6 @@ export function editionToNumber(object: Edition): number {
return 99998;
case Edition.EDITION_99999_TEST_ONLY:
return 99999;
- case Edition.EDITION_MAX:
- return 2147483647;
case Edition.UNRECOGNIZED:
default:
return -1;
@@ -390,12 +357,12 @@ export interface FieldDescriptorProto {
* If true, this is a proto3 "optional". When a proto3 field is optional, it
* tracks presence regardless of field type.
*
- * When proto3_optional is true, this field must belong to a oneof to signal
- * to old proto3 clients that presence is tracked for this field. This oneof
- * is known as a "synthetic" oneof, and this field must be its sole member
- * (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs
- * exist in the descriptor only, and do not generate any API. Synthetic oneofs
- * must be ordered after all "real" oneofs.
+ * When proto3_optional is true, this field must be belong to a oneof to
+ * signal to old proto3 clients that presence is tracked for this field. This
+ * oneof is known as a "synthetic" oneof, and this field must be its sole
+ * member (each proto3 optional field gets its own synthetic oneof). Synthetic
+ * oneofs exist in the descriptor only, and do not generate any API. Synthetic
+ * oneofs must be ordered after all "real" oneofs.
*
* For message fields, proto3_optional doesn't create any semantic change,
* since non-repeated message fields always track presence. However it still
@@ -772,16 +739,12 @@ export interface FileOptions {
*/
javaGenerateEqualsAndHash: boolean;
/**
- * A proto2 file can set this to true to opt in to UTF-8 checking for Java,
- * which will throw an exception if invalid UTF-8 is parsed from the wire or
- * assigned to a string field.
- *
- * TODO: clarify exactly what kinds of field types this option
- * applies to, and update these docs accordingly.
- *
- * Proto3 files already perform these checks. Setting the option explicitly to
- * false has no effect: it cannot be used to opt proto3 files out of UTF-8
- * checks.
+ * If set true, then the Java2 code generator will generate code that
+ * throws an exception whenever an attempt is made to assign a non-UTF-8
+ * byte sequence to a string field.
+ * Message reflection will do the same.
+ * However, an extension field still accepts non-UTF-8 byte sequences.
+ * This option has no effect on when used with the lite runtime.
*/
javaStringCheckUtf8: boolean;
optimizeFor: FileOptions_OptimizeMode;
@@ -808,6 +771,7 @@ export interface FileOptions {
ccGenericServices: boolean;
javaGenericServices: boolean;
pyGenericServices: boolean;
+ phpGenericServices: boolean;
/**
* Is this file deprecated?
* Depending on the target platform, this can emit Deprecated annotations
@@ -961,6 +925,10 @@ export interface MessageOptions {
*/
deprecated: boolean;
/**
+ * NOTE: Do not set the option in .proto files. Always use the maps syntax
+ * instead. The option should only be implicitly set by the proto compiler
+ * parser.
+ *
* Whether the message is an automatically generated map entry type for the
* maps field.
*
@@ -978,10 +946,6 @@ export interface MessageOptions {
* use a native map in the target language to hold the keys and values.
* The reflection APIs in such implementations still need to work as
* if the field is a repeated message field.
- *
- * NOTE: Do not set the option in .proto files. Always use the maps syntax
- * instead. The option should only be implicitly set by the proto compiler
- * parser.
*/
mapEntry: boolean;
/**
@@ -1059,11 +1023,19 @@ export interface FieldOptions {
* call from multiple threads concurrently, while non-const methods continue
* to require exclusive access.
*
- * Note that lazy message fields are still eagerly verified to check
- * ill-formed wireformat or missing required fields. Calling IsInitialized()
- * on the outer message would fail if the inner message has missing required
- * fields. Failed verification would result in parsing failure (except when
- * uninitialized messages are acceptable).
+ * Note that implementations may choose not to check required fields within
+ * a lazy sub-message. That is, calling IsInitialized() on the outer message
+ * may return true even if the inner message has missing required fields.
+ * This is necessary because otherwise the inner message would have to be
+ * parsed in order to perform the check, defeating the purpose of lazy
+ * parsing. An implementation which chooses not to check required fields
+ * must be consistent about it. That is, for any particular sub-message, the
+ * implementation must either *always* check its required fields, or *never*
+ * check its required fields, regardless of whether or not the message has
+ * been parsed.
+ *
+ * As of May 2022, lazy verifies the contents of the byte stream during
+ * parsing. An invalid byte stream will cause the overall parsing to fail.
*/
lazy: boolean;
/**
@@ -1090,9 +1062,8 @@ export interface FieldOptions {
targets: FieldOptions_OptionTargetType[];
editionDefaults: FieldOptions_EditionDefault[];
/** Any features defined in the specific edition. */
- features: FeatureSet | undefined;
- featureSupport:
- | FieldOptions_FeatureSupport
+ features:
+ | FeatureSet
| undefined;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
@@ -1395,32 +1366,6 @@ export interface FieldOptions_EditionDefault {
value: string;
}
-/** Information about the support window of a feature. */
-export interface FieldOptions_FeatureSupport {
- /**
- * The edition that this feature was first available in. In editions
- * earlier than this one, the default assigned to EDITION_LEGACY will be
- * used, and proto files will not be able to override it.
- */
- editionIntroduced: Edition;
- /**
- * The edition this feature becomes deprecated in. Using this after this
- * edition may trigger warnings.
- */
- editionDeprecated: Edition;
- /**
- * The deprecation warning text if this feature is used after the edition it
- * was marked deprecated in.
- */
- deprecationWarning: string;
- /**
- * The edition this feature is no longer available in. In editions after
- * this one, the last default assigned will be used, and proto files will
- * not be able to override it.
- */
- editionRemoved: Edition;
-}
-
export interface OneofOptions {
/** Any features defined in the specific edition. */
features:
@@ -1797,8 +1742,8 @@ export function featureSet_RepeatedFieldEncodingToNumber(object: FeatureSet_Repe
export enum FeatureSet_Utf8Validation {
UTF8_VALIDATION_UNKNOWN = "UTF8_VALIDATION_UNKNOWN",
- VERIFY = "VERIFY",
NONE = "NONE",
+ VERIFY = "VERIFY",
UNRECOGNIZED = "UNRECOGNIZED",
}
@@ -1807,12 +1752,12 @@ export function featureSet_Utf8ValidationFromJSON(object: any): FeatureSet_Utf8V
case 0:
case "UTF8_VALIDATION_UNKNOWN":
return FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN;
+ case 1:
+ case "NONE":
+ return FeatureSet_Utf8Validation.NONE;
case 2:
case "VERIFY":
return FeatureSet_Utf8Validation.VERIFY;
- case 3:
- case "NONE":
- return FeatureSet_Utf8Validation.NONE;
case -1:
case "UNRECOGNIZED":
default:
@@ -1824,10 +1769,10 @@ export function featureSet_Utf8ValidationToJSON(object: FeatureSet_Utf8Validatio
switch (object) {
case FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN:
return "UTF8_VALIDATION_UNKNOWN";
- case FeatureSet_Utf8Validation.VERIFY:
- return "VERIFY";
case FeatureSet_Utf8Validation.NONE:
return "NONE";
+ case FeatureSet_Utf8Validation.VERIFY:
+ return "VERIFY";
case FeatureSet_Utf8Validation.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
@@ -1838,10 +1783,10 @@ export function featureSet_Utf8ValidationToNumber(object: FeatureSet_Utf8Validat
switch (object) {
case FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN:
return 0;
+ case FeatureSet_Utf8Validation.NONE:
+ return 1;
case FeatureSet_Utf8Validation.VERIFY:
return 2;
- case FeatureSet_Utf8Validation.NONE:
- return 3;
case FeatureSet_Utf8Validation.UNRECOGNIZED:
default:
return -1;
@@ -1982,12 +1927,7 @@ export interface FeatureSetDefaults {
*/
export interface FeatureSetDefaults_FeatureSetEditionDefault {
edition: Edition;
- /** Defaults of features that can be overridden in this edition. */
- overridableFeatures:
- | FeatureSet
- | undefined;
- /** Defaults of features that can't be overridden in this edition. */
- fixedFeatures: FeatureSet | undefined;
+ features: FeatureSet | undefined;
}
/**
@@ -2049,7 +1989,7 @@ export interface SourceCodeInfo_Location {
* location.
*
* Each element is a field number or an index. They form a path from
- * the root FileDescriptorProto to the place where the definition appears.
+ * the root FileDescriptorProto to the place where the definition occurs.
* For example, this path:
* [ 4, 3, 2, 7, 1 ]
* refers to:
@@ -4047,6 +3987,7 @@ function createBaseFileOptions(): FileOptions {
ccGenericServices: false,
javaGenericServices: false,
pyGenericServices: false,
+ phpGenericServices: false,
deprecated: false,
ccEnableArenas: false,
objcClassPrefix: "",
@@ -4093,6 +4034,9 @@ export const FileOptions = {
if (message.pyGenericServices === true) {
writer.uint32(144).bool(message.pyGenericServices);
}
+ if (message.phpGenericServices === true) {
+ writer.uint32(336).bool(message.phpGenericServices);
+ }
if (message.deprecated === true) {
writer.uint32(184).bool(message.deprecated);
}
@@ -4206,6 +4150,13 @@ export const FileOptions = {
message.pyGenericServices = reader.bool();
continue;
+ case 42:
+ if (tag !== 336) {
+ break;
+ }
+
+ message.phpGenericServices = reader.bool();
+ continue;
case 23:
if (tag !== 184) {
break;
@@ -4308,6 +4259,7 @@ export const FileOptions = {
ccGenericServices: isSet(object.ccGenericServices) ? globalThis.Boolean(object.ccGenericServices) : false,
javaGenericServices: isSet(object.javaGenericServices) ? globalThis.Boolean(object.javaGenericServices) : false,
pyGenericServices: isSet(object.pyGenericServices) ? globalThis.Boolean(object.pyGenericServices) : false,
+ phpGenericServices: isSet(object.phpGenericServices) ? globalThis.Boolean(object.phpGenericServices) : false,
deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
ccEnableArenas: isSet(object.ccEnableArenas) ? globalThis.Boolean(object.ccEnableArenas) : false,
objcClassPrefix: isSet(object.objcClassPrefix) ? globalThis.String(object.objcClassPrefix) : "",
@@ -4356,6 +4308,9 @@ export const FileOptions = {
if (message.pyGenericServices === true) {
obj.pyGenericServices = message.pyGenericServices;
}
+ if (message.phpGenericServices === true) {
+ obj.phpGenericServices = message.phpGenericServices;
+ }
if (message.deprecated === true) {
obj.deprecated = message.deprecated;
}
@@ -4407,6 +4362,7 @@ export const FileOptions = {
message.ccGenericServices = object.ccGenericServices ?? false;
message.javaGenericServices = object.javaGenericServices ?? false;
message.pyGenericServices = object.pyGenericServices ?? false;
+ message.phpGenericServices = object.phpGenericServices ?? false;
message.deprecated = object.deprecated ?? false;
message.ccEnableArenas = object.ccEnableArenas ?? false;
message.objcClassPrefix = object.objcClassPrefix ?? "";
@@ -4605,7 +4561,6 @@ function createBaseFieldOptions(): FieldOptions {
targets: [],
editionDefaults: [],
features: undefined,
- featureSupport: undefined,
uninterpretedOption: [],
};
}
@@ -4650,9 +4605,6 @@ export const FieldOptions = {
if (message.features !== undefined) {
FeatureSet.encode(message.features, writer.uint32(170).fork()).ldelim();
}
- if (message.featureSupport !== undefined) {
- FieldOptions_FeatureSupport.encode(message.featureSupport, writer.uint32(178).fork()).ldelim();
- }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -4760,13 +4712,6 @@ export const FieldOptions = {
message.features = FeatureSet.decode(reader, reader.uint32());
continue;
- case 22:
- if (tag !== 178) {
- break;
- }
-
- message.featureSupport = FieldOptions_FeatureSupport.decode(reader, reader.uint32());
- continue;
case 999:
if (tag !== 7994) {
break;
@@ -4803,9 +4748,6 @@ export const FieldOptions = {
? object.editionDefaults.map((e: any) => FieldOptions_EditionDefault.fromJSON(e))
: [],
features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
- featureSupport: isSet(object.featureSupport)
- ? FieldOptions_FeatureSupport.fromJSON(object.featureSupport)
- : undefined,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -4850,9 +4792,6 @@ export const FieldOptions = {
if (message.features !== undefined) {
obj.features = FeatureSet.toJSON(message.features);
}
- if (message.featureSupport !== undefined) {
- obj.featureSupport = FieldOptions_FeatureSupport.toJSON(message.featureSupport);
- }
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
@@ -4878,9 +4817,6 @@ export const FieldOptions = {
message.features = (object.features !== undefined && object.features !== null)
? FeatureSet.fromPartial(object.features)
: undefined;
- message.featureSupport = (object.featureSupport !== undefined && object.featureSupport !== null)
- ? FieldOptions_FeatureSupport.fromPartial(object.featureSupport)
- : undefined;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
@@ -4960,119 +4896,6 @@ export const FieldOptions_EditionDefault = {
},
};
-function createBaseFieldOptions_FeatureSupport(): FieldOptions_FeatureSupport {
- return {
- editionIntroduced: Edition.EDITION_UNKNOWN,
- editionDeprecated: Edition.EDITION_UNKNOWN,
- deprecationWarning: "",
- editionRemoved: Edition.EDITION_UNKNOWN,
- };
-}
-
-export const FieldOptions_FeatureSupport = {
- encode(message: FieldOptions_FeatureSupport, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- if (message.editionIntroduced !== Edition.EDITION_UNKNOWN) {
- writer.uint32(8).int32(editionToNumber(message.editionIntroduced));
- }
- if (message.editionDeprecated !== Edition.EDITION_UNKNOWN) {
- writer.uint32(16).int32(editionToNumber(message.editionDeprecated));
- }
- if (message.deprecationWarning !== "") {
- writer.uint32(26).string(message.deprecationWarning);
- }
- if (message.editionRemoved !== Edition.EDITION_UNKNOWN) {
- writer.uint32(32).int32(editionToNumber(message.editionRemoved));
- }
- return writer;
- },
-
- decode(input: _m0.Reader | Uint8Array, length?: number): FieldOptions_FeatureSupport {
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseFieldOptions_FeatureSupport();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- if (tag !== 8) {
- break;
- }
-
- message.editionIntroduced = editionFromJSON(reader.int32());
- continue;
- case 2:
- if (tag !== 16) {
- break;
- }
-
- message.editionDeprecated = editionFromJSON(reader.int32());
- continue;
- case 3:
- if (tag !== 26) {
- break;
- }
-
- message.deprecationWarning = reader.string();
- continue;
- case 4:
- if (tag !== 32) {
- break;
- }
-
- message.editionRemoved = editionFromJSON(reader.int32());
- continue;
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skipType(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): FieldOptions_FeatureSupport {
- return {
- editionIntroduced: isSet(object.editionIntroduced)
- ? editionFromJSON(object.editionIntroduced)
- : Edition.EDITION_UNKNOWN,
- editionDeprecated: isSet(object.editionDeprecated)
- ? editionFromJSON(object.editionDeprecated)
- : Edition.EDITION_UNKNOWN,
- deprecationWarning: isSet(object.deprecationWarning) ? globalThis.String(object.deprecationWarning) : "",
- editionRemoved: isSet(object.editionRemoved) ? editionFromJSON(object.editionRemoved) : Edition.EDITION_UNKNOWN,
- };
- },
-
- toJSON(message: FieldOptions_FeatureSupport): unknown {
- const obj: any = {};
- if (message.editionIntroduced !== Edition.EDITION_UNKNOWN) {
- obj.editionIntroduced = editionToJSON(message.editionIntroduced);
- }
- if (message.editionDeprecated !== Edition.EDITION_UNKNOWN) {
- obj.editionDeprecated = editionToJSON(message.editionDeprecated);
- }
- if (message.deprecationWarning !== "") {
- obj.deprecationWarning = message.deprecationWarning;
- }
- if (message.editionRemoved !== Edition.EDITION_UNKNOWN) {
- obj.editionRemoved = editionToJSON(message.editionRemoved);
- }
- return obj;
- },
-
- create(base?: DeepPartial<FieldOptions_FeatureSupport>): FieldOptions_FeatureSupport {
- return FieldOptions_FeatureSupport.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<FieldOptions_FeatureSupport>): FieldOptions_FeatureSupport {
- const message = createBaseFieldOptions_FeatureSupport();
- message.editionIntroduced = object.editionIntroduced ?? Edition.EDITION_UNKNOWN;
- message.editionDeprecated = object.editionDeprecated ?? Edition.EDITION_UNKNOWN;
- message.deprecationWarning = object.deprecationWarning ?? "";
- message.editionRemoved = object.editionRemoved ?? Edition.EDITION_UNKNOWN;
- return message;
- },
-};
-
function createBaseOneofOptions(): OneofOptions {
return { features: undefined, uninterpretedOption: [] };
}
@@ -6081,7 +5904,7 @@ export const FeatureSetDefaults = {
};
function createBaseFeatureSetDefaults_FeatureSetEditionDefault(): FeatureSetDefaults_FeatureSetEditionDefault {
- return { edition: Edition.EDITION_UNKNOWN, overridableFeatures: undefined, fixedFeatures: undefined };
+ return { edition: Edition.EDITION_UNKNOWN, features: undefined };
}
export const FeatureSetDefaults_FeatureSetEditionDefault = {
@@ -6089,11 +5912,8 @@ export const FeatureSetDefaults_FeatureSetEditionDefault = {
if (message.edition !== Edition.EDITION_UNKNOWN) {
writer.uint32(24).int32(editionToNumber(message.edition));
}
- if (message.overridableFeatures !== undefined) {
- FeatureSet.encode(message.overridableFeatures, writer.uint32(34).fork()).ldelim();
- }
- if (message.fixedFeatures !== undefined) {
- FeatureSet.encode(message.fixedFeatures, writer.uint32(42).fork()).ldelim();
+ if (message.features !== undefined) {
+ FeatureSet.encode(message.features, writer.uint32(18).fork()).ldelim();
}
return writer;
},
@@ -6112,19 +5932,12 @@ export const FeatureSetDefaults_FeatureSetEditionDefault = {
message.edition = editionFromJSON(reader.int32());
continue;
- case 4:
- if (tag !== 34) {
- break;
- }
-
- message.overridableFeatures = FeatureSet.decode(reader, reader.uint32());
- continue;
- case 5:
- if (tag !== 42) {
+ case 2:
+ if (tag !== 18) {
break;
}
- message.fixedFeatures = FeatureSet.decode(reader, reader.uint32());
+ message.features = FeatureSet.decode(reader, reader.uint32());
continue;
}
if ((tag & 7) === 4 || tag === 0) {
@@ -6138,10 +5951,7 @@ export const FeatureSetDefaults_FeatureSetEditionDefault = {
fromJSON(object: any): FeatureSetDefaults_FeatureSetEditionDefault {
return {
edition: isSet(object.edition) ? editionFromJSON(object.edition) : Edition.EDITION_UNKNOWN,
- overridableFeatures: isSet(object.overridableFeatures)
- ? FeatureSet.fromJSON(object.overridableFeatures)
- : undefined,
- fixedFeatures: isSet(object.fixedFeatures) ? FeatureSet.fromJSON(object.fixedFeatures) : undefined,
+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
};
},
@@ -6150,11 +5960,8 @@ export const FeatureSetDefaults_FeatureSetEditionDefault = {
if (message.edition !== Edition.EDITION_UNKNOWN) {
obj.edition = editionToJSON(message.edition);
}
- if (message.overridableFeatures !== undefined) {
- obj.overridableFeatures = FeatureSet.toJSON(message.overridableFeatures);
- }
- if (message.fixedFeatures !== undefined) {
- obj.fixedFeatures = FeatureSet.toJSON(message.fixedFeatures);
+ if (message.features !== undefined) {
+ obj.features = FeatureSet.toJSON(message.features);
}
return obj;
},
@@ -6167,11 +5974,8 @@ export const FeatureSetDefaults_FeatureSetEditionDefault = {
): FeatureSetDefaults_FeatureSetEditionDefault {
const message = createBaseFeatureSetDefaults_FeatureSetEditionDefault();
message.edition = object.edition ?? Edition.EDITION_UNKNOWN;
- message.overridableFeatures = (object.overridableFeatures !== undefined && object.overridableFeatures !== null)
- ? FeatureSet.fromPartial(object.overridableFeatures)
- : undefined;
- message.fixedFeatures = (object.fixedFeatures !== undefined && object.fixedFeatures !== null)
- ? FeatureSet.fromPartial(object.fixedFeatures)
+ message.features = (object.features !== undefined && object.features !== null)
+ ? FeatureSet.fromPartial(object.features)
: undefined;
return message;
},
diff --git a/frontend/src/types/proto/store/project.ts b/frontend/src/types/proto/store/project.ts
index 9a1ac27616..b067241efe 100644
--- a/frontend/src/types/proto/store/project.ts
+++ b/frontend/src/types/proto/store/project.ts
@@ -1,6 +1,7 @@
/* eslint-disable */
import Long from "long";
import _m0 from "protobufjs/minimal";
+import { Expr } from "../google/type/expr";
export const protobufPackage = "bytebase.store";
@@ -129,6 +130,34 @@ export function protectionRule_BranchSourceToNumber(object: ProtectionRule_Branc
}
}
+export interface Binding {
+ /**
+ * The role that is assigned to the members.
+ * Format: roles/{role}
+ */
+ role: string;
+ /**
+ * Specifies the principals requesting access for a Bytebase resource.
+ * For users, the member should be: users/{userUID}
+ * For groups, the member should be: groups/{email}
+ */
+ members: string[];
+ /**
+ * 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.
+ */
+ condition: Expr | undefined;
+}
+
+export interface ProjectIamPolicy {
+ /**
+ * Collection of binding.
+ * A binding binds one or more members or groups to a single project role.
+ */
+ bindings: Binding[];
+}
+
function createBaseLabel(): Label {
return { value: "", color: "", group: "" };
}
@@ -442,6 +471,156 @@ export const ProtectionRule = {
},
};
+function createBaseBinding(): Binding {
+ return { role: "", members: [], condition: undefined };
+}
+
+export const Binding = {
+ encode(message: Binding, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.role !== "") {
+ writer.uint32(10).string(message.role);
+ }
+ for (const v of message.members) {
+ writer.uint32(18).string(v!);
+ }
+ if (message.condition !== undefined) {
+ Expr.encode(message.condition, writer.uint32(26).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): Binding {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseBinding();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.role = reader.string();
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.members.push(reader.string());
+ continue;
+ case 3:
+ if (tag !== 26) {
+ 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): Binding {
+ return {
+ role: isSet(object.role) ? globalThis.String(object.role) : "",
+ members: globalThis.Array.isArray(object?.members) ? object.members.map((e: any) => globalThis.String(e)) : [],
+ condition: isSet(object.condition) ? Expr.fromJSON(object.condition) : undefined,
+ };
+ },
+
+ toJSON(message: Binding): unknown {
+ const obj: any = {};
+ if (message.role !== "") {
+ obj.role = message.role;
+ }
+ if (message.members?.length) {
+ obj.members = message.members;
+ }
+ if (message.condition !== undefined) {
+ obj.condition = Expr.toJSON(message.condition);
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<Binding>): Binding {
+ return Binding.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<Binding>): Binding {
+ const message = createBaseBinding();
+ message.role = object.role ?? "";
+ message.members = object.members?.map((e) => e) || [];
+ message.condition = (object.condition !== undefined && object.condition !== null)
+ ? Expr.fromPartial(object.condition)
+ : undefined;
+ return message;
+ },
+};
+
+function createBaseProjectIamPolicy(): ProjectIamPolicy {
+ return { bindings: [] };
+}
+
+export const ProjectIamPolicy = {
+ encode(message: ProjectIamPolicy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ for (const v of message.bindings) {
+ Binding.encode(v!, writer.uint32(10).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ProjectIamPolicy {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseProjectIamPolicy();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.bindings.push(Binding.decode(reader, reader.uint32()));
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ProjectIamPolicy {
+ return {
+ bindings: globalThis.Array.isArray(object?.bindings) ? object.bindings.map((e: any) => Binding.fromJSON(e)) : [],
+ };
+ },
+
+ toJSON(message: ProjectIamPolicy): unknown {
+ const obj: any = {};
+ if (message.bindings?.length) {
+ obj.bindings = message.bindings.map((e) => Binding.toJSON(e));
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<ProjectIamPolicy>): ProjectIamPolicy {
+ return ProjectIamPolicy.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<ProjectIamPolicy>): ProjectIamPolicy {
+ const message = createBaseProjectIamPolicy();
+ message.bindings = object.bindings?.map((e) => Binding.fromPartial(e)) || [];
+ return message;
+ },
+};
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
diff --git a/frontend/src/types/proto/v1/iam_policy.ts b/frontend/src/types/proto/v1/iam_policy.ts
index 6f02f6bcdb..5bd8c36612 100644
--- a/frontend/src/types/proto/v1/iam_policy.ts
+++ b/frontend/src/types/proto/v1/iam_policy.ts
@@ -20,7 +20,11 @@ export interface Binding {
* Format: roles/{role}
*/
role: string;
- /** Specifies the principals requesting access for a Bytebase resource. */
+ /**
+ * 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}
+ */
members: string[];
/**
* The condition that is associated with this binding.
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 258fcf6689..1872d5bfb5 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -8891,7 +8891,10 @@ components:
type: array
items:
type: string
- description: Specifies the principals requesting access for a Bytebase resource.
+ description: |-
+ 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:
allOf:
- $ref: '#/components/schemas/Expr'
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index 6587d1c3cd..2f242d4a36 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -183,8 +183,10 @@
- [SQLReviewRuleLevel](#bytebase-store-SQLReviewRuleLevel)
- [store/project.proto](#store_project-proto)
+ - [Binding](#bytebase-store-Binding)
- [Label](#bytebase-store-Label)
- [Project](#bytebase-store-Project)
+ - [ProjectIamPolicy](#bytebase-store-ProjectIamPolicy)
- [ProtectionRule](#bytebase-store-ProtectionRule)
- [ProtectionRule.BranchSource](#bytebase-store-ProtectionRule-BranchSource)
@@ -2889,6 +2891,23 @@ Format: users/{userUID}. |
+<a name="bytebase-store-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: users/{userUID} For groups, the member should be: groups/{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. |
+
+
+
+
+
+
<a name="bytebase-store-Label"></a>
### Label
@@ -2923,6 +2942,21 @@ Format: users/{userUID}. |
+<a name="bytebase-store-ProjectIamPolicy"></a>
+
+### ProjectIamPolicy
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| bindings | [Binding](#bytebase-store-Binding) | repeated | Collection of binding. A binding binds one or more members or groups to a single project role. |
+
+
+
+
+
+
<a name="bytebase-store-ProtectionRule"></a>
### ProtectionRule
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index dfd838fb32..534fa457c0 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -901,6 +901,10 @@
<a href="#store%2fproject.proto">store/project.proto</a>
<ul>
+ <li>
+ <a href="#bytebase.store.Binding"><span class="badge">M</span>Binding</a>
+ </li>
+
<li>
<a href="#bytebase.store.Label"><span class="badge">M</span>Label</a>
</li>
@@ -909,6 +913,10 @@
<a href="#bytebase.store.Project"><span class="badge">M</span>Project</a>
</li>
+ <li>
+ <a href="#bytebase.store.ProjectIamPolicy"><span class="badge">M</span>ProjectIamPolicy</a>
+ </li>
+
<li>
<a href="#bytebase.store.ProtectionRule"><span class="badge">M</span>ProtectionRule</a>
</li>
@@ -7437,6 +7445,49 @@ roles/CREATOR </p></td>
<p></p>
+ <h3 id="bytebase.store.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: users/{userUID}
+For groups, the member should be: groups/{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>
+
+ </tbody>
+ </table>
+
+
+
+
+
<h3 id="bytebase.store.Label">Label</h3>
<p></p>
@@ -7513,6 +7564,31 @@ roles/CREATOR </p></td>
+ <h3 id="bytebase.store.ProjectIamPolicy">ProjectIamPolicy</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.store.Binding">Binding</a></td>
+ <td>repeated</td>
+ <td><p>Collection of binding.
+A binding binds one or more members or groups to a single project role. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
<h3 id="bytebase.store.ProtectionRule">ProtectionRule</h3>
<p></p>
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index c25ebc25f9..5b7780d026 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -4188,7 +4188,7 @@ The environment&#39;s `name` field is used to identify the environment to update
| 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. |
+| 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. |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index fee7a9f86a..800082af7e 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -12363,7 +12363,9 @@ Format: roles/{role} </p></td>
<td>members</td>
<td><a href="#string">string</a></td>
<td>repeated</td>
- <td><p>Specifies the principals requesting access for a Bytebase resource. </p></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>
diff --git a/proto/generated-go/store/project.pb.go b/proto/generated-go/store/project.pb.go
index 1a6a766cd9..e9fa860f76 100644
--- a/proto/generated-go/store/project.pb.go
+++ b/proto/generated-go/store/project.pb.go
@@ -7,6 +7,7 @@
package store
import (
+ expr "google.golang.org/genproto/googleapis/type/expr"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -325,54 +326,187 @@ func (x *ProtectionRule) GetBranchSource() ProtectionRule_BranchSource {
return ProtectionRule_BRANCH_SOURCE_UNSPECIFIED
}
+type Binding struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The role that is assigned to the members.
+ // Format: roles/{role}
+ Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
+ // Specifies the principals requesting access for a Bytebase resource.
+ // For users, the member should be: users/{userUID}
+ // For groups, the member should be: groups/{email}
+ Members []string `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"`
+ // 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.
+ Condition *expr.Expr `protobuf:"bytes,3,opt,name=condition,proto3" json:"condition,omitempty"`
+}
+
+func (x *Binding) Reset() {
+ *x = Binding{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_store_project_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Binding) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Binding) ProtoMessage() {}
+
+func (x *Binding) ProtoReflect() protoreflect.Message {
+ mi := &file_store_project_proto_msgTypes[3]
+ 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 Binding.ProtoReflect.Descriptor instead.
+func (*Binding) Descriptor() ([]byte, []int) {
+ return file_store_project_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *Binding) GetRole() string {
+ if x != nil {
+ return x.Role
+ }
+ return ""
+}
+
+func (x *Binding) GetMembers() []string {
+ if x != nil {
+ return x.Members
+ }
+ return nil
+}
+
+func (x *Binding) GetCondition() *expr.Expr {
+ if x != nil {
+ return x.Condition
+ }
+ return nil
+}
+
+type ProjectIamPolicy struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Collection of binding.
+ // A binding binds one or more members or groups to a single project role.
+ Bindings []*Binding `protobuf:"bytes,1,rep,name=bindings,proto3" json:"bindings,omitempty"`
+}
+
+func (x *ProjectIamPolicy) Reset() {
+ *x = ProjectIamPolicy{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_store_project_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ProjectIamPolicy) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProjectIamPolicy) ProtoMessage() {}
+
+func (x *ProjectIamPolicy) ProtoReflect() protoreflect.Message {
+ mi := &file_store_project_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 ProjectIamPolicy.ProtoReflect.Descriptor instead.
+func (*ProjectIamPolicy) Descriptor() ([]byte, []int) {
+ return file_store_project_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *ProjectIamPolicy) GetBindings() []*Binding {
+ if x != nil {
+ return x.Bindings
+ }
+ return nil
+}
+
var File_store_project_proto protoreflect.FileDescriptor
var file_store_project_proto_rawDesc = []byte{
0x0a, 0x13, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x49, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x14,
- 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72,
- 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70,
- 0x22, 0xbc, 0x01, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x49, 0x0a, 0x10,
- 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73,
- 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69,
- 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65,
- 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x4c,
- 0x61, 0x62, 0x65, 0x6c, 0x52, 0x0b, 0x69, 0x73, 0x73, 0x75, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c,
- 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65,
- 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x66,
- 0x6f, 0x72, 0x63, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22,
- 0xfd, 0x02, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75,
- 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
- 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,
- 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75,
- 0x6c, 0x65, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65,
- 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74,
- 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x72, 0x6f,
- 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77,
- 0x65, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x0d, 0x62, 0x72, 0x61, 0x6e, 0x63,
- 0x68, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b,
+ 0x73, 0x74, 0x6f, 0x72, 0x65, 0x1a, 0x16, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79,
+ 0x70, 0x65, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x49, 0x0a,
+ 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05,
+ 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x6c,
+ 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xbc, 0x01, 0x0a, 0x07, 0x50, 0x72, 0x6f,
+ 0x6a, 0x65, 0x63, 0x74, 0x12, 0x49, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e,
0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e,
- 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x42,
- 0x72, 0x61, 0x6e, 0x63, 0x68, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0c, 0x62, 0x72, 0x61,
- 0x6e, 0x63, 0x68, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x47, 0x0a, 0x06, 0x54, 0x61, 0x72,
- 0x67, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x54, 0x45, 0x43, 0x54, 0x49, 0x4f,
- 0x4e, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
- 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48,
- 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x4c, 0x49, 0x53, 0x54,
- 0x10, 0x02, 0x22, 0x3b, 0x0a, 0x0c, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x53, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x53, 0x4f, 0x55,
- 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
- 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x10, 0x01, 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,
+ 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0f,
+ 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12,
+ 0x38, 0x0a, 0x0c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18,
+ 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x0b, 0x69, 0x73,
+ 0x73, 0x75, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x66, 0x6f, 0x72,
+ 0x63, 0x65, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x49, 0x73, 0x73, 0x75,
+ 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0xfd, 0x02, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x74,
+ 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x06, 0x74, 0x61,
+ 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74,
+ 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65,
+ 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x61, 0x6d,
+ 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
+ 0x6e, 0x61, 0x6d, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c,
+ 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28,
+ 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12,
+ 0x50, 0x0a, 0x0d, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x53, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x52, 0x0c, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x53, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x22, 0x47, 0x0a, 0x06, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x1d, 0x50,
+ 0x52, 0x4f, 0x54, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54,
+ 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a,
+ 0x0a, 0x06, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x48,
+ 0x41, 0x4e, 0x47, 0x45, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x02, 0x22, 0x3b, 0x0a, 0x0c, 0x42, 0x72,
+ 0x61, 0x6e, 0x63, 0x68, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x42, 0x52,
+ 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50,
+ 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x41, 0x54,
+ 0x41, 0x42, 0x41, 0x53, 0x45, 0x10, 0x01, 0x22, 0x68, 0x0a, 0x07, 0x42, 0x69, 0x6e, 0x64, 0x69,
+ 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72,
+ 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73,
+ 0x12, 0x2f, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 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, 0x47, 0x0a, 0x10, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x61, 0x6d, 0x50,
+ 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x33, 0x0a, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67,
+ 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67,
+ 0x52, 0x08, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 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 (
@@ -388,24 +522,29 @@ func file_store_project_proto_rawDescGZIP() []byte {
}
var file_store_project_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
-var file_store_project_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_store_project_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_store_project_proto_goTypes = []interface{}{
(ProtectionRule_Target)(0), // 0: bytebase.store.ProtectionRule.Target
(ProtectionRule_BranchSource)(0), // 1: bytebase.store.ProtectionRule.BranchSource
(*Label)(nil), // 2: bytebase.store.Label
(*Project)(nil), // 3: bytebase.store.Project
(*ProtectionRule)(nil), // 4: bytebase.store.ProtectionRule
+ (*Binding)(nil), // 5: bytebase.store.Binding
+ (*ProjectIamPolicy)(nil), // 6: bytebase.store.ProjectIamPolicy
+ (*expr.Expr)(nil), // 7: google.type.Expr
}
var file_store_project_proto_depIdxs = []int32{
4, // 0: bytebase.store.Project.protection_rules:type_name -> bytebase.store.ProtectionRule
2, // 1: bytebase.store.Project.issue_labels:type_name -> bytebase.store.Label
0, // 2: bytebase.store.ProtectionRule.target:type_name -> bytebase.store.ProtectionRule.Target
1, // 3: bytebase.store.ProtectionRule.branch_source:type_name -> bytebase.store.ProtectionRule.BranchSource
- 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
+ 7, // 4: bytebase.store.Binding.condition:type_name -> google.type.Expr
+ 5, // 5: bytebase.store.ProjectIamPolicy.bindings:type_name -> bytebase.store.Binding
+ 6, // [6:6] is the sub-list for method output_type
+ 6, // [6:6] is the sub-list for method input_type
+ 6, // [6:6] is the sub-list for extension type_name
+ 6, // [6:6] is the sub-list for extension extendee
+ 0, // [0:6] is the sub-list for field type_name
}
func init() { file_store_project_proto_init() }
@@ -450,6 +589,30 @@ func file_store_project_proto_init() {
return nil
}
}
+ file_store_project_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Binding); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_store_project_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ProjectIamPolicy); 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{
@@ -457,7 +620,7 @@ func file_store_project_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_store_project_proto_rawDesc,
NumEnums: 2,
- NumMessages: 3,
+ NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/proto/generated-go/v1/iam_policy.pb.go b/proto/generated-go/v1/iam_policy.pb.go
index 1395347356..25846eb7d4 100644
--- a/proto/generated-go/v1/iam_policy.pb.go
+++ b/proto/generated-go/v1/iam_policy.pb.go
@@ -81,6 +81,8 @@ type Binding struct {
// Format: roles/{role}
Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
// 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}
Members []string `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"`
// The condition that is associated with this binding.
// If the condition evaluates to true, then this binding applies to the current request.
diff --git a/proto/store/project.proto b/proto/store/project.proto
index 013edb4c41..5126ce5b1e 100644
--- a/proto/store/project.proto
+++ b/proto/store/project.proto
@@ -2,6 +2,8 @@ syntax = "proto3";
package bytebase.store;
+import "google/type/expr.proto";
+
option go_package = "generated-go/store";
message Label {
@@ -42,3 +44,25 @@ message ProtectionRule {
}
BranchSource branch_source = 5;
}
+
+message Binding {
+ // The role that is assigned to the members.
+ // Format: roles/{role}
+ string role = 1;
+
+ // Specifies the principals requesting access for a Bytebase resource.
+ // For users, the member should be: users/{userUID}
+ // For groups, the member should be: groups/{email}
+ repeated string members = 2;
+
+ // 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.
+ google.type.Expr condition = 3;
+}
+
+message ProjectIamPolicy {
+ // Collection of binding.
+ // A binding binds one or more members or groups to a single project role.
+ repeated Binding bindings = 1;
+}
diff --git a/proto/v1/iam_policy.proto b/proto/v1/iam_policy.proto
index 2f85194437..b2c6ea5eb6 100644
--- a/proto/v1/iam_policy.proto
+++ b/proto/v1/iam_policy.proto
@@ -20,6 +20,8 @@ message Binding {
string role = 1;
// 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}
repeated string members = 2;
// The condition that is associated with this binding.