Skip to content

[DSIP-104][ApiServer][UI] Introduce project-scoped authorization - #18718

Open
ruanwenjun wants to merge 4 commits into
apache:devfrom
ruanwenjun:Feature-17923
Open

ruanwenjun wants to merge 4 commits into
apache:devfrom
ruanwenjun:Feature-17923

Conversation

@ruanwenjun

@ruanwenjun ruanwenjun commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Was this PR generated or assisted by AI?

YES. The implementation, UI, schema upgrades, tests and documentation were generated or assisted by AI.

Purpose of the pull request

Implements DSIP-104: users receive explicit operation permissions within a project, and shared resources are granted to projects. Project operations require the relevant permission and resource grants.

Closes #17923.

flowchart LR
    U[User] -->|Project operation permissions| P[Project]
    R[Shared resources] -->|Resource-use grants| P
    P --> C{Permission AND resource grant}
    C --> A[Allow project operation]
Loading

Brief change log

  • Add separate user-project permission and project-resource authorization tables, assignment APIs and project management UI. System administrators grant resources; project member managers assign permissions within their project.
  • Scope resource queries in SQL and enforce project permissions at configuration, publication and manual execution/rerun entry points, including nested subworkflows. Resolve actual instance projects and return non-sensitive metadata from project resource selectors.
  • Cover datasources, worker groups, tenants, queues, environments, alert groups, Kubernetes namespaces and task groups. Resource files are deferred.
  • Update project and Shell/Python E2E fixtures to use the new resource assignment UI and explicitly grant their execution resources.
  • Add MySQL/PostgreSQL 3.5.0 upgrade scripts and English/Chinese upgrade notes. Legacy authorization tables and data are retained without migration or authorization fallback; administrators must reassign project member permissions and resource grants.

Resource grant revocation does not recheck existing running/queued instances, scheduled triggers or automatic retries, and does not disable existing schedules.

Verify this pull request

Local validation:

  • All 43 changed/new backend, DAO and upgrade test suites: 450 passed, 7 existing skips, 0 failures/errors.
  • Real MySQL 8 and PostgreSQL 16 upgrade/DAO tests verify empty new grant tables, preserved legacy permissions and execution/schedule records, safe repeated upgrades, exact resource-key matching and string round trips.
  • UI production build (including TypeScript checks), ESLint and Prettier checks passed.
  • Updated E2E Java sources compile successfully; browser E2E tests were not run locally.
  • Diff whitespace checks passed.

The initial CI documentation link check failed while parsing the existing lychee.toml (include_fragments = false is incompatible with the CI lychee version). That configuration is unchanged by this PR.

Pull Request Notice

Pull Request Notice

@github-actions github-actions Bot added UI ui and front end related backend test document labels Oct 16, 2026
@ruanwenjun ruanwenjun added this to the 3.5.0 milestone Oct 16, 2026
@ruanwenjun ruanwenjun added feature new feature DSIP labels Oct 16, 2026
@github-actions github-actions Bot added the e2e e2e test label Oct 16, 2026
Comment on lines +78 to +79
if (!resourceAuthorizationDao.isAuthorized(projectCode, ProjectResourceType.DATASOURCE,
datasourceId.toString())) {
putMsg(result, Status.SUCCESS);

return result;
if (loginUser.getId() == userId) {
namespaceUser.setUpdateTime(now);
k8sNamespaceUserMapper.insert(namespaceUser);
Arrays.stream(projectIds.split(Constants.COMMA)).distinct().forEach(projectId -> {
Project project = projectDao.queryDetailById(Integer.parseInt(projectId));
@SbloodyS SbloodyS changed the title [Feature-17923][ApiServer][UI] Introduce project-scoped authorization [DSIP-104][ApiServer][UI] Introduce project-scoped authorization Oct 17, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend document DSIP e2e e2e test feature new feature test UI ui and front end related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DSIP-104][ApiServer] Refactor the permission verification template code.

3 participants