Skip to content

Prevent cross-cluster resource access#1070

Open
mxsrc wants to merge 1 commit into
mainfrom
fix-inc-004
Open

Prevent cross-cluster resource access#1070
mxsrc wants to merge 1 commit into
mainfrom
fix-inc-004

Conversation

@mxsrc
Copy link
Copy Markdown
Contributor

@mxsrc mxsrc commented May 28, 2026

Currently, authentication and resource retrieval is decoupled, allowing API clients to authenticate to one cluster and access resources of a different one. This change introduces checks that resources are accessed in their correct scope.

Note that this fix was complicated by the fact that the backup API does not follow the cannonical API structure. In particular, the deletion of all LVol backups was registered at /clusters/{cluster_id}/backups/{lvol_id} instead of /clusters/{cluster_id}/storage-pools/{pool_id}/volumes/{volume_id}/backups/. To correct for this, the PR duplicates the endpoint at the latter location and modifies the existing one to call the new function, which implicitly adds the ownership validation. The existing endpoint is marked as deprecated but will continue to function, maintaining compatibility.

I confirmed that the linter and test failures predate this changeset.

Requesting a review from @noctarius specifically to confirm API modification.

Currently, authentication and resource retrieval is decoupled, allowing
API clients to authenticate to one cluster and access resources of a
different one. This change introduces checks that resources are accessed
in their correct scope.
@mxsrc mxsrc requested review from Hamdy-khader and noctarius May 28, 2026 11:54
@mxsrc mxsrc marked this pull request as ready for review May 28, 2026 11:54
Copy link
Copy Markdown
Collaborator

@Hamdy-khader Hamdy-khader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants