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

include self-signed root CA in chain #1954

Conversation

knackaron
Copy link

Signed-off-by: Aron Parsons aron@knackworks.com

What this PR does / why we need it:

Currently, cert-manager explicitly excludes self-signed CA certificates from the secrets it generates, even when the operator opts to include their self-signed CA certificate in the issuer secret. It is critical to include the full CA chain so that mutual TLS authentication and verifying the whole chain work with the in-cluster secrets, versus having to include the root CA in every pod that needs it (which differs per container image and is a huge PITA to maintain).

The choice to exclude these certificates was made as part of #1077.

All the details below, including current behavior and the behavior when this PR is applied. Hopefully not too much detail, and I have commentary in between the command output to create the full story.

ClusterIssuer:

$ k -n certs describe clusterissuer
Name:         ca-issuer
Namespace:    
Labels:       app=certs
              chart=certs-2019.0.6
              heritage=Tiller
              release=certs
Annotations:  flux.weave.works/antecedent: certs:helmrelease/certs
API Version:  certmanager.k8s.io/v1alpha1
Kind:         ClusterIssuer
Metadata:
  Creation Timestamp:  2019-08-02T03:49:04Z
  Generation:          2
  Resource Version:    56512
  Self Link:           /apis/certmanager.k8s.io/v1alpha1/clusterissuers/ca-issuer
  UID:                 78e42b26-b4d8-11e9-b8f0-566fac170003
Spec:
  Ca:
    Secret Name:  ca-key-pair
Status:
  Conditions:
    Last Transition Time:  2019-08-02T03:49:06Z
    Message:               Signing CA verified
    Reason:                KeyPairVerified
    Status:                True
    Type:                  Ready
Events:
  Type    Reason           Age                From          Message
  ----    ------           ----               ----          -------
  Normal  KeyPairVerified  65s (x3 over 70s)  cert-manager  Signing CA verified

Root Certificate:

$ k -n certs get secret ca-keyca\.crt}' | base64 -dta.t
-----BEGIN CERTIFICATE-----
MIIFWDCCA0CgAwIBAgIUOIcIPkkuCKUN/vgeQadDicdQI98wDQYJKoZIhvcNAQEN
BQAwRDELMAkGA1UEBhMCVVMxGDAWBgNVBAoTD3N0YWNrLWJv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cfP1Fw/IDkRTh/2hl7KA3AWw7EeKa+cynI/mXOQsjmWODhUFacj9yTLimC0
mt4afCwhSvI6LqeR94LAAvGB1o8pvkZYvMt4MZdLhPW2TCBAuvcnr08JDznNBkp3
JAXvQc0CVzKvQuCmOjibuhxiVhjywXtv0SRY4sUo+6jU7rtbFxeCeGVVZkwTGQlh
j//sA6gTT7qO4uMRUnAjqDeKlyAQN8408PVIdfYUni78ApHNhiIYElKX9fw3F8Ok
VSD4QARmxd1lIMf91CTCCxdqYx63NrBvuHH3WFnKdoGinl5VwAS4NWCx0ikyNaEU
c1lQFAGf+AJFu7WPUqQdAa4SyplKmZfn6dF/qymbPX7H/C9hY7vnwGM30mkHe5rp
JJNUFwLOV5oH+K2rg4V5WZBiYfiW3ILXA678hFGbfO/4n//c+20ssg4SD8MjZSMI
GRqBrlmTUrtAng+cK7TARTO+bWa/IcQg4LXRnDK7S0N8poE2MxBWvaGboleM7eDW
TuOENhK0Ri0/ngphOs/cNEsCiARhtW6ImJa5Un9Aq7uiusel6B1+8lPxTl9+BFqz
R7Aw680c2FgPiTJVTikTvqk8XEsSPFIi/B2uHXprb1y975MBfYp9HVC7h8IaaN3x
F5YWgysI6xZWCS9JfVwqqZ6U+ATvoBchJ0F+NA==
-----END CERTIFICATE-----

