-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
if we have a dedicated serviceaccount keypair, use it to verify serviceaccounts #44169
Conversation
mikedanese
commented
Apr 6, 2017
•
edited by enisoc
Loading
edited by enisoc
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cjcullen, mikedanese
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
@k8s-bot gce etcd3 e2e test this |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue (batch tested with PRs 42025, 44169, 43940) |
@@ -1004,6 +1004,9 @@ function start-kube-apiserver { | |||
params+=" --kubelet-client-certificate=${APISERVER_CLIENT_CERT_PATH}" | |||
params+=" --kubelet-client-key=${APISERVER_CLIENT_KEY_PATH}" | |||
fi | |||
if [[ -n "${SERVICEACCOUNT_CERT_PATH:-}" ]]; then |
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.
who is calling this a cert? it's a key, right?
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.
shouldn't this be SERVICEACCOUNT_KEY_PATH?
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.
huh, I guess this works because we'll parse the public key out of the certificate...
// Parse the key
var parsedKey interface{}
if parsedKey, err = x509.ParsePKIXPublicKey(block.Bytes); err != nil {
if cert, err := x509.ParseCertificate(block.Bytes); err == nil {
parsedKey = cert.PublicKey
} else {
return nil, err
}
}
didn't see that coming...
…4169-release-1.5 Automatic merge from submit-queue Automated cherry pick of #44169 release 1.5
…pick-of-#44169-release-1.6 Automatic merge from submit-queue Automated cherry pick of kubernetes#44169 release 1.6 kubernetes#44169 ```release-note Fix [broken service accounts when using dedicated service account key](kubernetes#44285). ```