-
Notifications
You must be signed in to change notification settings - Fork 40k
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
append an abac rule for $KUBE_USER. #29164
Conversation
Doesn't look like this is correct on our debian-based scripts. |
I am not too familiar with salt, but the way I have seen this done in the past is to add a configurable variable in salt config, it your case, you can in https://github.com/kubernetes/kubernetes/blob/master/cluster/saltbase/salt/kube-apiserver/abac-authz-policy.jsonl something like: {"apiVersion": "abac.authorization.kubernetes.io/v1beta1", "kind": "Policy", "spec": {"user":"{{kube_user}}", "namespace": "", "resource": "", "apiGroup": "", "nonResourcePath": ""} and then |
@adityakali Yeah you're right. I'll do this in the more "salty" way. |
ac74be2
to
be385d1
Compare
Okay, should be in a cleaner state now.
PTAL |
LGTM |
local -r abac_policy_json="${src_dir}/abac-authz-policy.jsonl" | ||
remove-salt-config-comments "${abac_policy_json}" | ||
sed -i -e "s@{{kube_user}}@${KUBE_USER}@g" "${abac_policy_json}" | ||
cp ${abac_policy_json} /etc/srv/kubernetes/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: (and below) quotes: "${abac_policy_json}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done and done.
LGTM except nit. Fix and feel free to self-apply label. |
c9593ba
to
8de63a0
Compare
Change was just a rebase to get past the docs verification error from yesterday. Reapplying LGTM. |
GCE e2e build/test passed for commit e559e30. |
Automatic merge from submit-queue |
This was done for GCE in kubernetes#29164, but not for AWS. Fixes kubernetes#29424
This was done for GCE in kubernetes#29164, but not for AWS. Fixes kubernetes#29424
Commit found in the "release-1.3" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
This was done for GCE in kubernetes#29164, but not for AWS. Fixes kubernetes#29424
This was done for GCE in kubernetes#29164, but not for AWS. Fixes kubernetes#29424
…ck-of-#29164-upstream-release-1.3 Automatic merge from submit-queue Automated cherry pick of kubernetes#29164 Cherry pick of kubernetes#29164 on release-1.3.
Allows the specified basic-auth credentials to be authorized against all resources.
Fixes #28869.