Skip to content

[Console] Add missing RBAC checks on cluster and variable endpoints#4381

Open
shangeyao wants to merge 1 commit into
apache:devfrom
shangeyao:fix/cluster-variable-rbac
Open

[Console] Add missing RBAC checks on cluster and variable endpoints#4381
shangeyao wants to merge 1 commit into
apache:devfrom
shangeyao:fix/cluster-variable-rbac

Conversation

@shangeyao

Copy link
Copy Markdown
Contributor

Summary

  • Add @RequiresPermissions to unprotected FlinkClusterController endpoints (page, list, alive, get, start, shutdown, delete, etc.).
  • Add @RequiresPermissions("variable:view") to VariableController.list and guard check/code with variable permissions.
  • Use Logical.OR on cluster list/alive so app create/edit flows (app:add/app:update) can still load cluster options.

Closes #4380

Test plan

  • User without cluster:update cannot start/shutdown/delete clusters
  • User with app:add can still load cluster list in Flink app form
  • User without variable:view cannot list variables by teamId

Made with Cursor

Protect Flink cluster lifecycle APIs with cluster:create/update permissions
and variable list/code-check APIs with variable:view (and related) permissions.

Closes apache#4380

Co-authored-by: Cursor <cursoragent@cursor.com>
@sonarqubecloud

Copy link
Copy Markdown

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Console] Add missing RBAC checks on FlinkCluster and Variable endpoints

1 participant