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

add the service serving cert signer ca to SA token secret #9044

Merged
merged 2 commits into from
Jun 4, 2016

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented May 26, 2016

Adds the service serving cert signer ca to the SA token secret so it gets automounted into every pod.

Doing this in the upstream controller makes sure that new secrets always have this before the pod starts and old secrets also get updated.

I did create bundle of the rootCA and the serviceSignerCA to mount. The rootCA key is more closely guarded and if you compromise that, you can change the CA cert in the mountpoint, so you're effectively trusting it anyway.

Updated the existing extended test for proof. I owe a conformance test, but those appear to busted in jenkins at the moment.

@liggitt @smarterclayton

glog.Fatalf("Error parsing ca file for Service Serving Certificate Signer: %s: %v", c.Options.ControllerConfig.ServiceServingCert.Signer.CertFile, err)
}

// if we have a rootCA bundle add that too. The rootCA will be used when hitting the default master service, since those are signed
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@liggitt decided if you think is true. With that key I'd be able to spoof the master, rewrite traffic to the controller keeping the ca.crt in sync, and substitute a ca.crt of my choosing into any pod I wanted. It's also seems unlikely/wrong for the rootCA key to used to sign a conflicting set of internal dns names by accident.

@stevekuznetsov
Copy link
Contributor

stevekuznetsov commented May 27, 2016

[testextended][extended:cmd]

@deads2k
Copy link
Contributor Author

deads2k commented May 27, 2016

This is effectively API since the ca cert is in a known location. I marked it alpha to match the service account flags.

@smarterclayton
Copy link
Contributor

Approved

@deads2k
Copy link
Contributor Author

deads2k commented May 31, 2016

@liggitt @mfojtik let's get this tied off.

@@ -41,6 +41,8 @@ import (
"k8s.io/kubernetes/pkg/watch"
)

const ServiceServingCASecretKey = "alpha.service-serving-cert-ca.crt"
Copy link
Contributor

Choose a reason for hiding this comment

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

simplify the name to something like service-ca.crt, then LGTM

@deads2k deads2k force-pushed the service-signer-ca-02 branch from 716135f to 0fd084a Compare June 3, 2016 17:37
@deads2k
Copy link
Contributor Author

deads2k commented Jun 3, 2016

simplify the name to something like service-ca.crt, then LGTM

Updated. waiting for green extended test before merge.

@stevekuznetsov about my desire for bash based conformance tests.... any reason not to?

@openshift-bot
Copy link
Contributor

openshift-bot commented Jun 3, 2016

Evaluated for origin testextended up to 0fd084a

@openshift-bot
Copy link
Contributor

openshift-bot commented Jun 3, 2016

continuous-integration/openshift-jenkins/testextended SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin_extended/207/) (Extended Tests: cmd)

@smarterclayton
Copy link
Contributor

smarterclayton commented Jun 3, 2016 via email

@deads2k
Copy link
Contributor Author

deads2k commented Jun 3, 2016

[merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Jun 3, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4456/) (Image: devenv-rhel7_4316)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 0fd084a

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 0fd084a

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4443/)

@openshift-bot openshift-bot merged commit 2b6d744 into openshift:master Jun 4, 2016
@0xmichalis
Copy link
Contributor

@deads2k can't we have the carry merged upstream?

@deads2k
Copy link
Contributor Author

deads2k commented Jun 5, 2016

@Kargakis No. It's nonsensical without a service cert signing system

@smarterclayton
Copy link
Contributor

smarterclayton commented Jun 5, 2016 via email

@deads2k
Copy link
Contributor Author

deads2k commented Jun 6, 2016

@smarterclayton I can't think of a good reason to do it that way except for fragmentation. It's a controller made to create a secret of a fixed shape.

If you want an upstream solution, I'd go back to my auto-mounted secrets specified on service accounts from way back.

@smarterclayton
Copy link
Contributor

smarterclayton commented Jun 6, 2016 via email

@deads2k
Copy link
Contributor Author

deads2k commented Jun 6, 2016

the exact shape isn't fully
defined

The shape is fully defined. It's API. The intent is "things I need to know to work in this cluster", but to be effective, the shape is defined. The argument of "I want to have a plug point to change what goes into this secret" makes no sense when that secret is effectively an API and they've decided what goes into it.

@smarterclayton
Copy link
Contributor

smarterclayton commented Jun 6, 2016 via email

@deads2k deads2k deleted the service-signer-ca-02 branch September 6, 2016 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants