-
Notifications
You must be signed in to change notification settings - Fork 84
Incorrect authz policy order #1218
Comments
I still do not understand why this happened. If we treat the anyOf and allOf having short circuit behavior. The boolean expression of the above policy is If it is Master Key, then it passes. |
The problem is that it's not a simple true/false checks; it returns an error. SDK refresh session only if error has reason |
I guess the In JavaScript, |
Yes.
Suppose errors are falsy values. In case of expired session, |
Yes. AnyOf should return the last error. |
Since the behavior of AnyOf is changed, please check if any existing code is relying on the old behavior (returning the first error) |
The only API that uses |
Currently, some API requires the request contains either a valid session, or master key. This is represented as:
However, due to ordering of the policies, if the session is expired, the produced error reason is
AccessKeyNotAccepted
, instead of the expected reasonNotAuthenticated
. Client SDK would not refresh the session automatically and breaks the session.To fix it, the order should be changed so that
NotAuthenticated
would be produced.The text was updated successfully, but these errors were encountered: