Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/kubernetes: dashboard lockdown #42217

Merged
merged 1 commit into from Jun 19, 2018

Conversation

johanot
Copy link
Contributor

@johanot johanot commented Jun 19, 2018

Kubernetes dashboard currently has cluster admin permissions, which is not recommended. See: https://github.com/kubernetes/dashboard/wiki/Access-control.

I've added minimal granted privileges for the Dashboard as per: https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml

A new option is available for re-enabling cluster admin permissions, for those who find that desirable.

To assign other custom privileges to the dashboard, one can add verbatim roles and rolebindings to the addon-manager, using: services.kubernetes.addonManager.addons.

What's changed:

  • Renamed option "services.kubernetes.addons.dashboard.enableRBAC" to "services.kubernetes.addons.dashboard.rbac.enable"

  • Added option "services.kubernetes.addons.dashboard.rbac.clusterAdmin", default = false.

  • Setting recommended minimal permissions for the dashboard in accordance with https://github.com/kubernetes/dashboard/wiki/Installation

  • Updated release note for 18.09.


  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)

  • Built on platform(s)

    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
    /nixos/tests/kubernetes/dns.nix
    /nixos/tests/kubernetes/rbac.nix

  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"

  • Tested execution of all binary files (usually in ./result/bin/)

  • Fits CONTRIBUTING.md.


Kubernetes dashboard currently has cluster admin permissions,
which is not recommended.

- Renamed option "services.kubernetes.addons.dashboard.enableRBAC" to "services.kubernetes.addons.dashboard.rbac.enable"
- Added option "services.kubernetes.addons.dashboard.rbac.clusterAdmin", default = false.
- Setting recommended minimal permissions for the dashboard in accordance with https://github.com/kubernetes/dashboard/wiki/Installation
- Updated release note for 18.09.
@globin globin merged commit f9ad1ca into NixOS:master Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants