NamespaceManagement cleanup can delete RBAC in unrelated namespaces
Maintainer antworten meist innerhalb von 1 Tag
@Rizwana777 arbeitet bereits daran.
Seit 16.11.2026.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 22/100
Rechercherichtung
Start in argocd-operator/controllers/argocd/util.go around lines 1999-2015, where cleanupRBACsForNamespaceManagement is called from handleArgoCDNamespaceManagementUpdate, then read deleteRBACsForNamespace. Confirm the Roles and RoleBindings deleted there are not filtered by owning instance. Done means deletion is limited to grants owned by the originating ArgoCD, with regression tests for unrelated namespaces both with and without the feature flag.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
A user who can create and update an ArgoCD CR in their own namespace can cause the operator to delete Argo CD Roles and RoleBindings in another namespace, without permission or consent from that namespace. This also occurs when ALLOW_NAMESPACE_MANAGEMENT_IN_NAMESPACE_SCOPED_INSTANCES=false.
Reproduction
With a cluster-wide operator installation and existing Argo CD RBAC in namespace victim:
- Create an ArgoCD CR in an unrelated namespace,
tenant. - Set its
.spec.namespaceManagementto[{name: victim, allowManagedBy: true}]. - Remove that entry from the CR.
No NamespaceManagement CR or managed-by label authorizing the tenant instance is required in victim.
Actual behavior
The update predicate calls handleArgoCDNamespaceManagementUpdate, which passes the removed namespace to cleanupRBACsForNamespaceManagement. The cleanup deletes Roles and RoleBindings labeled app.kubernetes.io/part-of=argocd in victim, regardless of which instance owns them. Repeated updates can disrupt other Argo CD instances.
Relevant code: argocd-operator/controllers/argocd/util.go, particularly lines 1999–2015 and deleteRBACsForNamespace.
Expected behavior
Cleanup should delete only grants owned by the originating ArgoCD instance. Merely naming a namespace in the CR must not authorize deletion there. Add regression coverage for unrelated namespaces with the feature enabled and disabled, while preserving legitimate grant cleanup.
Confirmed at commit 5fb7a030 using an isolated fake-client reproduction through the update predicate; no live-cluster exploit was run.
(Bug text c/o OpenAI Codex v6.1 Sol xhigh)
- Vorherrschende Sprache
- Go
- Sterne
- 190
- Forks
- 367
- Ø Merge
- 4 T. 2 Std.
- Gemergte PRs (30 T.)
- 63
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus redhat-developer/gitops-operator
-
Manager does not detect Route CRD that appears after startupEvtl. vergeben @atishay-kasliwal hat das heute übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
redhat-developer/gitops-operator#1566 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
NamespaceManagement revocation checks labels on the wrong namespaceEvtl. vergeben @Rizwana777 hat das vor 3 Tagen übernommen. Offenkind/bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
redhat-developer/gitops-operator#1559 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Deleting an ArgoCD instance removes RBAC belonging to same-named instancesEvtl. vergeben @Rizwana777 hat das vor 3 Tagen übernommen. Offenkind/bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
redhat-developer/gitops-operator#1558 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
ApplicationSet tokenRef strict mode changes only apply after the controller is restartedEvtl. vergeben @Gabrielandre02 hat das vor 5 Tagen übernommen. Offen
redhat-developer/gitops-operator#1554 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Enqueue the previous Argo CD instance when NamespaceManagement consent is withdrawnEvtl. vergeben @Gabrielandre02 hat das vor 5 Tagen übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
redhat-developer/gitops-operator#1530 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in redhat-developer/gitops-operator
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
mozilla-ai/cq#601 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag