-
Notifications
You must be signed in to change notification settings - Fork 18
Feat: Add support to export ACM certificates #82
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
Feat: Add support to export ACM certificates #82
Conversation
|
Hi @alexwang0311. Thanks for your PR. I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
|
/ok-to-test |
michaelhtm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @alexwang0311
left a few comments below
|
@alexwang0311: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
michaelhtm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again @alexwang0311
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexwang0311, michaelhtm The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| "Action": [ | ||
| "acm-pca:IssueCertificate", | ||
| "acm-pca:GetCertificate", | ||
| "acm-pca:ListPermissions" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is ListPermissions needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://awscli.amazonaws.com/v2/documentation/api/2.1.30/reference/acm-pca/list-permissions.html
Permissions designate which private CA actions can be performed by an AWS service or entity. In order for ACM to automatically renew private certificates, you must give the ACM service principal all available permissions (IssueCertificate , GetCertificate , and ListPermissions ). Permissions can be assigned with the CreatePermission action, removed with the DeletePermission action, and listed with the ListPermissions action.
| "type": "string" | ||
| }, | ||
| "endpoint": { | ||
| "endpoint_url": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why we added allow_unsafe_aws_endpoint_urls? What does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was something added by the latest commit from the code generator repo
| func generateRandomString(length int) (string, error) { | ||
| const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+-=[]{}|;:,.<>?" | ||
| b := make([]byte, length) | ||
| if _, err := io.ReadFull(rand.Reader, b); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts on using crypto/rand.Int()? Something like:
num, err := rand.Int(rand.Reader, big.NewInt(int64(len(charset))))
| return nil, errors.New("failed to decrypt PEM block") | ||
| } | ||
|
|
||
| // NOTE: Algorithms supported for an ACM certificate request include: RSA_2048, EC_prime256v1, EC_secp384r1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there plans to add more algorithms? If so, how do we keep this up to date?
Add support to export ACM certificates to Kubernetes TLS Secrets for ACM private and public certificates.