Lexikjwtauthenticationbundle: Allow passing RAW keys directly in config (from "private_key_path" to "private_key")

Created on 1 Jun 2017  路  7Comments  路  Source: lexik/LexikJWTAuthenticationBundle

Changing public_key_path/private_key_path to public_key/private_key, allowing to pass the key content directly as well as its file path.
This would allow storing keys as environment variables, btw removing the need for git-ignoring these keys if stored in the project itself (fixing https://github.com/symfony/recipes/pull/89).

This also relates to one thing I'd like to get in: allow using symmetric key algorithms (shared key, https://github.com/lexik/LexikJWTAuthenticationBundle/projects/1#card-2657179)

Feature Ready

Most helpful comment

Hey, currently working on :) should be finished today, release in the next days (hopefully tomorrow).

All 7 comments

Hello, I'm trying to set the public_key_path/private_key_path to public_key/private_key in a symfony framework project, but I'm getting the following error :
[SymfonyComponentConfigDefinitionExceptionInvalidConfigurationException]
Unrecognized options "private_key, public_key" under "lexik_jwt_authentication"
Any suggestions ?
Thank you

@ge0Aja This feature has not been implemented yet, you still have to use public_key_path/private_key_path.
I'm currently finishing #369 which will provide a better base for this. Once that done, I'll give some more details about what needs to be done here and work on it if nobody does.

@chalasr Thank you I've just noticed that it is on the Todo list. I'm trying this work around to deploy the project to heroku since they do not allow changing permissions for their file system.

Did you encounter this problem before ?

Hi, any info on this ? We also want to use environment variable for this, especially for docker containers.

Maybe we could separate the HMAC support and the direct key content ingestion from #369, at least while #369 is in the works.

@chalasr I could help with this if it's OK.

Hi, are there any news?

Here (https://github.com/lexik/LexikJWTAuthenticationBundle/issues/497#issuecomment-392011576) is told this PR will be merged soon: any ideas about the timing?

I've to decide if I need a workaround or if I can wait for the release :)

Hey, currently working on :) should be finished today, release in the next days (hopefully tomorrow).

Was this page helpful?
0 / 5 - 0 ratings