Open ahobsonsayers opened 2 years ago
Hi @ahobsonsayers, when you are using claims_map
, you cannot use claims_namespace
or claims_format
, you need to have the claims map as a proper JSON object. This is due to the fact that namespace and map are 2 different methods to provide the JWT config to hasura.
If claims_namespace
is set, hasura will try to find the required/default keys in the root of the namespace whereas when claims_map
is set, hasura will try to find the keys on the specified paths, hence these methods are quite different from each other and should not be used together. (claims_format
cannot be used with claims map, this follows from the point that we need a new key to assign the json string but there isn't a way to convey this new key name to hasura).
This probably doesn't solve your issue but there isn't a straightforward way to use claims_map
with claims_format: stringified_json
.
Version Information
Server Version: v2.2.2
Environment
Cloud
What is the expected behaviour?
claims_map
with valid JSONPaths can be used whenclaims_format
isstringified_json
Keywords
jwt, claims_map, claims_format, stringified_json, cognito, jsonpath
What is the current behaviour?
When JWT
claims_format
isstringified_json
, you are not able to specify aclaims_map
with JSON Paths. If you do, you get the following error when making a query or mutation:How to reproduce the issue?
HASURA_GRAPHQL_JWT_SECRET
environmental variable to:Any possible solutions?
Sorry, no!
Can you identify the location in the source code where the problem exists?
No :(
If the bug is confirmed, would you be willing to submit a PR?
Unfortunately not