Query param security_tenant is lost when forwarding to openid

Using OpenSearch/Dashboards 2.18 we have the following issue that we didn’t have before upgrading from 2.11 : using openid connect, the query parameters do not seem to be forwarded to keycloak. This causes problems when linking to dashboards in a specific tenant because the security_tenant query parameter is lost. When checking with curl -I to see what happens to the headers, here is what we see:

In 2.11:

location: /auth/openid/login?nextUrl=%2Fgoto%2F72f15fe59c66240e4e1602041b7b33a7%3Fsecurity_tenant%3Dfoo&security_tenant=

In 2.18:

location: /auth/openid/captureUrlFragment?nextUrl=/goto/72f15fe59c66240e4e1602041b7b33a7

@faxmodem Could you share your current config.yml?
What is the Keycloak version?

This PR should resolve the issue in 2.19: Preserve Query in nextUrl during openid login redirect by KleinSebastian · Pull Request #2140 · opensearch-project/security-dashboards-plugin · GitHub