Reputation: 4339
I am trying to set claims_map in HASURA_GRAPHQL_JWT_SECRET in my docker compose file using the below config
HASURA_GRAPHQL_JWT_SECRET: '{"type":"HS256","key":"***************************","claims_namespace":"p-clamis-allow","claims_map":{"x-hasura-user-id":{"path":"$.user.id"}}}'
I get the following error:
Invalid interpolation format for "environment" option in service "graphql-engine":"{"type":"HS256","key":"*************************","claims_namespace":"p-clamis-allow","claims_map":{"x-hasura-user-id":{"path":"$.user.id"}}}"**
Upvotes: 0
Views: 1865
Reputation: 11
This will work with
export HASURA_GRAPHQL_JWT_SECRET="{ \"type\": \"HS256\", \"key\": \"***************************\",\"claims_namespace\":\"p-claims-allow\"}"
Upvotes: 1
Reputation: 4166
Replace $ with $$ and things should work!
HASURA_GRAPHQL_JWT_SECRET: '{"type":"HS256","key":"***************************","claims_namespace":"p-clamis-allow","claims_map":{"x-hasura-user-id":{"path":"$$.user.id"}}}'
Upvotes: 3