Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: deprecate algorithm (#14821)
Danny Xu3517b3079f4f
diff --git a/backend/api/v1/database_catalog_service.go b/backend/api/v1/database_catalog_service.goindex 4927c1bd87..3739ccbb8c 100644--- a/backend/api/v1/database_catalog_service.go+++ b/backend/api/v1/database_catalog_service.go@@ -144,14 +144,11 @@ func convertTableCatalog(t *storepb.TableCatalog) *v1pb.TableCatalog {func convertColumnCatalog(c *storepb.ColumnCatalog) *v1pb.ColumnCatalog {return &v1pb.ColumnCatalog{- Name: c.Name,- SemanticTypeId: c.SemanticTypeId,- Labels: c.Labels,- ClassificationId: c.ClassificationId,- MaskingLevel: convertToV1PBMaskingLevel(c.MaskingLevel),- FullMaskingAlgorithmId: c.FullMaskingAlgorithmId,- PartialMaskingAlgorithmId: c.PartialMaskingAlgorithmId,- ObjectSchema: convertStoreObjectSchema(c.ObjectSchema),+ Name: c.Name,+ SemanticTypeId: c.SemanticTypeId,+ Labels: c.Labels,+ ClassificationId: c.ClassificationId,+ ObjectSchema: convertStoreObjectSchema(c.ObjectSchema),}}@@ -220,14 +217,11 @@ func convertV1TableCatalog(t *v1pb.TableCatalog) *storepb.TableCatalog {func convertV1ColumnCatalog(c *v1pb.ColumnCatalog) *storepb.ColumnCatalog {return &storepb.ColumnCatalog{- Name: c.Name,- SemanticTypeId: c.SemanticTypeId,- Labels: c.Labels,- ClassificationId: c.ClassificationId,- MaskingLevel: convertToStorePBMaskingLevel(c.MaskingLevel),- FullMaskingAlgorithmId: c.FullMaskingAlgorithmId,- PartialMaskingAlgorithmId: c.PartialMaskingAlgorithmId,- ObjectSchema: convertV1ObjectSchema(c.GetObjectSchema()),+ Name: c.Name,+ SemanticTypeId: c.SemanticTypeId,+ Labels: c.Labels,+ ClassificationId: c.ClassificationId,+ ObjectSchema: convertV1ObjectSchema(c.GetObjectSchema()),}}diff --git a/backend/api/v1/masking_evaluator.go b/backend/api/v1/masking_evaluator.goindex 48cdb483f1..e51a97587e 100644--- a/backend/api/v1/masking_evaluator.go+++ b/backend/api/v1/masking_evaluator.go@@ -17,14 +17,12 @@ type maskingLevelEvaluator struct {maskingRules []*storepb.MaskingRulePolicy_MaskingRuledataClassificationIDMap map[string]*storepb.DataClassificationSetting_DataClassificationConfigsemanticTypesMap map[string]*storepb.SemanticTypeSetting_SemanticType- maskingAlgorithms map[string]*storepb.Algorithm}func newEmptyMaskingLevelEvaluator() *maskingLevelEvaluator {return &maskingLevelEvaluator{dataClassificationIDMap: make(map[string]*storepb.DataClassificationSetting_DataClassificationConfig),semanticTypesMap: make(map[string]*storepb.SemanticTypeSetting_SemanticType),- maskingAlgorithms: make(map[string]*storepb.Algorithm),}}@@ -61,17 +59,6 @@ func (m *maskingLevelEvaluator) withSemanticTypeSetting(semanticTypeSetting *storeturn m}-// nolint-func (m *maskingLevelEvaluator) withMaskingAlgorithmSetting(maskingAlgorithmSetting *storepb.MaskingAlgorithmSetting) *maskingLevelEvaluator {- if maskingAlgorithmSetting == nil {- return m- }- for _, maskingAlgorithm := range maskingAlgorithmSetting.Algorithms {- m.maskingAlgorithms[maskingAlgorithm.Id] = maskingAlgorithm- }- return m-}-func (m *maskingLevelEvaluator) getDataClassificationConfig(classificationID string) *storepb.DataClassificationSetting_DataClassificationConfig {return m.dataClassificationIDMap[classificationID]}@@ -92,67 +79,38 @@ func (m *maskingLevelEvaluator) evaluateMaskingAlgorithmOfColumn(databaseProjectDataClassificationID string,columnConfig *storepb.ColumnCatalog,filteredMaskingExceptions []*storepb.MaskingExceptionPolicy_MaskingException,-) (*storepb.Algorithm, storepb.MaskingLevel, error) {+) (*storepb.Algorithm, error) {// TODO(d): deprecate globalMaskingLevel.globalMaskingLevel, err := m.evaluateGlobalMaskingLevelOfColumn(databaseMessage, schemaName, tableName, columnName, databaseProjectDataClassificationID, columnConfig)if err != nil {- return nil, storepb.MaskingLevel_MASKING_LEVEL_UNSPECIFIED, errors.Wrapf(err, "failed to evaluate masking level of column")- }-- fullAlgorithmID, partialAlgorithmID := columnConfig.GetFullMaskingAlgorithmId(), columnConfig.GetPartialMaskingAlgorithmId()- if fullAlgorithmID == "" && partialAlgorithmID == "" && columnConfig.GetSemanticTypeId() != "" {- semanticType, ok := m.semanticTypesMap[columnConfig.GetSemanticTypeId()]- if ok {- if semanticType.GetFullMaskAlgorithmId() != "" {- fullAlgorithmID = semanticType.GetFullMaskAlgorithmId()- }- if semanticType.GetPartialMaskAlgorithmId() != "" {- partialAlgorithmID = semanticType.GetPartialMaskAlgorithmId()- }- }- }- var fullAlgorithm, partialAlgorithm *storepb.Algorithm- if fullAlgorithmID != "" {- fullAlgorithm = m.maskingAlgorithms[fullAlgorithmID]- }- if partialAlgorithmID != "" {- partialAlgorithm = m.maskingAlgorithms[partialAlgorithmID]- }- if fullAlgorithm == nil {- fullAlgorithm = defaultFullAlgorithm- }- if partialAlgorithm == nil {- partialAlgorithm = defaultPartialAlgorithm+ return nil, errors.Wrapf(err, "failed to evaluate masking level of column")}-switch globalMaskingLevel {case storepb.MaskingLevel_NONE:- return nil, storepb.MaskingLevel_NONE, nil- case storepb.MaskingLevel_PARTIAL, storepb.MaskingLevel_FULL:+ return nil, nil+ case storepb.MaskingLevel_FULL, storepb.MaskingLevel_PARTIAL:pass, err := evaluateExceptionOfColumn(databaseMessage, schemaName, tableName, columnName, filteredMaskingExceptions)if err != nil {- return nil, storepb.MaskingLevel_MASKING_LEVEL_UNSPECIFIED, err+ return nil, err}if pass {- return nil, storepb.MaskingLevel_NONE, nil+ return nil, nil}if globalMaskingLevel == storepb.MaskingLevel_FULL {- return fullAlgorithm, globalMaskingLevel, nil+ return defaultFullAlgorithm, nil}if globalMaskingLevel == storepb.MaskingLevel_PARTIAL {- return partialAlgorithm, globalMaskingLevel, nil+ return defaultPartialAlgorithm, nil}}-- switch columnConfig.GetMaskingLevel() {- case storepb.MaskingLevel_NONE:- return nil, storepb.MaskingLevel_NONE, nil- case storepb.MaskingLevel_FULL:- return fullAlgorithm, storepb.MaskingLevel_FULL, nil- case storepb.MaskingLevel_PARTIAL:- return partialAlgorithm, storepb.MaskingLevel_PARTIAL, nil+ if columnConfig.GetSemanticTypeId() == "default-static" {+ return defaultFullAlgorithm, nil+ }+ semanticType, ok := m.semanticTypesMap[columnConfig.GetSemanticTypeId()]+ if ok {+ return semanticType.GetAlgorithms(), nil}- return nil, storepb.MaskingLevel_NONE, nil+ return nil, nil}func (m *maskingLevelEvaluator) evaluateGlobalMaskingLevelOfColumn(diff --git a/backend/api/v1/masking_evaluator_test.go b/backend/api/v1/masking_evaluator_test.goindex 297705a286..e91a53e09f 100644--- a/backend/api/v1/masking_evaluator_test.go+++ b/backend/api/v1/masking_evaluator_test.go@@ -46,6 +46,20 @@ func TestEvalMaskingLevelOfColumn(t *testing.T) {},},}+ defaultAlgorithm := &storepb.Algorithm{+ Id: "hash",+ Mask: &storepb.Algorithm_Md5Mask{+ Md5Mask: &storepb.Algorithm_MD5Mask{Salt: "123"},+ },+ }+ defaultSemanticType := &storepb.SemanticTypeSetting{+ Types: []*storepb.SemanticTypeSetting_SemanticType{+ {+ Id: "salary-amount",+ Algorithms: defaultAlgorithm,+ },+ },+ }testCases := []struct {description string@@ -59,7 +73,7 @@ func TestEvalMaskingLevelOfColumn(t *testing.T) {filteredMaskingExceptions []*storepb.MaskingExceptionPolicy_MaskingExceptiondataClassification *storepb.DataClassificationSetting- want storepb.MaskingLevel+ want *storepb.Algorithm}{{description: "Follow The Global Masking Rule",@@ -69,7 +83,6 @@ func TestEvalMaskingLevelOfColumn(t *testing.T) {columnName: "salary",columnCatalog: &storepb.ColumnCatalog{ClassificationId: "1-1-1",- MaskingLevel: storepb.MaskingLevel_NONE,},maskingRulePolicy: &storepb.MaskingRulePolicy{Rules: []*storepb.MaskingRulePolicy_MaskingRule{@@ -84,7 +97,7 @@ func TestEvalMaskingLevelOfColumn(t *testing.T) {dataClassification: defaultClassification,databaseProjectDatabaseClassificationID: defaultProjectDatabaseDataClassificationID,- want: storepb.MaskingLevel_FULL,+ want: defaultFullAlgorithm,},{description: "Respect The Exception",@@ -116,7 +129,7 @@ func TestEvalMaskingLevelOfColumn(t *testing.T) {dataClassification: defaultClassification,databaseProjectDatabaseClassificationID: defaultProjectDatabaseDataClassificationID,- want: storepb.MaskingLevel_NONE,+ want: nil,},{description: "Column Catalog",@@ -125,22 +138,21 @@ func TestEvalMaskingLevelOfColumn(t *testing.T) {tableName: "employees",columnName: "salary",columnCatalog: &storepb.ColumnCatalog{- ClassificationId: "1-1-1",- MaskingLevel: storepb.MaskingLevel_FULL,+ SemanticTypeId: "salary-amount",},maskingRulePolicy: &storepb.MaskingRulePolicy{},dataClassification: defaultClassification,databaseProjectDatabaseClassificationID: defaultProjectDatabaseDataClassificationID,- want: storepb.MaskingLevel_FULL,+ want: defaultAlgorithm,},}a := require.New(t)for _, tc := range testCases {- m := newEmptyMaskingLevelEvaluator().withMaskingRulePolicy(tc.maskingRulePolicy).withDataClassificationSetting(tc.dataClassification)- _, result, err := m.evaluateMaskingAlgorithmOfColumn(tc.databaseMessage, tc.schemaName, tc.tableName, tc.columnName, tc.databaseProjectDatabaseClassificationID, tc.columnCatalog, tc.filteredMaskingExceptions)+ m := newEmptyMaskingLevelEvaluator().withMaskingRulePolicy(tc.maskingRulePolicy).withDataClassificationSetting(tc.dataClassification).withSemanticTypeSetting(defaultSemanticType)+ result, err := m.evaluateMaskingAlgorithmOfColumn(tc.databaseMessage, tc.schemaName, tc.tableName, tc.columnName, tc.databaseProjectDatabaseClassificationID, tc.columnCatalog, tc.filteredMaskingExceptions)a.NoError(err, tc.description)a.Equal(tc.want, result, tc.description)}diff --git a/backend/api/v1/query_result_masker.go b/backend/api/v1/query_result_masker.goindex 2eecee2a2b..1f3f6a3063 100644--- a/backend/api/v1/query_result_masker.go+++ b/backend/api/v1/query_result_masker.go@@ -39,11 +39,6 @@ func (s *QueryResultMasker) MaskResults(ctx context.Context, spans []*base.Queryreturn errors.Wrapf(err, "failed to find masking rule policy")}- algorithmSetting, err := s.store.GetMaskingAlgorithmSetting(ctx)- if err != nil {- return errors.Wrapf(err, "failed to find masking algorithm setting")- }-semanticTypesSetting, err := s.store.GetSemanticTypesSetting(ctx)if err != nil {return errors.Wrapf(err, "failed to find semantic types setting")@@ -52,7 +47,6 @@ func (s *QueryResultMasker) MaskResults(ctx context.Context, spans []*base.Querym := newEmptyMaskingLevelEvaluator().withMaskingRulePolicy(maskingRulePolicy).withDataClassificationSetting(classificationSetting).- withMaskingAlgorithmSetting(algorithmSetting).withSemanticTypeSetting(semanticTypesSetting)// We expect the len(spans) == len(results), but to avoid NPE, we use the min(len(spans), len(results)) here.@@ -215,11 +209,11 @@ func (s *QueryResultMasker) getMaskerForColumnResource(}}- maskingAlgorithm, maskingLevel, err := m.evaluateMaskingAlgorithmOfColumn(database, sourceColumn.Schema, sourceColumn.Table, sourceColumn.Column, project.DataClassificationConfigID, config, maskingExceptionContainsCurrentPrincipal)+ maskingAlgorithm, err := m.evaluateMaskingAlgorithmOfColumn(database, sourceColumn.Schema, sourceColumn.Table, sourceColumn.Column, project.DataClassificationConfigID, config, maskingExceptionContainsCurrentPrincipal)if err != nil {return nil, errors.Wrapf(err, "failed to evaluate masking level of database %q, schema %q, table %q, column %q", sourceColumn.Database, sourceColumn.Schema, sourceColumn.Table, sourceColumn.Column)}- return getMaskerByMaskingAlgorithmAndLevel(maskingAlgorithm, maskingLevel), nil+ return getMaskerByMaskingAlgorithmAndLevel(maskingAlgorithm), nil}func (s *QueryResultMasker) getColumnForColumnResource(ctx context.Context, instanceID string, sourceColumn *base.ColumnResource) (*storepb.ColumnMetadata, *storepb.ColumnCatalog, error) {@@ -274,16 +268,9 @@ func (s *QueryResultMasker) getColumnForColumnResource(ctx context.Context, instreturn columnMetadata, columnConfig, nil}-func getMaskerByMaskingAlgorithmAndLevel(algorithm *storepb.Algorithm, level storepb.MaskingLevel) masker.Masker {+func getMaskerByMaskingAlgorithmAndLevel(algorithm *storepb.Algorithm) masker.Masker {if algorithm == nil {- switch level {- case storepb.MaskingLevel_FULL:- return masker.NewDefaultFullMasker()- case storepb.MaskingLevel_PARTIAL:- return masker.NewDefaultRangeMasker()- default:- return masker.NewNoneMasker()- }+ return masker.NewNoneMasker()}switch algorithm.GetId() {case "default-full":diff --git a/backend/runner/schemasync/syncer.go b/backend/runner/schemasync/syncer.goindex c2260627ae..f8d1af4e5b 100644--- a/backend/runner/schemasync/syncer.go+++ b/backend/runner/schemasync/syncer.go@@ -798,10 +798,7 @@ func setClassificationAndUserCommentFromComment(dbSchema *storepb.DatabaseSchemafunc isEmptyColumnConfig(config *storepb.ColumnCatalog) bool {return config == nil || (len(config.Labels) == 0 &&config.ClassificationId == "" &&- config.SemanticTypeId == "" &&- config.MaskingLevel == storepb.MaskingLevel_MASKING_LEVEL_UNSPECIFIED &&- config.FullMaskingAlgorithmId == "" &&- config.PartialMaskingAlgorithmId == "")+ config.SemanticTypeId == "")}func setUserCommentFromComment(dbSchema *storepb.DatabaseSchemaMetadata) {diff --git a/backend/server/init.go b/backend/server/init.goindex 981ede2047..e1ecc2cfd1 100644--- a/backend/server/init.go+++ b/backend/server/init.go@@ -287,9 +287,11 @@ func (s *Server) migrateMaskingData(ctx context.Context) error {schemaConfig := dbModelConfig.CreateOrGetSchemaConfig(mask.Schema)tableConfig := schemaConfig.CreateOrGetTableConfig(mask.Table)columnConfig := tableConfig.CreateOrGetColumnConfig(mask.Column)- columnConfig.MaskingLevel = mask.MaskingLevel- columnConfig.FullMaskingAlgorithmId = mask.FullMaskingAlgorithmId- columnConfig.PartialMaskingAlgorithmId = mask.PartialMaskingAlgorithmId+ if mask.FullMaskingAlgorithmId != "" {+ columnConfig.SemanticTypeId = mask.FullMaskingAlgorithmId+ } else if mask.PartialMaskingAlgorithmId != "" {+ columnConfig.SemanticTypeId = mask.PartialMaskingAlgorithmId+ }}if err := s.store.UpdateDBSchema(ctx, policy.ResourceUID, &store.UpdateDBSchemaMessage{Config: dbModelConfig.BuildDatabaseConfig()}, api.SystemBotID); err != nil {diff --git a/backend/server/onboard.go b/backend/server/onboard.goindex c1c96cb01a..c02d907731 100644--- a/backend/server/onboard.go+++ b/backend/server/onboard.go@@ -319,7 +319,7 @@ func (s *Server) generateOnboardingData(ctx context.Context, user *store.UserMesschemaConfig := dbModelConfig.CreateOrGetSchemaConfig("public")tableConfig := schemaConfig.CreateOrGetTableConfig("salary")columnConfig := tableConfig.CreateOrGetColumnConfig("amount")- columnConfig.MaskingLevel = storepb.MaskingLevel_FULL+ columnConfig.SemanticTypeId = "default-static"if err := s.store.UpdateDBSchema(ctx, prodDatabase.UID, &store.UpdateDBSchemaMessage{Config: dbModelConfig.BuildDatabaseConfig()}, userID); err != nil {return errors.Wrapf(err, "failed to update db config for database %v", prodDatabase.UID)diff --git a/backend/store/model/database.go b/backend/store/model/database.goindex e1e09eb5a6..6d8ca3727f 100644--- a/backend/store/model/database.go+++ b/backend/store/model/database.go@@ -231,13 +231,10 @@ func (d *DatabaseConfig) BuildDatabaseConfig() *storepb.DatabaseConfig {for colName, colConfig := range tConfig.internal {tableConfig.Columns = append(tableConfig.Columns, &storepb.ColumnCatalog{- Name: colName,- SemanticTypeId: colConfig.SemanticTypeId,- Labels: colConfig.Labels,- ClassificationId: colConfig.ClassificationId,- MaskingLevel: colConfig.MaskingLevel,- FullMaskingAlgorithmId: colConfig.FullMaskingAlgorithmId,- PartialMaskingAlgorithmId: colConfig.PartialMaskingAlgorithmId,+ Name: colName,+ SemanticTypeId: colConfig.SemanticTypeId,+ Labels: colConfig.Labels,+ ClassificationId: colConfig.ClassificationId,})}schemaConfig.Tables = append(schemaConfig.Tables, tableConfig)@@ -286,8 +283,7 @@ func (t *TableConfig) CreateOrGetColumnConfig(name string) *storepb.ColumnCataloreturn config}t.internal[name] = &storepb.ColumnCatalog{- Name: name,- MaskingLevel: storepb.MaskingLevel_MASKING_LEVEL_UNSPECIFIED,+ Name: name,}return t.internal[name]}diff --git a/backend/tests/sensitive_data_test.go b/backend/tests/sensitive_data_test.goindex 050c718177..1ae5579bcb 100644--- a/backend/tests/sensitive_data_test.go+++ b/backend/tests/sensitive_data_test.go@@ -196,12 +196,12 @@ func TestSensitiveData(t *testing.T) {Columns: &v1pb.TableCatalog_Columns{Columns: []*v1pb.ColumnCatalog{{- Name: "id",- MaskingLevel: v1pb.MaskingLevel_FULL,+ Name: "id",+ SemanticTypeId: "default-static",},{- Name: "author",- MaskingLevel: v1pb.MaskingLevel_FULL,+ Name: "author",+ SemanticTypeId: "default-static",},},},diff --git a/frontend/src/components/SensitiveData/components/SemanticTypesTable.vue b/frontend/src/components/SensitiveData/components/SemanticTypesTable.vueindex 5b38d60495..abbcf6f404 100644--- a/frontend/src/components/SensitiveData/components/SemanticTypesTable.vue+++ b/frontend/src/components/SensitiveData/components/SemanticTypesTable.vue@@ -19,18 +19,16 @@<script lang="tsx" setup>import { CheckIcon, PencilIcon, TrashIcon, Undo2Icon } from "lucide-vue-next";-import { NPopconfirm, NSelect, NInput, NDataTable } from "naive-ui";-import type { SelectOption, DataTableColumn } from "naive-ui";+import { NPopconfirm, NInput, NDataTable } from "naive-ui";+import type { DataTableColumn } from "naive-ui";import { v4 as uuidv4 } from "uuid";import { computed, reactive } from "vue";import { useI18n } from "vue-i18n";import { MiniActionButton } from "@/components/v2";-import { useSettingV1Store } from "@/store";import {Algorithm,type SemanticTypeSetting_SemanticType,} from "@/types/proto/v1/setting_service";-import { isDev } from "@/utils";import MaskingAlgorithmsCreateDrawer from "./MaskingAlgorithmsCreateDrawer.vue";type SemanticItemMode = "NORMAL" | "CREATE" | "EDIT";@@ -70,7 +68,6 @@ const state = reactive<LocalState>({});const { t } = useI18n();-const settingStore = useSettingV1Store();const onDrawerDismiss = () => {state.pendingEditSemanticIndex = undefined;@@ -137,115 +134,40 @@ const columnList = computed(() => {},},];- if (isDev()) {- columns.push({- key: "algorithm",- title: t(- "settings.sensitive-data.semantic-types.table.masking-algorithm"- ),- width: "minmax(min-content, auto)",- render: (item, row) => {- return (- <div class="flex items-center space-x-1">- <h3>- {item.item.algorithms?.title ??- t("settings.sensitive-data.algorithms.default")}- </h3>- {!props.readonly && (- <MiniActionButton- onClick={() => {- state.pendingEditAlgorithm =- item.item.algorithms ??- Algorithm.fromPartial({- id: uuidv4(),- });- state.pendingEditSemanticIndex = row;- state.showAlgorithmDrawer = true;- }}- >- <PencilIcon class="w-4 h-4" />- </MiniActionButton>- )}- </div>- );- },- });- } else {- columns.push(- {- key: "full-masking-algorithm",- title: t(- "settings.sensitive-data.semantic-types.table.full-masking-algorithm"- ),- width: "minmax(min-content, auto)",- render: (item, row) => {- if (item.mode === "NORMAL") {- return (- <h3>- {getAlgorithmById(item.item.fullMaskAlgorithmId)?.label ??- t("settings.sensitive-data.algorithms.default")}- </h3>- );- }-- return (- <NSelect- value={item.item.fullMaskAlgorithmId}- options={algorithmList.value}- consistentMenuWidth={false}- placeholder={t("settings.sensitive-data.algorithms.default")}- fallbackOption={(_: string) => ({- label: t("settings.sensitive-data.algorithms.default"),- value: "",- })}- clearable- size="small"- style="min-width: 7rem; width: auto; overflow-x: hidden"- onUpdateValue={(val) =>- onInput(row, (data) => (data.item.fullMaskAlgorithmId = val))- }- />- );- },- },- {- key: "partial-masking-algorithm",- title: t(- "settings.sensitive-data.semantic-types.table.partial-masking-algorithm"- ),- width: "minmax(min-content, auto)",- render: (item, row) => {- if (item.mode === "NORMAL") {- return (- <h3>- {getAlgorithmById(item.item.partialMaskAlgorithmId)?.label ??- t("settings.sensitive-data.algorithms.default")}- </h3>- );- }-- return (- <NSelect- value={item.item.partialMaskAlgorithmId}- options={algorithmList.value}- consistentMenuWidth={false}- placeholder={t("settings.sensitive-data.algorithms.default")}- fallbackOption={(_: string) => ({- label: t("settings.sensitive-data.algorithms.default"),- value: "",- })}- clearable- size="small"- style="min-width: 7rem; width: auto; overflow-x: hidden"- onUpdateValue={(val) =>- onInput(row, (data) => (data.item.partialMaskAlgorithmId = val))- }- />- );- },- }- );- }++ columns.push({+ key: "algorithm",+ title: t(+ "settings.sensitive-data.semantic-types.table.masking-algorithm"+ ),+ width: "minmax(min-content, auto)",+ render: (item, row) => {+ return (+ <div class="flex items-center space-x-1">+ <h3>+ {item.item.algorithms?.title ??+ t("settings.sensitive-data.algorithms.default")}+ </h3>+ {!props.readonly && (+ <MiniActionButton+ onClick={() => {+ state.pendingEditAlgorithm =+ item.item.algorithms ??+ Algorithm.fromPartial({+ id: uuidv4(),+ });+ state.pendingEditSemanticIndex = row;+ state.showAlgorithmDrawer = true;+ }}+ >+ <PencilIcon class="w-4 h-4" />+ </MiniActionButton>+ )}+ </div>+ );+ },+ });+if (!props.readonly) {// operation.columns.push({@@ -321,27 +243,6 @@ const onInput = (index: number, callback: (item: SemanticItem) => void) => {item.dirty = true;};-const algorithmList = computed((): SelectOption[] => {- const list = (- settingStore.getSettingByName("bb.workspace.masking-algorithm")?.value- ?.maskingAlgorithmSettingValue?.algorithms ?? []- ).map((algorithm) => ({- label: algorithm.title,- value: algorithm.id,- }));-- list.unshift({- label: t("settings.sensitive-data.algorithms.default"),- value: "",- });-- return list;-});--const getAlgorithmById = (algorithmId: string) => {- return algorithmList.value.find((a) => a.value === algorithmId);-};-const isConfirmDisabled = (data: SemanticItem): boolean => {if (!data.item.title) {return true;diff --git a/frontend/src/components/SensitiveData/types.ts b/frontend/src/components/SensitiveData/types.tsindex 939f0e54d6..7861ee54ad 100644--- a/frontend/src/components/SensitiveData/types.ts+++ b/frontend/src/components/SensitiveData/types.ts@@ -1,9 +1,8 @@import type { ComposedDatabase, DatabaseResource } from "@/types";import { type User } from "@/types/proto/v1/auth_service";-import { MaskingLevel } from "@/types/proto/v1/common";import type { Group } from "@/types/proto/v1/group_service";import type { MaskingExceptionPolicy_MaskingException_Action } from "@/types/proto/v1/org_policy_service";-+import { MaskingLevel } from "@/types/proto/v1/common";export interface MaskData {schema: string;table: string;diff --git a/frontend/src/types/proto/store/database.ts b/frontend/src/types/proto/store/database.tsindex 7aa03d65a9..0c08c4bb87 100644--- a/frontend/src/types/proto/store/database.ts+++ b/frontend/src/types/proto/store/database.ts@@ -910,8 +910,11 @@ export interface ColumnCatalog {/** The user labels for a column. */labels: { [key: string]: string };classificationId: string;+ /** Deprecated. */maskingLevel: MaskingLevel;+ /** Deprecated. */fullMaskingAlgorithmId: string;+ /** Deprecated. */partialMaskingAlgorithmId: string;objectSchema?: ObjectSchema | undefined;}diff --git a/frontend/src/types/proto/store/setting.ts b/frontend/src/types/proto/store/setting.tsindex 899960e92e..e6a10ef7d2 100644--- a/frontend/src/types/proto/store/setting.ts+++ b/frontend/src/types/proto/store/setting.ts@@ -465,18 +465,6 @@ export interface SemanticTypeSetting_SemanticType {title: string;/** the description of the semantic type, it can be empty. */description: string;- /**- * Deprecated.- * the partial mask algorithm id for the semantic type, if it is empty,- * should use the default partial mask algorithm.- */- partialMaskAlgorithmId: string;- /**- * Deprecated.- * the full mask algorithm id for the semantic type, if it is empty, should- * use the default full mask algorithm.- */- fullMaskAlgorithmId: string;algorithms: Algorithm | undefined;}@@ -2762,14 +2750,7 @@ export const SemanticTypeSetting: MessageFns<SemanticTypeSetting> = {};function createBaseSemanticTypeSetting_SemanticType(): SemanticTypeSetting_SemanticType {- return {- id: "",- title: "",- description: "",- partialMaskAlgorithmId: "",- fullMaskAlgorithmId: "",- algorithms: undefined,- };+ return { id: "", title: "", description: "", algorithms: undefined };}export const SemanticTypeSetting_SemanticType: MessageFns<SemanticTypeSetting_SemanticType> = {@@ -2783,12 +2764,6 @@ export const SemanticTypeSetting_SemanticType: MessageFns<SemanticTypeSetting_Seif (message.description !== "") {writer.uint32(26).string(message.description);}- if (message.partialMaskAlgorithmId !== "") {- writer.uint32(34).string(message.partialMaskAlgorithmId);- }- if (message.fullMaskAlgorithmId !== "") {- writer.uint32(42).string(message.fullMaskAlgorithmId);- }if (message.algorithms !== undefined) {Algorithm.encode(message.algorithms, writer.uint32(50).fork()).join();}@@ -2826,22 +2801,6 @@ export const SemanticTypeSetting_SemanticType: MessageFns<SemanticTypeSetting_Semessage.description = reader.string();continue;}- case 4: {- if (tag !== 34) {- break;- }-- message.partialMaskAlgorithmId = reader.string();- continue;- }- case 5: {- if (tag !== 42) {- break;- }-- message.fullMaskAlgorithmId = reader.string();- continue;- }case 6: {if (tag !== 50) {break;@@ -2864,10 +2823,6 @@ export const SemanticTypeSetting_SemanticType: MessageFns<SemanticTypeSetting_Seid: isSet(object.id) ? globalThis.String(object.id) : "",title: isSet(object.title) ? globalThis.String(object.title) : "",description: isSet(object.description) ? globalThis.String(object.description) : "",- partialMaskAlgorithmId: isSet(object.partialMaskAlgorithmId)- ? globalThis.String(object.partialMaskAlgorithmId)- : "",- fullMaskAlgorithmId: isSet(object.fullMaskAlgorithmId) ? globalThis.String(object.fullMaskAlgorithmId) : "",algorithms: isSet(object.algorithms) ? Algorithm.fromJSON(object.algorithms) : undefined,};},@@ -2883,12 +2838,6 @@ export const SemanticTypeSetting_SemanticType: MessageFns<SemanticTypeSetting_Seif (message.description !== "") {obj.description = message.description;}- if (message.partialMaskAlgorithmId !== "") {- obj.partialMaskAlgorithmId = message.partialMaskAlgorithmId;- }- if (message.fullMaskAlgorithmId !== "") {- obj.fullMaskAlgorithmId = message.fullMaskAlgorithmId;- }if (message.algorithms !== undefined) {obj.algorithms = Algorithm.toJSON(message.algorithms);}@@ -2903,8 +2852,6 @@ export const SemanticTypeSetting_SemanticType: MessageFns<SemanticTypeSetting_Semessage.id = object.id ?? "";message.title = object.title ?? "";message.description = object.description ?? "";- message.partialMaskAlgorithmId = object.partialMaskAlgorithmId ?? "";- message.fullMaskAlgorithmId = object.fullMaskAlgorithmId ?? "";message.algorithms = (object.algorithms !== undefined && object.algorithms !== null)? Algorithm.fromPartial(object.algorithms): undefined;diff --git a/frontend/src/types/proto/v1/setting_service.ts b/frontend/src/types/proto/v1/setting_service.tsindex 0362dace0f..e3e5f48080 100644--- a/frontend/src/types/proto/v1/setting_service.ts+++ b/frontend/src/types/proto/v1/setting_service.ts@@ -598,16 +598,6 @@ export interface SemanticTypeSetting_SemanticType {title: string;/** the description of the semantic type, it can be empty. */description: string;- /**- * Deprecated.- * the partial mask algorithm id for the semantic type, if it is empty, should use the default partial mask algorithm.- */- partialMaskAlgorithmId: string;- /**- * Deprecated.- * the full mask algorithm id for the semantic type, if it is empty, should use the default full mask algorithm.- */- fullMaskAlgorithmId: string;algorithms: Algorithm | undefined;}@@ -4239,14 +4229,7 @@ export const SemanticTypeSetting: MessageFns<SemanticTypeSetting> = {};function createBaseSemanticTypeSetting_SemanticType(): SemanticTypeSetting_SemanticType {- return {- id: "",- title: "",- description: "",- partialMaskAlgorithmId: "",- fullMaskAlgorithmId: "",- algorithms: undefined,- };+ return { id: "", title: "", description: "", algorithms: undefined };}export const SemanticTypeSetting_SemanticType: MessageFns<SemanticTypeSetting_SemanticType> = {@@ -4260,12 +4243,6 @@ export const SemanticTypeSetting_SemanticType: MessageFns<SemanticTypeSetting_Seif (message.description !== "") {writer.uint32(26).string(message.description);}- if (message.partialMaskAlgorithmId !== "") {- writer.uint32(34).string(message.partialMaskAlgorithmId);- }- if (message.fullMaskAlgorithmId !== "") {- writer.uint32(42).string(message.fullMaskAlgorithmId);- }if (message.algorithms !== undefined) {Algorithm.encode(message.algorithms, writer.uint32(50).fork()).join();}@@ -4303,22 +4280,6 @@ export const SemanticTypeSetting_SemanticType: MessageFns<SemanticTypeSetting_Semessage.description = reader.string();continue;}- case 4: {- if (tag !== 34) {- break;- }-- message.partialMaskAlgorithmId = reader.string();- continue;- }- case 5: {- if (tag !== 42) {- break;- }-- message.fullMaskAlgorithmId = reader.string();- continue;- }case 6: {if (tag !== 50) {break;@@ -4341,10 +4302,6 @@ export const SemanticTypeSetting_SemanticType: MessageFns<SemanticTypeSetting_Seid: isSet(object.id) ? globalThis.String(object.id) : "",title: isSet(object.title) ? globalThis.String(object.title) : "",description: isSet(object.description) ? globalThis.String(object.description) : "",- partialMaskAlgorithmId: isSet(object.partialMaskAlgorithmId)- ? globalThis.String(object.partialMaskAlgorithmId)- : "",- fullMaskAlgorithmId: isSet(object.fullMaskAlgorithmId) ? globalThis.String(object.fullMaskAlgorithmId) : "",algorithms: isSet(object.algorithms) ? Algorithm.fromJSON(object.algorithms) : undefined,};},@@ -4360,12 +4317,6 @@ export const SemanticTypeSetting_SemanticType: MessageFns<SemanticTypeSetting_Seif (message.description !== "") {obj.description = message.description;}- if (message.partialMaskAlgorithmId !== "") {- obj.partialMaskAlgorithmId = message.partialMaskAlgorithmId;- }- if (message.fullMaskAlgorithmId !== "") {- obj.fullMaskAlgorithmId = message.fullMaskAlgorithmId;- }if (message.algorithms !== undefined) {obj.algorithms = Algorithm.toJSON(message.algorithms);}@@ -4380,8 +4331,6 @@ export const SemanticTypeSetting_SemanticType: MessageFns<SemanticTypeSetting_Semessage.id = object.id ?? "";message.title = object.title ?? "";message.description = object.description ?? "";- message.partialMaskAlgorithmId = object.partialMaskAlgorithmId ?? "";- message.fullMaskAlgorithmId = object.fullMaskAlgorithmId ?? "";message.algorithms = (object.algorithms !== undefined && object.algorithms !== null)? Algorithm.fromPartial(object.algorithms): undefined;diff --git a/frontend/src/types/semanticTypes.ts b/frontend/src/types/semanticTypes.tsindex d13af430c5..30750101df 100644--- a/frontend/src/types/semanticTypes.ts+++ b/frontend/src/types/semanticTypes.ts@@ -1,12 +1,11 @@import { v4 as uuidv4 } from "uuid";import { t } from "@/plugins/i18n";-import { SemanticTypeSetting_SemanticType } from "@/types/proto/v1/setting_service";+import { SemanticTypeSetting_SemanticType, Algorithm } from "@/types/proto/v1/setting_service";import buildInSemanticTypes from "./semantic-types.yaml";interface BuildInSemantic {id: string;- fullMaskAlgorithmId?: string;- partialMaskAlgorithmId?: string;+ algorithm: Algorithm;}export const getSemanticTemplateList = () => {@@ -19,8 +18,7 @@ export const getSemanticTemplateList = () => {description: t(`settings.sensitive-data.semantic-types.template.${buildInSemantic.id}.description`),- fullMaskAlgorithmId: buildInSemantic.fullMaskAlgorithmId,- partialMaskAlgorithmId: buildInSemantic.partialMaskAlgorithmId,+ algorithms: buildInSemantic.algorithm,}));};diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 84d89292ff..b685abe5d4 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -13803,18 +13803,6 @@ components:description:type: stringdescription: the description of the semantic type, it can be empty.- partialMaskAlgorithmId:- type: string- description: |-- Deprecated.- the partial mask algorithm id for the semantic type, if it is empty,- should use the default partial mask algorithm.- fullMaskAlgorithmId:- type: string- description: |-- Deprecated.- the full mask algorithm id for the semantic type, if it is empty, should- use the default full mask algorithm.algorithms:$ref: '#/components/schemas/Algorithm'SetIamPolicyRequest:diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 404248129f..1d953bba04 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -930,9 +930,9 @@ Metadata about the request.| semantic_type_id | [string](#string) | | || labels | [ColumnCatalog.LabelsEntry](#bytebase-store-ColumnCatalog-LabelsEntry) | repeated | The user labels for a column. || classification_id | [string](#string) | | |-| masking_level | [MaskingLevel](#bytebase-store-MaskingLevel) | | |-| full_masking_algorithm_id | [string](#string) | | |-| partial_masking_algorithm_id | [string](#string) | | |+| masking_level | [MaskingLevel](#bytebase-store-MaskingLevel) | | Deprecated. |+| full_masking_algorithm_id | [string](#string) | | Deprecated. |+| partial_masking_algorithm_id | [string](#string) | | Deprecated. || object_schema | [ObjectSchema](#bytebase-store-ObjectSchema) | optional | |@@ -4719,8 +4719,6 @@ SlowQueryPolicy is the policy configuration for slow query.| id | [string](#string) | | id is the uuid for semantic type. || title | [string](#string) | | the title of the semantic type, it should not be empty. || description | [string](#string) | | the description of the semantic type, it can be empty. |-| partial_mask_algorithm_id | [string](#string) | | Deprecated. the partial mask algorithm id for the semantic type, if it is empty, should use the default partial mask algorithm. |-| full_mask_algorithm_id | [string](#string) | | Deprecated. the full mask algorithm id for the semantic type, if it is empty, should use the default full mask algorithm. || algorithms | [Algorithm](#bytebase-store-Algorithm) | | |diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex 7aacd162df..c6322420a5 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -2961,21 +2961,21 @@ This information is not authenticated and should be treated accordingly. </p></t<td>masking_level</td><td><a href="#bytebase.store.MaskingLevel">MaskingLevel</a></td><td></td>- <td><p> </p></td>+ <td><p>Deprecated. </p></td></tr><tr><td>full_masking_algorithm_id</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Deprecated. </p></td></tr><tr><td>partial_masking_algorithm_id</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Deprecated. </p></td></tr><tr>@@ -11821,24 +11821,6 @@ The default value is 100MB, we will use the default value if the setting not exi<td><p>the description of the semantic type, it can be empty. </p></td></tr>- <tr>- <td>partial_mask_algorithm_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Deprecated.-the partial mask algorithm id for the semantic type, if it is empty,-should use the default partial mask algorithm. </p></td>- </tr>-- <tr>- <td>full_mask_algorithm_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Deprecated.-the full mask algorithm id for the semantic type, if it is empty, should-use the default full mask algorithm. </p></td>- </tr>-<tr><td>algorithms</td><td><a href="#bytebase.store.Algorithm">Algorithm</a></td>diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 8ecf5ec88c..74e1428b48 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -5007,8 +5007,6 @@ When paginating, all other parameters provided to `ListSettings` must match the| id | [string](#string) | | id is the uuid for semantic type. || title | [string](#string) | | the title of the semantic type, it should not be empty. || description | [string](#string) | | the description of the semantic type, it can be empty. |-| partial_mask_algorithm_id | [string](#string) | | Deprecated. the partial mask algorithm id for the semantic type, if it is empty, should use the default partial mask algorithm. |-| full_mask_algorithm_id | [string](#string) | | Deprecated. the full mask algorithm id for the semantic type, if it is empty, should use the default full mask algorithm. || algorithms | [Algorithm](#bytebase-v1-Algorithm) | | |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 74612014c8..2b8302d9fc 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -14467,22 +14467,6 @@ Not used. </p></td><td><p>the description of the semantic type, it can be empty. </p></td></tr>- <tr>- <td>partial_mask_algorithm_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Deprecated.-the partial mask algorithm id for the semantic type, if it is empty, should use the default partial mask algorithm. </p></td>- </tr>-- <tr>- <td>full_mask_algorithm_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Deprecated.-the full mask algorithm id for the semantic type, if it is empty, should use the default full mask algorithm. </p></td>- </tr>-<tr><td>algorithms</td><td><a href="#bytebase.v1.Algorithm">Algorithm</a></td>diff --git a/proto/generated-go/store/database.pb.go b/proto/generated-go/store/database.pb.goindex 61643d3335..21cbc8c858 100644--- a/proto/generated-go/store/database.pb.go+++ b/proto/generated-go/store/database.pb.go@@ -3332,12 +3332,15 @@ type ColumnCatalog struct {Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`SemanticTypeId string `protobuf:"bytes,2,opt,name=semantic_type_id,json=semanticTypeId,proto3" json:"semantic_type_id,omitempty"`// The user labels for a column.- Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`- ClassificationId string `protobuf:"bytes,4,opt,name=classification_id,json=classificationId,proto3" json:"classification_id,omitempty"`- MaskingLevel MaskingLevel `protobuf:"varint,5,opt,name=masking_level,json=maskingLevel,proto3,enum=bytebase.store.MaskingLevel" json:"masking_level,omitempty"`- FullMaskingAlgorithmId string `protobuf:"bytes,6,opt,name=full_masking_algorithm_id,json=fullMaskingAlgorithmId,proto3" json:"full_masking_algorithm_id,omitempty"`- PartialMaskingAlgorithmId string `protobuf:"bytes,7,opt,name=partial_masking_algorithm_id,json=partialMaskingAlgorithmId,proto3" json:"partial_masking_algorithm_id,omitempty"`- ObjectSchema *ObjectSchema `protobuf:"bytes,8,opt,name=object_schema,json=objectSchema,proto3,oneof" json:"object_schema,omitempty"`+ Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`+ ClassificationId string `protobuf:"bytes,4,opt,name=classification_id,json=classificationId,proto3" json:"classification_id,omitempty"`+ // Deprecated.+ MaskingLevel MaskingLevel `protobuf:"varint,5,opt,name=masking_level,json=maskingLevel,proto3,enum=bytebase.store.MaskingLevel" json:"masking_level,omitempty"`+ // Deprecated.+ FullMaskingAlgorithmId string `protobuf:"bytes,6,opt,name=full_masking_algorithm_id,json=fullMaskingAlgorithmId,proto3" json:"full_masking_algorithm_id,omitempty"`+ // Deprecated.+ PartialMaskingAlgorithmId string `protobuf:"bytes,7,opt,name=partial_masking_algorithm_id,json=partialMaskingAlgorithmId,proto3" json:"partial_masking_algorithm_id,omitempty"`+ ObjectSchema *ObjectSchema `protobuf:"bytes,8,opt,name=object_schema,json=objectSchema,proto3,oneof" json:"object_schema,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}diff --git a/proto/generated-go/store/setting.pb.go b/proto/generated-go/store/setting.pb.goindex 9ad9f9aced..544689fcd6 100644--- a/proto/generated-go/store/setting.pb.go+++ b/proto/generated-go/store/setting.pb.go@@ -1976,18 +1976,10 @@ type SemanticTypeSetting_SemanticType struct {// the title of the semantic type, it should not be empty.Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`// the description of the semantic type, it can be empty.- Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`- // Deprecated.- // the partial mask algorithm id for the semantic type, if it is empty,- // should use the default partial mask algorithm.- PartialMaskAlgorithmId string `protobuf:"bytes,4,opt,name=partial_mask_algorithm_id,json=partialMaskAlgorithmId,proto3" json:"partial_mask_algorithm_id,omitempty"`- // Deprecated.- // the full mask algorithm id for the semantic type, if it is empty, should- // use the default full mask algorithm.- FullMaskAlgorithmId string `protobuf:"bytes,5,opt,name=full_mask_algorithm_id,json=fullMaskAlgorithmId,proto3" json:"full_mask_algorithm_id,omitempty"`- Algorithms *Algorithm `protobuf:"bytes,6,opt,name=algorithms,proto3" json:"algorithms,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache+ Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`+ Algorithms *Algorithm `protobuf:"bytes,6,opt,name=algorithms,proto3" json:"algorithms,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache}func (x *SemanticTypeSetting_SemanticType) Reset() {@@ -2041,20 +2033,6 @@ func (x *SemanticTypeSetting_SemanticType) GetDescription() string {return ""}-func (x *SemanticTypeSetting_SemanticType) GetPartialMaskAlgorithmId() string {- if x != nil {- return x.PartialMaskAlgorithmId- }- return ""-}--func (x *SemanticTypeSetting_SemanticType) GetFullMaskAlgorithmId() string {- if x != nil {- return x.FullMaskAlgorithmId- }- return ""-}-func (x *SemanticTypeSetting_SemanticType) GetAlgorithms() *Algorithm {if x != nil {return x.Algorithms@@ -2827,25 +2805,18 @@ var file_store_setting_proto_rawDesc = []byte{0x2e, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6c,0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61,- 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe1, 0x02, 0x0a, 0x13, 0x53, 0x65, 0x6d, 0x61,+ 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf1, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x6d, 0x61,0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12,0x46, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30,0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e,0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x53, 0x65, 0x74, 0x74,0x69, 0x6e, 0x67, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65,- 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x81, 0x02, 0x0a, 0x0c, 0x53, 0x65, 0x6d, 0x61,+ 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x91, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x6d, 0x61,0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c,0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20,0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20,0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,- 0x12, 0x39, 0x0a, 0x19, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6d, 0x61, 0x73, 0x6b,- 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20,- 0x01, 0x28, 0x09, 0x52, 0x16, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x73, 0x6b,- 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x16, 0x66,- 0x75, 0x6c, 0x6c, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74,- 0x68, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x66, 0x75, 0x6c,- 0x6c, 0x4d, 0x61, 0x73, 0x6b, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x49, 0x64,0x12, 0x39, 0x0a, 0x0a, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x73, 0x18, 0x06,0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x52,diff --git a/proto/generated-go/v1/setting_service.pb.go b/proto/generated-go/v1/setting_service.pb.goindex 4bd4e69fb6..e8c0654002 100644--- a/proto/generated-go/v1/setting_service.pb.go+++ b/proto/generated-go/v1/setting_service.pb.go@@ -2881,16 +2881,10 @@ type SemanticTypeSetting_SemanticType struct {// the title of the semantic type, it should not be empty.Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`// the description of the semantic type, it can be empty.- Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`- // Deprecated.- // the partial mask algorithm id for the semantic type, if it is empty, should use the default partial mask algorithm.- PartialMaskAlgorithmId string `protobuf:"bytes,4,opt,name=partial_mask_algorithm_id,json=partialMaskAlgorithmId,proto3" json:"partial_mask_algorithm_id,omitempty"`- // Deprecated.- // the full mask algorithm id for the semantic type, if it is empty, should use the default full mask algorithm.- FullMaskAlgorithmId string `protobuf:"bytes,5,opt,name=full_mask_algorithm_id,json=fullMaskAlgorithmId,proto3" json:"full_mask_algorithm_id,omitempty"`- Algorithms *Algorithm `protobuf:"bytes,6,opt,name=algorithms,proto3" json:"algorithms,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache+ Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`+ Algorithms *Algorithm `protobuf:"bytes,6,opt,name=algorithms,proto3" json:"algorithms,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache}func (x *SemanticTypeSetting_SemanticType) Reset() {@@ -2944,20 +2938,6 @@ func (x *SemanticTypeSetting_SemanticType) GetDescription() string {return ""}-func (x *SemanticTypeSetting_SemanticType) GetPartialMaskAlgorithmId() string {- if x != nil {- return x.PartialMaskAlgorithmId- }- return ""-}--func (x *SemanticTypeSetting_SemanticType) GetFullMaskAlgorithmId() string {- if x != nil {- return x.FullMaskAlgorithmId- }- return ""-}-func (x *SemanticTypeSetting_SemanticType) GetAlgorithms() *Algorithm {if x != nil {return x.Algorithms@@ -3689,25 +3669,18 @@ var file_v1_setting_service_proto_rawDesc = []byte{0x2e, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6c,0x61, 0x73, 0x73, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61,- 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xdb, 0x02, 0x0a, 0x13, 0x53, 0x65, 0x6d, 0x61,+ 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xeb, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x6d, 0x61,0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12,0x43, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d,0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6d,0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74,- 0x79, 0x70, 0x65, 0x73, 0x1a, 0xfe, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69,+ 0x79, 0x70, 0x65, 0x73, 0x1a, 0x8e, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69,0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02,0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64,0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,- 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a,- 0x19, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x5f, 0x61, 0x6c,- 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,- 0x52, 0x16, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x73, 0x6b, 0x41, 0x6c, 0x67,- 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x16, 0x66, 0x75, 0x6c, 0x6c,- 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x5f,- 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x66, 0x75, 0x6c, 0x6c, 0x4d, 0x61,- 0x73, 0x6b, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x49, 0x64, 0x12, 0x36, 0x0a,+ 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a,0x0a, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28,0x0b, 0x32, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x52, 0x0a, 0x61, 0x6c, 0x67, 0x6f, 0x72,diff --git a/proto/store/database.proto b/proto/store/database.protoindex 6fbb17a8cc..bd5e37d6ec 100644--- a/proto/store/database.proto+++ b/proto/store/database.proto@@ -743,10 +743,13 @@ message ColumnCatalog {string classification_id = 4;+ // Deprecated.MaskingLevel masking_level = 5;+ // Deprecated.string full_masking_algorithm_id = 6;+ // Deprecated.string partial_masking_algorithm_id = 7;optional ObjectSchema object_schema = 8;diff --git a/proto/store/setting.proto b/proto/store/setting.protoindex 314c36c6ee..df414fae31 100644--- a/proto/store/setting.proto+++ b/proto/store/setting.proto@@ -236,14 +236,6 @@ message SemanticTypeSetting {string title = 2;// the description of the semantic type, it can be empty.string description = 3;- // Deprecated.- // the partial mask algorithm id for the semantic type, if it is empty,- // should use the default partial mask algorithm.- string partial_mask_algorithm_id = 4;- // Deprecated.- // the full mask algorithm id for the semantic type, if it is empty, should- // use the default full mask algorithm.- string full_mask_algorithm_id = 5;Algorithm algorithms = 6;}diff --git a/proto/v1/setting_service.proto b/proto/v1/setting_service.protoindex 74319f3ad0..841d1083a3 100644--- a/proto/v1/setting_service.proto+++ b/proto/v1/setting_service.proto@@ -400,12 +400,6 @@ message SemanticTypeSetting {string title = 2;// the description of the semantic type, it can be empty.string description = 3;- // Deprecated.- // the partial mask algorithm id for the semantic type, if it is empty, should use the default partial mask algorithm.- string partial_mask_algorithm_id = 4;- // Deprecated.- // the full mask algorithm id for the semantic type, if it is empty, should use the default full mask algorithm.- string full_mask_algorithm_id = 5;Algorithm algorithms = 6;}