-
Notifications
You must be signed in to change notification settings - Fork 32
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
Should a request triggering an error really be allowed through? #505
Comments
Also, it is worth noting that the behavior would/might change for a |
Authorino logs for the request that has no
|
Authorino used to be "resilient" to this kind of situation before, by hiding the "error" as a condition mismatch and thus skipping the AuthConfig altogether. Now with CEL, the user has a proper way to distinguish between one thing and the other, according to how it gets flagged in the logs, but effectively the service still falls back to the same behavior. If in CEL we always have ways for preventing an error in the expression (e.g. The problem I guess is that the decision has to be made now, otherwise it would become a breaking change. |
I think the issue was always there... e.g. typo in a gjson, right? |
Looks like this has always been the behavior, or at least it wasn't introduced with CEL support, yet on evaluating the top-level conditions, if an error occurs, we allow the request through...
I don't know whether that's a good thing or not really. In either case tho, I also wonder if it should be reflected to the user whether (sometimes?) the evaluation of the conditions fails... This came up with the behavior of CEL when no key is present in a Map, more specifically in this case ...
request.headers
. As now one would need to test for the presence of the header before accessing it:'foo' in request.headers ? request.headers['foo'] == 'bar' : false
... which if expressed asrequest.headers['foo'] == 'bar'
and the header is not present, this would err out withno such key: foo
.The text was updated successfully, but these errors were encountered: