Skip to content

Auth endpoint returns 404 on successful login #398

@legalgig

Description

@legalgig

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions