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

Đang mở
#267 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, helm, kubernetes
Lĩnh vực
authentication, security

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Go
Star
493
Fork
23
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cozystack/talm

Tất cả issue của cozystack/talm

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.