v0.10.0: each viewer sees what their own RBAC allows
Until now anyone admitted through Dex saw every namespace and every log, read with the module's service account. auth.visibility: ViewerRBAC (the default) asks the API server as the viewer, with the token the DexAuthenticator forwards: list pods in all namespaces means the whole cluster; otherwise the namespaces where they can list pods. Logs also need get pods/log, node cards list nodes, cluster-wide alerts are for cluster-wide viewers. Traffic to a hidden namespace keeps its counts with the peer shown as hidden. One minute cache per token hash, SSARs in parallel (8), a cluster-wide viewer costs two. Verified against the live cluster with two real tokens: a service account with view in one namespace got that namespace only (0 nodes, 403 on another namespace's YAML and logs, 403 on node usage); the module's own account, cluster-wide, got all 56 namespaces and 6 nodes; no token, 401. auth.visibility: Everything keeps the old behaviour. The DexAuthenticator now forwards the token when either actions or ViewerRBAC need it (templates/_helpers.tpl). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ce6dad9a58
commit
c50020e420
@@ -58,8 +58,16 @@ properties:
|
||||
description: |
|
||||
Доступ к веб-интерфейсу.
|
||||
|
||||
Любой, кого сюда пустили, видит все namespace, манифесты workload'ов, Service и Ingress (Secret — никогда) и логи контейнеров — через собственную read-only-учётку модуля. Ограничивайте доступ через `allowedUserGroups`.
|
||||
При `visibility: ViewerRBAC` (по умолчанию) каждый видит только namespace, где его собственный RBAC разрешает смотреть поды; при `Everything` любой, кого сюда пустили, видит все namespace, манифесты workload'ов, Service и Ingress (Secret — никогда) и логи контейнеров. В обоих случаях ограничивайте круг допущенных через `allowedUserGroups`.
|
||||
properties:
|
||||
visibility:
|
||||
description: |
|
||||
Что видит пользователь.
|
||||
|
||||
- `ViewerRBAC` — то, что разрешают его собственные права: весь кластер, если он может смотреть поды во всех namespace, иначе только namespace, где он может смотреть поды. Для логов контейнеров нужно ещё `get pods/log`, для карточек нод — `list nodes`. Трафик в скрытый namespace показывается как соединение со скрытым соседом. Проверяется через SelfSubjectAccessReview от имени пользователя, ответ кешируется на минуту.
|
||||
- `Everything` — каждый допущенный пользователь видит весь кластер, чтение идёт сервисным аккаунтом модуля.
|
||||
|
||||
Для `ViewerRBAC` нужен токен пользователя: модуль `user-authn` или `externalAuthentication`, который кладёт в заголовок `Authorization` токен, принимаемый API-сервером.
|
||||
externalAuthentication:
|
||||
description: |
|
||||
Параметры для подключения внешней аутентификации на основе механизма Ingress NGINX [external-auth](https://kubernetes.github.io/ingress-nginx/examples/auth/external-auth/).
|
||||
|
||||
Reference in New Issue
Block a user