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

ACM Allow to import certificates #2043

Closed
mathias-muench opened this issue Mar 18, 2024 · 3 comments
Closed

ACM Allow to import certificates #2043

mathias-muench opened this issue Mar 18, 2024 · 3 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. service/acm Indicates issues or PRs that are related to acm-controller.

Comments

@mathias-muench
Copy link

Due to company policy, we have to use TLS certificates issued by a specific CA. To use these certificates, it would be very handy if importing them to ACM could be controlled by ACK, so that we do not need to fall back to different tools for AWS resources.

I propose to add "ImportCertificate" to the service spec, supported by all necessary certificate data.

Since the API call is available in the ACM service, it may already be possible to do this with the ACK ACM service. In that case, I propose to add it to the documentation / API reference.

@a-hilaly a-hilaly added kind/feature Categorizes issue or PR as related to a new feature. service/acm Indicates issues or PRs that are related to acm-controller. labels Mar 18, 2024
@ack-bot
Copy link
Collaborator

ack-bot commented Sep 14, 2024

Issues go stale after 180d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 60d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale

@ack-prow ack-prow bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 14, 2024
@mathias-muench
Copy link
Author

/remove-lifecycle stale

@ack-prow ack-prow bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 24, 2024
ack-prow bot pushed a commit to aws-controllers-k8s/acm-controller that referenced this issue Nov 6, 2024
Description of changes:

Adds support for [importing certificates](https://docs.aws.amazon.com/acm/latest/APIReference/API_ImportCertificate.html) into ACM. When `Spec.Certificate` is set, the controller attempts to import a certificate into ACM, otherwise it requests a certificate. It is an error to set fields used to request a certificate when importing a certificate and vice versa. The two fields required for importing a certificate (`Certificate` and `PrivateKey`) are both secret references. While the certificate portion may not be private information, it’s common to store TLS certificates as secrets in Kubernetes. The ACK runtime currently only supports resolving `Opaque` secrets and not TLS certificates, so users wanting to import existing TLS secrets into ACM will have to migrate them first.

The `late_initialize_post_read_one` hook is used to allow late initialization of optional fields, otherwise the controller will keep retrying `DescribeCertificate` for setting fields that will never be returned from the API.

`GoCodeSetSDKForStruct` in code-generator does not support resolving secret references for custom `[]byte` fields, so a wrapper type `importCertificateInput` has been introduced as a workaround.

Issue #, if available: aws-controllers-k8s/community#2043


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
@henryzhao95
Copy link

Love the support for opaque Kubernetes secrets to be imported into ACM. However, we use cert-manager to generate TLS Kubernetes secrets, and we have to build our own translation layer to convert them to opaque before they can be imported.

It'd be lovely if the ACK could support TLS secrets!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. service/acm Indicates issues or PRs that are related to acm-controller.
Projects
None yet
Development

No branches or pull requests

4 participants