-
Notifications
You must be signed in to change notification settings - Fork 4k
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(certificatemanager): key algorithm support for PrivateCertificate
and Certificate
#28597
Merged
Merged
Changes from 2 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
de6a043
feat: add support for key algorithm for private certificate
longtv2222 28b63fc
docs: add comments for KeyAlgorithm class
longtv2222 bf6fbbb
docs: update README.md
longtv2222 fcc23d2
fix: lint
longtv2222 291550d
feat: add key algorithm to certificate
longtv2222 4f597f9
test: add integration tests
longtv2222 cf27f43
fix: add missing integration test results
longtv2222 773ea5a
fix: lint and added Annotation for unused keyAlgorithm props in
longtv2222 60bc56e
fix: lint
longtv2222 37e5b17
fix: improve docs and rename integration tests stack name
longtv2222 ed9a685
fix: missing docs for private certificate
longtv2222 65fe4fb
docs: add link for
longtv2222 ef15008
Update packages/aws-cdk-lib/aws-certificatemanager/README.md
kaizencc 343fd95
Merge branch 'main' into certificate-algorithm
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { Construct } from 'constructs'; | ||
import { ICertificate } from './certificate'; | ||
import { ICertificate, KeyAlgorithm } from './certificate'; | ||
import { CertificateBase } from './certificate-base'; | ||
import { CfnCertificate } from './certificatemanager.generated'; | ||
import * as acmpca from '../../aws-acmpca'; | ||
|
@@ -28,6 +28,13 @@ export interface PrivateCertificateProps { | |
* Private certificate authority (CA) that will be used to issue the certificate. | ||
*/ | ||
readonly certificateAuthority: acmpca.ICertificateAuthority; | ||
|
||
/** | ||
* Specifies the algorithm of the public and private key pair that your certificate uses to encrypt data. | ||
* | ||
longtv2222 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* @default KeyAlgorithm.RSA_2048 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If |
||
*/ | ||
readonly keyAlgorithm?: KeyAlgorithm; | ||
} | ||
|
||
/** | ||
|
@@ -59,6 +66,7 @@ export class PrivateCertificate extends CertificateBase implements ICertificate | |
domainName: props.domainName, | ||
subjectAlternativeNames: props.subjectAlternativeNames, | ||
certificateAuthorityArn: props.certificateAuthority.certificateAuthorityArn, | ||
keyAlgorithm: props.keyAlgorithm?.name, | ||
}); | ||
|
||
this.certificateArn = cert.ref; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Allowed values are:
RSA_1024 | RSA_2048 | RSA_3072 | RSA_4096 | EC_prime256v1 | EC_secp384r1 | EC_secp521r1
but I only includedRSA_2048 | EC_prime256v1 | EC_secp384r1
since imported certificate does not exist in CloudFormationThere 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.
Personally I feel like that's the right thing to do for now too. Having the ability to create additional values probably makes up for any edge cases that could come up.