-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"propagate_claims" with empty array value got 500 and empty resp body #121
Comments
Thank you @AlAnwari-ari, we will look into this shortly and get back to you |
@AlAnwari-ari : I've create a branch to try to reproduce the issue here : https://github.com/krakend/krakend-jose/pull/125/files Just so I understand it correctly: you issue is that some claim in jwt has a value of an array, when that array has some value, your request succeeds, but when it is empty, you get an error ? I would need more information about how to reproduce it, mostly because, looking at the code here: https://github.com/krakend/krakend-jose/blob/master/jose.go#L265 does not look like it could fail , in case of an empty array, it would return an empty string value. However, if the issue is that "group" is not an empty array, but is just a key that is not there, the behaviour was for the header to not be there . On the other side, if the "group" key is there, but with a But, in any case, it should not break , or produce an error. Take into account, that in the soon to be released new CE version, the behaviour will be different, and the header will be always there, set to empty string if no value is there. In any case, I could not reproduce the error issue.. so I wonder if the error is the side effect of not having the expected headers somewhere down in the pipeline, or produced by the response of a backend that was expecting the header to be there. |
I'm using "propagate_claims" and want to put the header value with its token data. But suddenly i got 500 response code and no body response when i got empty array. ex:
"auth/validator": { ... "propagate_claims": [["group", "X-GROUP"]] }
and
group
value is empty arraygroup:[]
anything insight would be very appreciate it...
thank you
The text was updated successfully, but these errors were encountered: