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

reduce permissions on bootstrap kubeconfig used by masters #879

Merged

Conversation

abhinavdahiya
Copy link
Contributor

@abhinavdahiya abhinavdahiya commented Dec 11, 2018

Currently the master nodes have a kubeconfig served from bootstrap node that has admin priviledges, but only for 30 mins. This PR reduces the permissions on that kubeconfig to only allow CSR creation.

Addition of clusterrolebindings from openshift/machine-config-operator#226 ( csr-approver-role-binding.yaml and csr-bootstrapper-role-binding.yaml) allow kubelets to create a CSR and get that CSR autoapproved from the controller manager.

Requires openshift/machine-config-operator#226

/cc @wking @aaronlevy

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 11, 2018
@ashcrow
Copy link
Member

ashcrow commented Dec 12, 2018

/test e2e-aws

@abhinavdahiya
Copy link
Contributor Author

/retest

@crawford
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 12, 2018
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, crawford

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [abhinavdahiya,crawford]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit cbc7c5c into openshift:master Dec 12, 2018
abhinavdahiya added a commit to abhinavdahiya/machine-config-operator that referenced this pull request Dec 12, 2018
openshift/installer#879 merged that switches to the new bootstrap manifests. So we can drop the old ones now.
@abhinavdahiya abhinavdahiya deleted the master_bootstrapping branch December 12, 2018 22:22
abhinavdahiya added a commit to abhinavdahiya/installer that referenced this pull request Jan 10, 2019
…o 1 day

The 30 minutes validity was necessary as before openshift#879 the client certificate provided
cluster admin rights. But after openshift#879 the client certificate only has access to CSR endpoint.

Therefore, we can safely increase the validity to something longer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants