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

(CloudFront): Support TrustedSigners & Key Groups #11791

Closed
stmasc opened this issue Nov 30, 2020 · 8 comments · Fixed by #12847
Closed

(CloudFront): Support TrustedSigners & Key Groups #11791

stmasc opened this issue Nov 30, 2020 · 8 comments · Fixed by #12847
Assignees
Labels
@aws-cdk/aws-cloudfront Related to Amazon CloudFront effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1

Comments

@stmasc
Copy link

stmasc commented Nov 30, 2020

In CloudFront in AWS Console I can create Public Keys, Key Groups and associate a Web Distributions Behavior with the trusted Key Group. I'd like to, at a minimum, create Key Groups and associate them with behaviors so I can serve private content out of Web Distributions created by CDK.

Use Case

I want to serve private content out of a Web Distribution created via CDK.

@stmasc stmasc added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Nov 30, 2020
@github-actions github-actions bot added the @aws-cdk/aws-cloudfront Related to Amazon CloudFront label Nov 30, 2020
@njlynch njlynch added effort/medium Medium work item – several days of effort p2 and removed needs-triage This issue or PR still needs to be triaged. labels Dec 1, 2020
@stoyan-scava
Copy link

IMO it'd be best to add trustedKeyGroups to the Behavior interface of CloudFrontWebDistribution.

For the time being, I'm adding the trusted key group with a raw override of the CloudFormation template.

cfnDistribution.addOverride("Properties.DistributionConfig.DefaultCacheBehavior.TrustedKeyGroups", ["<my cloudfront key group id>"]);

@saksham
Copy link

saksham commented Dec 8, 2020

Would be great to have this. I am resorting to L1 construct for creating my cloudfront distribution due to lack of this feature. My use case is exactly the same as that from @stmasc. Thanks!

@ilgarm
Copy link

ilgarm commented Dec 19, 2020

Also interested in this feature

@NateBank
Copy link

IMO it'd be best to add trustedKeyGroups to the Behavior interface of CloudFrontWebDistribution.

For the time being, I'm adding the trusted key group with a raw override of the CloudFormation template.

cfnDistribution.addOverride("Properties.DistributionConfig.DefaultCacheBehavior.TrustedKeyGroups", ["<my cloudfront key group id>"]);

Isn't CloudFrontWebDistribution deprecated though? The CloudFront overview says Users are encouraged to use the newer Distribution instead, as it has a simpler interface and receives new features faster. I also am interested in how to set up trusted signers or whatever the new flavor of this is supposed to be using the correct construct.

@okonon
Copy link

okonon commented Jan 19, 2021

I just ran into this myself. I have a need to have private only dist and serve content using signed urls. #12584

@okonon
Copy link

okonon commented Jan 19, 2021

@njlynch i wonder if there are any updates regarding this request

@njlynch njlynch added p1 and removed p2 labels Jan 19, 2021
@njlynch
Copy link
Contributor

njlynch commented Jan 19, 2021

@okonon - No progress to report at the moment; I'm afraid I can't comment on when we'll be able to deliver this.

That being said, given the current 👍s, I've bumped this up to a p1 to note it's a top priority. I am also more than willing to work with anyone who's motivated to contribute to this (discuss design/review PRs).

I see this as (likely) 3 separate tasks/PRs, and can split them out for tracking purposes if anyone wants to tackle just one:

  1. Creation of a PublicKey L2 construct. (Medium)
  2. Creation of a KeyGroup L2 construct. (Small-to-Medium)
  3. Integration of the KeyGroups with the Distribution and CloudFrontWebDistribution. (Medium+)

If anyone is interested in contributing, please let me know! Feel free to comment here or hit me up on the cdk.dev Slack channel to discuss design/implementation.

mergify bot pushed a commit that referenced this issue Feb 3, 2021
@njlynch This is my humble start on creating L2 constructs for `PublicKey` and `KeyGroup` for CloudFront module. I'm going to need some guidance/mentorship as this is my first L2 construct from the scratch. I'll convert this PR to draft and I'll post some of my thoughts and ideas around this feature tomorrow. I'm trying to address feature requests in #11791. I've decided to lump `PublicKey` and `KeyGroup` features together as they seem to depend on each other.

All in the good spirits of learning how to extend CDK 🍻 .

Any ideas and/or constructive criticism is more than welcome... that's the best way to learn.✌️ 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@mergify mergify bot closed this as completed in #12847 Feb 4, 2021
mergify bot pushed a commit that referenced this issue Feb 4, 2021
…d CloudFrontWebDistribution (#12847)


@njlynch Closes #11791

https://media3.giphy.com/media/3o7aCWJavAgtBzLWrS/giphy.gif

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

github-actions bot commented Feb 4, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

NovakGu pushed a commit to NovakGu/aws-cdk that referenced this issue Feb 18, 2021
@njlynch This is my humble start on creating L2 constructs for `PublicKey` and `KeyGroup` for CloudFront module. I'm going to need some guidance/mentorship as this is my first L2 construct from the scratch. I'll convert this PR to draft and I'll post some of my thoughts and ideas around this feature tomorrow. I'm trying to address feature requests in aws#11791. I've decided to lump `PublicKey` and `KeyGroup` features together as they seem to depend on each other.

All in the good spirits of learning how to extend CDK 🍻 .

Any ideas and/or constructive criticism is more than welcome... that's the best way to learn.✌️ 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
NovakGu pushed a commit to NovakGu/aws-cdk that referenced this issue Feb 18, 2021
…d CloudFrontWebDistribution (aws#12847)


@njlynch Closes aws#11791

https://media3.giphy.com/media/3o7aCWJavAgtBzLWrS/giphy.gif

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-cloudfront Related to Amazon CloudFront effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1
Projects
None yet
7 participants