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

Use existing ABAC policy file when upgrading GCE cluster #40172

Merged
merged 1 commit into from
Jan 26, 2017

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Jan 19, 2017

When upgrading, continue loading an existing ABAC policy file so that existing system components continue working as-is

When upgrading an existing 1.5 GCE cluster using `cluster/gce/upgrade.sh`, an existing ABAC policy file located at /etc/srv/kubernetes/abac-authz-policy.jsonl (the default location in 1.5) will enable the ABAC authorizer in addition to the RBAC authorizer. To switch an upgraded 1.5 cluster completely to RBAC, ensure the control plane components and your superuser have been granted sufficient RBAC permissions, move the legacy ABAC policy file to a backup location, and restart the apiserver.

@k8s-reviewable
Copy link

This change is Reviewable

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 19, 2017
@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note-label-needed labels Jan 19, 2017
# ABAC_AUTHZ_FILE
function detect-legacy-abac-file() {
# This is the location GCE scripts wrote ABAC policy files to prior to 1.6
local -r legacy_abac_path="/etc/srv/kubernetes/abac-authz-policy.jsonl"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The container-linux scripts put it /srv/kubernetes/abac-authz-policy.jsonl :(

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really? both places I saw it referenced by the apiserver it was at this path

c1afc4a#diff-82d9e3b777d0e39e2fea4985a20f307eL715

ecd23a0#diff-6e3b476b9225d1213dc6ad13e453fc16L789

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, the container-linux scripts didn't exist in release-1.5

@k8s-github-robot k8s-github-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 19, 2017
@@ -900,6 900,9 @@ function start-kube-apiserver {


local authorization_mode="RBAC"
# Load existing ABAC policy files written by versions < 1.6 of this script
# TODO: only default to this legacy path when in upgrade mode
ABAC_AUTHZ_FILE="${ABAC_AUTHZ_FILE:-/etc/srv/kubernetes/abac-authz-policy.jsonl}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for GCI.

I think you'd need the same thing above the corresponding stanza in the container-linux script.
Trusty would be the same as this, but it looks like it isn't being maintained anymore...
Debian sets this up w/ salt (https://github.com/kubernetes/kubernetes/tree/master/cluster/saltbase/salt/kube-apiserver) and it appears to still be using ABAC all the time.

Those can be handled in followup PRs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The container-linux script didn't exist in 1.5. Is it possible for someone to have an existing install that they upgrade using that script?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The container-linux script was recently renamed from "coreos". It was heavily refactored after the 1.5 cut (due to my slow review) and I'm not sure if the maintainers are concerned with upgrade compatibility as they are still heavily modifying the script.

@spxtr
Copy link
Contributor

spxtr commented Jan 19, 2017

@k8s-bot test this
kubernetes/test-infra#1598

@liggitt
Copy link
Member Author

liggitt commented Jan 20, 2017

@k8s-bot cross build this

@roberthbailey
Copy link
Contributor

/approve

@k8s-github-robot k8s-github-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 24, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

The following people have approved this PR: roberthbailey

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@liggitt
Copy link
Member Author

liggitt commented Jan 26, 2017

tagging based on #40172 (comment)

@liggitt liggitt added lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Jan 26, 2017
@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 38739, 40480, 40495, 40172, 40393)

@k8s-github-robot k8s-github-robot merged commit b1279a3 into kubernetes:master Jan 26, 2017
@liggitt liggitt deleted the abac-upgrade branch January 27, 2017 14:07
@liggitt liggitt added this to the v1.6 milestone Apr 13, 2017
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants