-
Notifications
You must be signed in to change notification settings - Fork 536
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
ChainAuthHandlerImpl#postAuthentication throws IndexOutOfBoundsException #2641
Comments
Thanks for the reproducer. Can you elaborate about your use case in production? I understand it is possible to create a configuration that fails as such, but I'm not sure yet why nested chains are needed. |
Production schema:
Integration tests:
|
Thanks for the details @andrei-tulba |
See vert-x3#2641 ChainAuthHandlerImpl maintains, for instances of type "any", an index indicating which handler in the list succeeded to authenticate the user. This index is used in the postAuthentication method to determine which handler int he list should have its postAuthentication method invoked. When "any" ChainAuthHandlers were nested, the index computed in the top level ChainAuthHandler was used to choose the handlers in the list of nested ChainAuthHandler. This caused either the wrong handler to be peeked or IndexOutOfBoundsException to be thrown. With this change, the value put in the RoutingContext is specific to a ChainAuthHandler instance. Signed-off-by: Thomas Segismont <[email protected]>
See #2641 ChainAuthHandlerImpl maintains, for instances of type "any", an index indicating which handler in the list succeeded to authenticate the user. This index is used in the postAuthentication method to determine which handler int he list should have its postAuthentication method invoked. When "any" ChainAuthHandlers were nested, the index computed in the top level ChainAuthHandler was used to choose the handlers in the list of nested ChainAuthHandler. This caused either the wrong handler to be peeked or IndexOutOfBoundsException to be thrown. With this change, the value put in the RoutingContext is specific to a ChainAuthHandler instance. Signed-off-by: Thomas Segismont <[email protected]>
See #2641 ChainAuthHandlerImpl maintains, for instances of type "any", an index indicating which handler in the list succeeded to authenticate the user. This index is used in the postAuthentication method to determine which handler int he list should have its postAuthentication method invoked. When "any" ChainAuthHandlers were nested, the index computed in the top level ChainAuthHandler was used to choose the handlers in the list of nested ChainAuthHandler. This caused either the wrong handler to be peeked or IndexOutOfBoundsException to be thrown. With this change, the value put in the RoutingContext is specific to a ChainAuthHandler instance. Signed-off-by: Thomas Segismont <[email protected]>
Fixed by ae41772 |
Version
4.5.9
Context
This commit f856512 causes an IndexOutOfBoundsException when calling the postAuthentication method in nested chain auth hadlers.
Do you have a reproducer?
ChainAuthHandlerImplTest
Tip
Cast an eye on README for pre-requisites and installation guide.
Steps to reproduce
Extra
Linked issues
Stacktrace
The text was updated successfully, but these errors were encountered: