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

Auth endpoint returns 404 on successful login #398

Open
legalgig opened this issue Jul 4, 2024 · 2 comments
Open

Auth endpoint returns 404 on successful login #398

legalgig opened this issue Jul 4, 2024 · 2 comments
Assignees
Labels
bug Something isn't working self-hosted

Comments

@legalgig
Copy link

legalgig commented Jul 4, 2024

Describe the problem

After implementation of custom error pages into ingress controller (Traefik with error middleware) I've noticed that /auth endpoint returns code 404 to the browser even though the auth has succeeded. This error code breaks the error handling implemented by reverse proxies because it forwards the traffic to the container managing 400-599 error codes.

To Reproduce

Steps to reproduce the behavior:

  1. Deploy the dashboard with Zitadel auth behind traefik reverse proxy
  2. Open up the Netbird dashboard
  3. Login into Zitadel
  4. Login should succeed but /auth endpoint will return 404 error code

Expected behavior

auth endpoint should respond with non error HTTP status code

Are you using NetBird Cloud?

No

NetBird version

Dashboard: v2.4.0
Netbird: v0.28.4

NetBird status -d output:

/

Screenshots

image

Additional context

Not sure if it's relevant but I'm using different domains for Netbird (nb.domain.com) and Netbird dashboard (nb.int.domain.com)

Dashboard environment variables:

NETBIRD_MGMT_API_ENDPOINT: "https://nb.domain.com"
NETBIRD_MGMT_GRPC_API_ENDPOINT: "https://nb.domain.com"
AUTH_AUTHORITY: https://auth.domain.com
AUTH_AUDIENCE: "client_id"
AUTH_CLIENT_ID: "client_id"
USE_AUTH0: "false"
AUTH_SUPPORTED_SCOPES: "openid profile email offline_access"
AUTH_REDIRECT_URI: "/auth"
AUTH_SILENT_REDIRECT_URI: "/silent-auth"
NETBIRD_TOKEN_SOURCE: idToken
@mlsmaycon
Copy link
Contributor

Thanks for reporting the issue @legalgig. I can confirm the issue and we will work on a fix for it; however, while testing, that is not stopping the authentication from proceeding. Can you confirm if your authentication fails because of this error?

@legalgig
Copy link
Author

legalgig commented Jul 5, 2024

Authentication fails only when the error handling middleware is enabled, as soon as I disable that middleware it's working just fine.

@mlsmaycon mlsmaycon added bug Something isn't working self-hosted and removed needs-triage labels Jul 8, 2024
@mlsmaycon mlsmaycon assigned mlsmaycon and heisbrot and unassigned mlsmaycon Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working self-hosted
Projects
None yet
Development

No branches or pull requests

3 participants