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 support for Amazon Certificate Manager #333

Closed
thedrow opened this issue Feb 22, 2018 · 31 comments
Closed

Add support for Amazon Certificate Manager #333

thedrow opened this issue Feb 22, 2018 · 31 comments
Labels
area/api Indicates a PR directly modifies the 'pkg/apis' directory kind/design Categorizes issue or PR as related to design. kind/feature Categorizes issue or PR as related to a new feature. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@thedrow
Copy link

thedrow commented Feb 22, 2018

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

/kind feature

Amazon Certificate Manager is another service that handles SSL certificates. Would be nice to add support for it for those who use AWS.

@jetstack-bot jetstack-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 22, 2018
@whereisaaron
Copy link
Contributor

Yes, but you can't download ACM certificates, because ACM won't give you the private key (right?). So this is not useful for Ingress's or in-cluster services. ACM is a different model from the CA, ACME / Let's Encrypt, and Vault models, since it doesn't actually let you have the certificate.

There are a couple useful scenarios for ACM for k8s Services, but nothing useful for Ingress's or in-cluster services:

1) Auto-import to ACM. After cert-manager issues a certificate with CA/ACME/Vault, it could auto-import it into ACM to e.g. be available for use with AWS load balancers or Cloudfront, or it could then update the service.beta.kubernetes.io/aws-load-balancer-ssl-cert annotation on one or more Services to use that certificate.

2) Issue ACM certificates for AWS Load Balancer Services. cert-manager could have an Issuer variant that does not create a TLS Secret, but uses the new DNS validation option for ACM to request and validate a certificate (via Route53). And then update the service.beta.kubernetes.io/aws-load-balancer-ssl-cert annotation on one or more Services to use that certificate. Since ACM handles auto-renewal if you leave the DNS record in place. Nothing for cert-manager to do after that, other than delete the certificate if the Certificate resource is deleted.

Both are well outside the scope of cert-manager functions and are AWS-specific, but I imagine pull requests for these features would still be welcome.

@thedrow
Copy link
Author

thedrow commented Feb 22, 2018

I had scenario 2 in mind. I don't need this functionality right now, I just heard about this service and figured I'd file an issue to see if there's interest for someone to implement such a thing.

@munnerz
Copy link
Member

munnerz commented Feb 22, 2018

Thanks for the detailed breakdown of how ACM works @whereisaaron

When considering (1), this falls under 'alternate delivery mechanisms' for cert-manager certificates. It's something I've considered before (when considering how cert delivery-to-the-pod can work). Depending on how ACM works (whether it always manages private keys for the user) it may also be related to #303.

Right now, if a user wants to use cert-manager to issue certificates for ACM in this way, I'd advise they write a separate controller that watches secret resources and syncs appropriate ones to ACM (perhaps by annotation Certificate resources). This controller would then also upload those certificates to ACM if they change (e.g. after renewal by cert-manager). This solves the 'alternate delivery mechanism' issue by pushing it out of cert-manager core (i.e. it doesn't, we just decide to not support it).

For (2), this again kind of falls under alternate delivery (as there is no delivery). Updating an annotation on a service does seem slightly arbitrary though, and I'm not sure if it should be cert-manager's responsibility.

If anyone wants to try mocking up a proposal for this I'd be open to considering it, but it would need to touch on or at least consider how other delivery mechanisms may be implemented and expressed in future.

@gtaylor
Copy link
Contributor

gtaylor commented Apr 5, 2018

The newly announced ACM Private may have just made this relevant to non-ELB usage cases.

Should we create a separate issue for that, or is this one good enough? We'd actually be far more interested in the ACM Private->Kubernetes Secret usage case than for ELBs.

@euank
Copy link
Contributor

euank commented Apr 5, 2018

ACM (not private)

I'm not convinced that ELB "LoadBalancer" type services + ACM integration makes sense in this codebase.

That seems much more like a kubernetes cloud-provider feature, or a separate extension to it. It just doesn't really match up with the existing cert-manager concepts well IMO.

If it did end up in cert-manager, I think it would end up being a new resource type, a "CertificateStub", and that type would then be able to be referenced from certain other resources... but it really doesn't match the rest of what cert-manager does and has so many caveats that I don't think it's worth considering any time soon, if ever.

ACM Private

If no one else wants to, I might pick up the work to make an ACM Private issuer since I do think ACM private is a good match for cert-manager based on a quick skim of that post.

That looks quite handy and like it matches existing cert-manager concepts quite well.

I'm fine with either a new issue or re-purposing this one to track it.

@munnerz
Copy link
Member

munnerz commented Apr 17, 2018

👍 from a quick read of that ACM Private blog post, it seems like a perfect fit for a new Issuer type. I'd be happy to accept a PR that adds this functionality 😄

@munnerz
Copy link
Member

munnerz commented Apr 17, 2018

That said, we need to make sure the integration is properly tested. How do developers usually test things against AWS APIs to ensure they work?

I notice there's an associated cost with running a private ACM, so I don't think we can feasibly create real private CAs for use in tests unless we can 'work around' this cost 😄

@retest-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 16, 2018
@qrevel
Copy link

qrevel commented Jul 16, 2018

/remove-lifecycle stale

@jetstack-bot jetstack-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 16, 2018
@rafaelmagu
Copy link

Was there any movement towards adding ACM Private CA support?

@munnerz
Copy link
Member

munnerz commented Sep 24, 2018 via email

@retest-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 23, 2018
@twittyc
Copy link

twittyc commented Jan 2, 2019

/remove-lifecycle stale

@jetstack-bot jetstack-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 2, 2019
@munnerz munnerz added area/api Indicates a PR directly modifies the 'pkg/apis' directory kind/design Categorizes issue or PR as related to design. priority/backlog Higher priority than priority/awaiting-more-evidence. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. and removed priority/backlog Higher priority than priority/awaiting-more-evidence. labels Feb 7, 2019
@rmb938
Copy link
Contributor

rmb938 commented Feb 19, 2019

I'm going to take a crack at adding thing feature. I have a use case for ACM and having cert-manager handle the creation and rotation of certs would be awesome.

@rmb938
Copy link
Contributor

rmb938 commented Feb 20, 2019

Created a PR for ACM Private CA here #1391

Once that is merged I'll look into adding the non-private CA. I haven't used that one as much however so if someone else knows it better feel free to help out :)

@Typositoire
Copy link

👍 for auto-import to ACM! This would work right with ALB IngressController!

@Jeffwan
Copy link

Jeffwan commented Mar 18, 2019

I really love to have this PR merged as soon as possible! Excellent!

@whereisaaron
Copy link
Contributor

whereisaaron commented Apr 2, 2019

I misunderstood @rmb938's PR #1391. It is not to push cert-manager Let's Encrypt certificates to AWS Certificate Manager; That would be utterly fantastic feature for cert-manager for the aws-alb-ingress-controller and for CloudFront users. The PR is actually to use AWS Private CA to issue certs instead of cert-manager's own private CA support.

Both are good ideas for cert-manager, but only the first one excites me personally.

@Vlaaaaaaad
Copy link

Since this is being discussed in the PR comments, there is interest for ACM Private! I am one of the people looking forward to it.

ACM Private is also a first step and would lead the way for ACM so I am very much in favor of it!

@Freyert
Copy link
Contributor

Freyert commented May 9, 2019

Looking a little bit wider many clouds offer a Certificate Manager that tends to work tightly with their L7 load balancers:

Perhaps it's a good time to invent an interface for these cloud providers to implement their providers out of certmanager's tree? Similar to k8s CNIs and CSIs, just for Certificate issuing.


Personal note, I haven't looked too far into it yet, but the new AWS ALB Ingress controller doesn't seem able to import certificates from the K8S cluster. My team has currently dropped into issuing certificates via terraform + ACM and then referencing the ARN in the Ingress annotation which is not fun. Perhaps I need to try again.

@retest-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 7, 2019
@retest-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle rotten
/remove-lifecycle stale

@jetstack-bot jetstack-bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 6, 2019
@voroniys
Copy link

Is there any progress on this issue? PR is submitted in April, now it is September already. The feature is more than welcome for many people.

@StyleT
Copy link

StyleT commented Oct 3, 2019

/remove-lifecycle rotten

@jetstack-bot jetstack-bot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Oct 3, 2019
@munnerz
Copy link
Member

munnerz commented Oct 16, 2019

For the time being, I don't think we're going to proceed with this in the main codebase so I'm going to close issue.

If someone does want to implement this still, I'd suggest implementing it as an out of tree Issuer which are now supported by default from v0.11 onwards 😄

@munnerz munnerz closed this as completed Oct 16, 2019
@gregsidelinger
Copy link

@munnerz is there any docs on out of tree issuers? I have a custom one I wrote targeting 0.6 and was going to submit a PR once I got it merged with master but out of tree makes more since because I suspect the company's CA product is not used by too many people.

@marcellodesales
Copy link

Any progress on this?

@diranged
Copy link

diranged commented Dec 3, 2020

I am just reviving this a bit.. the awspca-issuer project looks dead (I have started an issue at codingvirtues/awspca-issuer#5 to discuss). I would love to get some eyes on it though and see if we can revive it somewhere else so that it can be improved. Right now it is not quite production ready.

@divyansh-gupta
Copy link

ACM Private CA support for cert-manager is now available using the Private CA Kubernetes cert-manager plugin. With the plugin, you can use a highly-available, secure, managed Private CA as an issuer for your Kubernetes cluster. Learn more about the plugin:

@migueleliasweb
Copy link

For the ones that land here looking for public certs in ACM, have a look at this: aws-controllers-k8s/community#482

@Ghilteras
Copy link

does this work on NON EKS clusters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Indicates a PR directly modifies the 'pkg/apis' directory kind/design Categorizes issue or PR as related to design. kind/feature Categorizes issue or PR as related to a new feature. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests