#Authentik + Traefik "standalone"

1 messages · Page 1 of 1 (latest)

onyx wigeon
#

I'll do my best to explain and paste all config.
So I'm trying to setup a proxy in Authentik to put a authentication layer on top of wg-easy.

Middleware:

http:
  middlewares:
    https-redirect:
      redirectScheme:
        scheme: https

    default-headers:
      headers:
        frameDeny: true
        sslRedirect: true
        browserXssFilter: true
        contentTypeNosniff: true
        forceSTSHeader: true
        stsIncludeSubdomains: true
        stsPreload: true
        stsSeconds: 15552000
        customFrameOptionsValue: SAMEORIGIN
        customRequestHeaders:
          X-Forwarded-Proto: https
    
    compression:
      compress:
        excludedContentTypes:
          - text/event-stream

    auth:
      forwardAuth:
        address: https://auth.mydomain.com/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:

http:
  services:
    auth:
      loadBalancer:
        servers:
          - url: "http://192.168.10.7:9000/outpost.goauthentik.io"
        passHostHeader: true 
    wg-easy:
      loadBalancer:
        servers:
          - url: "http://192.168.10.7:51821"
        passHostHeader: true

Routers:

http:
  routers:
    auth:
      entryPoints:
        - "https"
      rule: "Host(`auth.mydomain.com`)"
      middlewares:
        - default-headers
      tls: {}
      service: auth
    wg-easy:
      entryPoints:
        - "https"
      rule: "Host(`wg-easy.mydomain.com`)"
      middlewares:
        - auth
      priority: 10
      tls: {}
      service: wg-easy
    wg-easy-auth:
      rule: "Host(`wg-easy.mydomain.com`) && PathPrefix(`/outpost.goauthentik.io/`)"
      priority: 15
      service: auth
#

Outpost:

#

Proxy Provder:

#

Application:

#

This is what I get when trying to access externally... Any suggestions? ❤️