graphql-engine: HASURA_GRAPHQL_JWT_SECRET not working with RS256 in docker-compose
From docker-compose.yaml HASURA_GRAPHQL_JWT_SECRET : ‘{“type”:“RS256”, “key”:“-----BEGIN PUBLIC KEY-----[mypublickey]-----END PUBLIC KEY-----”}’
Fatal Error: JWT conf: Error in $: Invalid JWK: Could not decode PEM: invalid PEM delimiter found
Am I doing something wrong?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (5 by maintainers)
@ecthiender I agree, the key above is not in the PEM format, however I´ve tried the same with our PEM formatted key from the .pem file
I´ve tried that with spaces, with no spaces, as a single line without line breaks etc and it always produces
EDIT:
Got it working now by changing a few things:
Thank you anyway 😃
@jakobrosenberg This is typically a quoting/newline error. Can you use https://hasura.io/jwt-config and generate the value with proper escaping etc. and try again?
Thank you for your help @shahidhk .
For anyone else with this problem, my solution was to decode the public key to XML and then reencode it to PEM. https://superdry.apphb.com/tools/online-rsa-key-converter