You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When opening a short URL pointing to a SAML-enabled OSD instance the SAML login flow won't be initiated and clients will receive the following response:
{"statusCode":400,"error":"Bad Request","message":"[request query.security_tenant]: definition for this key is missing"}
What's interesting is that the nextURL won't include the HTTP-encoded security_tenant parameter.
Instead, an empty security_tenant parameter will be included in the request itself.
Server: Kubernetes 1.25.12, workers using gardenlinux 934.10.0, pods using opensearchproject/opensearch-dashboards:1.3.12 (Amazon Linux 2)
Plugins: Security Dashboards Plugin
Do you have any screenshots?
Not applicable
Do you have any additional context?
Obviously, authenticated clients will not be affected. One can work around the issue by HTTP-encoding the security_tenant parameter and appending it to the value of nextURL to properly trigger the SAML login flow manually:
This could be wrong though because the problem seems to affect short URLs only (or any tenant-scoped resource, I didn't test this yet). I couldn't test this claim though because I had problems running the unit tests for the project.
The text was updated successfully, but these errors were encountered:
bgoerzig
changed the title
[BUG] 1.13.12 Short URL raises 400 error during SAML login
[BUG] 1.3.12 Short URL raises 400 error during SAML login
Oct 21, 2023
[Triage] @bgoerzig Thank you for filing this issue and providing rich description of the issue to reproduce. I have marked this as triaged and help wanted.
Hi, I also encountered this bug at AWS OSS 2.8.0. At the same time, I'm using another AWS OSS 2.8.0 instance, but with OIDC authentication, where opening shortened links works. Looking at the code, it looks like a quick fix.
Can it be rewrited to this global utils function, or not? It seems to work with this function.
EDIT: Sorry, I looked more closely and find that OpenID implementation was rewrited in this PR to same as SAML have. And yes I also encountered bug from this PR at OpenID auth. 😄 It seems that both SAML and OpenID must be now fixed on master branch.
What is the bug?
When opening a short URL pointing to a SAML-enabled OSD instance the SAML login flow won't be initiated and clients will receive the following response:
What's interesting is that the
nextURL
won't include the HTTP-encodedsecurity_tenant
parameter.Instead, an empty
security_tenant
parameter will be included in the request itself.For example, opening the short URL
will redirect the client to
Verbose flow using
curl
:How can one reproduce the bug?
Steps to reproduce the behavior:
What is the expected behavior?
I expected the SAML login flow to be triggered with the correct
nextURL
.What is your host/environment?
Do you have any screenshots?
Not applicable
Do you have any additional context?
Obviously, authenticated clients will not be affected. One can work around the issue by HTTP-encoding the
security_tenant
parameter and appending it to the value ofnextURL
to properly trigger the SAML login flow manually:I have a hunch that the
generateNextURL
function simply drops all parameters because it only takes into account therequest.url.pathname
without parameters: https://github.com/opensearch-project/security-dashboards-plugin/blob/1.3.12.0/server/auth/types/saml/saml_auth.ts#L54-L59This could be wrong though because the problem seems to affect short URLs only (or any tenant-scoped resource, I didn't test this yet). I couldn't test this claim though because I had problems running the unit tests for the project.
The text was updated successfully, but these errors were encountered: