Skip to content

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

chore: change instance_role proto (#4578)

rebelice80c56db59e4b
diff --git a/backend/api/v1/instance_role_service.go b/backend/api/v1/instance_role_service.go
index c1b98087e9..d1b4e4b319 100644
--- a/backend/api/v1/instance_role_service.go
+++ b/backend/api/v1/instance_role_service.go
@@ -123,15 +123,7 @@ func (s *InstanceRoleService) CreateRole(ctx context.Context, request *v1pb.Crea
Password: request.Role.Password,
ConnectionLimit: request.Role.ConnectionLimit,
ValidUntil: request.Role.ValidUntil,
- Attribute: &db.DatabaseRoleAttributeMessage{
- SuperUser: request.Role.Attribute.SuperUser,
- NoInherit: request.Role.Attribute.NoInherit,
- CreateRole: request.Role.Attribute.CreateRole,
- CreateDb: request.Role.Attribute.CreateDb,
- CanLogin: request.Role.Attribute.CanLogin,
- Replication: request.Role.Attribute.Replication,
- BypassRls: request.Role.Attribute.BypassRls,
- },
+ Attribute: request.Role.Attribute,
}
if err := validateRole(roleUpsert); err != nil {
return nil, err
@@ -191,15 +183,7 @@ func (s *InstanceRoleService) UpdateRole(ctx context.Context, request *v1pb.Upda
case "role.valid_until":
upsert.ValidUntil = request.Role.ValidUntil
case "role.attribute":
- upsert.Attribute = &db.DatabaseRoleAttributeMessage{
- SuperUser: request.Role.Attribute.SuperUser,
- NoInherit: request.Role.Attribute.NoInherit,
- CreateRole: request.Role.Attribute.CreateRole,
- CreateDb: request.Role.Attribute.CreateDb,
- CanLogin: request.Role.Attribute.CanLogin,
- Replication: request.Role.Attribute.Replication,
- BypassRls: request.Role.Attribute.BypassRls,
- }
+ upsert.Attribute = request.Role.Attribute
}
}
if err := validateRole(upsert); err != nil {
@@ -286,15 +270,7 @@ func convertToRole(role *db.DatabaseRoleMessage, instance *store.InstanceMessage
RoleName: role.Name,
ConnectionLimit: &role.ConnectionLimit,
ValidUntil: role.ValidUntil,
- Attribute: &v1pb.RoleAttribute{
- SuperUser: role.Attribute.SuperUser,
- NoInherit: role.Attribute.NoInherit,
- CreateRole: role.Attribute.CreateRole,
- CreateDb: role.Attribute.CreateDb,
- CanLogin: role.Attribute.CanLogin,
- Replication: role.Attribute.Replication,
- BypassRls: role.Attribute.BypassRls,
- },
+ Attribute: role.Attribute,
}
}
diff --git a/backend/plugin/db/driver.go b/backend/plugin/db/driver.go
index f7c18f9a83..ad47392d48 100644
--- a/backend/plugin/db/driver.go
+++ b/backend/plugin/db/driver.go
@@ -378,24 +378,6 @@ type QueryContext struct {
CurrentDatabase string
}
-// DatabaseRoleAttributeMessage is the attribute for role. Docs: https://www.postgresql.org/docs/current/role-attributes.html
-type DatabaseRoleAttributeMessage struct {
- // A database superuser bypasses all permission checks, except the right to log in.
- SuperUser bool
- // A role is given permission to inherit the privileges of roles it is a member of. To create a role without the permission, use "noInherit = true"
- NoInherit bool
- // A role must be explicitly given permission to create more roles (except for superusers, since those bypass all permission checks).
- CreateRole bool
- // A role must be explicitly given permission to create databases (except for superusers, since those bypass all permission checks).
- CreateDb bool
- // Only roles that have the LOGIN attribute can be used as the initial role name for a database connection.
- CanLogin bool
- // A role must explicitly be given permission to initiate streaming replication (except for superusers, since those bypass all permission checks).
- Replication bool
- // A role must be explicitly given permission to bypass every row-level security (RLS) policy (except for superusers, since those bypass all permission checks).
- BypassRls bool
-}
-
// DatabaseRoleMessage is the API message for database role.
type DatabaseRoleMessage struct {
// The role unique name.
@@ -405,7 +387,7 @@ type DatabaseRoleMessage struct {
// The expiration for the role's password.
ValidUntil *string
// The role attribute.
- Attribute *DatabaseRoleAttributeMessage
+ Attribute *string
}
// DatabaseRoleUpsertMessage is the API message for upserting a database role.
@@ -419,7 +401,7 @@ type DatabaseRoleUpsertMessage struct {
// The VALID UNTIL clause sets a date and time after which the role's password is no longer valid. If this clause is omitted the password will be valid for all time.
ValidUntil *string
// The role attribute.
- Attribute *DatabaseRoleAttributeMessage
+ Attribute *string
}
// Driver is the interface for database driver.
diff --git a/backend/plugin/db/pg/role.go b/backend/plugin/db/pg/role.go
index 167475dd9a..5674e5fc64 100644
--- a/backend/plugin/db/pg/role.go
+++ b/backend/plugin/db/pg/role.go
@@ -43,7 +43,7 @@ const (
// BYPASSRLS is the role attribute for rolbypassrls.
BYPASSRLS RoleAttribute = "BYPASSRLS"
// NOBYPASSRLS is the role attribute for rolbypassrls.
- NOBYPASSRLS RoleAttribute = "BYPASSRLS"
+ NOBYPASSRLS RoleAttribute = "NOBYPASSRLS"
)
// ToString returns the string value for role attribute.
@@ -202,27 +202,73 @@ func findRoleImpl(ctx context.Context, txn *sql.Tx, find *roleFind) ([]*db.Datab
var roleList []*db.DatabaseRoleMessage
for rows.Next() {
- inherit := false
- role := &db.DatabaseRoleMessage{
- Attribute: &db.DatabaseRoleAttributeMessage{},
- }
-
+ var name string
+ var super, inherit, createRole, createDB, canLogin, replication, bypassRLS bool
+ var validUntil sql.NullString
+ var connectionLimit int32
if err := rows.Scan(
- &role.Name,
- &role.Attribute.SuperUser,
+ &name,
+ &super,
&inherit,
- &role.Attribute.CreateRole,
- &role.Attribute.CreateDb,
- &role.Attribute.CanLogin,
- &role.Attribute.Replication,
- &role.Attribute.BypassRls,
- &role.ValidUntil,
- &role.ConnectionLimit,
+ &createRole,
+ &createDB,
+ &canLogin,
+ &replication,
+ &bypassRLS,
+ &validUntil,
+ &connectionLimit,
); err != nil {
return nil, util.FormatErrorWithQuery(err, statement)
}
- role.Attribute.NoInherit = !inherit
+ var attributes []string
+ if super {
+ attributes = append(attributes, SUPERUSER.ToString())
+ } else {
+ attributes = append(attributes, NOSUPERUSER.ToString())
+ }
+ if inherit {
+ attributes = append(attributes, INHERIT.ToString())
+ } else {
+ attributes = append(attributes, NOINHERIT.ToString())
+ }
+ if createRole {
+ attributes = append(attributes, CREATEROLE.ToString())
+ } else {
+ attributes = append(attributes, NOCREATEROLE.ToString())
+ }
+ if createDB {
+ attributes = append(attributes, CREATEDB.ToString())
+ } else {
+ attributes = append(attributes, NOCREATEDB.ToString())
+ }
+ if canLogin {
+ attributes = append(attributes, LOGIN.ToString())
+ } else {
+ attributes = append(attributes, NOLOGIN.ToString())
+ }
+ if replication {
+ attributes = append(attributes, REPLICATION.ToString())
+ } else {
+ attributes = append(attributes, NOREPLICATION.ToString())
+ }
+ if bypassRLS {
+ attributes = append(attributes, BYPASSRLS.ToString())
+ } else {
+ attributes = append(attributes, NOBYPASSRLS.ToString())
+ }
+
+ attribute := strings.Join(attributes, " ")
+ role := &db.DatabaseRoleMessage{
+ Name: name,
+ ConnectionLimit: connectionLimit,
+ Attribute: &attribute,
+ }
+
+ if validUntil.Valid {
+ role.ValidUntil = &validUntil.String
+ }
+
roleList = append(roleList, role)
}
@@ -266,41 +312,7 @@ func convertToAttributeStatement(r *db.DatabaseRoleUpsertMessage) string {
attributeList := []string{}
if r.Attribute != nil {
- if r.Attribute.SuperUser {
- attributeList = append(attributeList, SUPERUSER.ToString())
- } else {
- attributeList = append(attributeList, NOSUPERUSER.ToString())
- }
- if r.Attribute.NoInherit {
- attributeList = append(attributeList, NOINHERIT.ToString())
- } else {
- attributeList = append(attributeList, INHERIT.ToString())
- }
- if r.Attribute.CanLogin {
- attributeList = append(attributeList, LOGIN.ToString())
- } else {
- attributeList = append(attributeList, NOLOGIN.ToString())
- }
- if r.Attribute.CreateRole {
- attributeList = append(attributeList, CREATEROLE.ToString())
- } else {
- attributeList = append(attributeList, NOCREATEROLE.ToString())
- }
- if r.Attribute.CreateDb {
- attributeList = append(attributeList, CREATEDB.ToString())
- } else {
- attributeList = append(attributeList, NOCREATEDB.ToString())
- }
- if r.Attribute.Replication {
- attributeList = append(attributeList, REPLICATION.ToString())
- } else {
- attributeList = append(attributeList, NOREPLICATION.ToString())
- }
- if r.Attribute.BypassRls {
- attributeList = append(attributeList, BYPASSRLS.ToString())
- } else {
- attributeList = append(attributeList, NOBYPASSRLS.ToString())
- }
+ attributeList = append(attributeList, *r.Attribute)
}
if v := r.Password; v != nil {
diff --git a/frontend/src/types/proto/v1/instance_role_service.ts b/frontend/src/types/proto/v1/instance_role_service.ts
index 1aad2001ce..a9c7f47b5c 100644
--- a/frontend/src/types/proto/v1/instance_role_service.ts
+++ b/frontend/src/types/proto/v1/instance_role_service.ts
@@ -86,24 +86,6 @@ export interface UndeleteRoleRequest {
name: string;
}
-/** RoleAttribute is the attribute for role. Docs: https://www.postgresql.org/docs/current/role-attributes.html */
-export interface RoleAttribute {
- /** A database superuser bypasses all permission checks, except the right to log in. */
- superUser: boolean;
- /** A role is given permission to inherit the privileges of roles it is a member of. To create a role without the permission, use "noInherit = true" */
- noInherit: boolean;
- /** A role must be explicitly given permission to create more roles (except for superusers, since those bypass all permission checks). */
- createRole: boolean;
- /** A role must be explicitly given permission to create databases (except for superusers, since those bypass all permission checks). */
- createDb: boolean;
- /** Only roles that have the LOGIN attribute can be used as the initial role name for a database connection. */
- canLogin: boolean;
- /** A role must explicitly be given permission to initiate streaming replication (except for superusers, since those bypass all permission checks). */
- replication: boolean;
- /** A role must be explicitly given permission to bypass every row-level security (RLS) policy (except for superusers, since those bypass all permission checks). */
- bypassRls: boolean;
-}
-
/** InstanceRole is the API message for instance role. */
export interface InstanceRole {
/**
@@ -126,8 +108,12 @@ export interface InstanceRole {
validUntil?:
| string
| undefined;
- /** The role attribute. */
- attribute?: RoleAttribute;
+ /**
+ * The role attribute.
+ * For PostgreSQL, it containt super_user, no_inherit, create_role, create_db, can_login, replication and bypass_rls. Docs: https://www.postgresql.org/docs/current/role-attributes.html
+ * For MySQL, it's the global privileges as GRANT statements, which means it only contains "GRANT ... ON *.* TO ...". Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html
+ */
+ attribute?: string | undefined;
}
function createBaseGetRoleRequest(): GetRoleRequest {
@@ -520,117 +506,6 @@ export const UndeleteRoleRequest = {
},
};
-function createBaseRoleAttribute(): RoleAttribute {
- return {
- superUser: false,
- noInherit: false,
- createRole: false,
- createDb: false,
- canLogin: false,
- replication: false,
- bypassRls: false,
- };
-}
-
-export const RoleAttribute = {
- encode(message: RoleAttribute, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- if (message.superUser === true) {
- writer.uint32(8).bool(message.superUser);
- }
- if (message.noInherit === true) {
- writer.uint32(16).bool(message.noInherit);
- }
- if (message.createRole === true) {
- writer.uint32(24).bool(message.createRole);
- }
- if (message.createDb === true) {
- writer.uint32(32).bool(message.createDb);
- }
- if (message.canLogin === true) {
- writer.uint32(40).bool(message.canLogin);
- }
- if (message.replication === true) {
- writer.uint32(48).bool(message.replication);
- }
- if (message.bypassRls === true) {
- writer.uint32(56).bool(message.bypassRls);
- }
- return writer;
- },
-
- decode(input: _m0.Reader | Uint8Array, length?: number): RoleAttribute {
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseRoleAttribute();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.superUser = reader.bool();
- break;
- case 2:
- message.noInherit = reader.bool();
- break;
- case 3:
- message.createRole = reader.bool();
- break;
- case 4:
- message.createDb = reader.bool();
- break;
- case 5:
- message.canLogin = reader.bool();
- break;
- case 6:
- message.replication = reader.bool();
- break;
- case 7:
- message.bypassRls = reader.bool();
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- },
-
- fromJSON(object: any): RoleAttribute {
- return {
- superUser: isSet(object.superUser) ? Boolean(object.superUser) : false,
- noInherit: isSet(object.noInherit) ? Boolean(object.noInherit) : false,
- createRole: isSet(object.createRole) ? Boolean(object.createRole) : false,
- createDb: isSet(object.createDb) ? Boolean(object.createDb) : false,
- canLogin: isSet(object.canLogin) ? Boolean(object.canLogin) : false,
- replication: isSet(object.replication) ? Boolean(object.replication) : false,
- bypassRls: isSet(object.bypassRls) ? Boolean(object.bypassRls) : false,
- };
- },
-
- toJSON(message: RoleAttribute): unknown {
- const obj: any = {};
- message.superUser !== undefined && (obj.superUser = message.superUser);
- message.noInherit !== undefined && (obj.noInherit = message.noInherit);
- message.createRole !== undefined && (obj.createRole = message.createRole);
- message.createDb !== undefined && (obj.createDb = message.createDb);
- message.canLogin !== undefined && (obj.canLogin = message.canLogin);
- message.replication !== undefined && (obj.replication = message.replication);
- message.bypassRls !== undefined && (obj.bypassRls = message.bypassRls);
- return obj;
- },
-
- fromPartial(object: DeepPartial<RoleAttribute>): RoleAttribute {
- const message = createBaseRoleAttribute();
- message.superUser = object.superUser ?? false;
- message.noInherit = object.noInherit ?? false;
- message.createRole = object.createRole ?? false;
- message.createDb = object.createDb ?? false;
- message.canLogin = object.canLogin ?? false;
- message.replication = object.replication ?? false;
- message.bypassRls = object.bypassRls ?? false;
- return message;
- },
-};
-
function createBaseInstanceRole(): InstanceRole {
return {
name: "",
@@ -660,7 +535,7 @@ export const InstanceRole = {
writer.uint32(42).string(message.validUntil);
}
if (message.attribute !== undefined) {
- RoleAttribute.encode(message.attribute, writer.uint32(50).fork()).ldelim();
+ writer.uint32(50).string(message.attribute);
}
return writer;
},
@@ -688,7 +563,7 @@ export const InstanceRole = {
message.validUntil = reader.string();
break;
case 6:
- message.attribute = RoleAttribute.decode(reader, reader.uint32());
+ message.attribute = reader.string();
break;
default:
reader.skipType(tag & 7);
@@ -705,7 +580,7 @@ export const InstanceRole = {
password: isSet(object.password) ? String(object.password) : undefined,
connectionLimit: isSet(object.connectionLimit) ? Number(object.connectionLimit) : undefined,
validUntil: isSet(object.validUntil) ? String(object.validUntil) : undefined,
- attribute: isSet(object.attribute) ? RoleAttribute.fromJSON(object.attribute) : undefined,
+ attribute: isSet(object.attribute) ? String(object.attribute) : undefined,
};
},
@@ -716,8 +591,7 @@ export const InstanceRole = {
message.password !== undefined && (obj.password = message.password);
message.connectionLimit !== undefined && (obj.connectionLimit = Math.round(message.connectionLimit));
message.validUntil !== undefined && (obj.validUntil = message.validUntil);
- message.attribute !== undefined &&
- (obj.attribute = message.attribute ? RoleAttribute.toJSON(message.attribute) : undefined);
+ message.attribute !== undefined && (obj.attribute = message.attribute);
return obj;
},
@@ -728,9 +602,7 @@ export const InstanceRole = {
message.password = object.password ?? undefined;
message.connectionLimit = object.connectionLimit ?? undefined;
message.validUntil = object.validUntil ?? undefined;
- message.attribute = (object.attribute !== undefined && object.attribute !== null)
- ? RoleAttribute.fromPartial(object.attribute)
- : undefined;
+ message.attribute = object.attribute ?? undefined;
return message;
},
};
diff --git a/proto/generated-go/v1/instance_role_service.pb.go b/proto/generated-go/v1/instance_role_service.pb.go
index ae144d3d20..9579022b16 100644
--- a/proto/generated-go/v1/instance_role_service.pb.go
+++ b/proto/generated-go/v1/instance_role_service.pb.go
@@ -421,109 +421,6 @@ func (x *UndeleteRoleRequest) GetName() string {
return ""
}
-// RoleAttribute is the attribute for role. Docs: https://www.postgresql.org/docs/current/role-attributes.html
-type RoleAttribute struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // A database superuser bypasses all permission checks, except the right to log in.
- SuperUser bool `protobuf:"varint,1,opt,name=super_user,json=superUser,proto3" json:"super_user,omitempty"`
- // A role is given permission to inherit the privileges of roles it is a member of. To create a role without the permission, use "noInherit = true"
- NoInherit bool `protobuf:"varint,2,opt,name=no_inherit,json=noInherit,proto3" json:"no_inherit,omitempty"`
- // A role must be explicitly given permission to create more roles (except for superusers, since those bypass all permission checks).
- CreateRole bool `protobuf:"varint,3,opt,name=create_role,json=createRole,proto3" json:"create_role,omitempty"`
- // A role must be explicitly given permission to create databases (except for superusers, since those bypass all permission checks).
- CreateDb bool `protobuf:"varint,4,opt,name=create_db,json=createDb,proto3" json:"create_db,omitempty"`
- // Only roles that have the LOGIN attribute can be used as the initial role name for a database connection.
- CanLogin bool `protobuf:"varint,5,opt,name=can_login,json=canLogin,proto3" json:"can_login,omitempty"`
- // A role must explicitly be given permission to initiate streaming replication (except for superusers, since those bypass all permission checks).
- Replication bool `protobuf:"varint,6,opt,name=replication,proto3" json:"replication,omitempty"`
- // A role must be explicitly given permission to bypass every row-level security (RLS) policy (except for superusers, since those bypass all permission checks).
- BypassRls bool `protobuf:"varint,7,opt,name=bypass_rls,json=bypassRls,proto3" json:"bypass_rls,omitempty"`
-}
-
-func (x *RoleAttribute) Reset() {
- *x = RoleAttribute{}
- if protoimpl.UnsafeEnabled {
- mi := &file_v1_instance_role_service_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *RoleAttribute) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*RoleAttribute) ProtoMessage() {}
-
-func (x *RoleAttribute) ProtoReflect() protoreflect.Message {
- mi := &file_v1_instance_role_service_proto_msgTypes[7]
- 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 RoleAttribute.ProtoReflect.Descriptor instead.
-func (*RoleAttribute) Descriptor() ([]byte, []int) {
- return file_v1_instance_role_service_proto_rawDescGZIP(), []int{7}
-}
-
-func (x *RoleAttribute) GetSuperUser() bool {
- if x != nil {
- return x.SuperUser
- }
- return false
-}
-
-func (x *RoleAttribute) GetNoInherit() bool {
- if x != nil {
- return x.NoInherit
- }
- return false
-}
-
-func (x *RoleAttribute) GetCreateRole() bool {
- if x != nil {
- return x.CreateRole
- }
- return false
-}
-
-func (x *RoleAttribute) GetCreateDb() bool {
- if x != nil {
- return x.CreateDb
- }
- return false
-}
-
-func (x *RoleAttribute) GetCanLogin() bool {
- if x != nil {
- return x.CanLogin
- }
- return false
-}
-
-func (x *RoleAttribute) GetReplication() bool {
- if x != nil {
- return x.Replication
- }
- return false
-}
-
-func (x *RoleAttribute) GetBypassRls() bool {
- if x != nil {
- return x.BypassRls
- }
- return false
-}
-
// InstanceRole is the API message for instance role.
type InstanceRole struct {
state protoimpl.MessageState
@@ -543,13 +440,15 @@ type InstanceRole struct {
// The expiration for the role's password.
ValidUntil *string `protobuf:"bytes,5,opt,name=valid_until,json=validUntil,proto3,oneof" json:"valid_until,omitempty"`
// The role attribute.
- Attribute *RoleAttribute `protobuf:"bytes,6,opt,name=attribute,proto3" json:"attribute,omitempty"`
+ // For PostgreSQL, it containt super_user, no_inherit, create_role, create_db, can_login, replication and bypass_rls. Docs: https://www.postgresql.org/docs/current/role-attributes.html
+ // For MySQL, it's the global privileges as GRANT statements, which means it only contains "GRANT ... ON *.* TO ...". Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html
+ Attribute *string `protobuf:"bytes,6,opt,name=attribute,proto3,oneof" json:"attribute,omitempty"`
}
func (x *InstanceRole) Reset() {
*x = InstanceRole{}
if protoimpl.UnsafeEnabled {
- mi := &file_v1_instance_role_service_proto_msgTypes[8]
+ mi := &file_v1_instance_role_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -562,7 +461,7 @@ func (x *InstanceRole) String() string {
func (*InstanceRole) ProtoMessage() {}
func (x *InstanceRole) ProtoReflect() protoreflect.Message {
- mi := &file_v1_instance_role_service_proto_msgTypes[8]
+ mi := &file_v1_instance_role_service_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -575,7 +474,7 @@ func (x *InstanceRole) ProtoReflect() protoreflect.Message {
// Deprecated: Use InstanceRole.ProtoReflect.Descriptor instead.
func (*InstanceRole) Descriptor() ([]byte, []int) {
- return file_v1_instance_role_service_proto_rawDescGZIP(), []int{8}
+ return file_v1_instance_role_service_proto_rawDescGZIP(), []int{7}
}
func (x *InstanceRole) GetName() string {
@@ -613,11 +512,11 @@ func (x *InstanceRole) GetValidUntil() string {
return ""
}
-func (x *InstanceRole) GetAttribute() *RoleAttribute {
- if x != nil {
- return x.Attribute
+func (x *InstanceRole) GetAttribute() string {
+ if x != nil && x.Attribute != nil {
+ return *x.Attribute
}
- return nil
+ return ""
}
var File_v1_instance_role_service_proto protoreflect.FileDescriptor
@@ -673,97 +572,82 @@ var file_v1_instance_role_service_proto_rawDesc = []byte{
0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2f, 0x0a, 0x13,
0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xe9, 0x01,
- 0x0a, 0x0d, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12,
- 0x1d, 0x0a, 0x0a, 0x73, 0x75, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d,
- 0x0a, 0x0a, 0x6e, 0x6f, 0x5f, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x08, 0x52, 0x09, 0x6e, 0x6f, 0x49, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x12, 0x1f, 0x0a,
- 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x08, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1b,
- 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28,
- 0x08, 0x52, 0x08, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x62, 0x12, 0x1b, 0x0a, 0x09, 0x63,
- 0x61, 0x6e, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08,
- 0x63, 0x61, 0x6e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6c,
- 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72,
- 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x79,
- 0x70, 0x61, 0x73, 0x73, 0x5f, 0x72, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09,
- 0x62, 0x79, 0x70, 0x61, 0x73, 0x73, 0x52, 0x6c, 0x73, 0x22, 0xa8, 0x02, 0x0a, 0x0c, 0x49, 0x6e,
- 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
- 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b,
- 0x0a, 0x09, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x70,
- 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2,
- 0x41, 0x01, 0x04, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x88,
- 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
- 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, 0x52, 0x0f,
- 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x88,
- 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x75, 0x6e, 0x74, 0x69,
- 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64,
- 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x72,
- 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x74,
- 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
- 0x74, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42,
- 0x13, 0x0a, 0x11, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c,
- 0x69, 0x6d, 0x69, 0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x75,
- 0x6e, 0x74, 0x69, 0x6c, 0x32, 0xed, 0x06, 0x0a, 0x13, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
- 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7f, 0x0a, 0x07,
- 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71,
+ 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x9f, 0x02,
+ 0x0a, 0x0c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x12,
+ 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12,
+ 0x25, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x04, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77,
+ 0x6f, 0x72, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
+ 0x48, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69,
+ 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f,
+ 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x76,
+ 0x61, 0x6c, 0x69, 0x64, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09,
+ 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48,
+ 0x03, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x88, 0x01, 0x01, 0x42,
+ 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42, 0x13, 0x0a, 0x11,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69,
+ 0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x75, 0x6e, 0x74, 0x69,
+ 0x6c, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x32,
+ 0xed, 0x06, 0x0a, 0x13, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7f, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x52, 0x6f,
+ 0x6c, 0x65, 0x12, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e,
+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x3c, 0xda, 0x41, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74,
+ 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f,
+ 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8a, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73,
+ 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72,
+ 0x65, 0x6e, 0x74, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73,
+ 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f,
+ 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x22,
- 0x3c, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d,
- 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f,
- 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
- 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8a, 0x01,
- 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f,
- 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x79, 0x74,
- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c,
- 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0xda, 0x41, 0x06, 0x70,
- 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x31,
+ 0x49, 0xda, 0x41, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x72, 0x6f, 0x6c, 0x65, 0x82,
+ 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x3a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x2d, 0x2f, 0x76, 0x31,
0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e,
0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
- 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x43,
- 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65,
- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f,
+ 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x9c, 0x01, 0x0a, 0x0a, 0x55,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f,
0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65,
0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
- 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x49, 0xda, 0x41, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c,
- 0x72, 0x6f, 0x6c, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x3a, 0x04, 0x72, 0x6f, 0x6c, 0x65,
- 0x22, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x65, 0x6e,
- 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73,
- 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12,
- 0x9c, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1e,
- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73,
- 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x53, 0xda, 0x41, 0x10, 0x72, 0x6f,
- 0x6c, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x3a, 0x3a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x32, 0x32, 0x2f, 0x76, 0x31, 0x2f,
- 0x7b, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72,
+ 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x53, 0xda, 0x41, 0x10, 0x72, 0x6f, 0x6c, 0x65, 0x2c, 0x75, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x3a,
+ 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x32, 0x32, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x72, 0x6f, 0x6c, 0x65,
+ 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e,
+ 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a,
+ 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x0a, 0x44, 0x65,
+ 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
+ 0x22, 0x3c, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x2a,
+ 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72,
0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
- 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x82,
- 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1e, 0x2e,
- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65,
- 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
- 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
- 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3c, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x2f, 0x2a, 0x2d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,
- 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69,
- 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73,
- 0x2f, 0x2a, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x0c, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65,
- 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c,
- 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x3a, 0x01, 0x2a, 0x22, 0x36, 0x2f, 0x76,
- 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d,
- 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73,
- 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x6e, 0x64, 0x65,
- 0x6c, 0x65, 0x74, 0x65, 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,
+ 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8e,
+ 0x01, 0x0a, 0x0c, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12,
+ 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e,
+ 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x41, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x3b, 0x3a, 0x01, 0x2a, 0x22, 0x36, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61,
+ 0x6d, 0x65, 0x3d, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f,
+ 0x2a, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x6f,
+ 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 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 (
@@ -778,7 +662,7 @@ func file_v1_instance_role_service_proto_rawDescGZIP() []byte {
return file_v1_instance_role_service_proto_rawDescData
}
-var file_v1_instance_role_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
+var file_v1_instance_role_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_v1_instance_role_service_proto_goTypes = []interface{}{
(*GetRoleRequest)(nil), // 0: bytebase.v1.GetRoleRequest
(*ListRolesRequest)(nil), // 1: bytebase.v1.ListRolesRequest
@@ -787,34 +671,32 @@ var file_v1_instance_role_service_proto_goTypes = []interface{}{
(*UpdateRoleRequest)(nil), // 4: bytebase.v1.UpdateRoleRequest
(*DeleteRoleRequest)(nil), // 5: bytebase.v1.DeleteRoleRequest
(*UndeleteRoleRequest)(nil), // 6: bytebase.v1.UndeleteRoleRequest
- (*RoleAttribute)(nil), // 7: bytebase.v1.RoleAttribute
- (*InstanceRole)(nil), // 8: bytebase.v1.InstanceRole
- (*fieldmaskpb.FieldMask)(nil), // 9: google.protobuf.FieldMask
- (*emptypb.Empty)(nil), // 10: google.protobuf.Empty
+ (*InstanceRole)(nil), // 7: bytebase.v1.InstanceRole
+ (*fieldmaskpb.FieldMask)(nil), // 8: google.protobuf.FieldMask
+ (*emptypb.Empty)(nil), // 9: google.protobuf.Empty
}
var file_v1_instance_role_service_proto_depIdxs = []int32{
- 8, // 0: bytebase.v1.ListRolesResponse.roles:type_name -> bytebase.v1.InstanceRole
- 8, // 1: bytebase.v1.CreateRoleRequest.role:type_name -> bytebase.v1.InstanceRole
- 8, // 2: bytebase.v1.UpdateRoleRequest.role:type_name -> bytebase.v1.InstanceRole
- 9, // 3: bytebase.v1.UpdateRoleRequest.update_mask:type_name -> google.protobuf.FieldMask
- 7, // 4: bytebase.v1.InstanceRole.attribute:type_name -> bytebase.v1.RoleAttribute
- 0, // 5: bytebase.v1.InstanceRoleService.GetRole:input_type -> bytebase.v1.GetRoleRequest
- 1, // 6: bytebase.v1.InstanceRoleService.ListRoles:input_type -> bytebase.v1.ListRolesRequest
- 3, // 7: bytebase.v1.InstanceRoleService.CreateRole:input_type -> bytebase.v1.CreateRoleRequest
- 4, // 8: bytebase.v1.InstanceRoleService.UpdateRole:input_type -> bytebase.v1.UpdateRoleRequest
- 5, // 9: bytebase.v1.InstanceRoleService.DeleteRole:input_type -> bytebase.v1.DeleteRoleRequest
- 6, // 10: bytebase.v1.InstanceRoleService.UndeleteRole:input_type -> bytebase.v1.UndeleteRoleRequest
- 8, // 11: bytebase.v1.InstanceRoleService.GetRole:output_type -> bytebase.v1.InstanceRole
- 2, // 12: bytebase.v1.InstanceRoleService.ListRoles:output_type -> bytebase.v1.ListRolesResponse
- 8, // 13: bytebase.v1.InstanceRoleService.CreateRole:output_type -> bytebase.v1.InstanceRole
- 8, // 14: bytebase.v1.InstanceRoleService.UpdateRole:output_type -> bytebase.v1.InstanceRole
- 10, // 15: bytebase.v1.InstanceRoleService.DeleteRole:output_type -> google.protobuf.Empty
- 8, // 16: bytebase.v1.InstanceRoleService.UndeleteRole:output_type -> bytebase.v1.InstanceRole
- 11, // [11:17] is the sub-list for method output_type
- 5, // [5:11] 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
+ 7, // 0: bytebase.v1.ListRolesResponse.roles:type_name -> bytebase.v1.InstanceRole
+ 7, // 1: bytebase.v1.CreateRoleRequest.role:type_name -> bytebase.v1.InstanceRole
+ 7, // 2: bytebase.v1.UpdateRoleRequest.role:type_name -> bytebase.v1.InstanceRole
+ 8, // 3: bytebase.v1.UpdateRoleRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 0, // 4: bytebase.v1.InstanceRoleService.GetRole:input_type -> bytebase.v1.GetRoleRequest
+ 1, // 5: bytebase.v1.InstanceRoleService.ListRoles:input_type -> bytebase.v1.ListRolesRequest
+ 3, // 6: bytebase.v1.InstanceRoleService.CreateRole:input_type -> bytebase.v1.CreateRoleRequest
+ 4, // 7: bytebase.v1.InstanceRoleService.UpdateRole:input_type -> bytebase.v1.UpdateRoleRequest
+ 5, // 8: bytebase.v1.InstanceRoleService.DeleteRole:input_type -> bytebase.v1.DeleteRoleRequest
+ 6, // 9: bytebase.v1.InstanceRoleService.UndeleteRole:input_type -> bytebase.v1.UndeleteRoleRequest
+ 7, // 10: bytebase.v1.InstanceRoleService.GetRole:output_type -> bytebase.v1.InstanceRole
+ 2, // 11: bytebase.v1.InstanceRoleService.ListRoles:output_type -> bytebase.v1.ListRolesResponse
+ 7, // 12: bytebase.v1.InstanceRoleService.CreateRole:output_type -> bytebase.v1.InstanceRole
+ 7, // 13: bytebase.v1.InstanceRoleService.UpdateRole:output_type -> bytebase.v1.InstanceRole
+ 9, // 14: bytebase.v1.InstanceRoleService.DeleteRole:output_type -> google.protobuf.Empty
+ 7, // 15: bytebase.v1.InstanceRoleService.UndeleteRole:output_type -> bytebase.v1.InstanceRole
+ 10, // [10:16] is the sub-list for method output_type
+ 4, // [4:10] 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
}
func init() { file_v1_instance_role_service_proto_init() }
@@ -909,18 +791,6 @@ func file_v1_instance_role_service_proto_init() {
}
}
file_v1_instance_role_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RoleAttribute); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- file_v1_instance_role_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InstanceRole); i {
case 0:
return &v.state
@@ -933,14 +803,14 @@ func file_v1_instance_role_service_proto_init() {
}
}
}
- file_v1_instance_role_service_proto_msgTypes[8].OneofWrappers = []interface{}{}
+ file_v1_instance_role_service_proto_msgTypes[7].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_v1_instance_role_service_proto_rawDesc,
NumEnums: 0,
- NumMessages: 9,
+ NumMessages: 8,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/proto/v1/instance_role_service.proto b/proto/v1/instance_role_service.proto
index b978a5a6b3..fb97ba3c04 100644
--- a/proto/v1/instance_role_service.proto
+++ b/proto/v1/instance_role_service.proto
@@ -125,30 +125,6 @@ message UndeleteRoleRequest {
string name = 1 [(google.api.field_behavior) = REQUIRED];
}
-// RoleAttribute is the attribute for role. Docs: https://www.postgresql.org/docs/current/role-attributes.html
-message RoleAttribute {
- // A database superuser bypasses all permission checks, except the right to log in.
- bool super_user = 1;
-
- // A role is given permission to inherit the privileges of roles it is a member of. To create a role without the permission, use "noInherit = true"
- bool no_inherit = 2;
-
- // A role must be explicitly given permission to create more roles (except for superusers, since those bypass all permission checks).
- bool create_role = 3;
-
- // A role must be explicitly given permission to create databases (except for superusers, since those bypass all permission checks).
- bool create_db = 4;
-
- // Only roles that have the LOGIN attribute can be used as the initial role name for a database connection.
- bool can_login = 5;
-
- // A role must explicitly be given permission to initiate streaming replication (except for superusers, since those bypass all permission checks).
- bool replication = 6;
-
- // A role must be explicitly given permission to bypass every row-level security (RLS) policy (except for superusers, since those bypass all permission checks).
- bool bypass_rls = 7;
-}
-
// InstanceRole is the API message for instance role.
message InstanceRole {
// The name of the role.
@@ -169,5 +145,7 @@ message InstanceRole {
optional string valid_until = 5;
// The role attribute.
- RoleAttribute attribute = 6;
+ // For PostgreSQL, it containt super_user, no_inherit, create_role, create_db, can_login, replication and bypass_rls. Docs: https://www.postgresql.org/docs/current/role-attributes.html
+ // For MySQL, it's the global privileges as GRANT statements, which means it only contains "GRANT ... ON *.* TO ...". Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html
+ optional string attribute = 6;
}
\ No newline at end of file