Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2171dbf
ce feat: implement unmasking workflow use cases and data structures
Seechi-Yolo Apr 22, 2026
6133c31
ce refactor: move Confidence type and constants to a new file for bet…
Seechi-Yolo Apr 22, 2026
569d83d
ce feat: implement DownloadOriginalDataExportWorkflow functionality
Seechi-Yolo Apr 22, 2026
c625fd2
ce feat: DMSService: add UnmaskingWorkflowUsecase field for export or…
LordofAvernus May 11, 2026
3273512
ce feat: enhance SQL result masking with project UID support
Seechi-Yolo Apr 22, 2026
f9920ed
ce feat: implement unmasking workflow endpoints and middleware
Seechi-Yolo Apr 22, 2026
c0b3a69
ce feat: enhance DataExportWorkflowUsecase with projectUID and unmask…
LordofAvernus May 11, 2026
5f98f55
ce feat: DMSService: align UnmaskingWorkflowUsecase field type (CE)
LordofAvernus May 11, 2026
337781d
ce feat: add ListTableColumns method for DMSService
Seechi-Yolo Apr 22, 2026
793644c
ce feat: add unmasking workflow messages for English and Chinese locales
Seechi-Yolo Apr 22, 2026
ac49b59
ce feat: add build verification script for multiple edition combinations
Seechi-Yolo Apr 22, 2026
3c91773
fix: update ListMaskingRulesReq to clarify projectUid parameter usage
LordofAvernus May 9, 2026
2fb1655
refactor: update ApproveUnmaskingWorkflowReq to make approve_unmaskin…
LordofAvernus May 9, 2026
cc4752e
refactor: improve SQL audit middleware error handling and request par…
LordofAvernus May 9, 2026
2a7fb1b
refactor: streamline Cloudbeaver and DataExportWorkflow usecases by r…
LordofAvernus May 11, 2026
75b31cb
fix(api): align data export and db structure column contracts with EE
LordofAvernus May 12, 2026
b18569e
feat(api): integrate SQL Workbench data masking middleware and storag…
LordofAvernus May 13, 2026
62602a9
refactor(swagger): update parameter definitions and response schemas …
LordofAvernus May 13, 2026
82cb724
fix swagger
LordofAvernus May 14, 2026
0971ce5
fix(api): improve error handling in APIServer response
LordofAvernus May 14, 2026
ea14f4f
gen swag
LordofAvernus May 14, 2026
e3321d8
fix(api): add swagger annotations for ListTableColumns API types
LordofAvernus May 14, 2026
3eca12e
fix(data_masking): align unmasking permission verifier signature
LordofAvernus May 14, 2026
b310763
feat(data_export): add API for downloading unmasked SQL query results…
LordofAvernus May 15, 2026
76c61f6
feat(data_export): add unmasking workflow details to data export work…
LordofAvernus May 18, 2026
14cb2ce
feat(data_export): add function to check if data export workflow stat…
LordofAvernus May 18, 2026
7f93314
feat(unmasking): implement activation and plaintext retrieval for unm…
LordofAvernus May 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ dms_unit_test_clean:
dms_test_dms:
go test -v -p 1 ./internal/dms/...

# 提交前校验:社区版 / 试用版 / 企业版 / DMS 企业版 四种 GO_BUILD_TAGS 组合下均能 make install
verify_edition_builds:
bash ./scripts/verify_build_editions.sh

############################### generate ##################################
gen_repo_fields:
go run ./internal/dms/cmd/gencli/gencli.go -d generate-node-repo-fields ./internal/dms/storage/model/ ./internal/dms/biz/
Expand Down
5 changes: 5 additions & 0 deletions api/dms/service/v1/data_export_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package v1
import (
"time"

maskingBiz "github.com/actiontech/dms/internal/data_masking/biz"
base "github.com/actiontech/dms/pkg/dms-common/api/base/v1"
)

Expand Down Expand Up @@ -127,6 +128,10 @@ type ListDataExportTaskSQL struct {
ExportSQLType string `json:"export_sql_type"`
AuditLevel string `json:"audit_level"`
AuditSQLResult []AuditSQLResult `json:"audit_sql_result"`
// 血缘分析快照(与查看原文工单 SQL 详情字段语义一致)
LineageAnalysisSnapshot *maskingBiz.AnalyzeResult `json:"lineage_analysis_snapshot,omitempty"`
// 脱敏配置快照
MaskingConfigSnapshot []*maskingBiz.ColumnMaskingConfig `json:"masking_config_snapshot,omitempty"`
}
type AuditSQLResult struct {
Level string `json:"level" example:"warn"`
Expand Down
48 changes: 48 additions & 0 deletions api/dms/service/v1/data_export_workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package v1
import (
"time"

"github.com/actiontech/dms/internal/data_masking/biz"
base "github.com/actiontech/dms/pkg/dms-common/api/base/v1"
dmsCommonV1 "github.com/actiontech/dms/pkg/dms-common/api/dms/v1"
)
Expand Down Expand Up @@ -221,6 +222,31 @@ type GetDataExportWorkflow struct {
CreateTime *time.Time `json:"create_time"`
WorkflowRecord WorkflowRecord `json:"workflow_record"`
WorkflowRecordHistory []WorkflowRecord `json:"workflow_record_history"`
// UnmaskingWorkflow 关联的查看原文工单摘要;无关联时为 null
UnmaskingWorkflow *DataExportRelatedUnmaskingWorkflow `json:"unmasking_workflow"`
}

// swagger:model DataExportRelatedUnmaskingWorkflow
// DataExportRelatedUnmaskingWorkflow 数据导出工单关联的查看原文工单(仅摘要字段)
type DataExportRelatedUnmaskingWorkflow struct {
// UnmaskingWorkflowUid 查看原文工单 UID,用于跳转详情等
UnmaskingWorkflowUid string `json:"unmasking_workflow_uid"`
// 创建人(uid + 展示名)
Creator UidWithName `json:"creator"`
// 创建时间 (RFC3339)
CreatedAt string `json:"created_at"`
// 过期时间 (RFC3339),未设置时省略
ExpireTime string `json:"expire_time,omitempty"`
// 审批状态
ApprovalStatus biz.UnmaskingWorkflowApprovalStatus `json:"approval_status"`
// 使用状态
UsageStatus biz.UnmaskingWorkflowUsageStatus `json:"usage_status"`
// 申请理由
ApplyReason string `json:"apply_reason"`
// 驳回理由(整单驳回时)
RejectReason string `json:"reject_reason,omitempty"`
// 操作记录
OperationLogs []*UnmaskingOperationLogItem `json:"operation_logs"`
}

type WorkflowRecord struct {
Expand Down Expand Up @@ -267,6 +293,28 @@ type ExportDataExportWorkflowReq struct {
DataExportWorkflowUid string `param:"data_export_workflow_uid" json:"data_export_workflow_uid" validate:"required"`
}

// swagger:parameters DownloadOriginalDataExportWorkflow
type DownloadOriginalDataExportWorkflowReq struct {
// project id
// Required: true
// in:path
ProjectUid string `param:"project_uid" json:"project_uid" validate:"required"`
// Required: true
// in:path
DataExportWorkflowUid string `param:"data_export_workflow_uid" json:"data_export_workflow_uid" validate:"required"`
// 已批准的查看原文工单 UID
// Required: true
// in:query
UnmaskingWorkflowUid string `query:"unmasking_workflow_uid" json:"unmasking_workflow_uid" validate:"required"`
}

// swagger:response DownloadOriginalDataExportWorkflowReply
type DownloadOriginalDataExportWorkflowReply struct {
// swagger:file
// in: body
File []byte
}

type RejectDataExportWorkflowPayload struct {
// Required: true
Reason string `json:"reason" validate:"required"`
Expand Down
36 changes: 36 additions & 0 deletions api/dms/service/v1/db_structure_columns.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package v1

import (
base "github.com/actiontech/dms/pkg/dms-common/api/base/v1"
)

// swagger:parameters ListTableColumns
type ListTableColumnsReq struct {
// Required: true
// in:path
ProjectUid string `param:"project_uid" json:"project_uid" validate:"required"`
// Required: true
// in:path
DBServiceUid string `param:"db_service_uid" json:"db_service_uid" validate:"required"`
// Required: true
// in:path
SchemaName string `param:"schema_name" json:"schema_name" validate:"required"`
// Required: true
// in:path
TableName string `param:"table_name" json:"table_name" validate:"required"`
}

// swagger:model ListTableColumnsReply
type ListTableColumnsReply struct {
Data []*TableColumn `json:"data"`
// Generic reply
base.GenericResp
}

// swagger:model TableColumn
type TableColumn struct {
Name string `json:"name"`
Type string `json:"type"`
Comment string `json:"comment"`
Nullable bool `json:"nullable"`
}
Loading