Skip to content
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

Strange StringIndexOutOfBoundsException if using KC_HTTP_RELATIVE_PATH=/auth #190

Closed
ghenadiibatalski opened this issue Feb 2, 2024 · 3 comments

Comments

@ghenadiibatalski
Copy link
Contributor

Description

I'm facing an StringIndexOutOfBoundsException in ResourceExtractor .

The problem occurs only in case of KC_HTTP_RELATIVE_PATH and only if the path was entered without the trailing /.

Expected Behavior

Should work as excpected also if KC_HTTP_RELATIVE_PATH is configured.

Actual Behavior

Eg: localhost/auth causes the exception while localhost/auth/ looks good. Internally redirects keycloak from /auth to /auth/ but with the MetricsFilter enabled it ends up in an exception.

We could redirect /auth$ to /auth/ on a reverse proxy, but it would be a strange workaround.

Without KC_HTTP_RELATIVE_PATH the filter works as expected (at least there is no exception).

Environment

Latest Keycloak: 23.0.5
keycloak-metrics-spi: 5.0.0

Configured via docker-compose

Steps to reproduce

  1. Start the keycloak with KC_HTTP_RELATIVE_PATH=/auth and keycloak-metrics-spi enabled
  2. Navigate to localhost:8080/auth - an error should occur
@ghenadiibatalski
Copy link
Contributor Author

The error occurs within the class ResteasyReactiveRequestContext here

@mfisch04
Copy link

mfisch04 commented Feb 5, 2024

This is broken for me as well. I rolled back to the 18.3.2 bitnami helm chart.

@ZazaKumar
Copy link

is it fixed in combination of 24.0.1 and metrics-spi-5.0.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants