Coder Social home page Coder Social logo

Comments (7)

thomseddon avatar thomseddon commented on May 20, 2024 1

The "RemoteAddr" is read directly from the request, so this would be the expected behaviour: https://github.com/thomseddon/traefik-forward-auth/blob/master/main.go#L23

Perhaps this could be improved in this scenario!

I want to test this with kubernetes a bit more, so this would be one to look at whilst that's being done.

from traefik-forward-auth.

thomseddon avatar thomseddon commented on May 20, 2024 1

I've just pushed a commit that should fix this: f1ba9b5

I will tag and release this next week :)

from traefik-forward-auth.

thomseddon avatar thomseddon commented on May 20, 2024 1

This is included in v2 which has been released today

from traefik-forward-auth.

chenrui333 avatar chenrui333 commented on May 20, 2024

I can actually use docker-compose-dev.yml to reproduce this issue.

  1. create OAuth API, configure http://localhost:8085/_oauth
  2. update the traefik-forward-auth env setup
  3. docker-compose -f docker-compose-dev.yml up
  4. update virtual host and access http://localhost:8085

I can always see

traefik-forward-auth_1  | time="2019-04-16T03:27:53Z" level=error msg="Invalid cookie: Invalid cookie mac" RemoteAddr="172.19.0.3:47630"

from traefik-forward-auth.

chenrui333 avatar chenrui333 commented on May 20, 2024

http request headers would be like below:

Cookie: _ga=GA1.1.1551400415.1547069710; _forward_auth=05Kj15XruH2T1MNGSDJ62KCfujj3is2WnGaLb5h2usM=|1555425295|[email protected]
Host: whoami.localhost.com

from traefik-forward-auth.

chenrui333 avatar chenrui333 commented on May 20, 2024

I turned on the DEBUG log:

traefik_1               | time="2019-04-16T03:45:22Z" level=debug msg="Creating server server-example-whoami2-1-d0bbe061a5e0438aae1a72e9084b9114 at http://172.19.0.2:80 with weight 1"
traefik_1               | time="2019-04-16T03:45:22Z" level=debug msg="Creating route route-frontend-Host-whoami-localhost-org-1 Host:whoami.localhost.org"
traefik_1               | time="2019-04-16T03:45:22Z" level=info msg="Server configuration reloaded on :80"
traefik_1               | time="2019-04-16T03:45:22Z" level=info msg="Server configuration reloaded on :8080"
traefik-forward-auth_1  | time="2019-04-16T03:45:33Z" level=error msg="Invalid cookie: Invalid cookie mac" RemoteAddr="172.19.0.5:50662"
traefik_1               | time="2019-04-16T03:45:33Z" level=debug msg="Remote error http://traefik-forward-auth:4181. StatusCode: 401"

from traefik-forward-auth.

chenrui333 avatar chenrui333 commented on May 20, 2024

Now I comment out the lines:

    # [entryPoints.http.auth.forward]
    # address = "http://traefik-forward-auth:4181"
    # authResponseHeaders = ["X-Forwarded-User"]

Seems working for my favor now.

from traefik-forward-auth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.