Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
refactor: rename GRANT_REQUEST to ROLE_GRANT (#19608)
boojack93e06211c2f9
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex e8faef437a..6df49523fa 100644--- a/backend/api/mcp/gen/openapi.yaml+++ b/backend/api/mcp/gen/openapi.yaml@@ -10995,31 +10995,6 @@ components:Format: worksheets/{worksheet}title: GetWorksheetRequestadditionalProperties: false- bytebase.v1.GrantRequest:- type: object- properties:- role:- type: string- title: role- description: |-- The requested role.- Format: roles/EXPORTER.- user:- type: string- title: user- description: |-- The user to be granted.- Format: users/{email}.- condition:- title: condition- description: The condition for the role. Same as the condition in IAM Binding message.- $ref: '#/components/schemas/google.type.Expr'- expiration:- title: expiration- description: The duration for which the grant is valid.- $ref: '#/components/schemas/google.protobuf.Duration'- title: GrantRequest- additionalProperties: falsebytebase.v1.GridLevel:type: objectproperties:@@ -11537,10 +11512,10 @@ components:The plan associated with the issue.Can be empty.Format: projects/{project}/plans/{plan}- grantRequest:- title: grant_request- description: Used if the issue type is GRANT_REQUEST.- $ref: '#/components/schemas/bytebase.v1.GrantRequest'+ roleGrant:+ title: role_grant+ description: Used if the issue type is ROLE_GRANT.+ $ref: '#/components/schemas/bytebase.v1.RoleGrant'riskLevel:title: risk_leveldescription: The risk level of the issue.@@ -11602,7 +11577,7 @@ components:enum:- TYPE_UNSPECIFIED- DATABASE_CHANGE- - GRANT_REQUEST+ - ROLE_GRANT- DATABASE_EXPORT- ACCESS_GRANTdescription: The type of issue.@@ -15181,6 +15156,31 @@ components:- TYPE_UNSPECIFIED- BUILT_IN- CUSTOM+ bytebase.v1.RoleGrant:+ type: object+ properties:+ role:+ type: string+ title: role+ description: |-+ The requested role.+ Format: roles/EXPORTER.+ user:+ type: string+ title: user+ description: |-+ The user to be granted.+ Format: users/{email}.+ condition:+ title: condition+ description: The condition for the role. Same as the condition in IAM Binding message.+ $ref: '#/components/schemas/google.type.Expr'+ expiration:+ title: expiration+ description: The duration for which the grant is valid.+ $ref: '#/components/schemas/google.protobuf.Duration'+ title: RoleGrant+ additionalProperties: falsebytebase.v1.Rollout:type: objectproperties:diff --git a/backend/api/v1/issue_hook.go b/backend/api/v1/issue_hook.goindex f422b2475d..4722732680 100644--- a/backend/api/v1/issue_hook.go+++ b/backend/api/v1/issue_hook.go@@ -46,7 +46,7 @@ func postCreateIssue(switch issue.Type {casestorepb.Issue_ACCESS_GRANT,- storepb.Issue_GRANT_REQUEST,+ storepb.Issue_ROLE_GRANT,storepb.Issue_DATABASE_EXPORT:if err := approval.FindAndApplyApprovalTemplate(ctx, stores, webhookManager, licenseService, issue); err != nil {@@ -68,7 +68,7 @@ func postCreateIssue(return issue, nil}- // For ACCESS_GRANT/GRANT_REQUEST that is auto-approved (no approval template), complete it.+ // For ACCESS_GRANT/ROLE_GRANT that is auto-approved (no approval template), complete it.approved, err := utils.CheckApprovalApproved(issue.Payload.Approval)if err != nil {return nil, errors.Wrapf(err, "failed to check if approval is approved")@@ -78,7 +78,7 @@ func postCreateIssue(}issue, err = completeAccessRequestIssue(ctx, stores, creatorEmail, issue)if err != nil {- return nil, errors.Wrapf(err, "failed to complete grant request")+ return nil, errors.Wrapf(err, "failed to complete role grant")}case storepb.Issue_DATABASE_CHANGE:b.ApprovalCheckChan <- int64(issue.UID)@@ -88,8 +88,8 @@ func postCreateIssue(return issue, nil}-// completeAccessRequestIssue completes the ACCESS_GRANT/GRANT_REQUEST issue.-// For GRANT_REQUEST issue: grant the privilege and updating the status.+// completeAccessRequestIssue completes the ACCESS_GRANT/ROLE_GRANT issue.+// For ROLE_GRANT issue: grant the privilege and update the status.// For ACCESS_GRANT issue: mark the status as ACTIVE.func completeAccessRequestIssue(ctx context.Context, stores *store.Store, userEmail string, issue *store.IssueMessage) (*store.IssueMessage, error) {switch issue.Type {@@ -101,8 +101,8 @@ func completeAccessRequestIssue(ctx context.Context, stores *store.Store, userEmif _, err := activateAccessGrant(ctx, stores, accessGrantName, true /* refresh expire time */); err != nil {return nil, errors.Wrapf(err, "failed to activate access grant %v", accessGrantName)}- case storepb.Issue_GRANT_REQUEST:- if err := utils.UpdateProjectPolicyFromGrantIssue(ctx, stores, issue, issue.Payload.GrantRequest); err != nil {+ case storepb.Issue_ROLE_GRANT:+ if err := utils.UpdateProjectPolicyFromRoleGrantIssue(ctx, stores, issue, issue.Payload.RoleGrant); err != nil {return nil, err}default:diff --git a/backend/api/v1/issue_service.go b/backend/api/v1/issue_service.goindex 60ad9dfb3f..4b81e6e882 100644--- a/backend/api/v1/issue_service.go+++ b/backend/api/v1/issue_service.go@@ -417,59 +417,58 @@ func (s *IssueService) CreateIssue(ctx context.Context, req *connect.Request[v1pfunc (s *IssueService) buildIssueMessage(ctx context.Context, project *store.ProjectMessage, userEmail string, request *v1pb.CreateIssueRequest) (*store.IssueMessage, error) {var planUID *int64- var grantRequest *storepb.GrantRequest+ var roleGrant *storepb.RoleGrantvar title, description string// Type-specific validation and preparationswitch request.Issue.Type {- case v1pb.Issue_GRANT_REQUEST:- // Title is required for grant requests+ case v1pb.Issue_ROLE_GRANT:+ // Title is required for role grant requests.if request.Issue.Title == "" {return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("issue title is required"))}- // Check if grant request feature is enabled+ // Check if role grant workflow feature is enabled.if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_REQUEST_ROLE_WORKFLOW); err != nil {return nil, connect.NewError(connect.CodePermissionDenied,errors.Errorf("role request requires approval workflow feature (available in Enterprise plan)"))}- // Validate grant request fields- if request.Issue.GrantRequest.GetRole() == "" {- return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("expect grant request role"))+ // Validate role grant fields.+ if request.Issue.RoleGrant.GetRole() == "" {+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("expect role grant role"))}- if request.Issue.GrantRequest.GetUser() == "" {- return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("expect grant request user"))+ if request.Issue.RoleGrant.GetUser() == "" {+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("expect role grant user"))}- // Validate CEL expression if it's not empty- if expression := request.Issue.GrantRequest.GetCondition().GetExpression(); expression != "" {+ // Validate CEL expression if it's not empty.+ if expression := request.Issue.RoleGrant.GetCondition().GetExpression(); expression != "" {e, err := cel.NewEnv(common.IAMPolicyConditionCELAttributes...)if err != nil {return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to create cel environment"))}if _, issues := e.Compile(expression); issues != nil {- return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("found issues in grant request condition expression, issues: %v", issues.String()))+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("found issues in role grant condition expression, issues: %v", issues.String()))}}- // Convert grant request (inlined from convertGrantRequest)- grantRequestUserEmail, err := common.GetUserEmail(request.Issue.GrantRequest.User)+ roleGrantUserEmail, err := common.GetUserEmail(request.Issue.RoleGrant.User)if err != nil {- return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to get user email from %q", request.Issue.GrantRequest.User))+ return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to get user email from %q", request.Issue.RoleGrant.User))}- grantRequestUser, err := s.store.GetUserByEmail(ctx, grantRequestUserEmail)+ roleGrantUser, err := s.store.GetUserByEmail(ctx, roleGrantUserEmail)if err != nil {- return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to get user by email %q", grantRequestUserEmail))+ return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to get user by email %q", roleGrantUserEmail))}- if grantRequestUser == nil {- return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("user %q not found", request.Issue.GrantRequest.User))+ if roleGrantUser == nil {+ return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("user %q not found", request.Issue.RoleGrant.User))}- grantRequest = &storepb.GrantRequest{- Role: request.Issue.GrantRequest.Role,- User: common.FormatUserEmail(grantRequestUser.Email),- Condition: request.Issue.GrantRequest.Condition,- Expiration: request.Issue.GrantRequest.Expiration,+ roleGrant = &storepb.RoleGrant{+ Role: request.Issue.RoleGrant.Role,+ User: common.FormatUserEmail(roleGrantUser.Email),+ Condition: request.Issue.RoleGrant.Condition,+ Expiration: request.Issue.RoleGrant.Expiration,}title = request.Issue.Title@@ -524,7 +523,7 @@ func (s *IssueService) buildIssueMessage(ctx context.Context, project *store.ProType: issueType,Description: description,Payload: &storepb.Issue{- GrantRequest: grantRequest,+ RoleGrant: roleGrant,Approval: &storepb.IssuePayloadApproval{ApprovalFindingDone: false,ApprovalTemplate: nil,@@ -620,11 +619,11 @@ func (s *IssueService) ApproveIssue(ctx context.Context, req *connect.Request[v1approval.NotifyApprovalRequested(ctx, s.store, s.webhookManager, issue, project)- // If the issue is a grant request and approved, complete it+ // If the issue is a role grant request and approved, complete it.if approved {issue, err = completeAccessRequestIssue(ctx, s.store, user.Email, issue)if err != nil {- slog.Debug("failed to complete grant request issue", log.BBError(err))+ slog.Debug("failed to complete role grant issue", log.BBError(err))}}diff --git a/backend/api/v1/issue_service_converter.go b/backend/api/v1/issue_service_converter.goindex 5819cc4dee..30a9d9fec7 100644--- a/backend/api/v1/issue_service_converter.go+++ b/backend/api/v1/issue_service_converter.go@@ -82,19 +82,19 @@ func (s *IssueService) isIssueNextApprover(ctx context.Context, issue *v1pb.Issufunc (*IssueService) convertToIssue(issue *store.IssueMessage) (*v1pb.Issue, error) {issuePayload := issue.Payload- convertedGrantRequest := convertToGrantRequest(issuePayload.GrantRequest)+ convertedRoleGrant := convertToRoleGrant(issuePayload.RoleGrant)issueV1 := &v1pb.Issue{- Name: common.FormatIssue(issue.ProjectID, issue.UID),- Title: issue.Title,- Description: issue.Description,- Type: convertToIssueType(issue.Type),- Status: convertToIssueStatus(issue.Status),- Creator: common.FormatUserEmail(issue.CreatorEmail),- CreateTime: timestamppb.New(issue.CreatedAt),- UpdateTime: timestamppb.New(issue.UpdatedAt),- GrantRequest: convertedGrantRequest,- Labels: issuePayload.Labels,+ Name: common.FormatIssue(issue.ProjectID, issue.UID),+ Title: issue.Title,+ Description: issue.Description,+ Type: convertToIssueType(issue.Type),+ Status: convertToIssueStatus(issue.Status),+ Creator: common.FormatUserEmail(issue.CreatorEmail),+ CreateTime: timestamppb.New(issue.CreatedAt),+ UpdateTime: timestamppb.New(issue.UpdatedAt),+ RoleGrant: convertedRoleGrant,+ Labels: issuePayload.Labels,}if issuePayload.AccessGrantId != "" {@@ -177,8 +177,8 @@ func convertToIssueType(t storepb.Issue_Type) v1pb.Issue_Type {switch t {case storepb.Issue_DATABASE_CHANGE:return v1pb.Issue_DATABASE_CHANGE- case storepb.Issue_GRANT_REQUEST:- return v1pb.Issue_GRANT_REQUEST+ case storepb.Issue_ROLE_GRANT:+ return v1pb.Issue_ROLE_GRANTcase storepb.Issue_DATABASE_EXPORT:return v1pb.Issue_DATABASE_EXPORTcase storepb.Issue_ACCESS_GRANT:@@ -192,8 +192,8 @@ func convertToAPIIssueType(t v1pb.Issue_Type) (storepb.Issue_Type, error) {switch t {case v1pb.Issue_DATABASE_CHANGE:return storepb.Issue_DATABASE_CHANGE, nil- case v1pb.Issue_GRANT_REQUEST:- return storepb.Issue_GRANT_REQUEST, nil+ case v1pb.Issue_ROLE_GRANT:+ return storepb.Issue_ROLE_GRANT, nilcase v1pb.Issue_DATABASE_EXPORT:return storepb.Issue_DATABASE_EXPORT, nilcase v1pb.Issue_ACCESS_GRANT:@@ -271,11 +271,11 @@ func convertToApprovalFlow(flow *storepb.ApprovalFlow) *v1pb.ApprovalFlow {}}-func convertToGrantRequest(v *storepb.GrantRequest) *v1pb.GrantRequest {+func convertToRoleGrant(v *storepb.RoleGrant) *v1pb.RoleGrant {if v == nil {return nil}- return &v1pb.GrantRequest{+ return &v1pb.RoleGrant{Role: v.Role,User: v.User,Condition: v.Condition,diff --git a/backend/generated-go/store/issue.pb.go b/backend/generated-go/store/issue.pb.goindex 6904be9efd..75d90054d9 100644--- a/backend/generated-go/store/issue.pb.go+++ b/backend/generated-go/store/issue.pb.go@@ -30,8 +30,8 @@ const (Issue_ISSUE_TYPE_UNSPECIFIED Issue_Type = 0// Issue for database schema or data changes.Issue_DATABASE_CHANGE Issue_Type = 1- // Issue requesting database access permissions.- Issue_GRANT_REQUEST Issue_Type = 2+ // Role grant request.+ Issue_ROLE_GRANT Issue_Type = 2// Issue for exporting data from databases.Issue_DATABASE_EXPORT Issue_Type = 3// Temporary access grant request.@@ -43,14 +43,14 @@ var (Issue_Type_name = map[int32]string{0: "ISSUE_TYPE_UNSPECIFIED",1: "DATABASE_CHANGE",- 2: "GRANT_REQUEST",+ 2: "ROLE_GRANT",3: "DATABASE_EXPORT",4: "ACCESS_GRANT",}Issue_Type_value = map[string]int32{"ISSUE_TYPE_UNSPECIFIED": 0,"DATABASE_CHANGE": 1,- "GRANT_REQUEST": 2,+ "ROLE_GRANT": 2,"DATABASE_EXPORT": 3,"ACCESS_GRANT": 4,}@@ -144,8 +144,8 @@ type Issue struct {state protoimpl.MessageState `protogen:"open.v1"`// Approval information for the issue workflow.Approval *IssuePayloadApproval `protobuf:"bytes,1,opt,name=approval,proto3" json:"approval,omitempty"`- // Access grant request details if this is a grant request issue.- GrantRequest *GrantRequest `protobuf:"bytes,2,opt,name=grant_request,json=grantRequest,proto3" json:"grant_request,omitempty"`+ // Role grant details if this is a role grant issue.+ RoleGrant *RoleGrant `protobuf:"bytes,2,opt,name=role_grant,json=roleGrant,proto3" json:"role_grant,omitempty"`// Labels attached to categorize and filter the issue.Labels []string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty"`// Risk level for the issue, calculated from statement types.@@ -193,9 +193,9 @@ func (x *Issue) GetApproval() *IssuePayloadApproval {return nil}-func (x *Issue) GetGrantRequest() *GrantRequest {+func (x *Issue) GetRoleGrant() *RoleGrant {if x != nil {- return x.GrantRequest+ return x.RoleGrant}return nil}@@ -221,8 +221,8 @@ func (x *Issue) GetAccessGrantId() string {return ""}-// GrantRequest contains details for requesting database access permissions.-type GrantRequest struct {+// RoleGrant contains details for requesting a project role.+type RoleGrant struct {state protoimpl.MessageState `protogen:"open.v1"`// The role being requested for the user.// Format: roles/EXPORTER.@@ -238,20 +238,20 @@ type GrantRequest struct {sizeCache protoimpl.SizeCache}-func (x *GrantRequest) Reset() {- *x = GrantRequest{}+func (x *RoleGrant) Reset() {+ *x = RoleGrant{}mi := &file_store_issue_proto_msgTypes[1]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}-func (x *GrantRequest) String() string {+func (x *RoleGrant) String() string {return protoimpl.X.MessageStringOf(x)}-func (*GrantRequest) ProtoMessage() {}+func (*RoleGrant) ProtoMessage() {}-func (x *GrantRequest) ProtoReflect() protoreflect.Message {+func (x *RoleGrant) ProtoReflect() protoreflect.Message {mi := &file_store_issue_proto_msgTypes[1]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))@@ -263,33 +263,33 @@ func (x *GrantRequest) ProtoReflect() protoreflect.Message {return mi.MessageOf(x)}-// Deprecated: Use GrantRequest.ProtoReflect.Descriptor instead.-func (*GrantRequest) Descriptor() ([]byte, []int) {+// Deprecated: Use RoleGrant.ProtoReflect.Descriptor instead.+func (*RoleGrant) Descriptor() ([]byte, []int) {return file_store_issue_proto_rawDescGZIP(), []int{1}}-func (x *GrantRequest) GetRole() string {+func (x *RoleGrant) GetRole() string {if x != nil {return x.Role}return ""}-func (x *GrantRequest) GetUser() string {+func (x *RoleGrant) GetUser() string {if x != nil {return x.User}return ""}-func (x *GrantRequest) GetCondition() *expr.Expr {+func (x *RoleGrant) GetCondition() *expr.Expr {if x != nil {return x.Condition}return nil}-func (x *GrantRequest) GetExpiration() *durationpb.Duration {+func (x *RoleGrant) GetExpiration() *durationpb.Duration {if x != nil {return x.Expiration}@@ -300,26 +300,28 @@ var File_store_issue_proto protoreflect.FileDescriptorconst file_store_issue_proto_rawDesc = "" +"\n" +- "\x11store/issue.proto\x12\x0ebytebase.store\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/expr.proto\x1a\x14store/approval.proto\x1a\x12store/common.proto\"\xc3\x03\n" ++ "\x11store/issue.proto\x12\x0ebytebase.store\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/expr.proto\x1a\x14store/approval.proto\x1a\x12store/common.proto\"\xb7\x03\n" +"\x05Issue\x12@\n" +- "\bapproval\x18\x01 \x01(\v2$.bytebase.store.IssuePayloadApprovalR\bapproval\x12A\n" +- "\rgrant_request\x18\x02 \x01(\v2\x1c.bytebase.store.GrantRequestR\fgrantRequest\x12\x16\n" ++ "\bapproval\x18\x01 \x01(\v2$.bytebase.store.IssuePayloadApprovalR\bapproval\x128\n" ++ "\n" ++ "role_grant\x18\x02 \x01(\v2\x19.bytebase.store.RoleGrantR\troleGrant\x12\x16\n" +"\x06labels\x18\x03 \x03(\tR\x06labels\x128\n" +"\n" +"risk_level\x18\x04 \x01(\x0e2\x19.bytebase.store.RiskLevelR\triskLevel\x12&\n" +- "\x0faccess_grant_id\x18\x05 \x01(\tR\raccessGrantId\"q\n" ++ "\x0faccess_grant_id\x18\x05 \x01(\tR\raccessGrantId\"n\n" +"\x04Type\x12\x1a\n" +"\x16ISSUE_TYPE_UNSPECIFIED\x10\x00\x12\x13\n" +- "\x0fDATABASE_CHANGE\x10\x01\x12\x11\n" +- "\rGRANT_REQUEST\x10\x02\x12\x13\n" ++ "\x0fDATABASE_CHANGE\x10\x01\x12\x0e\n" ++ "\n" ++ "ROLE_GRANT\x10\x02\x12\x13\n" +"\x0fDATABASE_EXPORT\x10\x03\x12\x10\n" +"\fACCESS_GRANT\x10\x04\"H\n" +"\x06Status\x12\x1c\n" +"\x18ISSUE_STATUS_UNSPECIFIED\x10\x00\x12\b\n" +"\x04OPEN\x10\x01\x12\b\n" +"\x04DONE\x10\x02\x12\f\n" +- "\bCANCELED\x10\x03\"\xa2\x01\n" +- "\fGrantRequest\x12\x12\n" ++ "\bCANCELED\x10\x03\"\x9f\x01\n" ++ "\tRoleGrant\x12\x12\n" +"\x04role\x18\x01 \x01(\tR\x04role\x12\x12\n" +"\x04user\x18\x02 \x01(\tR\x04user\x12/\n" +"\tcondition\x18\x03 \x01(\v2\x11.google.type.ExprR\tcondition\x129\n" +@@ -347,7 +349,7 @@ var file_store_issue_proto_goTypes = []any{(Issue_Type)(0), // 0: bytebase.store.Issue.Type(Issue_Status)(0), // 1: bytebase.store.Issue.Status(*Issue)(nil), // 2: bytebase.store.Issue- (*GrantRequest)(nil), // 3: bytebase.store.GrantRequest+ (*RoleGrant)(nil), // 3: bytebase.store.RoleGrant(*IssuePayloadApproval)(nil), // 4: bytebase.store.IssuePayloadApproval(RiskLevel)(0), // 5: bytebase.store.RiskLevel(*expr.Expr)(nil), // 6: google.type.Expr@@ -355,10 +357,10 @@ var file_store_issue_proto_goTypes = []any{}var file_store_issue_proto_depIdxs = []int32{4, // 0: bytebase.store.Issue.approval:type_name -> bytebase.store.IssuePayloadApproval- 3, // 1: bytebase.store.Issue.grant_request:type_name -> bytebase.store.GrantRequest+ 3, // 1: bytebase.store.Issue.role_grant:type_name -> bytebase.store.RoleGrant5, // 2: bytebase.store.Issue.risk_level:type_name -> bytebase.store.RiskLevel- 6, // 3: bytebase.store.GrantRequest.condition:type_name -> google.type.Expr- 7, // 4: bytebase.store.GrantRequest.expiration:type_name -> google.protobuf.Duration+ 6, // 3: bytebase.store.RoleGrant.condition:type_name -> google.type.Expr+ 7, // 4: bytebase.store.RoleGrant.expiration:type_name -> google.protobuf.Duration5, // [5:5] is the sub-list for method output_type5, // [5:5] is the sub-list for method input_type5, // [5:5] is the sub-list for extension type_namediff --git a/backend/generated-go/store/issue_equal.pb.go b/backend/generated-go/store/issue_equal.pb.goindex f9ee30e873..daedd6fc8a 100644--- a/backend/generated-go/store/issue_equal.pb.go+++ b/backend/generated-go/store/issue_equal.pb.go@@ -18,7 +18,7 @@ func (x *Issue) Equal(y *Issue) bool {if !x.Approval.Equal(y.Approval) {return false}- if !x.GrantRequest.Equal(y.GrantRequest) {+ if !x.RoleGrant.Equal(y.RoleGrant) {return false}if len(x.Labels) != len(y.Labels) {@@ -38,7 +38,7 @@ func (x *Issue) Equal(y *Issue) bool {return true}-func (x *GrantRequest) Equal(y *GrantRequest) bool {+func (x *RoleGrant) Equal(y *RoleGrant) bool {if x == y {return true}diff --git a/backend/generated-go/v1/issue_service.pb.go b/backend/generated-go/v1/issue_service.pb.goindex fed6ec4f47..8fbb7d1d9d 100644--- a/backend/generated-go/v1/issue_service.pb.go+++ b/backend/generated-go/v1/issue_service.pb.go@@ -92,8 +92,8 @@ const (Issue_TYPE_UNSPECIFIED Issue_Type = 0// Database schema or data change.Issue_DATABASE_CHANGE Issue_Type = 1- // Database access grant request.- Issue_GRANT_REQUEST Issue_Type = 2+ // Role grant request.+ Issue_ROLE_GRANT Issue_Type = 2// Database data export request.Issue_DATABASE_EXPORT Issue_Type = 3// Temporary access grant request.@@ -105,14 +105,14 @@ var (Issue_Type_name = map[int32]string{0: "TYPE_UNSPECIFIED",1: "DATABASE_CHANGE",- 2: "GRANT_REQUEST",+ 2: "ROLE_GRANT",3: "DATABASE_EXPORT",4: "ACCESS_GRANT",}Issue_Type_value = map[string]int32{"TYPE_UNSPECIFIED": 0,"DATABASE_CHANGE": 1,- "GRANT_REQUEST": 2,+ "ROLE_GRANT": 2,"DATABASE_EXPORT": 3,"ACCESS_GRANT": 4,}@@ -1141,8 +1141,8 @@ type Issue struct {// Can be empty.// Format: projects/{project}/plans/{plan}Plan string `protobuf:"bytes,11,opt,name=plan,proto3" json:"plan,omitempty"`- // Used if the issue type is GRANT_REQUEST.- GrantRequest *GrantRequest `protobuf:"bytes,13,opt,name=grant_request,json=grantRequest,proto3" json:"grant_request,omitempty"`+ // Used if the issue type is ROLE_GRANT.+ RoleGrant *RoleGrant `protobuf:"bytes,13,opt,name=role_grant,json=roleGrant,proto3" json:"role_grant,omitempty"`// The risk level of the issue.RiskLevel RiskLevel `protobuf:"varint,15,opt,name=risk_level,json=riskLevel,proto3,enum=bytebase.v1.RiskLevel" json:"risk_level,omitempty"`// Labels attached to the issue for categorization and filtering.@@ -1262,9 +1262,9 @@ func (x *Issue) GetPlan() string {return ""}-func (x *Issue) GetGrantRequest() *GrantRequest {+func (x *Issue) GetRoleGrant() *RoleGrant {if x != nil {- return x.GrantRequest+ return x.RoleGrant}return nil}@@ -1297,7 +1297,7 @@ func (x *Issue) GetAccessGrant() string {return ""}-type GrantRequest struct {+type RoleGrant struct {state protoimpl.MessageState `protogen:"open.v1"`// The requested role.// Format: roles/EXPORTER.@@ -1313,20 +1313,20 @@ type GrantRequest struct {sizeCache protoimpl.SizeCache}-func (x *GrantRequest) Reset() {- *x = GrantRequest{}+func (x *RoleGrant) Reset() {+ *x = RoleGrant{}mi := &file_v1_issue_service_proto_msgTypes[13]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}-func (x *GrantRequest) String() string {+func (x *RoleGrant) String() string {return protoimpl.X.MessageStringOf(x)}-func (*GrantRequest) ProtoMessage() {}+func (*RoleGrant) ProtoMessage() {}-func (x *GrantRequest) ProtoReflect() protoreflect.Message {+func (x *RoleGrant) ProtoReflect() protoreflect.Message {mi := &file_v1_issue_service_proto_msgTypes[13]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))@@ -1338,33 +1338,33 @@ func (x *GrantRequest) ProtoReflect() protoreflect.Message {return mi.MessageOf(x)}-// Deprecated: Use GrantRequest.ProtoReflect.Descriptor instead.-func (*GrantRequest) Descriptor() ([]byte, []int) {+// Deprecated: Use RoleGrant.ProtoReflect.Descriptor instead.+func (*RoleGrant) Descriptor() ([]byte, []int) {return file_v1_issue_service_proto_rawDescGZIP(), []int{13}}-func (x *GrantRequest) GetRole() string {+func (x *RoleGrant) GetRole() string {if x != nil {return x.Role}return ""}-func (x *GrantRequest) GetUser() string {+func (x *RoleGrant) GetUser() string {if x != nil {return x.User}return ""}-func (x *GrantRequest) GetCondition() *expr.Expr {+func (x *RoleGrant) GetCondition() *expr.Expr {if x != nil {return x.Condition}return nil}-func (x *GrantRequest) GetExpiration() *durationpb.Duration {+func (x *RoleGrant) GetExpiration() *durationpb.Duration {if x != nil {return x.Expiration}@@ -2218,7 +2218,7 @@ const file_v1_issue_service_proto_rawDesc = "" +"\x13RequestIssueRequest\x12.\n" +"\x04name\x18\x01 \x01(\tB\x1a\xe0A\x02\xfaA\x14\n" +"\x12bytebase.com/IssueR\x04name\x12\x18\n" +- "\acomment\x18\x02 \x01(\tR\acomment\"\xfb\t\n" ++ "\acomment\x18\x02 \x01(\tR\acomment\"\xef\t\n" +"\x05Issue\x12\x12\n" +"\x04name\x18\x01 \x01(\tR\x04name\x12\x1e\n" +"\x05title\x18\x02 \x01(\tB\b\xbaH\x05r\x03\x18\xc8\x01R\x05title\x12*\n" +@@ -2233,8 +2233,9 @@ const file_v1_issue_service_proto_rawDesc = "" +"\vupdate_time\x18\n" +" \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +"updateTime\x12\x12\n" +- "\x04plan\x18\v \x01(\tR\x04plan\x12>\n" +- "\rgrant_request\x18\r \x01(\v2\x19.bytebase.v1.GrantRequestR\fgrantRequest\x125\n" ++ "\x04plan\x18\v \x01(\tR\x04plan\x125\n" ++ "\n" ++ "role_grant\x18\r \x01(\v2\x16.bytebase.v1.RoleGrantR\troleGrant\x125\n" +"\n" +"risk_level\x18\x0f \x01(\x0e2\x16.bytebase.v1.RiskLevelR\triskLevel\x12\x16\n" +"\x06labels\x18\x11 \x03(\tR\x06labels\x12O\n" +@@ -2248,11 +2249,12 @@ const file_v1_issue_service_proto_rawDesc = "" +"\x12STATUS_UNSPECIFIED\x10\x00\x12\v\n" +"\aPENDING\x10\x01\x12\f\n" +"\bAPPROVED\x10\x02\x12\f\n" +- "\bREJECTED\x10\x03\"k\n" ++ "\bREJECTED\x10\x03\"h\n" +"\x04Type\x12\x14\n" +"\x10TYPE_UNSPECIFIED\x10\x00\x12\x13\n" +- "\x0fDATABASE_CHANGE\x10\x01\x12\x11\n" +- "\rGRANT_REQUEST\x10\x02\x12\x13\n" ++ "\x0fDATABASE_CHANGE\x10\x01\x12\x0e\n" ++ "\n" ++ "ROLE_GRANT\x10\x02\x12\x13\n" +"\x0fDATABASE_EXPORT\x10\x03\x12\x10\n" +"\fACCESS_GRANT\x10\x04\"u\n" +"\x0eApprovalStatus\x12\x1f\n" +@@ -2262,8 +2264,8 @@ const file_v1_issue_service_proto_rawDesc = "" +"\bAPPROVED\x10\x03\x12\f\n" +"\bREJECTED\x10\x04\x12\v\n" +"\aSKIPPED\x10\x05::\xeaA7\n" +- "\x12bytebase.com/Issue\x12!projects/{project}/issues/{issue}\"\xa2\x01\n" +- "\fGrantRequest\x12\x12\n" ++ "\x12bytebase.com/Issue\x12!projects/{project}/issues/{issue}\"\x9f\x01\n" ++ "\tRoleGrant\x12\x12\n" +"\x04role\x18\x01 \x01(\tR\x04role\x12\x12\n" +"\x04user\x18\x02 \x01(\tR\x04user\x12/\n" +"\tcondition\x18\x03 \x01(\v2\x11.google.type.ExprR\tcondition\x129\n" +@@ -2396,7 +2398,7 @@ var file_v1_issue_service_proto_goTypes = []any{(*RejectIssueRequest)(nil), // 15: bytebase.v1.RejectIssueRequest(*RequestIssueRequest)(nil), // 16: bytebase.v1.RequestIssueRequest(*Issue)(nil), // 17: bytebase.v1.Issue- (*GrantRequest)(nil), // 18: bytebase.v1.GrantRequest+ (*RoleGrant)(nil), // 18: bytebase.v1.RoleGrant(*ApprovalTemplate)(nil), // 19: bytebase.v1.ApprovalTemplate(*ApprovalFlow)(nil), // 20: bytebase.v1.ApprovalFlow(*ListIssueCommentsRequest)(nil), // 21: bytebase.v1.ListIssueCommentsRequest@@ -2427,11 +2429,11 @@ var file_v1_issue_service_proto_depIdxs = []int32{19, // 9: bytebase.v1.Issue.approval_template:type_name -> bytebase.v1.ApprovalTemplate31, // 10: bytebase.v1.Issue.create_time:type_name -> google.protobuf.Timestamp31, // 11: bytebase.v1.Issue.update_time:type_name -> google.protobuf.Timestamp- 18, // 12: bytebase.v1.Issue.grant_request:type_name -> bytebase.v1.GrantRequest+ 18, // 12: bytebase.v1.Issue.role_grant:type_name -> bytebase.v1.RoleGrant32, // 13: bytebase.v1.Issue.risk_level:type_name -> bytebase.v1.RiskLevel2, // 14: bytebase.v1.Issue.approval_status:type_name -> bytebase.v1.Issue.ApprovalStatus- 33, // 15: bytebase.v1.GrantRequest.condition:type_name -> google.type.Expr- 34, // 16: bytebase.v1.GrantRequest.expiration:type_name -> google.protobuf.Duration+ 33, // 15: bytebase.v1.RoleGrant.condition:type_name -> google.type.Expr+ 34, // 16: bytebase.v1.RoleGrant.expiration:type_name -> google.protobuf.Duration20, // 17: bytebase.v1.ApprovalTemplate.flow:type_name -> bytebase.v1.ApprovalFlow25, // 18: bytebase.v1.ListIssueCommentsResponse.issue_comments:type_name -> bytebase.v1.IssueComment25, // 19: bytebase.v1.CreateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueCommentdiff --git a/backend/generated-go/v1/issue_service_equal.pb.go b/backend/generated-go/v1/issue_service_equal.pb.goindex b469f5ae0e..4e3fa4f039 100644--- a/backend/generated-go/v1/issue_service_equal.pb.go+++ b/backend/generated-go/v1/issue_service_equal.pb.go@@ -308,7 +308,7 @@ func (x *Issue) Equal(y *Issue) bool {if x.Plan != y.Plan {return false}- if !x.GrantRequest.Equal(y.GrantRequest) {+ if !x.RoleGrant.Equal(y.RoleGrant) {return false}if x.RiskLevel != y.RiskLevel {@@ -331,7 +331,7 @@ func (x *Issue) Equal(y *Issue) bool {return true}-func (x *GrantRequest) Equal(y *GrantRequest) bool {+func (x *RoleGrant) Equal(y *RoleGrant) bool {if x == y {return true}diff --git a/backend/migrator/migration/3.17/0000##rename_grant_request_to_role_grant.sql b/backend/migrator/migration/3.17/0000##rename_grant_request_to_role_grant.sqlnew file mode 100644index 0000000000..6198876fe0--- /dev/null+++ b/backend/migrator/migration/3.17/0000##rename_grant_request_to_role_grant.sql@@ -0,0 +1,7 @@+UPDATE issue+SET type = 'ROLE_GRANT'+WHERE type = 'GRANT_REQUEST';++UPDATE issue+SET payload = (payload - 'grantRequest') || jsonb_build_object('roleGrant', payload->'grantRequest')+WHERE payload ? 'grantRequest';diff --git a/backend/migrator/migration/LATEST.sql b/backend/migrator/migration/LATEST.sqlindex a1369be971..a18c630801 100644--- a/backend/migrator/migration/LATEST.sql+++ b/backend/migrator/migration/LATEST.sql@@ -307,7 +307,7 @@ CREATE TABLE issue (plan_id bigint,name text NOT NULL,status text NOT NULL CHECK (status IN ('OPEN', 'DONE', 'CANCELED')),- -- type: DATABASE_CHANGE, GRANT_REQUEST, DATABASE_EXPORT+ -- type: DATABASE_CHANGE, ROLE_GRANT, DATABASE_EXPORT, ACCESS_GRANT-- Enum: Issue.Type (proto/store/store/issue.proto)type text NOT NULL,description text NOT NULL DEFAULT '',diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.goindex 053e240fd9..4d4dcca846 100644--- a/backend/migrator/migrator_test.go+++ b/backend/migrator/migrator_test.go@@ -15,8 +15,8 @@ import (func TestLatestVersion(t *testing.T) {files, err := getSortedVersionedFiles()require.NoError(t, err)- require.Equal(t, semver.MustParse("3.16.5"), *files[len(files)-1].version)- require.Equal(t, "migration/3.16/0005##add_project_to_plan_chain.sql", files[len(files)-1].path)+ require.Equal(t, semver.MustParse("3.17.0"), *files[len(files)-1].version)+ require.Equal(t, "migration/3.17/0000##rename_grant_request_to_role_grant.sql", files[len(files)-1].path)}func TestVersionUnique(t *testing.T) {diff --git a/backend/runner/approval/runner.go b/backend/runner/approval/runner.goindex 705d6f1976..d5609d5abc 100644--- a/backend/runner/approval/runner.go+++ b/backend/runner/approval/runner.go@@ -370,8 +370,8 @@ func buildFallbackCELVars(celVarsList []map[string]any) []map[string]any {// done=false means the caller should retry later (e.g., waiting for plan check runs).func buildCELVariablesForIssue(ctx context.Context, stores *store.Store, issue *store.IssueMessage) ([]map[string]any, bool, error) {switch issue.Type {- case storepb.Issue_GRANT_REQUEST:- return buildCELVariablesForGrantRequest(ctx, stores, issue)+ case storepb.Issue_ROLE_GRANT:+ return buildCELVariablesForRoleGrant(ctx, stores, issue)case storepb.Issue_DATABASE_CHANGE:return buildCELVariablesForDatabaseChange(ctx, stores, issue)case storepb.Issue_DATABASE_EXPORT:@@ -668,28 +668,28 @@ func buildCELVariablesForDataExport(ctx context.Context, stores *store.Store, isreturn celVarsList, true, nil}-// buildCELVariablesForGrantRequest builds CEL variables for GRANT_REQUEST issues.-func buildCELVariablesForGrantRequest(ctx context.Context, stores *store.Store, issue *store.IssueMessage) ([]map[string]any, bool, error) {+// buildCELVariablesForRoleGrant builds CEL variables for ROLE_GRANT issues.+func buildCELVariablesForRoleGrant(ctx context.Context, stores *store.Store, issue *store.IssueMessage) ([]map[string]any, bool, error) {payload := issue.Payload- if payload.GrantRequest == nil {- return nil, false, errors.New("grant request payload not found")+ if payload.RoleGrant == nil {+ return nil, false, errors.New("role grant payload not found")}- factors, err := common.GetQueryExportFactors(payload.GetGrantRequest().GetCondition().GetExpression())+ factors, err := common.GetQueryExportFactors(payload.GetRoleGrant().GetCondition().GetExpression())if err != nil {return nil, false, errors.Wrap(err, "failed to get query export factors")}// Default to max int if expiration is not set (no expiration)expirationDays := int64(math.MaxInt32)- if payload.GrantRequest.Expiration != nil {- expirationDays = int64(payload.GrantRequest.Expiration.AsDuration().Hours() / 24)+ if payload.RoleGrant.Expiration != nil {+ expirationDays = int64(payload.RoleGrant.Expiration.AsDuration().Hours() / 24)}baseVars := map[string]any{common.CELAttributeResourceProjectID: issue.ProjectID,common.CELAttributeRequestExpirationDays: expirationDays,- common.CELAttributeRequestRole: payload.GrantRequest.Role,+ common.CELAttributeRequestRole: payload.RoleGrant.Role,}// If no specific databases, create one entry per environment@@ -711,9 +711,9 @@ func buildCELVariablesForGrantRequest(ctx context.Context, stores *store.Store,}// Build one entry per database- databases, err := getDatabasesForGrantRequest(ctx, stores, issue.ProjectID, factors.Databases)+ databases, err := getDatabasesForRoleGrant(ctx, stores, issue.ProjectID, factors.Databases)if err != nil {- return nil, false, errors.Wrap(err, "failed to retrieve databases for grant request")+ return nil, false, errors.Wrap(err, "failed to retrieve databases for role grant")}var celVarsList []map[string]any@@ -795,10 +795,10 @@ func buildCELVariablesForAccessGrant(ctx context.Context, stores *store.Store, ireturn celVarsList, true, nil}-// getDatabasesForGrantRequest fetches database messages for the given database identifiers.-// Used exclusively by grant request approval flow to retrieve database information.+// getDatabasesForRoleGrant fetches database messages for the given database identifiers.+// Used exclusively by role grant approval flow to retrieve database information.// Returns a deduplicated list of databases.-func getDatabasesForGrantRequest(ctx context.Context, stores *store.Store, projectID string, databaseIdentifiers []string) ([]*store.DatabaseMessage, error) {+func getDatabasesForRoleGrant(ctx context.Context, stores *store.Store, projectID string, databaseIdentifiers []string) ([]*store.DatabaseMessage, error) {// Parse and deduplicate database identifierstype dbKey struct {instanceID string@@ -850,7 +850,7 @@ func getApprovalSourceFromPlan(config *storepb.PlanConfig) storepb.WorkspaceAppr// getApprovalSourceFromIssue determines the approval rule source enum from the issue type.func getApprovalSourceFromIssue(ctx context.Context, stores *store.Store, issue *store.IssueMessage) (storepb.WorkspaceApprovalSetting_Rule_Source, error) {switch issue.Type {- case storepb.Issue_GRANT_REQUEST:+ case storepb.Issue_ROLE_GRANT:return storepb.WorkspaceApprovalSetting_Rule_REQUEST_ROLE, nilcase storepb.Issue_DATABASE_CHANGE:if issue.PlanUID == nil {diff --git a/backend/store/principal.go b/backend/store/principal.goindex 33a2a6939c..042ae43b12 100644--- a/backend/store/principal.go+++ b/backend/store/principal.go@@ -487,24 +487,24 @@ func (s *Store) UpdateUserEmail(ctx context.Context, user *UserMessage, newEmail}}- // 2. Update GrantRequest in Issue payload- // The user in GrantRequest is stored as "users/{email}" within the JSON payload.+ // 2. Update RoleGrant in issue payload.+ // The user in RoleGrant is stored as "users/{email}" within the JSON payload.// We use text replacement for the specific path.oldUserRef := common.FormatUserEmail(user.Email)newUserRef := common.FormatUserEmail(newEmail)- // 'grantRequest' is the json key for grant_request field in Issue proto+ // 'roleGrant' is the json key for role_grant field in Issue proto.query = qb.Q().Space(`UPDATE issue- SET payload = jsonb_set(payload, '{grantRequest,user}', to_jsonb(?::text))- WHERE payload->'grantRequest'->>'user' = ?`,+ SET payload = jsonb_set(payload, '{roleGrant,user}', to_jsonb(?::text))+ WHERE payload->'roleGrant'->>'user' = ?`,newUserRef, oldUserRef)sqlStr, args, err = query.ToSQL()if err != nil {- return nil, errors.Wrapf(err, "failed to build update grant request sql")+ return nil, errors.Wrapf(err, "failed to build update role grant sql")}if _, err := tx.ExecContext(ctx, sqlStr, args...); err != nil {- return nil, errors.Wrapf(err, "failed to update issue grant request")+ return nil, errors.Wrapf(err, "failed to update issue role grant")}// 2b. Update Approval approvers in Issue payloaddiff --git a/backend/tests/user_test.go b/backend/tests/user_test.goindex ba124f9a57..927f0a886c 100644--- a/backend/tests/user_test.go+++ b/backend/tests/user_test.go@@ -249,14 +249,14 @@ func TestUpdateUserEmail(t *testing.T) {ctl.authInterceptor.token = loginResp.Msg.Token// Create Issue- // Use GRANT_REQUEST to avoid plan requirement and also test payload update.+ // Use ROLE_GRANT to avoid plan requirement and also test payload update.grantUser := common.FormatUserEmail(originalEmail)issueResp, err := ctl.issueServiceClient.CreateIssue(userCtx, connect.NewRequest(&v1pb.CreateIssueRequest{Parent: "projects/" + projectID,Issue: &v1pb.Issue{Title: "Test Grant Request",- Type: v1pb.Issue_GRANT_REQUEST,- GrantRequest: &v1pb.GrantRequest{+ Type: v1pb.Issue_ROLE_GRANT,+ RoleGrant: &v1pb.RoleGrant{Role: "roles/projectDeveloper",User: grantUser,},@@ -302,8 +302,8 @@ func TestUpdateUserEmail(t *testing.T) {a.NoError(err)// Creator is a string "users/{email}"a.Equal(common.FormatUserEmail(newEmail), updatedIssueResp.Msg.Creator, "Issue creator should be updated")- // Verify GrantRequest User in Payload- a.Equal(common.FormatUserEmail(newEmail), updatedIssueResp.Msg.GrantRequest.User, "GrantRequest user should be updated")+ // Verify RoleGrant user in payload.+ a.Equal(common.FormatUserEmail(newEmail), updatedIssueResp.Msg.RoleGrant.User, "RoleGrant user should be updated")// Verify Issue Comment CreatorcommentsResp, err := ctl.issueServiceClient.ListIssueComments(ctx, connect.NewRequest(&v1pb.ListIssueCommentsRequest{diff --git a/backend/utils/utils.go b/backend/utils/utils.goindex 0c3b37e3bd..62ee90170b 100644--- a/backend/utils/utils.go+++ b/backend/utils/utils.go@@ -77,20 +77,20 @@ func CheckIssueApproved(issue *store.IssueMessage) (bool, error) {return CheckApprovalApproved(issue.Payload.Approval)}-// UpdateProjectPolicyFromGrantIssue updates the project policy from grant issue.-func UpdateProjectPolicyFromGrantIssue(ctx context.Context, stores *store.Store, issue *store.IssueMessage, grantRequest *storepb.GrantRequest) error {+// UpdateProjectPolicyFromRoleGrantIssue updates the project policy from a role grant issue.+func UpdateProjectPolicyFromRoleGrantIssue(ctx context.Context, stores *store.Store, issue *store.IssueMessage, roleGrant *storepb.RoleGrant) error {policyMessage, err := stores.GetProjectIamPolicy(ctx, issue.ProjectID)if err != nil {return errors.Wrapf(err, "failed to get project policy for project %s", issue.ProjectID)}var newConditionExpr string- if grantRequest.Condition != nil {- newConditionExpr = grantRequest.Condition.Expression+ if roleGrant.Condition != nil {+ newConditionExpr = roleGrant.Condition.Expression}updated := false- email, err := extractEmailFromUserIdentifier(grantRequest.User)+ email, err := extractEmailFromUserIdentifier(roleGrant.User)if err != nil {return err}@@ -103,7 +103,7 @@ func UpdateProjectPolicyFromGrantIssue(ctx context.Context, stores *store.Store,}memberName := formatMemberNameByType(newUser)for _, binding := range policyMessage.Policy.Bindings {- if binding.Role != grantRequest.Role {+ if binding.Role != roleGrant.Role {continue}var oldConditionExpr string@@ -119,13 +119,13 @@ func UpdateProjectPolicyFromGrantIssue(ctx context.Context, stores *store.Store,break}if !updated {- condition := grantRequest.Condition+ condition := roleGrant.Conditionif condition == nil {condition = &expr.Expr{}}condition.Description = fmt.Sprintf("#%d", issue.UID)policyMessage.Policy.Bindings = append(policyMessage.Policy.Bindings, &storepb.Binding{- Role: grantRequest.Role,+ Role: roleGrant.Role,Members: []string{memberName},Condition: condition,})diff --git a/frontend/src/components/DataExportButton.vue b/frontend/src/components/DataExportButton.vueindex 53e4e66e9b..ae135667fe 100644--- a/frontend/src/components/DataExportButton.vue+++ b/frontend/src/components/DataExportButton.vue@@ -143,7 +143,7 @@ import { t } from "@/plugins/i18n";import { pushNotification } from "@/store";import { ExportFormat } from "@/types/proto-es/v1/common_pb";import { isNullOrUndefined } from "@/utils";-import MaxRowCountSelect from "./GrantRequestPanel/MaxRowCountSelect.vue";+import MaxRowCountSelect from "./RoleGrantPanel/MaxRowCountSelect.vue";import { Drawer, DrawerContent, ErrorTipsButton } from "./v2";interface LocalState {diff --git a/frontend/src/components/ExpirationSelector.vue b/frontend/src/components/ExpirationSelector.vueindex 289e4667aa..f413ae5904 100644--- a/frontend/src/components/ExpirationSelector.vue+++ b/frontend/src/components/ExpirationSelector.vue@@ -17,7 +17,7 @@type="datetime":is-date-disabled="isDateDisabled"clearable- :placeholder="$t('issue.grant-request.custom-date-placeholder')"+ :placeholder="$t('issue.role-grant.custom-date-placeholder')"@update:value="handleCustomDateChange"/><div v-if="maximumRoleExpiration" class="text-xs text-gray-500">@@ -175,7 +175,7 @@ const options = computed((): ExpirationOption[] => {// Add custom date option prominently after "Never expires"availableOptions.push({value: -1,- label: t("issue.grant-request.custom-date"),+ label: t("issue.role-grant.custom-date"),});// Add time-based optionsdiff --git a/frontend/src/components/GrantRequestPanel/index.ts b/frontend/src/components/GrantRequestPanel/index.tsdeleted file mode 100644index 6e5547f7c0..0000000000--- a/frontend/src/components/GrantRequestPanel/index.ts+++ /dev/null@@ -1,3 +0,0 @@-import GrantRequestPanel from "./GrantRequestPanel.vue";--export default GrantRequestPanel;diff --git a/frontend/src/components/IssueV1/components/IssueSearch/useIssueSearchScopeOptions.ts b/frontend/src/components/IssueV1/components/IssueSearch/useIssueSearchScopeOptions.tsindex 53973cd6bc..7022eeb4d5 100644--- a/frontend/src/components/IssueV1/components/IssueSearch/useIssueSearchScopeOptions.ts+++ b/frontend/src/components/IssueV1/components/IssueSearch/useIssueSearchScopeOptions.ts@@ -197,11 +197,11 @@ export const useIssueSearchScopeOptions = (),},{- value: Issue_Type[Issue_Type.GRANT_REQUEST],+ value: Issue_Type[Issue_Type.ROLE_GRANT],keywords: ["grant", "request"],render: () =>renderSpan(- t("issue.advanced-search.scope.issue-type.value.grant-request")+ t("issue.advanced-search.scope.issue-type.value.role-grant")),},{diff --git a/frontend/src/components/IssueV1/components/Panel/issueStatusAction.ts b/frontend/src/components/IssueV1/components/Panel/issueStatusAction.tsindex 389828b5ee..d8896f6413 100644--- a/frontend/src/components/IssueV1/components/Panel/issueStatusAction.ts+++ b/frontend/src/components/IssueV1/components/Panel/issueStatusAction.ts@@ -5,7 +5,7 @@ import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import {isAccessGrantIssue,isDatabaseDataExportIssue,- isGrantRequestIssue,+ isRoleGrantIssue,} from "@/utils";export type IssueStatusAction = "CLOSE" | "REOPEN";@@ -34,11 +34,11 @@ export const getApplicableIssueStatusActionList = (const list = PossibleIssueStatusActionMap[issue.status];return list.filter((action) => {if (- isGrantRequestIssue(issue) ||+ isRoleGrantIssue(issue) ||isAccessGrantIssue(issue) ||isDatabaseDataExportIssue(issue)) {- // Don't show REOPEN for grantRequest/accessGrant/dataExport issues.+ // Don't show REOPEN for roleGrant/accessGrant/dataExport issues.if (action === "REOPEN") {return false;}diff --git a/frontend/src/components/IssueV1/components/GrantRequest/DatabaseResourceTable.vue b/frontend/src/components/IssueV1/components/RoleGrant/DatabaseResourceTable.vuesimilarity index 100%rename from frontend/src/components/IssueV1/components/GrantRequest/DatabaseResourceTable.vuerename to frontend/src/components/IssueV1/components/RoleGrant/DatabaseResourceTable.vuediff --git a/frontend/src/components/IssueV1/components/GrantRequest/index.ts b/frontend/src/components/IssueV1/components/RoleGrant/index.tssimilarity index 100%rename from frontend/src/components/IssueV1/components/GrantRequest/index.tsrename to frontend/src/components/IssueV1/components/RoleGrant/index.tsdiff --git a/frontend/src/components/IssueV1/components/index.ts b/frontend/src/components/IssueV1/components/index.tsindex 98572530ee..cdc088b67d 100644--- a/frontend/src/components/IssueV1/components/index.ts+++ b/frontend/src/components/IssueV1/components/index.ts@@ -1,5 +1,5 @@import { IssueSearch } from "./IssueSearch";-export * from "./GrantRequest";+export * from "./RoleGrant";export * from "./Panel";export { IssueSearch };diff --git a/frontend/src/components/Permission/ComponentPermissionGuard.vue b/frontend/src/components/Permission/ComponentPermissionGuard.vueindex 72f5f61144..fbe962a75e 100644--- a/frontend/src/components/Permission/ComponentPermissionGuard.vue+++ b/frontend/src/components/Permission/ComponentPermissionGuard.vue@@ -38,7 +38,7 @@</NoPermissionPlaceholder></template>- <GrantRequestPanel+ <RoleGrantPanelv-if="showRequestRolePanel && project":project-name="project.name":required-permissions="missedPermissions"@@ -53,10 +53,10 @@ import { NButton } from "naive-ui";import { computed, ref } from "vue";import { useRouter } from "vue-router";import { FeatureBadge } from "@/components/FeatureGuard";-import GrantRequestPanel from "@/components/GrantRequestPanel";import NoPermissionPlaceholder from "@/components/Permission/NoPermissionPlaceholder.vue";import PermissionGuardWrapper from "@/components/Permission/PermissionGuardWrapper.vue";import RequiredBasicPermissionAlert from "@/components/Role/Setting/components/RequiredBasicPermissionAlert.vue";+import RoleGrantPanel from "@/components/RoleGrantPanel";import { hasFeature } from "@/store";import { BASIC_WORKSPACE_PERMISSIONS, type Permission } from "@/types";import type { Project } from "@/types/proto-es/v1/project_service_pb";@@ -96,4 +96,4 @@ const missedBasicPermission = computed(() => {(p) => !hasWorkspacePermissionV2(p));});-</script>\ No newline at end of file+</script>diff --git a/frontend/src/components/Plan/components/IssueReviewView/AccessGrantView/AccessGrantDetailsSection.vue b/frontend/src/components/Plan/components/IssueReviewView/AccessGrantView/AccessGrantDetailsSection.vueindex c29f99672b..fcffce4c74 100644--- a/frontend/src/components/Plan/components/IssueReviewView/AccessGrantView/AccessGrantDetailsSection.vue+++ b/frontend/src/components/Plan/components/IssueReviewView/AccessGrantView/AccessGrantDetailsSection.vue@@ -60,7 +60,7 @@{{ $t("common.duration") }}</template><template v-else>- {{ $t("issue.grant-request.expired-at") }}+ {{ $t("issue.access-grant.expired-at") }}</template></span><div class="text-base">diff --git a/frontend/src/components/Plan/components/IssueReviewView/GrantRequestView.vue b/frontend/src/components/Plan/components/IssueReviewView/RoleGrantView.vuesimilarity index 58%rename from frontend/src/components/Plan/components/IssueReviewView/GrantRequestView.vuerename to frontend/src/components/Plan/components/IssueReviewView/RoleGrantView.vueindex f37eb47c26..47fd0e7a42 100644--- a/frontend/src/components/Plan/components/IssueReviewView/GrantRequestView.vue+++ b/frontend/src/components/Plan/components/IssueReviewView/RoleGrantView.vue@@ -1,10 +1,10 @@<template><div class="w-full flex flex-col gap-y-4">- <!-- Grant Request Details Section -->+ <!-- Role Grant Details Section --><RequestDetailsSection /></div></template><script lang="ts" setup>-import { RequestDetailsSection } from "./GrantRequestView";+import { RequestDetailsSection } from "./RoleGrantView";</script>diff --git a/frontend/src/components/Plan/components/IssueReviewView/GrantRequestView/RequestDetailsSection.vue b/frontend/src/components/Plan/components/IssueReviewView/RoleGrantView/RequestDetailsSection.vuesimilarity index 91%rename from frontend/src/components/Plan/components/IssueReviewView/GrantRequestView/RequestDetailsSection.vuerename to frontend/src/components/Plan/components/IssueReviewView/RoleGrantView/RequestDetailsSection.vueindex 2c808e995b..259a3a1492 100644--- a/frontend/src/components/Plan/components/IssueReviewView/GrantRequestView/RequestDetailsSection.vue+++ b/frontend/src/components/Plan/components/IssueReviewView/RoleGrantView/RequestDetailsSection.vue@@ -1,7 +1,7 @@<template><div class="flex flex-col gap-y-4"><h3 class="text-base font-medium">- {{ $t("issue.grant-request.details") }}+ {{ $t("issue.role-grant.details") }}</h3><div class="p-4 border rounded-sm flex flex-col gap-y-4">@@ -40,7 +40,7 @@</span><div><span v-if="condition.databaseResources.length === 0">- {{ $t("issue.grant-request.all-databases") }}+ {{ $t("issue.role-grant.all-databases") }}</span><DatabaseResourceTablev-else@@ -53,7 +53,7 @@<!-- Expiration Time --><div class="flex flex-col gap-y-2"><span class="text-sm text-control-light">- {{ $t("issue.grant-request.expired-at") }}+ {{ $t("issue.role-grant.expired-at") }}</span><div class="text-base">{{@@ -81,7 +81,7 @@ const { issue } = usePlanContextWithIssue();const roleStore = useRoleStore();const requestRoleName = computed(() => {- return issue.value.grantRequest?.role;+ return issue.value.roleGrant?.role;});const requestRole = computed(() =>@@ -92,7 +92,7 @@ const condition = computedAsync(async () => {try {const conditionExpression = await convertFromCELString(- issue.value.grantRequest?.condition?.expression ?? ""+ issue.value.roleGrant?.condition?.expression ?? "");return conditionExpression;} catch (error) {diff --git a/frontend/src/components/Plan/components/IssueReviewView/GrantRequestView/index.ts b/frontend/src/components/Plan/components/IssueReviewView/RoleGrantView/index.tssimilarity index 100%rename from frontend/src/components/Plan/components/IssueReviewView/GrantRequestView/index.tsrename to frontend/src/components/Plan/components/IssueReviewView/RoleGrantView/index.tsdiff --git a/frontend/src/components/Plan/components/SpecDetailView/SpecDetailView.vue b/frontend/src/components/Plan/components/SpecDetailView/SpecDetailView.vueindex b791936c50..b76080f0db 100644--- a/frontend/src/components/Plan/components/SpecDetailView/SpecDetailView.vue+++ b/frontend/src/components/Plan/components/SpecDetailView/SpecDetailView.vue@@ -76,9 +76,9 @@ const isCreateDatabasePlan = computed(() => {);});-const isGrantRequestOrAccessGrantIssue = computed(() => {+const isRoleGrantOrAccessGrantIssue = computed(() => {return (- issue.value?.type === Issue_Type.GRANT_REQUEST ||+ issue.value?.type === Issue_Type.ROLE_GRANT ||issue.value?.type === Issue_Type.ACCESS_GRANT);});@@ -87,7 +87,7 @@ const shouldShowSidebar = computed(() => {return (!isDataExportPlan.value &&!isCreateDatabasePlan.value &&- !isGrantRequestOrAccessGrantIssue.value+ !isRoleGrantOrAccessGrantIssue.value);});diff --git a/frontend/src/components/Plan/logic/initialize/index.ts b/frontend/src/components/Plan/logic/initialize/index.tsindex 9d5bc9f766..afe75c32f4 100644--- a/frontend/src/components/Plan/logic/initialize/index.ts+++ b/frontend/src/components/Plan/logic/initialize/index.ts@@ -136,7 +136,7 @@ export function useInitializePlan(// Issue without plan - allow it to stay in CICD layout for issue-only view// This is expected for grant requests, but may indicate a problem for other issue typesif (- issueResult.type !== Issue_Type.GRANT_REQUEST &&+ issueResult.type !== Issue_Type.ROLE_GRANT &&issueResult.type !== Issue_Type.ACCESS_GRANT) {console.warn(diff --git a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vueindex e46696446f..8da1c5c62d 100644--- a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue+++ b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue@@ -126,9 +126,9 @@ import { NInput } from "naive-ui";import { computed, reactive, ref } from "vue";import { BBAttention } from "@/bbkit";import ExpirationSelector from "@/components/ExpirationSelector.vue";-import QuerierDatabaseResourceForm from "@/components/GrantRequestPanel/DatabaseResourceForm/index.vue";import MembersBindingSelect from "@/components/Member/MembersBindingSelect.vue";import RequiredStar from "@/components/RequiredStar.vue";+import QuerierDatabaseResourceForm from "@/components/RoleGrantPanel/DatabaseResourceForm/index.vue";import { EnvironmentSelect, RoleSelect } from "@/components/v2/Select";import { useRoleStore } from "@/store";import { type DatabaseResource } from "@/types";diff --git a/frontend/src/components/ProjectMember/ProjectMemberPanel.vue b/frontend/src/components/ProjectMember/ProjectMemberPanel.vueindex d7b60a0e74..f6806e5e89 100644--- a/frontend/src/components/ProjectMember/ProjectMemberPanel.vue+++ b/frontend/src/components/ProjectMember/ProjectMemberPanel.vue@@ -111,7 +111,7 @@@close="state.editingMember = undefined"/>- <GrantRequestPanel+ <RoleGrantPanelv-if="state.showRequestRolePanel":project-name="project.name"@close="state.showRequestRolePanel = false"@@ -151,7 +151,7 @@ import {import type { Project } from "@/types/proto-es/v1/project_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { hasProjectPermissionV2, isBindingPolicyExpired } from "@/utils";-import GrantRequestPanel from "../GrantRequestPanel";+import RoleGrantPanel from "../RoleGrantPanel";import { SearchBox } from "../v2";import AddProjectMembersPanel from "./AddProjectMember/AddProjectMembersPanel.vue";import ProjectMemberRolePanel from "./ProjectMemberRolePanel/index.vue";diff --git a/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/DatabaseResourceSelector.vue b/frontend/src/components/RoleGrantPanel/DatabaseResourceForm/DatabaseResourceSelector.vuesimilarity index 100%rename from frontend/src/components/GrantRequestPanel/DatabaseResourceForm/DatabaseResourceSelector.vuerename to frontend/src/components/RoleGrantPanel/DatabaseResourceForm/DatabaseResourceSelector.vuediff --git a/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/Label.vue b/frontend/src/components/RoleGrantPanel/DatabaseResourceForm/Label.vuesimilarity index 100%rename from frontend/src/components/GrantRequestPanel/DatabaseResourceForm/Label.vuerename to frontend/src/components/RoleGrantPanel/DatabaseResourceForm/Label.vuediff --git a/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/common.ts b/frontend/src/components/RoleGrantPanel/DatabaseResourceForm/common.tssimilarity index 100%rename from frontend/src/components/GrantRequestPanel/DatabaseResourceForm/common.tsrename to frontend/src/components/RoleGrantPanel/DatabaseResourceForm/common.tsdiff --git a/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/index.vue b/frontend/src/components/RoleGrantPanel/DatabaseResourceForm/index.vuesimilarity index 96%rename from frontend/src/components/GrantRequestPanel/DatabaseResourceForm/index.vuerename to frontend/src/components/RoleGrantPanel/DatabaseResourceForm/index.vueindex 85c3e5e2ca..72772412a8 100644--- a/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/index.vue+++ b/frontend/src/components/RoleGrantPanel/DatabaseResourceForm/index.vue@@ -10,21 +10,21 @@<template #trigger><NRadio:value="'ALL'"- :label="$t('issue.grant-request.all-databases')"+ :label="$t('issue.role-grant.all-databases')"/></template>- {{ $t("issue.grant-request.all-databases-tip") }}+ {{ $t("issue.role-grant.all-databases-tip") }}</NTooltip><NRadio class="leading-6!" :value="'EXPRESSION'" :disabled="!project"><div class="flex items-center gap-x-1"><FeatureBadge :feature="requiredFeature" />- <span>{{ $t("issue.grant-request.use-cel") }}</span>+ <span>{{ $t("issue.role-grant.use-cel") }}</span></div></NRadio><NRadio class="leading-6!" :value="'SELECT'" :disabled="!project"><div class="flex items-center gap-x-1"><FeatureBadge :feature="requiredFeature" />- <span>{{ $t("issue.grant-request.manually-select") }}</span>+ <span>{{ $t("issue.role-grant.manually-select") }}</span></div></NRadio></NRadioGroup>diff --git a/frontend/src/components/GrantRequestPanel/MaxRowCountSelect.vue b/frontend/src/components/RoleGrantPanel/MaxRowCountSelect.vuesimilarity index 100%rename from frontend/src/components/GrantRequestPanel/MaxRowCountSelect.vuerename to frontend/src/components/RoleGrantPanel/MaxRowCountSelect.vuediff --git a/frontend/src/components/GrantRequestPanel/GrantRequestPanel.vue b/frontend/src/components/RoleGrantPanel/RoleGrantPanel.vuesimilarity index 97%rename from frontend/src/components/GrantRequestPanel/GrantRequestPanel.vuerename to frontend/src/components/RoleGrantPanel/RoleGrantPanel.vueindex 4fdb68c608..fe6e34469d 100644--- a/frontend/src/components/GrantRequestPanel/GrantRequestPanel.vue+++ b/frontend/src/components/RoleGrantPanel/RoleGrantPanel.vue@@ -61,9 +61,9 @@ import { getUserEmailInBinding } from "@/types";import { BindingSchema } from "@/types/proto-es/v1/iam_policy_pb";import {CreateIssueRequestSchema,- GrantRequestSchema,IssueSchema,Issue_Type as NewIssue_Type,+ RoleGrantSchema,} from "@/types/proto-es/v1/issue_service_pb";import {displayRoleTitle,@@ -130,7 +130,7 @@ const doCreateIssue = async () => {return;}- const grantRequest = create(GrantRequestSchema, {+ const roleGrant = create(RoleGrantSchema, {role: binding.role,user: `users/${currentUser.value.email}`,condition: binding.condition,@@ -159,8 +159,8 @@ const doCreateIssue = async () => {)),description: binding.condition?.description,- type: NewIssue_Type.GRANT_REQUEST,- grantRequest,+ type: NewIssue_Type.ROLE_GRANT,+ roleGrant,labels: labels.value,});diff --git a/frontend/src/components/RoleGrantPanel/index.ts b/frontend/src/components/RoleGrantPanel/index.tsnew file mode 100644index 0000000000..11dda2e3fd--- /dev/null+++ b/frontend/src/components/RoleGrantPanel/index.ts@@ -0,0 +1,3 @@+import RoleGrantPanel from "./RoleGrantPanel.vue";++export default RoleGrantPanel;diff --git a/frontend/src/components/SensitiveData/GrantAccessForm.vue b/frontend/src/components/SensitiveData/GrantAccessForm.vueindex 665a352a2b..430eefcc35 100644--- a/frontend/src/components/SensitiveData/GrantAccessForm.vue+++ b/frontend/src/components/SensitiveData/GrantAccessForm.vue@@ -79,9 +79,9 @@ import { create } from "@bufbuild/protobuf";import { NButton, NDatePicker, NInput } from "naive-ui";import { computed, reactive, ref } from "vue";import { useI18n } from "vue-i18n";-import DatabaseResourceForm from "@/components/GrantRequestPanel/DatabaseResourceForm/index.vue";import MembersBindingSelect from "@/components/Member/MembersBindingSelect.vue";import RequiredStar from "@/components/RequiredStar.vue";+import DatabaseResourceForm from "@/components/RoleGrantPanel/DatabaseResourceForm/index.vue";import FormLayout from "@/components/v2/Form/FormLayout.vue";import { pushNotification, usePolicyV1Store } from "@/store";import { ExprSchema } from "@/types/proto-es/google/type/expr_pb";diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 65e2fc2991..67115bdc5b 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -1033,7 +1033,7 @@"description": "Filter by issue type","value": {"database-change": "Database Change",- "grant-request": "Grant Request",+ "role-grant": "Role Grant","database-export": "Database Export","access-grant": "Access Grant"}@@ -1114,9 +1114,10 @@},"issue-name": "Issue name","access-grant": {- "details": "Access Grant Details"+ "details": "Access Grant Details",+ "expired-at": "Expired at"},- "grant-request": {+ "role-grant": {"details": "Request Details","expired-at": "Expired at","all-databases": "All",diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex e72270a1e7..c374256e4b 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -1033,7 +1033,7 @@"description": "Filter by issue type","value": {"database-change": "Database Change",- "grant-request": "Grant Request",+ "role-grant": "Role Grant","database-export": "Database Export","access-grant": "Access Grant"}@@ -1114,9 +1114,10 @@},"issue-name": "Nombre de la incidencia","access-grant": {- "details": "Access Grant Details"+ "details": "Access Grant Details",+ "expired-at": "tiempo de caducidad"},- "grant-request": {+ "role-grant": {"details": "Detalles de la solicitud","expired-at": "tiempo de caducidad","all-databases": "todas las bases de datos",diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex e9d023ff03..ebabd57b7a 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -1033,7 +1033,7 @@"description": "Filter by issue type","value": {"database-change": "Database Change",- "grant-request": "Grant Request",+ "role-grant": "Role Grant","database-export": "Database Export","access-grant": "Access Grant"}@@ -1114,9 +1114,10 @@},"issue-name": "イシュー名","access-grant": {- "details": "Access Grant Details"+ "details": "Access Grant Details",+ "expired-at": "有効期限"},- "grant-request": {+ "role-grant": {"details": "リクエストの詳細","expired-at": "有効期限","all-databases": "すべてのデータベース",diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex 85a1fcca99..2dacf09653 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -1033,7 +1033,7 @@"description": "Filter by issue type","value": {"database-change": "Database Change",- "grant-request": "Grant Request",+ "role-grant": "Role Grant","database-export": "Database Export","access-grant": "Access Grant"}@@ -1114,9 +1114,10 @@},"issue-name": "Tên vấn đề","access-grant": {- "details": "Access Grant Details"+ "details": "Access Grant Details",+ "expired-at": "Hết hạn vào"},- "grant-request": {+ "role-grant": {"details": "Yêu cầu chi tiết","expired-at": "Hết hạn vào","all-databases": "Tất cả",diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 1352f11470..8c5077f7b2 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -1033,7 +1033,7 @@"description": "按工单类型过滤","value": {"database-change": "数据库变更",- "grant-request": "权限申请",+ "role-grant": "角色授权","database-export": "数据导出","access-grant": "访问授权"}@@ -1114,9 +1114,10 @@},"issue-name": "工单名称","access-grant": {- "details": "访问授权详情"+ "details": "访问授权详情",+ "expired-at": "过期时间"},- "grant-request": {+ "role-grant": {"details": "请求详细","expired-at": "过期时间","all-databases": "所有数据库",diff --git a/frontend/src/types/proto-es/v1/issue_service_pb.d.ts b/frontend/src/types/proto-es/v1/issue_service_pb.d.tsindex f8858e54eb..677ca7dbc5 100644--- a/frontend/src/types/proto-es/v1/issue_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/issue_service_pb.d.ts@@ -519,11 +519,11 @@ export declare type Issue = Message<"bytebase.v1.Issue"> & {plan: string;/**- * Used if the issue type is GRANT_REQUEST.+ * Used if the issue type is ROLE_GRANT.*- * @generated from field: bytebase.v1.GrantRequest grant_request = 13;+ * @generated from field: bytebase.v1.RoleGrant role_grant = 13;*/- grantRequest?: GrantRequest;+ roleGrant?: RoleGrant;/*** The risk level of the issue.@@ -647,11 +647,11 @@ export enum Issue_Type {DATABASE_CHANGE = 1,/**- * Database access grant request.+ * Role grant request.*- * @generated from enum value: GRANT_REQUEST = 2;+ * @generated from enum value: ROLE_GRANT = 2;*/- GRANT_REQUEST = 2,+ ROLE_GRANT = 2,/*** Database data export request.@@ -728,9 +728,9 @@ export enum Issue_ApprovalStatus {export declare const Issue_ApprovalStatusSchema: GenEnum<Issue_ApprovalStatus>;/**- * @generated from message bytebase.v1.GrantRequest+ * @generated from message bytebase.v1.RoleGrant*/-export declare type GrantRequest = Message<"bytebase.v1.GrantRequest"> & {+export declare type RoleGrant = Message<"bytebase.v1.RoleGrant"> & {/*** The requested role.* Format: roles/EXPORTER.@@ -763,10 +763,10 @@ export declare type GrantRequest = Message<"bytebase.v1.GrantRequest"> & {};/**- * Describes the message bytebase.v1.GrantRequest.- * Use `create(GrantRequestSchema)` to create a new message.+ * Describes the message bytebase.v1.RoleGrant.+ * Use `create(RoleGrantSchema)` to create a new message.*/-export declare const GrantRequestSchema: GenMessage<GrantRequest>;+export declare const RoleGrantSchema: GenMessage<RoleGrant>;/*** @generated from message bytebase.v1.ApprovalTemplatediff --git a/frontend/src/types/proto-es/v1/issue_service_pb.js b/frontend/src/types/proto-es/v1/issue_service_pb.jsindex 8e8d81801a..3eb747b68f 100644--- a/frontend/src/types/proto-es/v1/issue_service_pb.js+++ b/frontend/src/types/proto-es/v1/issue_service_pb.js@@ -17,7 +17,7 @@ import { file_v1_common } from "./common_pb";* Describes the file v1/issue_service.proto.*/export const file_v1_issue_service = /*@__PURE__*/- fileDesc("ChZ2MS9pc3N1ZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJKCg9HZXRJc3N1ZVJlcXVlc3QSKAoEbmFtZRgBIAEoCUIa4EEC+kEUChJieXRlYmFzZS5jb20vSXNzdWUSDQoFZm9yY2UYAiABKAgiagoSQ3JlYXRlSXNzdWVSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBImCgVpc3N1ZRgCIAEoCzISLmJ5dGViYXNlLnYxLklzc3VlQgPgQQIimQEKEUxpc3RJc3N1ZXNSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBIRCglwYWdlX3NpemUYAiABKAUSEgoKcGFnZV90b2tlbhgDIAEoCRIOC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XM6YmF0Y2hVcGRhdGVTdGF0dXMSfwoMQXBwcm92ZUlzc3VlEiAuYnl0ZWJhc2UudjEuQXBwcm92ZUlzc3VlUmVxdWVzdBoSLmJ5dGViYXNlLnYxLklzc3VlIjmQ6jACmOowAYLT5JMCKzoBKiImL3YxL3tuYW1lPXByb2plY3RzLyovaXNzdWVzLyp9OmFwcHJvdmUSfAoLUmVqZWN0SXNzdWUSHy5ieXRlYmFzZS52MS5SZWplY3RJc3N1ZVJlcXVlc3QaEi5ieXRlYmFzZS52MS5Jc3N1ZSI4kOowApjqMAGC0+STAio6ASoiJS92MS97bmFtZT1wcm9qZWN0cy8qL2lzc3Vlcy8qfTpyZWplY3QSfwoMUmVxdWVzdElzc3VlEiAuYnl0ZWJhc2UudjEuUmVxdWVzdElzc3VlUmVxdWVzdBoSLmJ5dGViYXNlLnYxLklzc3VlIjmQ6jACmOowAYLT5JMCKzoBKiImL3YxL3tuYW1lPXByb2plY3RzLyovaXNzdWVzLyp9OnJlcXVlc3RCpwEKD2NvbS5ieXRlYmFzZS52MUIRSXNzdWVTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_google_type_expr, file_v1_annotation, file_v1_common]);+ fileDesc("ChZ2MS9pc3N1ZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJKCg9HZXRJc3N1ZVJlcXVlc3QSKAoEbmFtZRgBIAEoCUIa4EEC+kEUChJieXRlYmFzZS5jb20vSXNzdWUSDQoFZm9yY2UYAiABKA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_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_google_type_expr, file_v1_annotation, file_v1_common]);/*** Describes the message bytebase.v1.GetIssueRequest.@@ -160,10 +160,10 @@ export const Issue_ApprovalStatus = /*@__PURE__*/tsEnum(Issue_ApprovalStatusSchema);/**- * Describes the message bytebase.v1.GrantRequest.- * Use `create(GrantRequestSchema)` to create a new message.+ * Describes the message bytebase.v1.RoleGrant.+ * Use `create(RoleGrantSchema)` to create a new message.*/-export const GrantRequestSchema = /*@__PURE__*/+export const RoleGrantSchema = /*@__PURE__*/messageDesc(file_v1_issue_service, 13);/**diff --git a/frontend/src/types/v1/issue/issue.ts b/frontend/src/types/v1/issue/issue.tsindex 513a17004e..857f922fd9 100644--- a/frontend/src/types/v1/issue/issue.ts+++ b/frontend/src/types/v1/issue/issue.ts@@ -12,7 +12,7 @@ export interface IssueFilter {riskLevelList?: RiskLevel[];createdTsAfter?: number;createdTsBefore?: number;- // typeList is the issue types to filter by, for example: GRANT_REQUEST, DATABASE_EXPORT+ // typeList is the issue types to filter by, for example: ROLE_GRANT, DATABASE_EXPORTtypeList?: Issue_Type[];// filter by labels, for example: labels = "feature & bug"labels?: string[];diff --git a/frontend/src/utils/v1/issue/issue.ts b/frontend/src/utils/v1/issue/issue.tsindex bac78d932b..5d8efdee70 100644--- a/frontend/src/utils/v1/issue/issue.ts+++ b/frontend/src/utils/v1/issue/issue.ts@@ -45,8 +45,8 @@ export const flattenTaskV1List = (rollout: Rollout | undefined) => {return rollout?.stages.flatMap((stage) => stage.tasks) || [];};-export const isGrantRequestIssue = (issue: Issue): boolean => {- return issue.type === Issue_Type.GRANT_REQUEST;+export const isRoleGrantIssue = (issue: Issue): boolean => {+ return issue.type === Issue_Type.ROLE_GRANT;};export const isAccessGrantIssue = (issue: Issue): boolean => {diff --git a/frontend/src/views/project/IssueDetailV1View.vue b/frontend/src/views/project/IssueDetailV1View.vueindex afcadf3d83..240641848d 100644--- a/frontend/src/views/project/IssueDetailV1View.vue+++ b/frontend/src/views/project/IssueDetailV1View.vue@@ -10,7 +10,7 @@<DatabaseExportView v-else-if="issueType === IssueType.EXPORT_DATA" /><!-- Grant Request View -->- <GrantRequestView v-else-if="issueType === IssueType.GRANT_REQUEST" />+ <RoleGrantView v-else-if="issueType === IssueType.ROLE_GRANT" /><!-- Access Grant View --><AccessGrantView v-else-if="issueType === IssueType.ACCESS_GRANT" />@@ -28,14 +28,14 @@ import AccessGrantView from "@/components/Plan/components/IssueReviewView/Accessimport { DatabaseChangeView } from "@/components/Plan/components/IssueReviewView/DatabaseChangeView";import DatabaseCreateView from "@/components/Plan/components/IssueReviewView/DatabaseCreateView.vue";import DatabaseExportView from "@/components/Plan/components/IssueReviewView/DatabaseExportView.vue";-import GrantRequestView from "@/components/Plan/components/IssueReviewView/GrantRequestView.vue";import IssueBaseLayout from "@/components/Plan/components/IssueReviewView/IssueBaseLayout.vue";+import RoleGrantView from "@/components/Plan/components/IssueReviewView/RoleGrantView.vue";import { Issue_Type } from "@/types/proto-es/v1/issue_service_pb";enum IssueType {CREATE_DATABASE = "CREATE_DATABASE",EXPORT_DATA = "EXPORT_DATA",- GRANT_REQUEST = "GRANT_REQUEST",+ ROLE_GRANT = "ROLE_GRANT",ACCESS_GRANT = "ACCESS_GRANT",DATABASE_CHANGE = "DATABASE_CHANGE",}@@ -49,8 +49,7 @@ const { plan, issue } = usePlanContextWithIssue();const isLoading = ref(true);const issueType = computed(() => {- if (issue.value.type === Issue_Type.GRANT_REQUEST)- return IssueType.GRANT_REQUEST;+ if (issue.value.type === Issue_Type.ROLE_GRANT) return IssueType.ROLE_GRANT;if (issue.value.type === Issue_Type.ACCESS_GRANT)return IssueType.ACCESS_GRANT;diff --git a/frontend/src/views/sql-editor/AsidePanel/AccessPane/AccessGrantItem.vue b/frontend/src/views/sql-editor/AsidePanel/AccessPane/AccessGrantItem.vueindex 63c7b1efd0..0db878bef2 100644--- a/frontend/src/views/sql-editor/AsidePanel/AccessPane/AccessGrantItem.vue+++ b/frontend/src/views/sql-editor/AsidePanel/AccessPane/AccessGrantItem.vue@@ -160,7 +160,7 @@ const expirationText = computed(() => {const dur = hours > 0 ? `${hours}h${minutes}m` : `${minutes}m`;return t("sql-editor.expire-in", { time: dur });}- return `${t("issue.grant-request.expired-at")} ${info.value}`;+ return `${t("issue.access-grant.expired-at")} ${info.value}`;});const allDatabaseNames = computed(() => {diff --git a/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue b/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vueindex b00a097610..26a5a86e78 100644--- a/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue+++ b/frontend/src/views/sql-editor/EditorCommon/QueryContextSettingPopover.vue@@ -103,7 +103,7 @@ import { NButton, NPopover, NRadio, NRadioGroup, NTooltip } from "naive-ui";import { storeToRefs } from "pinia";import { computed, watch } from "vue";import { useI18n } from "vue-i18n";-import MaxRowCountSelect from "@/components/GrantRequestPanel/MaxRowCountSelect.vue";+import MaxRowCountSelect from "@/components/RoleGrantPanel/MaxRowCountSelect.vue";import {useConnectionOfCurrentSQLEditorTab,useSQLEditorStore,diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/RequestQueryButton.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/RequestQueryButton.vueindex 99420939cf..53cadee33a 100644--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/RequestQueryButton.vue+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/RequestQueryButton.vue@@ -20,7 +20,7 @@</NButton></PermissionGuardWrapper>- <GrantRequestPanel+ <RoleGrantPanelv-if="showPanel":project-name="project.name":database-resources="missingResources"@@ -43,9 +43,9 @@ import { ShieldUserIcon } from "lucide-vue-next";import { NButton } from "naive-ui";import { computed, ref } from "vue";import { FeatureBadge } from "@/components/FeatureGuard";-import GrantRequestPanel from "@/components/GrantRequestPanel";-import { parseStringToResource } from "@/components/GrantRequestPanel/DatabaseResourceForm/common";import PermissionGuardWrapper from "@/components/Permission/PermissionGuardWrapper.vue";+import RoleGrantPanel from "@/components/RoleGrantPanel";+import { parseStringToResource } from "@/components/RoleGrantPanel/DatabaseResourceForm/common";import { hasFeature, useProjectV1Store, useSQLEditorStore } from "@/store";import {type DatabaseResource,diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 728d27e80a..c6bf2b5256 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -20318,31 +20318,6 @@ components:required:- nameadditionalProperties: false- bytebase.v1.GrantRequest:- type: object- properties:- role:- type: string- title: role- description: |-- The requested role.- Format: roles/EXPORTER.- user:- type: string- title: user- description: |-- The user to be granted.- Format: users/{email}.- condition:- title: condition- description: The condition for the role. Same as the condition in IAM Binding message.- $ref: '#/components/schemas/google.type.Expr'- expiration:- title: expiration- description: The duration for which the grant is valid.- $ref: '#/components/schemas/google.protobuf.Duration'- title: GrantRequest- additionalProperties: falsebytebase.v1.GridLevel:type: objectproperties:@@ -20869,10 +20844,10 @@ components:The plan associated with the issue.Can be empty.Format: projects/{project}/plans/{plan}- grantRequest:- title: grant_request- description: Used if the issue type is GRANT_REQUEST.- $ref: '#/components/schemas/bytebase.v1.GrantRequest'+ roleGrant:+ title: role_grant+ description: Used if the issue type is ROLE_GRANT.+ $ref: '#/components/schemas/bytebase.v1.RoleGrant'riskLevel:title: risk_leveldescription: The risk level of the issue.@@ -20936,7 +20911,7 @@ components:enum:- TYPE_UNSPECIFIED- DATABASE_CHANGE- - GRANT_REQUEST+ - ROLE_GRANT- DATABASE_EXPORT- ACCESS_GRANTdescription: The type of issue.@@ -24598,6 +24573,31 @@ components:- TYPE_UNSPECIFIED- BUILT_IN- CUSTOM+ bytebase.v1.RoleGrant:+ type: object+ properties:+ role:+ type: string+ title: role+ description: |-+ The requested role.+ Format: roles/EXPORTER.+ user:+ type: string+ title: user+ description: |-+ The user to be granted.+ Format: users/{email}.+ condition:+ title: condition+ description: The condition for the role. Same as the condition in IAM Binding message.+ $ref: '#/components/schemas/google.type.Expr'+ expiration:+ title: expiration+ description: The duration for which the grant is valid.+ $ref: '#/components/schemas/google.protobuf.Duration'+ title: RoleGrant+ additionalProperties: falsebytebase.v1.Rollout:type: objectproperties:diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex d4efb78c28..06e4d68aa8 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -146,8 +146,8 @@- [DataSourceType](#bytebase-store-DataSourceType)- [store/issue.proto](#store_issue-proto)- - [GrantRequest](#bytebase-store-GrantRequest)- [Issue](#bytebase-store-Issue)+ - [RoleGrant](#bytebase-store-RoleGrant)- [Issue.Status](#bytebase-store-Issue-Status)- [Issue.Type](#bytebase-store-Issue-Type)@@ -2660,37 +2660,37 @@ InstanceRole is the API message for instance role.-<a name="bytebase-store-GrantRequest"></a>+<a name="bytebase-store-Issue"></a>-### GrantRequest-GrantRequest contains details for requesting database access permissions.+### Issue+Issue is the metadata for issues that track database operations and access requests.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| role | [string](#string) | | The role being requested for the user. Format: roles/EXPORTER. |-| user | [string](#string) | | The user who will receive the role. Format: users/{email}. |-| condition | [google.type.Expr](#google-type-Expr) | | Optional conditional expression that limits when the grant applies. |-| expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | Duration after which the grant automatically expires. |+| approval | [IssuePayloadApproval](#bytebase-store-IssuePayloadApproval) | | Approval information for the issue workflow. |+| role_grant | [RoleGrant](#bytebase-store-RoleGrant) | | Role grant details if this is a role grant issue. |+| labels | [string](#string) | repeated | Labels attached to categorize and filter the issue. |+| risk_level | [RiskLevel](#bytebase-store-RiskLevel) | | Risk level for the issue, calculated from statement types. |+| access_grant_id | [string](#string) | | The access grant id for ACCESS_GRANT type issue. |-<a name="bytebase-store-Issue"></a>+<a name="bytebase-store-RoleGrant"></a>-### Issue-Issue is the metadata for issues that track database operations and access requests.+### RoleGrant+RoleGrant contains details for requesting a project role.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- |-| approval | [IssuePayloadApproval](#bytebase-store-IssuePayloadApproval) | | Approval information for the issue workflow. |-| grant_request | [GrantRequest](#bytebase-store-GrantRequest) | | Access grant request details if this is a grant request issue. |-| labels | [string](#string) | repeated | Labels attached to categorize and filter the issue. |-| risk_level | [RiskLevel](#bytebase-store-RiskLevel) | | Risk level for the issue, calculated from statement types. |-| access_grant_id | [string](#string) | | The access grant id for ACCESS_GRANT type issue. |+| role | [string](#string) | | The role being requested for the user. Format: roles/EXPORTER. |+| user | [string](#string) | | The user who will receive the role. Format: users/{email}. |+| condition | [google.type.Expr](#google-type-Expr) | | Optional conditional expression that limits when the grant applies. |+| expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | Duration after which the grant automatically expires. |@@ -2722,7 +2722,7 @@ Type represents the category of issue.| ---- | ------ | ----------- || ISSUE_TYPE_UNSPECIFIED | 0 | || DATABASE_CHANGE | 1 | Issue for database schema or data changes. |-| GRANT_REQUEST | 2 | Issue requesting database access permissions. |+| ROLE_GRANT | 2 | Role grant request. || DATABASE_EXPORT | 3 | Issue for exporting data from databases. || ACCESS_GRANT | 4 | Temporary access grant request. |diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex 5035fee7b9..1d3cfa1a20 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -744,11 +744,11 @@<ul><li>- <a href="#bytebase.store.GrantRequest"><span class="badge">M</span>GrantRequest</a>+ <a href="#bytebase.store.Issue"><span class="badge">M</span>Issue</a></li><li>- <a href="#bytebase.store.Issue"><span class="badge">M</span>Issue</a>+ <a href="#bytebase.store.RoleGrant"><span class="badge">M</span>RoleGrant</a></li>@@ -8006,8 +8006,8 @@ For MySQL, it is the global privileges as GRANT statements, which means it only<p></p>- <h3 id="bytebase.store.GrantRequest">GrantRequest</h3>- <p>GrantRequest contains details for requesting database access permissions.</p>+ <h3 id="bytebase.store.Issue">Issue</h3>+ <p>Issue is the metadata for issues that track database operations and access requests.</p><table class="field-table">@@ -8017,33 +8017,38 @@ For MySQL, it is the global privileges as GRANT statements, which means it only<tbody><tr>- <td>role</td>- <td><a href="#string">string</a></td>+ <td>approval</td>+ <td><a href="#bytebase.store.IssuePayloadApproval">IssuePayloadApproval</a></td><td></td>- <td><p>The role being requested for the user.-Format: roles/EXPORTER. </p></td>+ <td><p>Approval information for the issue workflow. </p></td></tr><tr>- <td>user</td>- <td><a href="#string">string</a></td>+ <td>role_grant</td>+ <td><a href="#bytebase.store.RoleGrant">RoleGrant</a></td><td></td>- <td><p>The user who will receive the role.-Format: users/{email}. </p></td>+ <td><p>Role grant details if this is a role grant issue. </p></td></tr><tr>- <td>condition</td>- <td><a href="#google.type.Expr">google.type.Expr</a></td>+ <td>labels</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>Labels attached to categorize and filter the issue. </p></td>+ </tr>++ <tr>+ <td>risk_level</td>+ <td><a href="#bytebase.store.RiskLevel">RiskLevel</a></td><td></td>- <td><p>Optional conditional expression that limits when the grant applies. </p></td>+ <td><p>Risk level for the issue, calculated from statement types. </p></td></tr><tr>- <td>expiration</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td>access_grant_id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Duration after which the grant automatically expires. </p></td>+ <td><p>The access grant id for ACCESS_GRANT type issue. </p></td></tr></tbody>@@ -8053,8 +8058,8 @@ Format: users/{email}. </p></td>- <h3 id="bytebase.store.Issue">Issue</h3>- <p>Issue is the metadata for issues that track database operations and access requests.</p>+ <h3 id="bytebase.store.RoleGrant">RoleGrant</h3>+ <p>RoleGrant contains details for requesting a project role.</p><table class="field-table">@@ -8064,38 +8069,33 @@ Format: users/{email}. </p></td><tbody><tr>- <td>approval</td>- <td><a href="#bytebase.store.IssuePayloadApproval">IssuePayloadApproval</a></td>- <td></td>- <td><p>Approval information for the issue workflow. </p></td>- </tr>-- <tr>- <td>grant_request</td>- <td><a href="#bytebase.store.GrantRequest">GrantRequest</a></td>+ <td>role</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Access grant request details if this is a grant request issue. </p></td>+ <td><p>The role being requested for the user.+Format: roles/EXPORTER. </p></td></tr><tr>- <td>labels</td>+ <td>user</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>Labels attached to categorize and filter the issue. </p></td>+ <td></td>+ <td><p>The user who will receive the role.+Format: users/{email}. </p></td></tr><tr>- <td>risk_level</td>- <td><a href="#bytebase.store.RiskLevel">RiskLevel</a></td>+ <td>condition</td>+ <td><a href="#google.type.Expr">google.type.Expr</a></td><td></td>- <td><p>Risk level for the issue, calculated from statement types. </p></td>+ <td><p>Optional conditional expression that limits when the grant applies. </p></td></tr><tr>- <td>access_grant_id</td>- <td><a href="#string">string</a></td>+ <td>expiration</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td><td></td>- <td><p>The access grant id for ACCESS_GRANT type issue. </p></td>+ <td><p>Duration after which the grant automatically expires. </p></td></tr></tbody>@@ -8163,9 +8163,9 @@ Format: users/{email}. </p></td></tr><tr>- <td>GRANT_REQUEST</td>+ <td>ROLE_GRANT</td><td>2</td>- <td><p>Issue requesting database access permissions.</p></td>+ <td><p>Role grant request.</p></td></tr><tr>diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 0c0de73c90..253a6b344c 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -48,7 +48,6 @@- [CreateIssueCommentRequest](#bytebase-v1-CreateIssueCommentRequest)- [CreateIssueRequest](#bytebase-v1-CreateIssueRequest)- [GetIssueRequest](#bytebase-v1-GetIssueRequest)- - [GrantRequest](#bytebase-v1-GrantRequest)- [Issue](#bytebase-v1-Issue)- [Issue.Approver](#bytebase-v1-Issue-Approver)- [IssueComment](#bytebase-v1-IssueComment)@@ -61,6 +60,7 @@- [ListIssuesResponse](#bytebase-v1-ListIssuesResponse)- [RejectIssueRequest](#bytebase-v1-RejectIssueRequest)- [RequestIssueRequest](#bytebase-v1-RequestIssueRequest)+ - [RoleGrant](#bytebase-v1-RoleGrant)- [SearchIssuesRequest](#bytebase-v1-SearchIssuesRequest)- [SearchIssuesResponse](#bytebase-v1-SearchIssuesResponse)- [UpdateIssueCommentRequest](#bytebase-v1-UpdateIssueCommentRequest)@@ -1324,24 +1324,6 @@ Webhook integration type.-<a name="bytebase-v1-GrantRequest"></a>--### GrantRequest----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| role | [string](#string) | | The requested role. Format: roles/EXPORTER. |-| user | [string](#string) | | The user to be granted. Format: users/{email}. |-| condition | [google.type.Expr](#google-type-Expr) | | The condition for the role. Same as the condition in IAM Binding message. |-| expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for which the grant is valid. |------<a name="bytebase-v1-Issue"></a>### Issue@@ -1361,7 +1343,7 @@ Webhook integration type.| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | || update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | || plan | [string](#string) | | The plan associated with the issue. Can be empty. Format: projects/{project}/plans/{plan} |-| grant_request | [GrantRequest](#bytebase-v1-GrantRequest) | | Used if the issue type is GRANT_REQUEST. |+| role_grant | [RoleGrant](#bytebase-v1-RoleGrant) | | Used if the issue type is ROLE_GRANT. || risk_level | [RiskLevel](#bytebase-v1-RiskLevel) | | The risk level of the issue. || labels | [string](#string) | repeated | Labels attached to the issue for categorization and filtering. || approval_status | [Issue.ApprovalStatus](#bytebase-v1-Issue-ApprovalStatus) | | |@@ -1574,6 +1556,24 @@ For example: creator == "users/[email protected]" && status in [&#+<a name="bytebase-v1-RoleGrant"></a>++### RoleGrant++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| role | [string](#string) | | The requested role. Format: roles/EXPORTER. |+| user | [string](#string) | | The user to be granted. Format: users/{email}. |+| condition | [google.type.Expr](#google-type-Expr) | | The condition for the role. Same as the condition in IAM Binding message. |+| expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for which the grant is valid. |++++++<a name="bytebase-v1-SearchIssuesRequest"></a>### SearchIssuesRequest@@ -1690,7 +1690,7 @@ The type of issue.| ---- | ------ | ----------- || TYPE_UNSPECIFIED | 0 | Unspecified issue type. || DATABASE_CHANGE | 1 | Database schema or data change. |-| GRANT_REQUEST | 2 | Database access grant request. |+| ROLE_GRANT | 2 | Role grant request. || DATABASE_EXPORT | 3 | Database data export request. || ACCESS_GRANT | 4 | Temporary access grant request. |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 76488907a4..7a4eb4e67d 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -347,10 +347,6 @@<a href="#bytebase.v1.GetIssueRequest"><span class="badge">M</span>GetIssueRequest</a></li>- <li>- <a href="#bytebase.v1.GrantRequest"><span class="badge">M</span>GrantRequest</a>- </li>-<li><a href="#bytebase.v1.Issue"><span class="badge">M</span>Issue</a></li>@@ -399,6 +395,10 @@<a href="#bytebase.v1.RequestIssueRequest"><span class="badge">M</span>RequestIssueRequest</a></li>+ <li>+ <a href="#bytebase.v1.RoleGrant"><span class="badge">M</span>RoleGrant</a>+ </li>+<li><a href="#bytebase.v1.SearchIssuesRequest"><span class="badge">M</span>SearchIssuesRequest</a></li>@@ -4537,53 +4537,6 @@ Format: projects/{project}/issues/{issue} </p></td>- <h3 id="bytebase.v1.GrantRequest">GrantRequest</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 requested role.-Format: roles/EXPORTER. </p></td>- </tr>-- <tr>- <td>user</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The user to be granted.-Format: users/{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 for the role. Same as the condition in IAM Binding message. </p></td>- </tr>-- <tr>- <td>expiration</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>- <td></td>- <td><p>The duration for which the grant is valid. </p></td>- </tr>-- </tbody>- </table>-----<h3 id="bytebase.v1.Issue">Issue</h3><p></p>@@ -4675,10 +4628,10 @@ Format: projects/{project}/plans/{plan} </p></td></tr><tr>- <td>grant_request</td>- <td><a href="#bytebase.v1.GrantRequest">GrantRequest</a></td>+ <td>role_grant</td>+ <td><a href="#bytebase.v1.RoleGrant">RoleGrant</a></td><td></td>- <td><p>Used if the issue type is GRANT_REQUEST. </p></td>+ <td><p>Used if the issue type is ROLE_GRANT. </p></td></tr><tr>@@ -5231,6 +5184,53 @@ Format: projects/{project}/issues/{issue} </p></td>+ <h3 id="bytebase.v1.RoleGrant">RoleGrant</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 requested role.+Format: roles/EXPORTER. </p></td>+ </tr>++ <tr>+ <td>user</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The user to be granted.+Format: users/{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 for the role. Same as the condition in IAM Binding message. </p></td>+ </tr>++ <tr>+ <td>expiration</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>The duration for which the grant is valid. </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.v1.SearchIssuesRequest">SearchIssuesRequest</h3><p></p>@@ -5533,9 +5533,9 @@ In this situation, `update_mask` is ignored. </p></td></tr><tr>- <td>GRANT_REQUEST</td>+ <td>ROLE_GRANT</td><td>2</td>- <td><p>Database access grant request.</p></td>+ <td><p>Role grant request.</p></td></tr><tr>diff --git a/proto/store/store/issue.proto b/proto/store/store/issue.protoindex 8c2351a934..65461a5818 100644--- a/proto/store/store/issue.proto+++ b/proto/store/store/issue.proto@@ -16,8 +16,8 @@ message Issue {ISSUE_TYPE_UNSPECIFIED = 0;// Issue for database schema or data changes.DATABASE_CHANGE = 1;- // Issue requesting database access permissions.- GRANT_REQUEST = 2;+ // Role grant request.+ ROLE_GRANT = 2;// Issue for exporting data from databases.DATABASE_EXPORT = 3;// Temporary access grant request.@@ -37,8 +37,8 @@ message Issue {// Approval information for the issue workflow.IssuePayloadApproval approval = 1;- // Access grant request details if this is a grant request issue.- GrantRequest grant_request = 2;+ // Role grant details if this is a role grant issue.+ RoleGrant role_grant = 2;// Labels attached to categorize and filter the issue.repeated string labels = 3;// Risk level for the issue, calculated from statement types.@@ -48,8 +48,8 @@ message Issue {string access_grant_id = 5;}-// GrantRequest contains details for requesting database access permissions.-message GrantRequest {+// RoleGrant contains details for requesting a project role.+message RoleGrant {// The role being requested for the user.// Format: roles/EXPORTER.string role = 1;diff --git a/proto/v1/v1/issue_service.proto b/proto/v1/v1/issue_service.protoindex 44bcc82a5d..0cce035ac3 100644--- a/proto/v1/v1/issue_service.proto+++ b/proto/v1/v1/issue_service.proto@@ -386,8 +386,8 @@ message Issue {TYPE_UNSPECIFIED = 0;// Database schema or data change.DATABASE_CHANGE = 1;- // Database access grant request.- GRANT_REQUEST = 2;+ // Role grant request.+ ROLE_GRANT = 2;// Database data export request.DATABASE_EXPORT = 3;// Temporary access grant request.@@ -434,8 +434,8 @@ message Issue {// Format: projects/{project}/plans/{plan}string plan = 11;- // Used if the issue type is GRANT_REQUEST.- GrantRequest grant_request = 13;+ // Used if the issue type is ROLE_GRANT.+ RoleGrant role_grant = 13;// The risk level of the issue.RiskLevel risk_level = 15;@@ -468,7 +468,7 @@ message Issue {];}-message GrantRequest {+message RoleGrant {// The requested role.// Format: roles/EXPORTER.string role = 1;