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

Proxy Provider - Forward Auth (domain level) can't work on Non-443 ports #12503

Open
CHANTXU64 opened this issue Dec 27, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@CHANTXU64
Copy link

CHANTXU64 commented Dec 27, 2024

Describe the bug
When using Traefik to reverse proxy applications with Authentik authentication, and having both 443 and 4443 ports open, accessing the application via port 4443 results in a page showing only the Authentik logo and the message “authentik Logo Not Found Go home Powered by authentik”. Other resources fail to load, and login is not possible. Port 443, however, works correctly for login and redirects.

authentik Logo
Not Found
Go home
Powered by authentik

To Reproduce
Steps to reproduce the behavior:

  1. Treafik config:
http:
  routers:
    router-whoami:
      entryPoints:
        - "web443"
        - "web4443"
      rule: "Host(`whoami.xxx.com`)"
      middlewares:
        - authentik
      service: authentik
    router-authentik:
      entryPoints:
        - "web443"
        - "web4443"
      rule: "Host(`auth.xxx.com`)"
      service: authentik
  middlewares:
    authentik:
      forwardAuth:
        address: http://172.16.0.100:9000/outpost.goauthentik.io/auth/traefik
        trustForwardHeader: true
        authResponseHeaders:
          - X-authentik-username
          - X-authentik-groups
          - X-authentik-email
          - X-authentik-name
          - X-authentik-uid
          - X-authentik-jwt
          - X-authentik-meta-jwks
          - X-authentik-meta-outpost
          - X-authentik-meta-provider
          - X-authentik-meta-app
          - X-authentik-meta-version
  services:
    authentik:
      loadBalancer:
        servers:
          - url: http://172.16.0.100:9000
    whoami:
      loadBalancer:
        servers:
          - url: http://172.16.0.100:4001
  1. Create Authentik Proxy Provider - Forward Auth (domain level):
    Authentication URL: https://auth.xxx.com:443
    Cookie domain: xxx.com
  2. Create Applications
    Name: Treafik
    Set provider
  3. Edit authentik Embedded Outpost
    Select Treafik Application
    Advanced settings - authentik_host: https://auth.xxx.com:443

Expected behavior
Port 4443 should behave the same as port 443, allowing normal login and proper resource loading.

Screenshots

Logs
docker-compose logs:

Port 4443:
INF auth_via=unauthenticated domain_url=whoami.xxx.com event=/outpost.goauthentik.io/auth/traefik host=whoami.xxx.com:4443 logger=authentik.asgi method=GET pid=64548 remote=192.168.127.66 request_id=0e9d4e30757e4dbba6f68b117f610ad4 runtime=10 schema_name=public scheme=https status=404 timestamp=2024-12-27T09:24:16.910949 user= user_agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Port 443:
INF event=/outpost.goauthentik.io/auth/traefik host=whoami.xxx.com logger=authentik.outpost.proxyv2.application method=GET name=Provider for Traefik remote=192.168.127.66 runtime=0.300 scheme=http size=0 status=0 timestamp=2024-12-27T09:24:23Z user=chantxu user_agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Version and Deployment (please complete the following information):

  • authentik version: ghcr.io/goauthentik/server:2024.10.4
  • Deployment: docker-compose

Additional context

@CHANTXU64 CHANTXU64 added the bug Something isn't working label Dec 27, 2024
@CHANTXU64
Copy link
Author

like #12492

@tarihub
Copy link

tarihub commented Dec 27, 2024

like #12492

I have solved in NPM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants