-
Bug
-
Resolution: Unresolved
-
Critical
-
None
-
2.13.2 GA
-
False
-
None
-
False
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
-
-
Currently it's not possible to implement a JWT Claim Check policy that compares a jwt claim against a query parameter.
For example
URI: https://example.com/?check=foo
JWT: `
`
It would be expected that you could configure the policy with the following operation values:
"jwt_claim_type": "plain"
"jwt_claim": "check"
"value_type": "liquid"
"value": "{{ query_args['check'] }}"
However this is not possible because the query string or parameters are not available in the liquid context for value field. This is because only the jwt context is provided to the liquid rendering here:
I found that the `uri` variable does also exist because the `get_uri` method is explicitly called here: https://github.com/3scale/APIcast/blob/4a71c1d762cc4a3e57f05b6813daec4294e24a0d/gateway/src/apicast/policy/jwt_claim_check/jwt_claim_check.lua#L61
However it doesn't include the query string. It's possible that we could follow a similar approach using the `get_uri_arg` method: https://github.com/3scale/APIcast/blob/e7f6ebbf15d1b053283f0d77ae7176e1c7bfcb44/gateway/src/apicast/policy/routing/request.lua#L22
- is related to
-
THREESCALE-6410 JWT Claim Check Policy does not work with APIaaP Backend
- Closed
- links to