TeslaGov / ngx-http-auth-jwt-module

Secure your NGINX locations with JWT
MIT License
309 stars 118 forks source link

Loading RS256 key from file #55

Closed penumbra23 closed 2 years ago

penumbra23 commented 3 years ago

Hi!

First off, nice plugin, saves a lot of trouble! 👏

We deploy this image on our K8s cluster using Helm charts, where the PEM encoded key is a generated on deployment and is a K8s secret. Helm can't work with keys generated on install and paste the content in the Nginx configuration (because it's being generated in the same operation). One solution would be to map the secret onto a file and use that path as a mounted volume.

Would reading the PEM file from a file be a new feature in this plugin?

I've already forked the repo and added two attributes that load the key, it serves us well. If it's cool for you I can make a PR to include it officially?

JoshMcCullough commented 3 years ago

Yes, you should make a PR. Thanks!

penumbra23 commented 3 years ago

Leave some reviews, comments, remarks 😄 PR: PEM key file support

fitzyjoe commented 2 years ago

Thanks again for the PR @penguinologist