cozystack preset: OIDC groups mapped without prefix allow the IdP to grant system:masters

オープン
#267 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go, helm, kubernetes

調査の方向性

Read the cozystack preset’s Talos v1.14+ authentication renderer and its legacy OIDC renderer; the issue does not name their file paths. Start by tracing how each renderer maps the groups claim, then check the existing tests for both contract versions. Done means reserved system groups cannot be granted through the v1.14+ mapping, with coverage for that behavior; legacy handling remains an open design choice.

索引モデルが issue の本文から書いたものです。

説明

The cozystack preset passes the OIDC groups claim to Kubernetes as is:

  • Talos v1.14+: KubeAuthenticationConfig with claimMappings.groups: {claim: groups, prefix: ""}
  • older contracts: oidc-groups-claim: groups without oidc-groups-prefix

Thus any token from the issuer with system:masters in groups is cluster-admin, same for system:nodes and other reserved groups. Anyone who can create or assign groups in the IdP, or has the IdP signing key, gets the cluster. I think IdP admin should not be cluster admin automatically.

Adding a prefix would break Cozystack tenant RBAC, it binds unprefixed group names. For the v1.14+ renderer we can just drop reserved groups with CEL:

claimMappings:
  groups:
    expression: "has(claims.groups) ? claims.groups.filter(g, !g.startsWith('system:')) : []"

The legacy renderer has no CEL, there we can document it or add opt-in oidcGroupsPrefix value.

I can send a PR for the v1.14+ part.

主要言語
Go
スター
493
フォーク
23
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cozystack/talm のほかの issue

cozystack/talm の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。