HTTP-01 challenge: support stateless http-01 challenge
Is your feature request related to a problem? Please describe.
Current solver http01 require to set up either ingress or gatewayHTTPRoute keys.
However, in some corporate environments, HTTP/80 never reaches the Kubernetes cluster but they are still able to pass the challenge with stateless http-01.
Traffic is terminated directly on haproxy listen: 80, or some other commercial L7 load balancer (bare metal or cloud). Usually it serves as a HTTP to HTTPS redirect but it can answer all HTTP-01 challenges statelessly without talking to acme client CertManager at all - it is configured upfront, before the Issuer/ClusterIssuer: https://github.com/acmesh-official/acme.sh/wiki/Stateless-Mode
Usually this is done to enforce that:
- Cluster users / developerscan't expose theirs apps on an unecrypted HTTP accidentally. so only tcp/443 is LoadBalanced into ingress controllers.
- Additionally, some apps / rollouts do not create Ingress objects at all, as they are exposed with a per-controller. solutions, like Traefik IngressRoute CRDs, istio Gateway+VirtualService objects, contour.io HTTPProxy objects
- Even if a cluster supprots Gateway API and has a controller, there may be no Gateway service on unsecured http port 80 and they may never provision correctly.
- Some cluster may not have Ingress controller enabled at all, which will cause Ingress object to be in a Pending state forever. On clusters that only istio or traefik is allowed and they disable Ingress controller functionality - they do not react to Ingress objects within a cluster as a policy.
Describe the solution you'd like
- I would like to request an ability to configure
http01solver that does not need, and does NOT create Ingress or Gateway HTTPRoute objects at all. - Or it could be done with a new new
statelesshttp01solver.
Either way, CertManager should still perform reachability tests before attempting to complete HTTP-01 challenge by trying to reach it. If stateless-http-01 is configured correctly on tcp/80 externally, every challenge will pass properly and reachability test should succeed.
Describe alternatives you've considered
There are no good alternatives at this moment. CertManager always try to spin or alter current Ingress objects, but there may be none at all or cluster may not react to Ingress objects at all.
Additional context Users who wish to use stateless http-01 are knowledgable enough to export account private key and calculate thumbprint to make this work. They can also prepare acme accounts upfront and keep track of ACME accounts and accounts_uri. Mostly because of a restricted types of CAA records that points straight to your ACME account_uri that is tied to the account key: example.org CAA 0 issue "otherca.com;accounturi=https://otherca.com/acct/123456" example.org CAA 0 issuewild "otherca.com;accounturi=https://otherca.com/acct/123456"
Users that keep their security and acme account tight already manage and import account-keys into CertManager and re-use them on multiple clusters to not have to manage too many CAA records as above.
Additionally, advanced users rolls out multiple ACMEv2 accounts (one with letsencrypt, one with pki.goog) using the same account private key. As such, two ClusterIssuer - one to letsencrypt, other to pki.goog CAN STILL PASS the http-01 challenge statelesly as thumbprint is calculated from the public portion of ACMEv2 account keys. Despite two CA doing HTTP challenge, thumbprint will remain the same.
Registering ACMEv2 accounts is usually done manually before setting up ClusterIssuers in such tight environments and they are tracked separatelly.
Additionally, there is another challenge, dns-persist-01 coming next year that also uses account_uri in DNS records, but it will be requested separately here.
Environment details (remove if not applicable):
- Kubernetes version: any
- Cloud-provider/provisioner: any, where tcp/80 is not terminated on the cluster as a company policy
- cert-manager version: any
- Install method: helm
/kind feature
Source: cert-manager/cert-manager