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

[BUG] Handler for .well-known/openid-configuration constructs redirect path incorrectly #5456

Closed
2 tasks done
Dlougach opened this issue Jun 7, 2024 · 2 comments · Fixed by #5458
Closed
2 tasks done
Labels
bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers

Comments

@Dlougach
Copy link
Contributor

Dlougach commented Jun 7, 2024

Describe the bug

Let's assume the following configuration:

configmap:
  adminServer:
    auth:
      userAuth:
        openId:
          baseUrl: https://something.onelogin.com/oidc/2

Then request to Flyte's /.well-known/openid-configuration returns HTTP Code 303 (See Other) with the following header:

Location: https://something.onelogin.com/oidc/.well-known/openid-configuration

I think this happens because in this line ResolveReference is used which has the following behaviour for merging paths:

return a string consisting of the reference's path component
appended to all but the last segment of the base URI's path (i.e.,
excluding any characters after the right-most "/" in the base URI
path, or excluding the entire base URI path if it does not contain
any "/" characters).

Expected behavior

The correct URL would be https://something.onelogin.com/oidc/2/.well-known/openid-configuration

Additional context to reproduce

No response

Screenshots

No response

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes
@Dlougach Dlougach added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Jun 7, 2024
Copy link

welcome bot commented Jun 7, 2024

Thank you for opening your first issue here! 🛠

Copy link

runllm bot commented Jun 7, 2024

The issue you're describing seems to be related to how the ResolveReference method constructs the redirect path in the Flyte admin server's authentication handler. This method appends the reference's path component to all but the last segment of the base URI's path, which can lead to incorrect URL construction.

To address this, you might need to modify the way the URL is constructed in the Flyte admin server's code. Specifically, you should ensure that the base URL is correctly appended with the desired path.

Would you like more detailed guidance on how to modify the code to fix this issue?

Sources:


This is an AI-generated response and your feedback is appreciated! Please leave a 👍 if this is helpful and 👎 if it is not.

Mention @RunLLM to ask follow-up questions. See runllm.com for more!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant