Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
58ef1d0
[Feature-17937][API][UI] Add sensitive workflow and task parameters
det101 Sep 14, 2026
015b5b7
Merge branch 'dev' into feature-17937-sensitive-property-pr1
det101 Sep 14, 2026
11eedbc
[Chore] Retrigger CI
det101 Sep 15, 2026
edecc0d
Merge branch 'dev' into feature-17937-sensitive-property-pr1
det101 Sep 15, 2026
90a9e4a
[Improvement-17937][API] Split sensitive property mask into typed ove…
det101 Sep 15, 2026
ea46d67
[Fix-17937][API] Mask sensitive values in workflow instance commandParam
det101 Sep 16, 2026
9ba9507
[Chore] Retrigger CI
det101 Sep 16, 2026
9cabab9
[Feature-17937][API][UI] Add sensitive workflow and task parameters
det101 Sep 14, 2026
bf5b8f4
[Improvement-17937][API] Split sensitive property mask into typed ove…
det101 Sep 15, 2026
bc252d2
[Fix-17937][API] Mask sensitive values in workflow instance commandParam
det101 Sep 16, 2026
93e5fbc
Merge branch 'dev' into feature-17937-sensitive-property-pr1
det101 Sep 17, 2026
7d05505
Merge branch 'dev' into feature-17937-sensitive-property-pr1
det101 Sep 17, 2026
a56117e
Merge branch 'feature-17937-sensitive-property-pr1' of github.com:det…
det101 Sep 18, 2026
bd8d4b2
[Chore] Retrigger CI
det101 Sep 18, 2026
4f960d7
Merge branch 'dev' into feature-17937-sensitive-property-pr1
det101 Sep 18, 2026
bffb5b3
[Fix-17937][API] Drop unchecked SuppressWarnings for sensitive masking
det101 Sep 20, 2026
5e1c2db
[Fix-17937][API] Inherit sensitive flags into start/command params
det101 Sep 20, 2026
e3ff067
[Fix-17937][API] Collapse subclass mask overloads into parent methods
det101 Sep 20, 2026
b400364
[Chore] Retrigger CI
det101 Sep 21, 2026
26a596f
[Improvement-17937][UI] Rename sensitive parameter labels
det101 Sep 21, 2026
57eb1af
[Chore] Retrigger CI
det101 Sep 21, 2026
5035fa8
[Chore] Retrigger CI
det101 Sep 21, 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
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.apache.dolphinscheduler.api.service.DataAnalysisService;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.api.utils.SensitivePropertyUtils;
import org.apache.dolphinscheduler.api.vo.TaskInstanceCountVO;
import org.apache.dolphinscheduler.api.vo.WorkflowDefinitionCountVO;
import org.apache.dolphinscheduler.api.vo.WorkflowInstanceCountVO;
Expand All @@ -39,6 +40,7 @@

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
Expand Down Expand Up @@ -172,6 +174,11 @@ public Result<PageInfo<Command>> listPaging(@Parameter(hidden = true) @RequestAt
checkPageParams(pageNo, pageSize);
PageInfo<Command> commandPageInfo =
dataAnalysisService.listPendingCommands(loginUser, projectCode, pageNo, pageSize);
if (commandPageInfo != null && commandPageInfo.getTotalList() != null) {
commandPageInfo.setTotalList(commandPageInfo.getTotalList().stream()
.map(SensitivePropertyUtils::mask)
.collect(Collectors.toList()));
}
return Result.success(commandPageInfo);
}

Expand All @@ -197,6 +204,11 @@ public Result<PageInfo<ErrorCommand>> listErrorCommand(@Parameter(hidden = true)
checkPageParams(pageNo, pageSize);
PageInfo<ErrorCommand> errorCommandPageInfo =
dataAnalysisService.listErrorCommand(loginUser, projectCode, pageNo, pageSize);
if (errorCommandPageInfo != null && errorCommandPageInfo.getTotalList() != null) {
errorCommandPageInfo.setTotalList(errorCommandPageInfo.getTotalList().stream()
.map(SensitivePropertyUtils::mask)
.collect(Collectors.toList()));
}
return Result.success(errorCommandPageInfo);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@
import org.apache.dolphinscheduler.api.audit.enums.AuditType;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.TaskDefinitionService;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.api.utils.SensitivePropertyUtils;
import org.apache.dolphinscheduler.api.vo.TaskDefinitionVO;
import org.apache.dolphinscheduler.common.constants.Constants;
import org.apache.dolphinscheduler.common.enums.ReleaseState;
import org.apache.dolphinscheduler.dao.entity.TaskDefinitionLog;
import org.apache.dolphinscheduler.dao.entity.User;

import java.util.List;
import java.util.stream.Collectors;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
Expand Down Expand Up @@ -82,13 +86,21 @@ public class TaskDefinitionController extends BaseController {
@GetMapping(value = "/{code}/versions")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_TASK_DEFINITION_VERSIONS_ERROR)
public Result queryTaskDefinitionVersions(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable(value = "code") long code,
@RequestParam(value = "pageNo") int pageNo,
@RequestParam(value = "pageSize") int pageSize) {
public Result<PageInfo<TaskDefinitionLog>> queryTaskDefinitionVersions(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@PathVariable(value = "code") long code,
@RequestParam(value = "pageNo") int pageNo,
@RequestParam(value = "pageSize") int pageSize) {
checkPageParams(pageNo, pageSize);
return taskDefinitionService.queryTaskDefinitionVersions(loginUser, projectCode, code, pageNo, pageSize);
Result<PageInfo<TaskDefinitionLog>> result = taskDefinitionService.queryTaskDefinitionVersions(loginUser,
projectCode, code, pageNo, pageSize);
PageInfo<TaskDefinitionLog> pageInfo = result.getData();
if (pageInfo != null && pageInfo.getTotalList() != null) {
pageInfo.setTotalList(pageInfo.getTotalList().stream()
.map(log -> (TaskDefinitionLog) SensitivePropertyUtils.mask(log))
.collect(Collectors.toList()));
}
return result;
}

/**
Expand Down Expand Up @@ -163,7 +175,7 @@ public Result<TaskDefinitionVO> queryTaskDefinitionDetail(@Parameter(hidden = tr
@PathVariable(value = "code") long code) {
TaskDefinitionVO taskDefinitionVO =
taskDefinitionService.queryTaskDefinitionDetail(loginUser, projectCode, code);
return Result.success(taskDefinitionVO);
return Result.success((TaskDefinitionVO) SensitivePropertyUtils.mask(taskDefinitionVO));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,18 @@
import org.apache.dolphinscheduler.api.audit.enums.AuditType;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.TaskInstanceService;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.api.utils.SensitivePropertyUtils;
import org.apache.dolphinscheduler.common.constants.Constants;
import org.apache.dolphinscheduler.common.enums.TaskExecuteType;
import org.apache.dolphinscheduler.dao.entity.TaskInstance;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.plugin.task.api.enums.TaskExecutionStatus;
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;

import java.util.stream.Collectors;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
Expand Down Expand Up @@ -94,25 +99,25 @@ public class TaskInstanceController extends BaseController {
@GetMapping()
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_TASK_LIST_PAGING_ERROR)
public Result queryTaskListPaging(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "workflowInstanceId", required = false, defaultValue = "0") Integer workflowInstanceId,
@RequestParam(value = "workflowInstanceName", required = false) String workflowInstanceName,
@RequestParam(value = "workflowDefinitionName", required = false) String workflowDefinitionName,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam(value = "taskName", required = false) String taskName,
@RequestParam(value = "taskCode", required = false) Long taskCode,
@RequestParam(value = "executorName", required = false) String executorName,
@RequestParam(value = "stateType", required = false) TaskExecutionStatus stateType,
@RequestParam(value = "host", required = false) String host,
@RequestParam(value = "startDate", required = false) String startTime,
@RequestParam(value = "endDate", required = false) String endTime,
@RequestParam(value = "taskExecuteType", required = false, defaultValue = "BATCH") TaskExecuteType taskExecuteType,
@RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize) {
public Result<PageInfo<TaskInstance>> queryTaskListPaging(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
@RequestParam(value = "workflowInstanceId", required = false, defaultValue = "0") Integer workflowInstanceId,
@RequestParam(value = "workflowInstanceName", required = false) String workflowInstanceName,
@RequestParam(value = "workflowDefinitionName", required = false) String workflowDefinitionName,
@RequestParam(value = "searchVal", required = false) String searchVal,
@RequestParam(value = "taskName", required = false) String taskName,
@RequestParam(value = "taskCode", required = false) Long taskCode,
@RequestParam(value = "executorName", required = false) String executorName,
@RequestParam(value = "stateType", required = false) TaskExecutionStatus stateType,
@RequestParam(value = "host", required = false) String host,
@RequestParam(value = "startDate", required = false) String startTime,
@RequestParam(value = "endDate", required = false) String endTime,
@RequestParam(value = "taskExecuteType", required = false, defaultValue = "BATCH") TaskExecuteType taskExecuteType,
@RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize) {
checkPageParams(pageNo, pageSize);
searchVal = ParameterUtils.handleEscapes(searchVal);
return taskInstanceService.queryTaskListPaging(
Result<PageInfo<TaskInstance>> result = taskInstanceService.queryTaskListPaging(
loginUser,
projectCode,
workflowInstanceId,
Expand All @@ -129,6 +134,13 @@ public Result queryTaskListPaging(@Parameter(hidden = true) @RequestAttribute(va
taskExecuteType,
pageNo,
pageSize);
PageInfo<TaskInstance> pageInfo = result.getData();
if (pageInfo != null && pageInfo.getTotalList() != null) {
pageInfo.setTotalList(pageInfo.getTotalList().stream()
.map(SensitivePropertyUtils::mask)
.collect(Collectors.toList()));
}
return result;
}

/**
Expand Down
Loading
Loading