Skip to content

bug: gitops endpoints allow non-admin users to perform cluster mutations #6022

@aaradhychinche-alt

Description

@aaradhychinche-alt

User Request

Type: bug
Target: Console Application
Submitted by: @aaradhychinche-alt
Console Request ID: 6a3ed2da-b36c-4683-85f8-8901071ee344

Description

What happened:
Several GitOps endpoints (sync, helm upgrade, uninstall, rollback, drift detection, ArgoCD sync) only check authentication but do not enforce role-based authorization. As a result, any authenticated user can trigger cluster-level operations.

What I expected:
Cluster mutation operations should be restricted to admin users or users with appropriate permissions.

Steps to reproduce:

  1. Login as a non-admin (viewer/editor) user.
  2. Send a POST request to any of the following endpoints:
    • /api/gitops/sync
    • /api/gitops/helm-upgrade
    • /api/gitops/helm-uninstall
    • /api/gitops/helm-rollback
    • /api/gitops/detect-drift
    • /api/gitops/argocd/sync
  3. Observe that the request is processed instead of returning 403 Forbidden.

Relevant area:
GitOps handlers (pkg/api/handlers/gitops.go)

Suggested improvement:
Add explicit RBAC checks in all mutation endpoints to ensure only authorized users can perform these operations.

Impact:
Critical. Allows unauthorized users to modify or disrupt cluster state, leading to potential production incidents.


This issue was automatically created from the KubeStellar Console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions