NamespaceManagement revocation checks labels on the wrong namespace
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 25/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- go, kubernetes
- Domínio
- authorization, security
Direção de pesquisa
Start in argocd-operator/controllers/argocd/util.go at handleNamespaceManagementDelete and handleNamespaceManagementUpdate, where the cleanup fetches the namespace named by .spec.managedBy instead of the CR's own namespace. Reproduce the deletion case with the fake client first. Done when the target namespace's labels decide whether the old manager's Roles and RoleBindings are revoked, with regression tests for deletion, retargeting, and a preserved valid target-label grant.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Deleting or redirecting a NamespaceManagement CR can leave the old ArgoCD instance's cross-namespace permissions in place. The cleanup checks the managing namespace's labels instead of the namespace withdrawing consent.
Reproduction
With ALLOW_NAMESPACE_MANAGEMENT_IN_NAMESPACE_SCOPED_INSTANCES=true:
- Create a namespace-scoped ArgoCD instance in
manager, with.spec.namespaceManagement: [{name: target, allowManagedBy: true}]. - Label namespace
managerwithargocd.argoproj.io/managed-by: manager. Leave namespacetargetwithout amanaged-bylabel. - Create a NamespaceManagement CR in
targetwith.spec.managedBy: manager, and wait for the cross-namespace Roles and RoleBindings to be created. - Delete that NamespaceManagement CR, or change its
.spec.managedByto another namespace.
Actual behavior
The cleanup handlers fetch namespace manager using .spec.managedBy. Its self-referencing managed-by label causes cleanup to be skipped, although target has no overlapping label grant. The old manager's Roles and RoleBindings remain in target, retaining access after consent is withdrawn.
Relevant code: argocd-operator/controllers/argocd/util.go, in handleNamespaceManagementUpdate at line 2026 and handleNamespaceManagementDelete at line 2048.
Expected behavior
Check the labels on the NamespaceManagement CR's own namespace (target). Revoke the old manager's grants unless that target namespace independently authorizes continued access. Add regression tests for deletion and retargeting with a self-labeled manager, plus a case preserving a valid target-namespace label grant.
Confirmed the deletion case at commit 5fb7a030 using an isolated fake-client reproduction after a prior grant; no live-cluster exploit was run.
(Bug text c/o OpenAI Codex v6.1 Sol xhigh)
- Linguagem predominante
- Go
- Estrelas
- 190
- Forks
- 367
- Merge médio
- 4d 2h
- PRs com merge (30d)
- 63
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de redhat-developer/gitops-operator
-
Manager does not detect Route CRD that appears after startupTalvez já em andamento @atishay-kasliwal assumiu hoje. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
redhat-developer/gitops-operator#1566 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Deleting an ArgoCD instance removes RBAC belonging to same-named instancesTalvez já em andamento @Rizwana777 assumiu há 3 dias. Abertakind/bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 45/100
redhat-developer/gitops-operator#1558 · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
NamespaceManagement cleanup can delete RBAC in unrelated namespacesTalvez já em andamento @Rizwana777 assumiu há 3 dias. Abertakind/bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 22/100
redhat-developer/gitops-operator#1557 · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
ApplicationSet tokenRef strict mode changes only apply after the controller is restartedTalvez já em andamento @Gabrielandre02 assumiu há 5 dias. Aberta
redhat-developer/gitops-operator#1554 · 1 comentário · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Enqueue the previous Argo CD instance when NamespaceManagement consent is withdrawnTalvez já em andamento @Gabrielandre02 assumiu há 5 dias. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
redhat-developer/gitops-operator#1530 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de redhat-developer/gitops-operator
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
mozilla-ai/cq#601 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia