Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: support ServiceAccountSelect and WorkloadIdentitySelect (#19133)
ecmadao55eeb52ea183
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex 5374cf6d38..a26bac76d0 100644--- a/backend/api/mcp/gen/openapi.yaml+++ b/backend/api/mcp/gen/openapi.yaml@@ -12470,6 +12470,22 @@ components:type: booleantitle: show_deleteddescription: Show deleted service accounts if specified.+ filter:+ type: string+ title: filter+ description: |-+ Filter is used to filter service accounts returned in the list.+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++ Supported filter:+ - name: the service account name, support "==" and ".matches()" operator.+ - email: the service account email, support "==" and ".matches()" operator.++ For example:+ name == "ed"+ name.matches("ed")+ email == "[email protected]"+ email.matches("ed")title: ListServiceAccountsRequestadditionalProperties: falsedescription: Request message for listing service accounts.@@ -12630,6 +12646,22 @@ components:type: booleantitle: show_deleteddescription: Show deleted workload identities if specified.+ filter:+ type: string+ title: filter+ description: |-+ Filter is used to filter workload identities returned in the list.+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++ Supported filter:+ - name: the workload identity name, support "==" and ".matches()" operator.+ - email: the workload identity email, support "==" and ".matches()" operator.++ For example:+ name == "ed"+ name.matches("ed")+ email == "[email protected]"+ email.matches("ed")title: ListWorkloadIdentitiesRequestadditionalProperties: falsedescription: Request message for listing workload identities.diff --git a/backend/api/v1/service_account_service.go b/backend/api/v1/service_account_service.goindex be0d260534..385490437b 100644--- a/backend/api/v1/service_account_service.go+++ b/backend/api/v1/service_account_service.go@@ -156,12 +156,18 @@ func (s *ServiceAccountService) ListServiceAccounts(ctx context.Context, request}limitPlusOne := offset.limit + 1+ filterResult, err := store.GetAccountListFilter(request.Msg.Filter)+ if err != nil {+ return nil, connect.NewError(connect.CodeInvalidArgument, err)+ }+// List service accounts using the store method with project filteringsas, err := s.store.ListServiceAccounts(ctx, &store.FindServiceAccountMessage{Project: projectID,Limit: &limitPlusOne,Offset: &offset.offset,ShowDeleted: request.Msg.ShowDeleted,+ FilterQ: filterResult.Query,})if err != nil {return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to list service accounts"))diff --git a/backend/api/v1/workload_identity_service.go b/backend/api/v1/workload_identity_service.goindex c7ce43d2bd..ed5de7fc49 100644--- a/backend/api/v1/workload_identity_service.go+++ b/backend/api/v1/workload_identity_service.go@@ -144,12 +144,18 @@ func (s *WorkloadIdentityService) ListWorkloadIdentities(ctx context.Context, re}limitPlusOne := offset.limit + 1+ filterResult, err := store.GetAccountListFilter(request.Msg.Filter)+ if err != nil {+ return nil, connect.NewError(connect.CodeInvalidArgument, err)+ }+// List workload identities using the store method with project filteringwis, err := s.store.ListWorkloadIdentities(ctx, &store.FindWorkloadIdentityMessage{Project: projectID,Limit: &limitPlusOne,Offset: &offset.offset,ShowDeleted: request.Msg.ShowDeleted,+ FilterQ: filterResult.Query,})if err != nil {return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to list workload identities"))diff --git a/backend/generated-go/v1/service_account_service.pb.go b/backend/generated-go/v1/service_account_service.pb.goindex a8f46148c7..2f1b5a3be1 100644--- a/backend/generated-go/v1/service_account_service.pb.go+++ b/backend/generated-go/v1/service_account_service.pb.go@@ -252,7 +252,20 @@ type ListServiceAccountsRequest struct {// the call that provided the page token.PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`// Show deleted service accounts if specified.- ShowDeleted bool `protobuf:"varint,4,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"`+ ShowDeleted bool `protobuf:"varint,4,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"`+ // Filter is used to filter service accounts returned in the list.+ // The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+ //+ // Supported filter:+ // - name: the service account name, support "==" and ".matches()" operator.+ // - email: the service account email, support "==" and ".matches()" operator.+ //+ // For example:+ // name == "ed"+ // name.matches("ed")+ // email == "[email protected]"+ // email.matches("ed")+ Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -315,6 +328,13 @@ func (x *ListServiceAccountsRequest) GetShowDeleted() bool {return false}+func (x *ListServiceAccountsRequest) GetFilter() string {+ if x != nil {+ return x.Filter+ }+ return ""+}+// Response message for listing service accounts.type ListServiceAccountsResponse struct {state protoimpl.MessageState `protogen:"open.v1"`@@ -546,14 +566,15 @@ const file_v1_service_account_service_proto_rawDesc = "" +"\x0fservice_account\x18\x03 \x01(\v2\x1b.bytebase.v1.ServiceAccountB\x03\xe0A\x02R\x0eserviceAccount\"S\n" +"\x18GetServiceAccountRequest\x127\n" +"\x04name\x18\x01 \x01(\tB#\xe0A\x02\xfaA\x1d\n" +- "\x1bbytebase.com/ServiceAccountR\x04name\"\xae\x01\n" ++ "\x1bbytebase.com/ServiceAccountR\x04name\"\xc6\x01\n" +"\x1aListServiceAccountsRequest\x121\n" +"\x06parent\x18\x01 \x01(\tB\x19\xfaA\x16\n" +"\x14bytebase.com/ProjectR\x06parent\x12\x1b\n" +"\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" +"\n" +"page_token\x18\x03 \x01(\tR\tpageToken\x12!\n" +- "\fshow_deleted\x18\x04 \x01(\bR\vshowDeleted\"\x8d\x01\n" ++ "\fshow_deleted\x18\x04 \x01(\bR\vshowDeleted\x12\x16\n" ++ "\x06filter\x18\x05 \x01(\tR\x06filter\"\x8d\x01\n" +"\x1bListServiceAccountsResponse\x12F\n" +"\x10service_accounts\x18\x01 \x03(\v2\x1b.bytebase.v1.ServiceAccountR\x0fserviceAccounts\x12&\n" +"\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xa5\x01\n" +diff --git a/backend/generated-go/v1/service_account_service_equal.pb.go b/backend/generated-go/v1/service_account_service_equal.pb.goindex b8724f1202..bfc22ea6fc 100644--- a/backend/generated-go/v1/service_account_service_equal.pb.go+++ b/backend/generated-go/v1/service_account_service_equal.pb.go@@ -87,6 +87,9 @@ func (x *ListServiceAccountsRequest) Equal(y *ListServiceAccountsRequest) bool {if x.ShowDeleted != y.ShowDeleted {return false}+ if x.Filter != y.Filter {+ return false+ }return true}diff --git a/backend/generated-go/v1/workload_identity_service.pb.go b/backend/generated-go/v1/workload_identity_service.pb.goindex f63bf6b059..ce51e6b69f 100644--- a/backend/generated-go/v1/workload_identity_service.pb.go+++ b/backend/generated-go/v1/workload_identity_service.pb.go@@ -252,7 +252,20 @@ type ListWorkloadIdentitiesRequest struct {// the call that provided the page token.PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`// Show deleted workload identities if specified.- ShowDeleted bool `protobuf:"varint,4,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"`+ ShowDeleted bool `protobuf:"varint,4,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"`+ // Filter is used to filter workload identities returned in the list.+ // The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+ //+ // Supported filter:+ // - name: the workload identity name, support "==" and ".matches()" operator.+ // - email: the workload identity email, support "==" and ".matches()" operator.+ //+ // For example:+ // name == "ed"+ // name.matches("ed")+ // email == "[email protected]"+ // email.matches("ed")+ Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -315,6 +328,13 @@ func (x *ListWorkloadIdentitiesRequest) GetShowDeleted() bool {return false}+func (x *ListWorkloadIdentitiesRequest) GetFilter() string {+ if x != nil {+ return x.Filter+ }+ return ""+}+// Response message for listing workload identities.type ListWorkloadIdentitiesResponse struct {state protoimpl.MessageState `protogen:"open.v1"`@@ -545,14 +565,15 @@ const file_v1_workload_identity_service_proto_rawDesc = "" +"\x11workload_identity\x18\x03 \x01(\v2\x1d.bytebase.v1.WorkloadIdentityB\x03\xe0A\x02R\x10workloadIdentity\"W\n" +"\x1aGetWorkloadIdentityRequest\x129\n" +"\x04name\x18\x01 \x01(\tB%\xe0A\x02\xfaA\x1f\n" +- "\x1dbytebase.com/WorkloadIdentityR\x04name\"\xb1\x01\n" ++ "\x1dbytebase.com/WorkloadIdentityR\x04name\"\xc9\x01\n" +"\x1dListWorkloadIdentitiesRequest\x121\n" +"\x06parent\x18\x01 \x01(\tB\x19\xfaA\x16\n" +"\x14bytebase.com/ProjectR\x06parent\x12\x1b\n" +"\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" +"\n" +"page_token\x18\x03 \x01(\tR\tpageToken\x12!\n" +- "\fshow_deleted\x18\x04 \x01(\bR\vshowDeleted\"\x98\x01\n" ++ "\fshow_deleted\x18\x04 \x01(\bR\vshowDeleted\x12\x16\n" ++ "\x06filter\x18\x05 \x01(\tR\x06filter\"\x98\x01\n" +"\x1eListWorkloadIdentitiesResponse\x12N\n" +"\x13workload_identities\x18\x01 \x03(\v2\x1d.bytebase.v1.WorkloadIdentityR\x12workloadIdentities\x12&\n" +"\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xad\x01\n" +diff --git a/backend/generated-go/v1/workload_identity_service_equal.pb.go b/backend/generated-go/v1/workload_identity_service_equal.pb.goindex edbdbd7b40..52a495d7e5 100644--- a/backend/generated-go/v1/workload_identity_service_equal.pb.go+++ b/backend/generated-go/v1/workload_identity_service_equal.pb.go@@ -87,6 +87,9 @@ func (x *ListWorkloadIdentitiesRequest) Equal(y *ListWorkloadIdentitiesRequest)if x.ShowDeleted != y.ShowDeleted {return false}+ if x.Filter != y.Filter {+ return false+ }return true}diff --git a/backend/store/principal_filter.go b/backend/store/principal_filter.goindex ef76f49c5b..3dbbf41ed6 100644--- a/backend/store/principal_filter.go+++ b/backend/store/principal_filter.go@@ -22,6 +22,11 @@ type GetListUserFilterResult struct {UserTypes []storepb.PrincipalType}+// GetAccountListFilterResult contains the filter query for service accounts and workload identities.+type GetAccountListFilterResult struct {+ Query *qb.Query+}+// GetListUserFilter parses a CEL filter string and returns a query for filtering users.func GetListUserFilter(filter string) (*GetListUserFilterResult, error) {if filter == "" {@@ -205,3 +210,91 @@ func GetListUserFilter(filter string) (*GetListUserFilterResult, error) {UserTypes: userTypes,}, nil}++// GetAccountListFilter parses a CEL filter string and returns a query for filtering service accounts and workload identities.+func GetAccountListFilter(filter string) (*GetAccountListFilterResult, error) {+ if filter == "" {+ return &GetAccountListFilterResult{}, nil+ }++ e, err := cel.NewEnv()+ if err != nil {+ return nil, errors.Errorf("failed to create cel env")+ }+ ast, iss := e.Parse(filter)+ if iss != nil {+ return nil, errors.Errorf("failed to parse filter %v, error: %v", filter, iss.String())+ }++ var getFilter func(expr celast.Expr) (*qb.Query, error)++ parseToSQL := func(variable string, value any) (*qb.Query, error) {+ switch variable {+ case "email":+ return qb.Q().Space("principal.email = ?", value.(string)), nil+ case "name":+ return qb.Q().Space("principal.name = ?", value.(string)), nil+ default:+ return nil, errors.Errorf("unsupported variable %q", variable)+ }+ }++ getFilter = func(expr celast.Expr) (*qb.Query, error) {+ q := qb.Q()+ switch expr.Kind() {+ case celast.CallKind:+ functionName := expr.AsCall().FunctionName()+ switch functionName {+ case celoperators.LogicalOr:+ for _, arg := range expr.AsCall().Args() {+ qq, err := getFilter(arg)+ if err != nil {+ return nil, err+ }+ q.Or("?", qq)+ }+ return qb.Q().Space("(?)", q), nil+ case celoperators.LogicalAnd:+ for _, arg := range expr.AsCall().Args() {+ qq, err := getFilter(arg)+ if err != nil {+ return nil, err+ }+ q.And("?", qq)+ }+ return qb.Q().Space("(?)", q), nil+ case celoperators.Equals:+ variable, value := getVariableAndValueFromExpr(expr)+ return parseToSQL(variable, value)+ case celoverloads.Matches:+ variable := expr.AsCall().Target().AsIdent()+ args := expr.AsCall().Args()+ if len(args) != 1 {+ return nil, errors.Errorf(`invalid args for %q`, variable)+ }+ value := args[0].AsLiteral().Value()+ if variable != "name" && variable != "email" {+ return nil, errors.Errorf(`only "name" and "email" support %q operator, but found %q`, celoverloads.Matches, variable)+ }+ strValue, ok := value.(string)+ if !ok {+ return nil, errors.Errorf("expect string, got %T, hint: filter literals should be string", value)+ }+ return qb.Q().Space("LOWER(principal."+variable+") LIKE ?", "%"+strings.ToLower(strValue)+"%"), nil+ default:+ return nil, errors.Errorf("unexpected function %v", functionName)+ }+ default:+ return nil, errors.Errorf("unexpected expr kind %v", expr.Kind())+ }+ }++ q, err := getFilter(ast.NativeRep().Expr())+ if err != nil {+ return nil, err+ }++ return &GetAccountListFilterResult{+ Query: qb.Q().Space("(?)", q),+ }, nil+}diff --git a/backend/store/principal_service_account.go b/backend/store/principal_service_account.goindex cc4d3f30c9..8896b1cb54 100644--- a/backend/store/principal_service_account.go+++ b/backend/store/principal_service_account.go@@ -32,6 +32,8 @@ type FindServiceAccountMessage struct {Offset *int// Project filters by owning project. Use empty string for workspace-level service accounts.Project *string+ // FilterQ is the CEL filter query.+ FilterQ *qb.Query}// CreateServiceAccountMessage is the message for creating a service account.@@ -83,6 +85,9 @@ func (s *Store) ListServiceAccounts(ctx context.Context, find *FindServiceAccounwhere.And("project = ?", *v)}}+ if v := find.FilterQ; v != nil {+ where.And("?", v)+ }q := qb.Q().Space(`SELECTdiff --git a/backend/store/principal_workload_identity.go b/backend/store/principal_workload_identity.goindex 14fb3017f7..0493e0708b 100644--- a/backend/store/principal_workload_identity.go+++ b/backend/store/principal_workload_identity.go@@ -28,6 +28,8 @@ type WorkloadIdentityMessage struct {// LastLoginTime is the last login time of the workload identity.LastLoginTime *timestamppb.Timestamp}++// FindWorkloadIdentityMessage is the message for finding workload identities.type FindWorkloadIdentityMessage struct {ID *intEmail *string@@ -36,6 +38,8 @@ type FindWorkloadIdentityMessage struct {Offset *int// Project filters by owning project. Use empty string for workspace-level workload identities.Project *string+ // FilterQ is the CEL filter query.+ FilterQ *qb.Query}// CreateWorkloadIdentityMessage is the message for creating a workload identity.@@ -89,6 +93,9 @@ func (s *Store) ListWorkloadIdentities(ctx context.Context, find *FindWorkloadIdwhere.And("project = ?", *v)}}+ if v := find.FilterQ; v != nil {+ where.And("?", v)+ }q := qb.Q().Space(`SELECTdiff --git a/frontend/src/components/Member/EditMemberRoleDrawer.vue b/frontend/src/components/Member/EditMemberRoleDrawer.vueindex fe03424441..20125c06cd 100644--- a/frontend/src/components/Member/EditMemberRoleDrawer.vue+++ b/frontend/src/components/Member/EditMemberRoleDrawer.vue@@ -13,6 +13,7 @@:required="true":include-all-users="true":include-service-account="true"+ :include-workload-identity="true"/><div v-else class="w-full flex flex-col gap-y-2"><div class="flex items-center gap-x-1">diff --git a/frontend/src/components/Member/MembersBindingSelect.vue b/frontend/src/components/Member/MembersBindingSelect.vueindex bc157377fe..812bf7b695 100644--- a/frontend/src/components/Member/MembersBindingSelect.vue+++ b/frontend/src/components/Member/MembersBindingSelect.vue@@ -11,6 +11,12 @@@update:value="onTypeChange"><NRadio value="USERS">{{ $t("common.users") }}</NRadio>+ <NRadio v-if="includeServiceAccount" value="SERVICE_ACCOUNTS">+ {{ $t("settings.members.service-accounts") }}+ </NRadio>+ <NRadio v-if="includeWorkloadIdentity" value="WORKLOAD_IDENTITIES">+ {{ $t("settings.members.workload-identities") }}+ </NRadio><NRadio value="GROUPS">{{ $t("common.groups") }}</NRadio>@@ -44,13 +50,47 @@:disabled="disabled":project-name="projectName":include-all-users="includeAllUsers"- :include-service-account="includeServiceAccount"- :include-workload-identity="includeWorkloadIdentity"@update:value="onMemberListUpdate($event as string[])"/></div><div- v-else+ v-else-if="memberType === 'SERVICE_ACCOUNTS'"+ :class="[+ 'w-full flex flex-col gap-y-2',+ ]"+ >+ <div class="flex text-main items-center gap-x-1">+ {{ $t("settings.members.select-service-account", 2 /* multiply*/) }}+ <RequiredStar v-if="required" />+ </div>+ <ServiceAccountSelect+ key="service-account-select"+ :value="memberList"+ :multiple="true"+ :disabled="disabled"+ @update:value="onMemberListUpdate($event as string[])"+ />+ </div>+ <div+ v-else-if="memberType === 'WORKLOAD_IDENTITIES'"+ :class="[+ 'w-full flex flex-col gap-y-2',+ ]"+ >+ <div class="flex text-main items-center gap-x-1">+ {{ $t("settings.members.select-workload-identity", 2 /* multiply*/) }}+ <RequiredStar v-if="required" />+ </div>+ <WorkloadIdentitySelect+ key="workload-identity-select"+ :value="memberList"+ :multiple="true"+ :disabled="disabled"+ @update:value="onMemberListUpdate($event as string[])"+ />+ </div>+ <div+ v-else-if="memberType === 'GROUPS'":class="['w-full flex flex-col gap-y-2',]"@@ -77,7 +117,12 @@ import { uniq } from "lodash-es";import { NRadio, NRadioGroup } from "naive-ui";import { computed, ref } from "vue";import RequiredStar from "@/components/RequiredStar.vue";-import { GroupSelect, UserSelect } from "@/components/v2";+import {+ GroupSelect,+ ServiceAccountSelect,+ UserSelect,+ WorkloadIdentitySelect,+} from "@/components/v2";import {extractGroupEmail,extractServiceAccountId,@@ -93,10 +138,16 @@ import {getUserEmailInBinding,getWorkloadIdentityNameInBinding,groupBindingPrefix,+ serviceAccountBindingPrefix,+ workloadIdentityBindingPrefix,} from "@/types";import { convertMemberToFullname } from "@/utils";-type MemberType = "USERS" | "GROUPS";+type MemberType =+ | "USERS"+ | "SERVICE_ACCOUNTS"+ | "WORKLOAD_IDENTITIES"+ | "GROUPS";const props = withDefaults(defineProps<{@@ -129,12 +180,17 @@ const emit = defineEmits<{(event: "update:value", memberList: string[]): void;}>();-// TODO(ed): we'd probably support "SERVICE_ACCOUNT" and "WORKLOAD_IDENTITY"const initMemberType = computed((): MemberType => {for (const binding of props.value) {if (binding.startsWith(groupBindingPrefix)) {return "GROUPS";}+ if (binding.startsWith(serviceAccountBindingPrefix)) {+ return "SERVICE_ACCOUNTS";+ }+ if (binding.startsWith(workloadIdentityBindingPrefix)) {+ return "WORKLOAD_IDENTITIES";+ }return "USERS";}return "USERS";diff --git a/frontend/src/components/v2/Select/ServiceAccountSelect.vue b/frontend/src/components/v2/Select/ServiceAccountSelect.vuenew file mode 100644index 0000000000..62e165f31d--- /dev/null+++ b/frontend/src/components/v2/Select/ServiceAccountSelect.vue@@ -0,0 +1,151 @@+<template>+ <RemoteResourceSelector+ v-bind="$attrs"+ :multiple="multiple"+ :disabled="disabled"+ :size="size"+ :value="value"+ :tag="!hasPermission"+ :remote="hasPermission"+ :additional-options="additionalOptions"+ :render-label="renderLabel"+ :render-tag="renderTag"+ :search="handleSearch"+ :filter="filter"+ @update:value="(val) => $emit('update:value', val)"+ />+</template>++<script lang="tsx" setup>+import { computedAsync } from "@vueuse/core";+import { computed } from "vue";+import { HighlightLabelText } from "@/components/v2";+import { UserNameCell } from "@/components/v2/Model/cells";+import { serviceAccountToUser, useServiceAccountStore } from "@/store";+import type { ServiceAccount } from "@/types/proto-es/v1/service_account_service_pb";+import { hasWorkspacePermissionV2 } from "@/utils";+import RemoteResourceSelector from "./RemoteResourceSelector/index.vue";+import type {+ ResourceSelectOption,+ SelectSize,+} from "./RemoteResourceSelector/types";+import {+ getRenderLabelFunc,+ getRenderTagFunc,+} from "./RemoteResourceSelector/utils";++const props = defineProps<{+ multiple?: boolean;+ disabled?: boolean;+ size?: SelectSize;+ value?: string | string[] | undefined; // serviceAccounts/{email}+ filter?: (serviceAccount: ServiceAccount) => boolean;+}>();++defineEmits<{+ // the value is serviceAccounts/{email}+ (event: "update:value", value: string[] | string | undefined): void;+}>();++const serviceAccountStore = useServiceAccountStore();++const hasPermission = computed(() =>+ hasWorkspacePermissionV2("bb.serviceAccounts.list")+);++const getOption = (+ serviceAccount: ServiceAccount+): ResourceSelectOption<ServiceAccount> => ({+ resource: serviceAccount,+ value: serviceAccount.name,+ label: serviceAccount.title,+});++const additionalOptions = computedAsync(async () => {+ const options: ResourceSelectOption<ServiceAccount>[] = [];++ let names: string[] = [];+ if (Array.isArray(props.value)) {+ names = props.value;+ } else if (props.value) {+ names = [props.value];+ }++ for (const name of names) {+ const serviceAccount = await serviceAccountStore.getOrFetchServiceAccount(+ name,+ true+ );+ if (serviceAccount) {+ options.push(getOption(serviceAccount));+ }+ }++ return options;+}, []);++const handleSearch = async (params: {+ search: string;+ pageToken: string;+ pageSize: number;+}) => {+ const { serviceAccounts, nextPageToken } =+ await serviceAccountStore.listServiceAccounts({+ pageSize: params.pageSize,+ pageToken: params.pageToken,+ showDeleted: false,+ filter: {+ query: params.search.toLowerCase(),+ },+ });++ return {+ nextPageToken,+ options: serviceAccounts.map(getOption),+ };+};++const customLabel = (serviceAccount: ServiceAccount, keyword: string) => {+ const user = serviceAccountToUser(serviceAccount);+ return (+ <UserNameCell+ user={user}+ allowEdit={false}+ showMfaEnabled={false}+ showSource={false}+ showEmail={false}+ link={false}+ size="small"+ keyword={keyword}+ onClickUser={() => {}}+ >+ {{+ suffix: () => (+ <span class="textinfolabel truncate">+ (+ <HighlightLabelText keyword={keyword} text={serviceAccount.email} />+ )+ </span>+ ),+ }}+ </UserNameCell>+ );+};++const renderLabel = computed(() => {+ return getRenderLabelFunc({+ multiple: props.multiple,+ customLabel,+ showResourceName: false,+ });+});++const renderTag = computed(() => {+ return getRenderTagFunc({+ multiple: props.multiple,+ disabled: props.disabled,+ size: props.size,+ customLabel,+ });+});+</script>diff --git a/frontend/src/components/v2/Select/UserSelect.vue b/frontend/src/components/v2/Select/UserSelect.vueindex 75214da1f3..65733c571b 100644--- a/frontend/src/components/v2/Select/UserSelect.vue+++ b/frontend/src/components/v2/Select/UserSelect.vue@@ -44,8 +44,6 @@ const props = defineProps<{// allUsers is a special user that represents all users in the project.includeAllUsers?: boolean;includeSystemBot?: boolean;- includeServiceAccount?: boolean;- includeWorkloadIdentity?: boolean;filter?: (user: User) => boolean;}>();@@ -64,15 +62,9 @@ const getFilter = (search: string): UserFilter => {filter.push(`(name.matches("${search}") || email.matches("${search}"))`);}const allowedType = [UserType.USER];- if (props.includeServiceAccount) {- allowedType.push(UserType.SERVICE_ACCOUNT);- }if (props.includeSystemBot) {allowedType.push(UserType.SYSTEM_BOT);}- if (props.includeWorkloadIdentity) {- allowedType.push(UserType.WORKLOAD_IDENTITY);- }return {query: search,diff --git a/frontend/src/components/v2/Select/WorkloadIdentitySelect.vue b/frontend/src/components/v2/Select/WorkloadIdentitySelect.vuenew file mode 100644index 0000000000..593ab78ad3--- /dev/null+++ b/frontend/src/components/v2/Select/WorkloadIdentitySelect.vue@@ -0,0 +1,152 @@+<template>+ <RemoteResourceSelector+ v-bind="$attrs"+ :multiple="multiple"+ :disabled="disabled"+ :size="size"+ :value="value"+ :tag="!hasPermission"+ :remote="hasPermission"+ :additional-options="additionalOptions"+ :render-label="renderLabel"+ :render-tag="renderTag"+ :search="handleSearch"+ :filter="filter"+ @update:value="(val) => $emit('update:value', val)"+ />+</template>++<script lang="tsx" setup>+import { computedAsync } from "@vueuse/core";+import { computed } from "vue";+import { HighlightLabelText } from "@/components/v2";+import { UserNameCell } from "@/components/v2/Model/cells";+import { useWorkloadIdentityStore, workloadIdentityToUser } from "@/store";+import type { WorkloadIdentity } from "@/types/proto-es/v1/workload_identity_service_pb";+import { hasWorkspacePermissionV2 } from "@/utils";+import RemoteResourceSelector from "./RemoteResourceSelector/index.vue";+import type {+ ResourceSelectOption,+ SelectSize,+} from "./RemoteResourceSelector/types";+import {+ getRenderLabelFunc,+ getRenderTagFunc,+} from "./RemoteResourceSelector/utils";++const props = defineProps<{+ multiple?: boolean;+ disabled?: boolean;+ size?: SelectSize;+ value?: string | string[] | undefined; // workloadIdentities/{email}+ filter?: (workloadIdentity: WorkloadIdentity) => boolean;+}>();++defineEmits<{+ // the value is workloadIdentities/{email}+ (event: "update:value", value: string[] | string | undefined): void;+}>();++const workloadIdentityStore = useWorkloadIdentityStore();++const hasPermission = computed(() =>+ hasWorkspacePermissionV2("bb.workloadIdentities.list")+);++const getOption = (+ workloadIdentity: WorkloadIdentity+): ResourceSelectOption<WorkloadIdentity> => ({+ resource: workloadIdentity,+ value: workloadIdentity.name,+ label: workloadIdentity.title,+});++const additionalOptions = computedAsync(async () => {+ const options: ResourceSelectOption<WorkloadIdentity>[] = [];++ let names: string[] = [];+ if (Array.isArray(props.value)) {+ names = props.value;+ } else if (props.value) {+ names = [props.value];+ }++ for (const name of names) {+ const workloadIdentity =+ await workloadIdentityStore.getOrFetchWorkloadIdentity(name, true);+ if (workloadIdentity) {+ options.push(getOption(workloadIdentity));+ }+ }++ return options;+}, []);++const handleSearch = async (params: {+ search: string;+ pageToken: string;+ pageSize: number;+}) => {+ const { workloadIdentities, nextPageToken } =+ await workloadIdentityStore.listWorkloadIdentities({+ pageSize: params.pageSize,+ pageToken: params.pageToken,+ showDeleted: false,+ filter: {+ query: params.search.toLowerCase(),+ },+ });++ return {+ nextPageToken,+ options: workloadIdentities.map(getOption),+ };+};++const customLabel = (workloadIdentity: WorkloadIdentity, keyword: string) => {+ const user = workloadIdentityToUser(workloadIdentity);+ return (+ <UserNameCell+ user={user}+ allowEdit={false}+ showMfaEnabled={false}+ showSource={false}+ showEmail={false}+ link={false}+ size="small"+ keyword={keyword}+ onClickUser={() => {}}+ >+ {{+ suffix: () => (+ <span class="textinfolabel truncate">+ (+ <HighlightLabelText+ keyword={keyword}+ text={workloadIdentity.email}+ />+ )+ </span>+ ),+ }}+ </UserNameCell>+ );+};++const renderLabel = computed(() => {+ return getRenderLabelFunc({+ multiple: props.multiple,+ customLabel,+ showResourceName: false,+ });+});++const renderTag = computed(() => {+ return getRenderTagFunc({+ multiple: props.multiple,+ disabled: props.disabled,+ size: props.size,+ customLabel,+ });+});+</script>diff --git a/frontend/src/components/v2/Select/index.ts b/frontend/src/components/v2/Select/index.tsindex 660393d460..ee7a6ff6da 100644--- a/frontend/src/components/v2/Select/index.ts+++ b/frontend/src/components/v2/Select/index.ts@@ -5,7 +5,9 @@ import GroupSelect from "./GroupSelect.vue";import InstanceSelect from "./InstanceSelect.vue";import ProjectSelect from "./ProjectSelect.vue";import RoleSelect from "./RoleSelect.vue";+import ServiceAccountSelect from "./ServiceAccountSelect.vue";import UserSelect from "./UserSelect.vue";+import WorkloadIdentitySelect from "./WorkloadIdentitySelect.vue";export {AnnouncementLevelSelect,@@ -14,6 +16,8 @@ export {EnvironmentSelect,ProjectSelect,UserSelect,+ ServiceAccountSelect,+ WorkloadIdentitySelect,GroupSelect,RoleSelect,};diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex ccfce753a9..f14d940c15 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -539,6 +539,8 @@"revoke-allusers-alert": "Revoke \"@:{'settings.members.all-users'}\" will revoke related roles from all other users in your workspace. Are you sure to continue?","grant-access": "Grant Access","select-user": "Select user | Select users",+ "select-service-account": "Select service account | Select service accounts",+ "select-workload-identity": "Select workload-identity | Select workload identities","select-group": "Select group | Select groups","select-in-project": "Select users or groups in {project}","select-role": "Select role | Select roles",diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 82a33aacb6..b82b4c143b 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -539,6 +539,8 @@"revoke-allusers-alert": "Revocar \"@:{'settings.members.all-users'}\" revocará los roles relacionados de todos los demás usuarios de su espacio de trabajo. ¿Desea continuar?","grant-access": "Conceder acceso","select-user": "Seleccionar usuario | Seleccionar usuarios",+ "select-service-account": "Seleccionar cuenta de servicio | Seleccionar cuentas de servicio",+ "select-workload-identity": "Seleccionar identidad de carga de trabajo | Seleccionar identidades de carga de trabajo","select-group": "Seleccionar grupo | Seleccionar grupos","select-in-project": "Seleccione usuarios o grupos en {project}","select-role": "Seleccionar rol | Seleccionar roles",diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex eda6323c0f..9f5b48f0f3 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -539,6 +539,8 @@"revoke-allusers-alert": "「@:{'settings.members.all-users'}」を取り消すと、ワークスペース内の他のすべてのユーザーの関連ロールが取り消されます。続行しますか?","grant-access": "アクセスを許可する","select-user": "ユーザーを選択 | ユーザーを選択",+ "select-service-account": "サービスアカウントを選択 | サービスアカウントを選択",+ "select-workload-identity": "ワークロードアイデンティティを選択 | ワークロードアイデンティティを選択","select-group": "グループを選択 | グループを選択","select-in-project": "{project} 内のユーザーまたはグループを選択してください","select-role": "役割を選択 | 役割を選択",diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex c5a32c2cb5..00a54eb79b 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -539,6 +539,8 @@"revoke-allusers-alert": "Thu hồi \"@:{'settings.members.all-users'}\" sẽ thu hồi các vai trò liên quan từ tất cả người dùng khác trong không gian làm việc của bạn. Bạn có chắc chắn muốn tiếp tục không?","grant-access": "Cấp Quyền truy cập","select-user": "Chọn người dùng | Chọn người dùng",+ "select-service-account": "Chọn tài khoản dịch vụ | Chọn tài khoản dịch vụ",+ "select-workload-identity": "Chọn danh tính khối lượng công việc | Chọn danh tính khối lượng công việc","select-group": "Chọn nhóm | Chọn nhóm","select-in-project": "Chọn người dùng hoặc nhóm trong {project}","select-role": "Chọn vai trò | Chọn vai trò",diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 3dceefa850..7345d50545 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -539,6 +539,8 @@"revoke-allusers-alert": "撤销“@:{'settings.members.all-users'}”将撤销您工作区中所有其他用户的相关角色。您确定要继续吗?","grant-access": "授予访问权限","select-user": "选择用户 | 选择用户",+ "select-service-account": "选择服务账号 | 选择服务账号",+ "select-workload-identity": "选择工作负载身份 | 选择工作负载身份","select-group": "选择组 | 选择组","select-in-project": "选择 {project} 内的用户或群组","select-role": "选择角色 | 选择角色",diff --git a/frontend/src/store/modules/serviceAccount.ts b/frontend/src/store/modules/serviceAccount.tsindex 9e4a7b9f03..8a98f4e1d2 100644--- a/frontend/src/store/modules/serviceAccount.ts+++ b/frontend/src/store/modules/serviceAccount.ts@@ -23,6 +23,19 @@ import {import { useActuatorV1Store } from "./v1/actuator";import { extractServiceAccountId, serviceAccountNamePrefix } from "./v1/common";+export interface AccountFilter {+ query?: string;+}++export const getAccountListFilter = (params: AccountFilter) => {+ const filter = [];+ const search = params.query?.trim()?.toLowerCase();+ if (search) {+ filter.push(`(name.matches("${search}") || email.matches("${search}"))`);+ }+ return filter.join(" && ");+};+const ensureServiceAccountFullName = (identifier: string) => {const id = extractServiceAccountId(identifier);return `${serviceAccountNamePrefix}${id}`;@@ -32,15 +45,22 @@ export const useServiceAccountStore = defineStore("serviceAccount", () => {const actuatorStore = useActuatorV1Store();const cacheByName = ref<Map<string, ServiceAccount>>(new Map());- const listServiceAccounts = async (- pageSize: number,- pageToken: string | undefined,- showDeleted: boolean- ) => {+ const listServiceAccounts = async ({+ pageSize,+ pageToken,+ showDeleted,+ filter,+ }: {+ pageSize: number;+ pageToken: string | undefined;+ showDeleted: boolean;+ filter?: AccountFilter;+ }) => {const request = create(ListServiceAccountsRequestSchema, {pageSize,pageToken,showDeleted,+ filter: getAccountListFilter(filter ?? {}),});return serviceAccountServiceClientConnect.listServiceAccounts(request);};diff --git a/frontend/src/store/modules/user.ts b/frontend/src/store/modules/user.tsindex 76beee56ae..fae6096af9 100644--- a/frontend/src/store/modules/user.ts+++ b/frontend/src/store/modules/user.ts@@ -30,14 +30,9 @@ import {UserType,} from "@/types/proto-es/v1/user_service_pb";import { ensureUserFullName, hasWorkspacePermissionV2 } from "@/utils";-import { serviceAccountToUser, useServiceAccountStore } from "./serviceAccount";import { useActuatorV1Store } from "./v1/actuator";import { extractUserId, userNamePrefix } from "./v1/common";import { usePermissionStore } from "./v1/permission";-import {- useWorkloadIdentityStore,- workloadIdentityToUser,-} from "./workloadIdentity";export interface UserFilter {query?: string;@@ -69,8 +64,6 @@ const getListUserFilter = (params: UserFilter) => {export const useUserStore = defineStore("user", () => {const actuatorStore = useActuatorV1Store();- const serviceAccountStore = useServiceAccountStore();- const workloadIdentityStore = useWorkloadIdentityStore();const allUser = computed(() => allUsersUser());const userRequestCache = new Map<string, Promise<User>>();@@ -105,81 +98,21 @@ export const useUserStore = defineStore("user", () => {};}- const requestedTypes = params.filter?.types ?? [- UserType.USER,- UserType.SERVICE_ACCOUNT,- UserType.WORKLOAD_IDENTITY,- UserType.SYSTEM_BOT,- ];const showDeleted = params.filter?.state === State.DELETED;- const allUsers: User[] = [];-- const needsUserService = requestedTypes.some(- (t) => t === UserType.USER || t === UserType.SYSTEM_BOT- );- const needsServiceAccountService = requestedTypes.includes(- UserType.SERVICE_ACCOUNT- );- const needsWorkloadIdentityService = requestedTypes.includes(- UserType.WORKLOAD_IDENTITY- );-- const promises: Promise<void>[] = [];-- if (needsUserService) {- const userPromise = (async () => {- const request = create(ListUsersRequestSchema, {- pageSize: params.pageSize,- pageToken: params.pageToken,- filter: getListUserFilter(params.filter ?? {}),- showDeleted,- });- const response = await userServiceClientConnect.listUsers(request);- for (const user of response.users) {- setUser(user);- allUsers.push(user);- }- })();- promises.push(userPromise);- }-- if (needsServiceAccountService) {- const saPromise = (async () => {- const response = await serviceAccountStore.listServiceAccounts(- params.pageSize,- params.pageToken,- showDeleted- );- for (const sa of response.serviceAccounts) {- const user = serviceAccountToUser(sa);- setUser(user);- allUsers.push(user);- }- })();- promises.push(saPromise);- }-- if (needsWorkloadIdentityService) {- const wiPromise = (async () => {- const response = await workloadIdentityStore.listWorkloadIdentities(- params.pageSize,- params.pageToken,- showDeleted- );- for (const wi of response.workloadIdentities) {- const user = workloadIdentityToUser(wi);- setUser(user);- allUsers.push(user);- }- })();- promises.push(wiPromise);+ const request = create(ListUsersRequestSchema, {+ pageSize: params.pageSize,+ pageToken: params.pageToken,+ filter: getListUserFilter(params.filter ?? {}),+ showDeleted,+ });+ const response = await userServiceClientConnect.listUsers(request);+ for (const user of response.users) {+ setUser(user);}- await Promise.all(promises);-return {- users: allUsers,- nextPageToken: "",+ users: response.users,+ nextPageToken: response.nextPageToken,};};diff --git a/frontend/src/store/modules/workloadIdentity.ts b/frontend/src/store/modules/workloadIdentity.tsindex 3dc1e47b48..386a64ff25 100644--- a/frontend/src/store/modules/workloadIdentity.ts+++ b/frontend/src/store/modules/workloadIdentity.ts@@ -20,6 +20,7 @@ import {UpdateWorkloadIdentityRequestSchema,WorkloadIdentitySchema,} from "@/types/proto-es/v1/workload_identity_service_pb";+import { type AccountFilter, getAccountListFilter } from "./serviceAccount";import { useActuatorV1Store } from "./v1/actuator";import {extractWorkloadIdentityId,@@ -35,15 +36,22 @@ export const useWorkloadIdentityStore = defineStore("workloadIdentity", () => {const actuatorStore = useActuatorV1Store();const cacheByName = ref<Map<string, WorkloadIdentity>>(new Map());- const listWorkloadIdentities = async (- pageSize: number,- pageToken: string | undefined,- showDeleted: boolean- ) => {+ const listWorkloadIdentities = async ({+ pageSize,+ pageToken,+ showDeleted,+ filter,+ }: {+ pageSize: number;+ pageToken: string | undefined;+ showDeleted: boolean;+ filter?: AccountFilter;+ }) => {const request = create(ListWorkloadIdentitiesRequestSchema, {pageSize,pageToken,showDeleted,+ filter: getAccountListFilter(filter ?? {}),});return workloadIdentityServiceClientConnect.listWorkloadIdentities(request);};diff --git a/frontend/src/types/proto-es/v1/service_account_service_pb.d.ts b/frontend/src/types/proto-es/v1/service_account_service_pb.d.tsindex 5e0296a10c..0f56842a7b 100644--- a/frontend/src/types/proto-es/v1/service_account_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/service_account_service_pb.d.ts@@ -169,6 +169,24 @@ export declare type ListServiceAccountsRequest = Message<"bytebase.v1.ListServic* @generated from field: bool show_deleted = 4;*/showDeleted: boolean;++ /**+ * Filter is used to filter service accounts returned in the list.+ * The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+ *+ * Supported filter:+ * - name: the service account name, support "==" and ".matches()" operator.+ * - email: the service account email, support "==" and ".matches()" operator.+ *+ * For example:+ * name == "ed"+ * name.matches("ed")+ * email == "[email protected]"+ * email.matches("ed")+ *+ * @generated from field: string filter = 5;+ */+ filter: string;};/**diff --git a/frontend/src/types/proto-es/v1/service_account_service_pb.js b/frontend/src/types/proto-es/v1/service_account_service_pb.jsindex c986d474cb..5f23e31d59 100644--- a/frontend/src/types/proto-es/v1/service_account_service_pb.js+++ b/frontend/src/types/proto-es/v1/service_account_service_pb.js@@ -16,7 +16,7 @@ import { file_v1_common } from "./common_pb";* Describes the file v1/service_account_service.proto.*/export const file_v1_service_account_service = /*@__PURE__*/- fileDesc("CiB2MS9zZXJ2aWNlX2FjY291bnRfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEi/gEKDlNlcnZpY2VBY2NvdW50EhEKBG5hbWUYASABKAlCA+BBAxIhCgVzdGF0ZRgCIAEoDjISLmJ5dGViYXNlLnYxLlN0YXRlEhIKBWVtYWlsGAMgASgJQgPgQQMSFwoFdGl0bGUYBCABKAlCCLpIBXIDGMgBEhgKC3NlcnZpY2Vfa2V5GAUgASgJQgPgQQMSNAoLY3JlYXRlX3RpbWUYBiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQM6OepBNgobYnl0ZWJhc2UuY29tL1NlcnZpY2VBY2NvdW50EhdzZXJ2aWNlQWNjb3VudHMve2VtYWlsfSKkAQobQ3JlYXRlU2VydmljZUFjY291bnRSZXF1ZXN0EikKBnBhcmVudBgBIAEoCUIZ+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBIfChJzZXJ2aWNlX2FjY291bnRfaWQYAiABKAlCA+BBAhI5Cg9zZXJ2aWNlX2FjY291bnQYAyABKAsyGy5ieXRlYmFzZS52MS5TZXJ2aWNlQWNjb3VudEID4EECIk0KGEdldFNlcnZpY2VBY2NvdW50UmVxdWVzdBIxCgRuYW1lGAEgASgJQiPgQQL6QR0KG2J5dGViYXNlLmNvbS9TZXJ2aWNlQWNjb3VudCKEAQoaTGlzdFNlcnZpY2VBY2NvdW50c1JlcXVlc3QSKQoGcGFyZW50G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mljZUFjY291bnQSKi5ieXRlYmFzZS52MS5VbmRlbGV0ZVNlcnZpY2VBY2NvdW50UmVxdWVzdBobLmJ5dGViYXNlLnYxLlNlcnZpY2VBY2NvdW50IleK6jAbYmIuc2VydmljZUFjY291bnRzLnVuZGVsZXRlkOowAZjqMAGC0+STAio6ASoiJS92MS97bmFtZT1zZXJ2aWNlQWNjb3VudHMvKn06dW5kZWxldGVCsAEKD2NvbS5ieXRlYmFzZS52MUIaU2VydmljZUFjY291bnRTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common]);+ fileDesc("CiB2MS9zZXJ2aWNlX2FjY291bnRfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEi/gEKDlNlcnZpY2VBY2NvdW50EhEKBG5hbWUYASABKAlCA+BBAxIhCgVzdGF0ZRgCIAEoDjISLmJ5dGViYXNlLnYxLlN0YXRlEhIKBWVtYWlsGAMgASgJQgPgQQMSFwoFdGl0bGUYBCABKAlCCLpIBXIDGMgBEhgKC3NlcnZpY2Vfa2V5GAUgASgJQgPgQQMSNAoLY3JlYXRlX3RpbWUYBiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQM6OepBNgobYnl0ZWJhc2UuY29tL1NlcnZpY2VBY2NvdW50EhdzZXJ2aWNlQWNjb3VudHMve2VtYWlsfSKkAQobQ3JlYXRlU2VydmljZUFjY291bnRSZXF1ZXN0EikKBnBhcmVudBgBIAEoCUIZ+kEWChR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ljZV9hY2NvdW50MiwvdjEve3NlcnZpY2VfYWNjb3VudC5uYW1lPXNlcnZpY2VBY2NvdW50cy8qfRKqAQoURGVsZXRlU2VydmljZUFjY291bnQSKC5ieXRlYmFzZS52MS5EZWxldGVTZXJ2aWNlQWNjb3VudFJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHkiUNpBBG5hbWWK6jAZYmIuc2VydmljZUFjY291bnRzLmRlbGV0ZZDqMAGY6jABgtPkkwIeKhwvdjEve25hbWU9c2VydmljZUFjY291bnRzLyp9EroBChZVbmRlbGV0ZVNlcnZpY2VBY2NvdW50EiouYnl0ZWJhc2UudjEuVW5kZWxldGVTZXJ2aWNlQWNjb3VudFJlcXVlc3QaGy5ieXRlYmFzZS52MS5TZXJ2aWNlQWNjb3VudCJXiuowG2JiLnNlcnZpY2VBY2NvdW50cy51bmRlbGV0ZZDqMAGY6jABgtPkkwIqOgEqIiUvdjEve25hbWU9c2VydmljZUFjY291bnRzLyp9OnVuZGVsZXRlQrABCg9jb20uYnl0ZWJhc2UudjFCGlNlcnZpY2VBY2NvdW50U2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common]);/*** Describes the message bytebase.v1.ServiceAccount.diff --git a/frontend/src/types/proto-es/v1/workload_identity_service_pb.d.ts b/frontend/src/types/proto-es/v1/workload_identity_service_pb.d.tsindex c33663d0e3..cbd6fc4491 100644--- a/frontend/src/types/proto-es/v1/workload_identity_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/workload_identity_service_pb.d.ts@@ -170,6 +170,24 @@ export declare type ListWorkloadIdentitiesRequest = Message<"bytebase.v1.ListWor* @generated from field: bool show_deleted = 4;*/showDeleted: boolean;++ /**+ * Filter is used to filter workload identities returned in the list.+ * The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+ *+ * Supported filter:+ * - name: the workload identity name, support "==" and ".matches()" operator.+ * - email: the workload identity email, support "==" and ".matches()" operator.+ *+ * For example:+ * name == "ed"+ * name.matches("ed")+ * email == "[email protected]"+ * email.matches("ed")+ *+ * @generated from field: string filter = 5;+ */+ filter: string;};/**diff --git a/frontend/src/types/proto-es/v1/workload_identity_service_pb.js b/frontend/src/types/proto-es/v1/workload_identity_service_pb.jsindex 58560bc638..35ab76c5e0 100644--- a/frontend/src/types/proto-es/v1/workload_identity_service_pb.js+++ b/frontend/src/types/proto-es/v1/workload_identity_service_pb.js@@ -17,7 +17,7 @@ import { file_v1_user_service } from "./user_service_pb";* Describes the file v1/workload_identity_service.proto.*/export const file_v1_workload_identity_service = /*@__PURE__*/- fileDesc("CiJ2MS93b3JrbG9hZF9pZGVudGl0eV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSKyAgoQV29ya2xvYWRJZGVudGl0eRIRCgRuYW1lGAEgASgJQgPgQQMSIQoFc3RhdGUYAiABKA4yEi5ieXRlYmFzZS52MS5TdGF0ZRISCgVlbWFpbBgDIAEoCUID4EEDEhcKBXRpdGxlGAQgASgJQgi6SAVyAxjIARI0CgtjcmVhdGVfdGltZRgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxJFChh3b3JrbG9hZF9pZGVudGl0eV9jb25maWcYBiABKAsyIy5ieXRlYmFzZS52MS5Xb3JrbG9hZElkZW50aXR5Q29uZmlnOj7qQTsKHWJ5dGViYXNlLmNvbS9Xb3JrbG9hZElkZW50aXR5Ehp3b3JrbG9hZElkZW50aXRpZXMve2VtYWlsfSKs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_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_user_service]);+ fileDesc("CiJ2MS93b3JrbG9hZF9pZGVudGl0eV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSKyAgoQV29ya2xvYWRJZGVudGl0eRIRCgRuYW1lGAEgASgJQgPgQQMSIQoFc3RhdGUYAiABKA4yEi5ieXRlYmFzZS52MS5TdGF0ZRISCgVlbWFpbBgDIAEoCUID4EEDEhcKBXRpdGxlGAQgASgJQgi6SAVyAxjIARI0CgtjcmVhdGVfdGltZRgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCA+BBAxJFChh3b3JrbG9hZF9pZGVudGl0eV9jb25maWcYBiABKAsyIy5ieXRlYmFzZS52MS5Xb3JrbG9hZElkZW50aXR5Q29uZmlnOj7qQTsKHWJ5dGViYXNlLmNvbS9Xb3JrbG9hZElkZW50aXR5Ehp3b3JrbG9hZElkZW50aXRpZXMve2VtYWlsfSKsAQodQ3JlYXRlV29ya2xvYWRJZGVudGl0eVJlcXVlc3QSKQoGcGFyZW50GAEgASgJQhn6QRYKFGJ5dGViYXNlLmNvbS9Qcm9qZWN0EiEKFHdvcmtsb2FkX2lkZW50aXR5X2lkGAIgASgJQgPgQQISPQoRd29ya2xvYWRfaWRlbnRpdHkYAyABKAsyHS5ieXRlYmFzZS52MS5Xb3JrbG9hZElkZW50aXR5QgPgQQIiUQoaR2V0V29ya2xvYWRJZGVudGl0eVJlcXVlc3QSMwoEbmFtZRgBIAEoCUIl4EEC+kEfCh1ieXRlYmFzZS5jb20vV29ya2xvYWRJZGVudGl0eSKXAQodTGlzdFdvcmtsb2FkSWRlbnRpdGllc1JlcXVlc3QSKQoGcGFyZW50GAEgASgJQhn6QRYKFGJ5dGViYXNlLmNvbS9Qcm9qZWN0EhEKCXBhZ2Vfc2l6ZRgC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lbGV0ZZDqMAGY6jABgtPkkwIhKh8vdjEve25hbWU9d29ya2xvYWRJZGVudGl0aWVzLyp9EsYBChhVbmRlbGV0ZVdvcmtsb2FkSWRlbnRpdHkSLC5ieXRlYmFzZS52MS5VbmRlbGV0ZVdvcmtsb2FkSWRlbnRpdHlSZXF1ZXN0Gh0uYnl0ZWJhc2UudjEuV29ya2xvYWRJZGVudGl0eSJdiuowHmJiLndvcmtsb2FkSWRlbnRpdGllcy51bmRlbGV0ZZDqMAGY6jABgtPkkwItOgEqIigvdjEve25hbWU9d29ya2xvYWRJZGVudGl0aWVzLyp9OnVuZGVsZXRlQrIBCg9jb20uYnl0ZWJhc2UudjFCHFdvcmtsb2FkSWRlbnRpdHlTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_user_service]);/*** Describes the message bytebase.v1.WorkloadIdentity.diff --git a/frontend/src/views/SettingWorkspaceUsers.vue b/frontend/src/views/SettingWorkspaceUsers.vueindex d74026353b..5c5751700f 100644--- a/frontend/src/views/SettingWorkspaceUsers.vue+++ b/frontend/src/views/SettingWorkspaceUsers.vue@@ -618,11 +618,11 @@ const fetchServiceAccountList = async ({pageToken: string;pageSize: number;}) => {- const response = await serviceAccountStore.listServiceAccounts(+ const response = await serviceAccountStore.listServiceAccounts({pageSize,pageToken,- false- );+ showDeleted: false,+ });const users: User[] = response.serviceAccounts.map(serviceAccountToUser);return { list: users, nextPageToken: response.nextPageToken };};@@ -634,11 +634,11 @@ const fetchWorkloadIdentityList = async ({pageToken: string;pageSize: number;}) => {- const response = await workloadIdentityStore.listWorkloadIdentities(+ const response = await workloadIdentityStore.listWorkloadIdentities({pageSize,pageToken,- false- );+ showDeleted: false,+ });const users: User[] = response.workloadIdentities.map(workloadIdentityToUser);return { list: users, nextPageToken: response.nextPageToken };};@@ -650,11 +650,11 @@ const fetchInactiveServiceAccountList = async ({pageToken: string;pageSize: number;}) => {- const response = await serviceAccountStore.listServiceAccounts(+ const response = await serviceAccountStore.listServiceAccounts({pageSize,pageToken,- true- );+ showDeleted: true,+ });const users: User[] = response.serviceAccounts.filter((sa) => sa.state === State.DELETED).map(serviceAccountToUser);@@ -668,11 +668,11 @@ const fetchInactiveWorkloadIdentityList = async ({pageToken: string;pageSize: number;}) => {- const response = await workloadIdentityStore.listWorkloadIdentities(+ const response = await workloadIdentityStore.listWorkloadIdentities({pageSize,pageToken,- true- );+ showDeleted: true,+ });const users: User[] = response.workloadIdentities.filter((wi) => wi.state === State.DELETED).map(workloadIdentityToUser);diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 1dec165f75..b6a0ca9c74 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -8024,6 +8024,37 @@ paths:type: booleantitle: show_deleteddescription: Show deleted service accounts if specified.+ - name: filter+ in: query+ description: |-+ Filter is used to filter service accounts returned in the list.+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++ Supported filter:+ - name: the service account name, support "==" and ".matches()" operator.+ - email: the service account email, support "==" and ".matches()" operator.++ For example:+ name == "ed"+ name.matches("ed")+ email == "[email protected]"+ email.matches("ed")+ schema:+ type: string+ title: filter+ description: |-+ Filter is used to filter service accounts returned in the list.+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++ Supported filter:+ - name: the service account name, support "==" and ".matches()" operator.+ - email: the service account email, support "==" and ".matches()" operator.++ For example:+ name == "ed"+ name.matches("ed")+ email == "[email protected]"+ email.matches("ed")responses:"200":description: Success@@ -8340,6 +8371,37 @@ paths:type: booleantitle: show_deleteddescription: Show deleted workload identities if specified.+ - name: filter+ in: query+ description: |-+ Filter is used to filter workload identities returned in the list.+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++ Supported filter:+ - name: the workload identity name, support "==" and ".matches()" operator.+ - email: the workload identity email, support "==" and ".matches()" operator.++ For example:+ name == "ed"+ name.matches("ed")+ email == "[email protected]"+ email.matches("ed")+ schema:+ type: string+ title: filter+ description: |-+ Filter is used to filter workload identities returned in the list.+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++ Supported filter:+ - name: the workload identity name, support "==" and ".matches()" operator.+ - email: the workload identity email, support "==" and ".matches()" operator.++ For example:+ name == "ed"+ name.matches("ed")+ email == "[email protected]"+ email.matches("ed")responses:"200":description: Success@@ -9032,6 +9094,37 @@ paths:type: booleantitle: show_deleteddescription: Show deleted service accounts if specified.+ - name: filter+ in: query+ description: |-+ Filter is used to filter service accounts returned in the list.+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++ Supported filter:+ - name: the service account name, support "==" and ".matches()" operator.+ - email: the service account email, support "==" and ".matches()" operator.++ For example:+ name == "ed"+ name.matches("ed")+ email == "[email protected]"+ email.matches("ed")+ schema:+ type: string+ title: filter+ description: |-+ Filter is used to filter service accounts returned in the list.+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++ Supported filter:+ - name: the service account name, support "==" and ".matches()" operator.+ - email: the service account email, support "==" and ".matches()" operator.++ For example:+ name == "ed"+ name.matches("ed")+ email == "[email protected]"+ email.matches("ed")responses:"200":description: Success@@ -9804,6 +9897,37 @@ paths:type: booleantitle: show_deleteddescription: Show deleted workload identities if specified.+ - name: filter+ in: query+ description: |-+ Filter is used to filter workload identities returned in the list.+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++ Supported filter:+ - name: the workload identity name, support "==" and ".matches()" operator.+ - email: the workload identity email, support "==" and ".matches()" operator.++ For example:+ name == "ed"+ name.matches("ed")+ email == "[email protected]"+ email.matches("ed")+ schema:+ type: string+ title: filter+ description: |-+ Filter is used to filter workload identities returned in the list.+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++ Supported filter:+ - name: the workload identity name, support "==" and ".matches()" operator.+ - email: the workload identity email, support "==" and ".matches()" operator.++ For example:+ name == "ed"+ name.matches("ed")+ email == "[email protected]"+ email.matches("ed")responses:"200":description: Success@@ -16625,6 +16749,22 @@ components:type: booleantitle: show_deleteddescription: Show deleted service accounts if specified.+ filter:+ type: string+ title: filter+ description: |-+ Filter is used to filter service accounts returned in the list.+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++ Supported filter:+ - name: the service account name, support "==" and ".matches()" operator.+ - email: the service account email, support "==" and ".matches()" operator.++ For example:+ name == "ed"+ name.matches("ed")+ email == "[email protected]"+ email.matches("ed")title: ListServiceAccountsRequestadditionalProperties: falsedescription: Request message for listing service accounts.@@ -16787,6 +16927,22 @@ components:type: booleantitle: show_deleteddescription: Show deleted workload identities if specified.+ filter:+ type: string+ title: filter+ description: |-+ Filter is used to filter workload identities returned in the list.+ The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++ Supported filter:+ - name: the workload identity name, support "==" and ".matches()" operator.+ - email: the workload identity email, support "==" and ".matches()" operator.++ For example:+ name == "ed"+ name.matches("ed")+ email == "[email protected]"+ email.matches("ed")title: ListWorkloadIdentitiesRequestadditionalProperties: falsedescription: Request message for listing workload identities.diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 12dc811688..b3fae86e45 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -10243,6 +10243,11 @@ Request message for listing service accounts.When paginating, all other parameters provided to `ListServiceAccounts` must match the call that provided the page token. || show_deleted | [bool](#bool) | | Show deleted service accounts if specified. |+| filter | [string](#string) | | Filter is used to filter service accounts returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filter: - name: the service account name, support "==" and ".matches()" operator. - email: the service account email, support "==" and ".matches()" operator.++For example: name == "ed" name.matches("ed") email == "[email protected]" email.matches("ed") |@@ -10722,6 +10727,11 @@ Request message for listing workload identities.When paginating, all other parameters provided to `ListWorkloadIdentities` must match the call that provided the page token. || show_deleted | [bool](#bool) | | Show deleted workload identities if specified. |+| filter | [string](#string) | | Filter is used to filter workload identities returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filter: - name: the workload identity name, support "==" and ".matches()" operator. - email: the workload identity email, support "==" and ".matches()" operator.++For example: name == "ed" name.matches("ed") email == "[email protected]" email.matches("ed") |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex e325cadcfc..25b0077dac 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -28816,6 +28816,24 @@ the call that provided the page token. </p></td><td><p>Show deleted service accounts if specified. </p></td></tr>+ <tr>+ <td>filter</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Filter is used to filter service accounts returned in the list.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filter:+- name: the service account name, support "==" and ".matches()" operator.+- email: the service account email, support "==" and ".matches()" operator.++For example:+name == "ed"+name.matches("ed")+email == "[email protected]"+email.matches("ed") </p></td>+ </tr>+</tbody></table>@@ -30284,6 +30302,24 @@ the call that provided the page token. </p></td><td><p>Show deleted workload identities if specified. </p></td></tr>+ <tr>+ <td>filter</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Filter is used to filter workload identities returned in the list.+The syntax and semantics of CEL are documented at https://github.com/google/cel-spec++Supported filter:+- name: the workload identity name, support "==" and ".matches()" operator.+- email: the workload identity email, support "==" and ".matches()" operator.++For example:+name == "ed"+name.matches("ed")+email == "[email protected]"+email.matches("ed") </p></td>+ </tr>+</tbody></table>diff --git a/proto/v1/v1/service_account_service.proto b/proto/v1/v1/service_account_service.protoindex 6c4c21511e..8d9d13129b 100644--- a/proto/v1/v1/service_account_service.proto+++ b/proto/v1/v1/service_account_service.proto@@ -168,6 +168,20 @@ message ListServiceAccountsRequest {// Show deleted service accounts if specified.bool show_deleted = 4;++ // Filter is used to filter service accounts returned in the list.+ // The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+ //+ // Supported filter:+ // - name: the service account name, support "==" and ".matches()" operator.+ // - email: the service account email, support "==" and ".matches()" operator.+ //+ // For example:+ // name == "ed"+ // name.matches("ed")+ // email == "[email protected]"+ // email.matches("ed")+ string filter = 5;}// Response message for listing service accounts.diff --git a/proto/v1/v1/workload_identity_service.proto b/proto/v1/v1/workload_identity_service.protoindex b047e3333c..2f00fd7133 100644--- a/proto/v1/v1/workload_identity_service.proto+++ b/proto/v1/v1/workload_identity_service.proto@@ -169,6 +169,20 @@ message ListWorkloadIdentitiesRequest {// Show deleted workload identities if specified.bool show_deleted = 4;++ // Filter is used to filter workload identities returned in the list.+ // The syntax and semantics of CEL are documented at https://github.com/google/cel-spec+ //+ // Supported filter:+ // - name: the workload identity name, support "==" and ".matches()" operator.+ // - email: the workload identity email, support "==" and ".matches()" operator.+ //+ // For example:+ // name == "ed"+ // name.matches("ed")+ // email == "[email protected]"+ // email.matches("ed")+ string filter = 5;}// Response message for listing workload identities.