$ k -n certs get secret ca-key-pair -ojsonpath='{.data.ca\.crt}' | base64 -d | openssl x509 -text | grep -e Issuer: -e Subject: -e CA:TRUE
        Issuer: C=US, O=stack-bootstrap, CN=stack-bootstrap CA
        Subject: C=US, O=stack-bootstrap, CN=stack-bootstrap CA
                CA:TRUE

Intermediate Certificate:

$ k -n certs get secret ca-keytls\.crt}' | base64 -data.c
-----BEGIN CERTIFICATE-----
MIIFxjCCA66gAwIBAgIULooy6Qv0Gb5z9s+oO/nd1X+KRTgwDQYJKoZIhvcNAQEN
BQAwRDELMAkGA1UEBhMCVVMxGDAWBgNVBAoTD3N0YWNrLWJvb3RzdHJhcDEbMBkG
A1UEAxMSc3RhY2stYm9v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NBkp3
JAXvQc0CVzKvQuCmOjibuhxiVhjywXtv0SRY4sUo+6jU7rtbFxeCeGVVZkwTGQlh
j//sA6gTT7qO4uMRUnAjqDeKlyAQN8408PVIdfYUni78ApHNhiIYElKX9fw3F8Ok
VSD4QARmxd1lIMf91CTCCxdqYx63NrBvuHH3WFnKdoGinl5VwAS4NWCx0ikyNaEU
c1lQFAGf+AJFu7WPUqQdAa4SyplKmZfn6dF/qymbPX7H/C9hY7vnwGM30mkHe5rp
JJNUFwLOV5oH+K2rg4V5WZBiYfiW3ILXA678hFGbfO/4n//c+20ssg4SD8MjZSMI
GRqBrlmTUrtAng+cK7TARTO+bWa/IcQg4LXRnDK7S0N8poE2MxBWvaGboleM7eDW
TuOENhK0Ri0/ngphOs/cNEsCiARhtW6ImJa5Un9Aq7uiusel6B1+8lPxTl9+BFqz
R7Aw680c2FgPiTJVTikTvqk8XEsSPFIi/B2uHXprb1y975MBfYp9HVC7h8IaaN3x
F5YWgysI6xZWCS9JfVwqqZ6U+ATvoBchJ0F+NA==
-----END CERTIFICATE-----

$ k -n certs get secret ca-key-pair -ojsonpath='{.data.tls\.crt}' | base64 -d | openssl x509 -text | grep -e Issuer: -e Subject: -e CA:TRUE
        Issuer: C=US, O=stack-bootstrap, CN=stack-bootstrap CA
        Subject: C=US, O=stack-bootstrap, CN=stack-bootstrap Intermediate CA
                CA:TRUE, pathlen:0

I have the root CA appended to tls.crt as per #1067 indicates that it should be included in the secrets created by the issuer.

Requesting a certificate issues it, but the full chain is not included in tls.crt, just the intermediate CA. This prevents verifying the full chain by only referencing the secret values.

Certificate Request:

apiVersion: certmanager.k8s.io/v1alpha1
kind: Certificate
metadata:
  name: ztest
spec:
  secretName: ztest
  duration: 24h
  renewBefore: 12h
  dnsNames:
  - foo.example.com
  issuerRef:
    name: ca-issuer
    kind: ClusterIssuer

Details of ca.crt in the created secret:

$ k -n certs get secret ztest -ojsonpath='{.data.ca\.crt}' | base64 -d
-----BEGIN CERTIFICATE-----
MII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gZ8wDgYDVR0PAQH/BAQDAgGGMBIGA1UdEwEB
/wQIMAYBAf8CAQAwHQYDVR0OBBYEFM+c5ZTruGloPirCpqKTNOQDf21NMB8GA1Ud
IwQYMBaAFGOVswbzmN5tT8HkQp/Ba38BrIqPMDkGA1UdHwQyMDAwLqAsoCqGKGh0
dHBzOi8vc3RhY2stYm9vdHN0cmFwL2FwaS92MS9jZnNzbC9jcmwwDQYJKoZIhvcN
AQENBQADggIBALl2UYfbC5cCsgTOOHa9+ZZ9TrjKc3dEIW1dRrj2L5aE/g3OXNe+
8037C2Gcfg5FCxzEr+KpwMgixxD4+XIdKYEuDkSaVGfBr2DIBnKADic/+4CqQGgP
nYwIAjGcz2QeZQvbeX77W+pZDMGb4SBzwc+Ji+kICfRPjlHEHDS8iP5TBnr/uQe/
S1/DQvQdmS9w8j7v0XJA7kH7ROCI9RANLtf7/mi7g4tThyELdYMjzsiGUjInA1Uv
ykTCuAxRHUqtXDe3v8O03n1hzAEcQms7LxtJCiKtzPLjppdWfvIwxDj1wtf8AOzB
lhM3YYJE1Ms5cMnQAvvI0OYvAiNoHi3qU8r9fsXyLmr4PVVvAfUIaC0L02PRoCFX
fjzcAAO/JPk+kBoQRL1ZaCgfmyLU+3QafEjgHLgvE9PLO9jKLMJGH8MxlKoEZhmg
PPx5JR2gUFDUrDJU058kEYurOzBzfw83HpiGyrStR/hCJCr8eBz/E/v43pIbzWp1
QkfZK3UCiLk8Q7D3Uw45N4t0NcJvl8zUH+5Q4vBgsdJFvqc0H+bXnmrsHmc9lW0z
LftUwk4S5A+LP2u97UP0crqiNQKiFRoOSz4tFEEb4CI7tnmgtss4w1Y7Lfhu7RxR
X+kUW/zT3ctX67FZ+3cdoGK/rWgbdhJTsjPCkGYWge/K1BjWnWP4W9L7
-----END CERTIFICATE-----

k -n certs get secret ztest -ojsonpath='{.data.ca\.crt}' | base64 -d | openssl x509 -text | grep -e Issuer: -e Subject: -e CA:TRUE
        Issuer: C=US, O=stack-bootstrap, CN=stack-bootstrap CA
        Subject: C=US, O=stack-bootstrap, CN=stack-bootstrap Intermediate CA
                CA:TRUE, pathlen:0

Details of tls.crt in the created secret:

$ k -n certs get secret ztest -ojsonpath='{.data.tls\.crt}' | base64 -d
-----BEGIN CERTIFICATE-----
MIIEaTCCAlGgAwIBAgIQFh0ah86olry9hjS7wLLXjzANBgkqhkiG9w0BAQsFADBR
MQswCQYDVQQGEwJVUzEYMBYGA1UEChMPc3RhY2stYm9vdHN0cmFwMSgwJgYDVQQD
Ex9zdGFjay1ib290c3RyYXAgSW50ZXJtZWRpYXRlIENBMB4XDTE5MDgwMjAzNTM0
M1oXDTE5MDgwMzAzNTM0M1owMTEVMBMGA1UEChMMY2VydC1tYW5hZ2VyMRgwFgYD
VQQDEw9mb28uZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
AoIBAQDgc+MPvTtKt1yMgqXge7o7XnuL5g85sPcC1jhCI3JfpttDyiFnoi4/ci5Z
sZtexm+0DE0JZqAlxFP7BRQdDJVfciz/o0vZhkZ+p6RqtSzVQMyhFjUWZet5mM4i
kQvFf+Gx1bU6hyrfV6RP3BLA962Q3iw5ytUSSAa6c3gGc/IpW/Ic2BRWm1Tc9CtF
SHXBfMdjh0UNmRudNRAg+GRv6zPmTkbH51z1ujqMeUAGAUO9qvx+dDEUjhLZW43g
6NVZTjkZkvT49EHXp6G2FHRYXj4qJmYSxyagso4AcS/UA+0iJbu+qxS2nnZl39h8
vRtBNg6Kiq8/d+vzVOAeSu91goENAgMBAAGjXTBbMA4GA1UdDwEB/wQEAwIFoDAM
BgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaAFM+c5ZTruGloPirCpqKTNOQDf21NMBoG
A1UdEQQTMBGCD2Zvby5leGFtcGxlLmNvbTANBgkqhkiG9w0BAQsFAAOCAgEAClPX
k+EzcN+70YsH2ZgNd0dpk4QfidsnBwoPh16V0EjCPtwKvd9kr46UpCIJWNCxrCyP
5CJlSvbRmIED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HEHDS8iP5TBnr/uQe/
S1/DQvQdmS9w8j7v0XJA7kH7ROCI9RANLtf7/mi7g4tThyELdYMjzsiGUjInA1Uv
ykTCuAxRHUqtXDe3v8O03n1hzAEcQms7LxtJCiKtzPLjppdWfvIwxDj1wtf8AOzB
lhM3YYJE1Ms5cMnQAvvI0OYvAiNoHi3qU8r9fsXyLmr4PVVvAfUIaC0L02PRoCFX
fjzcAAO/JPk+kBoQRL1ZaCgfmyLU+3QafEjgHLgvE9PLO9jKLMJGH8MxlKoEZhmg
PPx5JR2gUFDUrDJU058kEYurOzBzfw83HpiGyrStR/hCJCr8eBz/E/v43pIbzWp1
QkfZK3UCiLk8Q7D3Uw45N4t0NcJvl8zUH+5Q4vBgsdJFvqc0H+bXnmrsHmc9lW0z
LftUwk4S5A+LP2u97UP0crqiNQKiFRoOSz4tFEEb4CI7tnmgtss4w1Y7Lfhu7RxR
X+kUW/zT3ctX67FZ+3cdoGK/rWgbdhJTsjPCkGYWge/K1BjWnWP4W9L7
-----END CERTIFICATE-----

You can see that the root CA is not included in the generated secret because of this conditional: https://github.com/jetstack/cert-manager/blob/master/pkg/util/pki/csr.go#L339

I do not believe that the choice to exclude the self-signed root certificate is valid. In the case of a self-signed CA chain, not including the root CA makes including the intermediate pointless, as the whole chain can not be verified.

Below is the output of removing that check for self-signed CAs, and shows that the full chain is included in tls.crt, as desired. I believe this is a safe change to make, because I have explicitly included my root CA in tls.crt of the issuer so that it does get included; if someone did not want that, they would opt not to put their full CA chain to the secret.

Patched version of cert-manager and full CA chain included, as desired:

$ k -n certs get secret ztest -ojsonpath='{.data.tls\.crt}' | base64 -d
-----BEGIN CERTIFICATE-----
MIIEajCCAlKgAwIBAgIRALmzxuAKbi4Lptgiy853j8AwDQYJKoZIhvcNAQELBQAw
UTELMAkGA1UEBhMCVVMxGDAWBgNVBAoTD3N0YWNrLWJvb3RzdHJhcDEoMCYGA1UE
AxMfc3RhY2stYm9vdHN0cmFwIEludGVybWVkaWF0ZS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.com>
@jetstack-bot
Copy link
Contributor

@knackaron: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jetstack-bot jetstack-bot added the dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. label Aug 2, 2019
@jetstack-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: knackaron
To complete the pull request process, please assign joshvanl
You can assign the PR to them by writing /assign @joshvanl in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jetstack-bot jetstack-bot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Aug 2, 2019
@jetstack-bot jetstack-bot requested a review from munnerz August 2, 2019 04:12
@jetstack-bot
Copy link
Contributor

Hi @knackaron. Thanks for your PR.

I'm waiting for a jetstack or cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jetstack-bot jetstack-bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 2, 2019
@knackaron
Copy link
Author

/assign @JoshVanL

@munnerz
Copy link
Member

munnerz commented Aug 2, 2019

I do not believe that the choice to exclude the self-signed root certificate is valid. In the case of a self-signed CA chain, not including the root CA makes including the intermediate pointless, as the whole chain can not be verified.

I'm not sure I agree - if the full CA chain is included, and you implicitly trust this full chain, you aren't really verifying anything when you validate a certificate is valid.

On your local system, a set of self signed root CA certificates are embedded as part of your distribution (i.e. on various linux distros, the ca-certificates package). This means that the certificate's presented to you by webservers do not include the root CA, as it is 'trusted' on your machine.

Likewise, distributing the root of trust to the various 'nodes' in your cluster should be a separate concern.

For what its worth, we do make the CA used to sign a Certificate available in the Secret resource, under the ca.crt key. We just exclude that ca.crt data from the certificate chain, which as far as I understand/have seen/am aware is standard practice when handling certificates 😄

@knackaron
Copy link
Author

On your local system, a set of self signed root CA certificates are embedded as part of your distribution (i.e. on various linux distros, the ca-certificates package).

That is fine for public certificate authorities because most existing container images have those CAs baked in, but untrue for for corporate and isolated private networks where public certificate authorities are explicitly not trusted. At the node level, the private CA chains are distributed via configuration management tools (e.g., Puppet, custom RPMs). At the container level, those CAs are not baked in, as containers are portable between environments and networks (e.g., your prod containers don't trust any part of your dev CA chain, isolated network1 doesn't trust isolated network2). We rely on cert-manager to generate the certificates for these containers and provide the CA chain in ca.crt. In a scenario with just a root certificate, and not an intermediate in the chain (e.g., root -> server-cert), this works fine because the self-signed root certificate is included in ca.crt. But when an intermediate certificate signs the server cert, we can't rely on this mechanism.

This means that the certificate's presented to you by webservers do not include the root CA, as it is 'trusted' on your machine.

I'm not sure I agree - if the full CA chain is included, and you implicitly trust this full chain, you aren't really verifying anything when you validate a certificate is valid.

For the application serving, yes, including the full chain in tls.crt isn't right because it would have clients implicitly trust the server, and we don't want that (which makes this PR behavior invalid). I'm coming at it from the angle of containers using the the cert-manager-generated secret for both their client certificate and using ca.crt as a source for the full CA chain, which all services in the environment will be signed with.

Likewise, distributing the root of trust to the various 'nodes' in your cluster should be a separate concern.

It's not the nodes, but the containers where including additional CA certificates is typically not accounted for in the entrypoint. cert-manager eases the pain by including the CA in the secret key ca.crt, wherein we then have in-band distribution of the CA.

For what its worth, we do make the CA used to sign a Certificate available in the Secret resource, under the ca.crt key.

So really, the root and intermediate should be included in ca.crt if an operator chooses to include it. Which isn't what this PR achieves, it's using the mechanism to include the root CA, which is fine for client certs but bad for server certs.

Since the issuer secret already includes the root certificate in ca.crt, perhaps we could explore a way to include that in the ca.crt field for the secrets generated by cert-manager?

@knackaron
Copy link
Author

Solving this another way.

@knackaron knackaron closed this Aug 8, 2019
@kautkata
Copy link

kautkata commented Oct 8, 2020

And how did you actually solve this ?

@dstoffel
Copy link

dstoffel commented Apr 9, 2021

+1

@knackaron how did you solve this please ?

@knackaron
Copy link
Author

@knackaron how did you solve this please ?

The CAs are defined once for our operator that deploys charts via Helm, and all releases inherit those values. We then use a subchart to provide a Secret that contains our CAs (replacing the mechanism we'd rely on cert-manager to provide), then mount that in where required, and use the best mechanism available to have the applications point at those (e.g., native support to use an alternate chain, SSL_CERT_FILE). This has worked well for us to have a unified way to provide CA chains to applications without having to bake CAs into our container images (not portable) or modify third-party container images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. 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.

5 participants