Closed andrei-tulba closed 2 months ago
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.
JWT Types: There are three types of JSON Web Tokens (JWTs) used in our production code. Each type is processed through a series of handlers.
3rd Type of JWT: The third type of JWT includes user claims. Sometimes, there's an additional, optional token that represents a more privileged user. This additional token is sent as a custom header and is managed by a separate handler. Here we wrap into an all chain handler these 2 handlers
Integration Testing: For integration testing, we use a static token of the third type JWT. In this context chain handler from bullet 2 get wrapped into another any chain handler in addition with a simple authentication handler (checks a static test JWT).
Production schema:
Integration tests:
Thanks for the details @andrei-tulba
Fixed by ae4177281
Version
4.5.9
Context
This commit https://github.com/vert-x3/vertx-web/commit/f8565123f6130725af93dc94fae55d85d5033dce causes an IndexOutOfBoundsException when calling the postAuthentication method in nested chain auth hadlers.
Do you have a reproducer?
ChainAuthHandlerImplTest
Steps to reproduce
Extra
Linked issues
Stacktrace