NamespaceManagement revocation checks labels on the wrong namespace
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go, kubernetes
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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)
- 主要言語
- Go
- スター
- 190
- フォーク
- 367
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 63
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
redhat-developer/gitops-operator のほかの issue
-
Manager does not detect Route CRD that appears after startup対応中かも @atishay-kasliwal が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
redhat-developer/gitops-operator#1566 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Deleting an ArgoCD instance removes RBAC belonging to same-named instances対応中かも @Rizwana777 が 3 日前に担当しました。 オープンkind/bug
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
redhat-developer/gitops-operator#1558 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
NamespaceManagement cleanup can delete RBAC in unrelated namespaces対応中かも @Rizwana777 が 3 日前に担当しました。 オープンkind/bug
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
redhat-developer/gitops-operator#1557 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
ApplicationSet tokenRef strict mode changes only apply after the controller is restarted対応中かも @Gabrielandre02 が 5 日前に担当しました。 オープン
redhat-developer/gitops-operator#1554 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Enqueue the previous Argo CD instance when NamespaceManagement consent is withdrawn対応中かも @Gabrielandre02 が 5 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
redhat-developer/gitops-operator#1530 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
redhat-developer/gitops-operator の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Inconsistency between golang and cue in spec対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
security
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
Tencent/LoopForge#1087 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信