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

Mocking Cloudfront key pair for signing? #8121

Open
chrisspen opened this issue Sep 12, 2024 · 1 comment
Open

Mocking Cloudfront key pair for signing? #8121

chrisspen opened this issue Sep 12, 2024 · 1 comment

Comments

@chrisspen
Copy link

I think this might be more of a feature request, but is there any way to mock a Cloudfront key pair, so we can simulate signing URLs for restricted Cloudfront paths? I can't find anything in the documentation.

I've written a unittest that uses moto to successfully mock S3, Dynamo, Cloudfront, and Cognito, but I'm stuck on trying to generate signed cookies to a Cloudfront path.

@bblommers
Copy link
Collaborator

Hi @chrisspen, that is not possible at the moment. As a workaround, it is always possible to patch botocore to mock these methods: https://docs.getmoto.org/en/latest/docs/services/patching_other_services.html

I'll mark it as an enhancement to add support for these in Moto though. Which methods specifically would you like to see mocked? Based on your description, it sounds like at least:

  • create_public_key()
  • create_key_group()

Any others?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants