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

if we have a dedicated serviceaccount keypair, use it to verify serviceaccounts #44169

Merged
merged 1 commit into from
Apr 7, 2017

Conversation

mikedanese
Copy link
Member

@mikedanese mikedanese commented Apr 6, 2017

Fix [broken service accounts when using dedicated service account key](https://github.com/kubernetes/kubernetes/issues/44285).

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 6, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-github-robot k8s-github-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note-label-needed labels Apr 6, 2017
@cjcullen
Copy link
Member

cjcullen commented Apr 6, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 6, 2017
@k8s-github-robot
Copy link

[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 /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Apr 6, 2017
@mikedanese
Copy link
Member Author

@k8s-bot gce etcd3 e2e test this

@mikedanese mikedanese added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. release-note-label-needed labels Apr 6, 2017
@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 42025, 44169, 43940)

@k8s-github-robot k8s-github-robot merged commit 0653751 into kubernetes:master Apr 7, 2017
@mikedanese mikedanese deleted the fix branch April 7, 2017 00:24
@@ -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
Copy link
Member

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?

Copy link
Member

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?

Copy link
Member

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...

https://github.com/kubernetes/kubernetes/blob/master/vendor/github.com/dgrijalva/jwt-go/rsa_utils.go#L55

// 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...

k8s-github-robot pushed a commit that referenced this pull request Apr 10, 2017
…4169-release-1.6

Automatic merge from submit-queue

Automated cherry pick of #44169 release 1.6

#44169

```release-note
Fix [broken service accounts when using dedicated service account key](#44285).
```
k8s-github-robot pushed a commit that referenced this pull request Apr 11, 2017
…4169-release-1.5

Automatic merge from submit-queue

Automated cherry pick of #44169 release 1.5
@enisoc enisoc added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Apr 13, 2017
mintzhao pushed a commit to mintzhao/kubernetes that referenced this pull request Jun 1, 2017
…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).
```
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.

9 participants