Git Product home page Git Product logo

Comments (5)

code-and-such avatar code-and-such commented on June 2, 2024

After reading the tickets involved I must confess I do not really understand whether token refresh is completely broken, or it's just some aspect of it that do not work properly/according to spec. I assume the latter

We do have problems with our Cognito/Oauth2-proxy setup, and I thought it might have had to do with this, but it might as well be misaligned cookie expire/refresh values, which we now modified (and we are now waiting for user feedback)

But it would be nice to get some kind of clarification if token refreshing works in most cases?

from oauth2-proxy.

xXluki98Xx avatar xXluki98Xx commented on June 2, 2024

Hi, I had the same/similar Problem.
I am using Zitadel as IdP and want Oauth2Proxy as Middleware.

tl;dr: The Session Refresh Handling seems to be broken if you use only cookie. I added Redis for session handling and it works.

But I am not sure if its a solution for your situation.

from oauth2-proxy.

devildant avatar devildant commented on June 2, 2024

Hi, I had the same/similar Problem.

I am using Zitadel as IdP and want Oauth2Proxy as Middleware.

tl;dr: The Session Refresh Handling seems to be broken if you use only cookie. I added Redis for session handling and it works.

But I am not sure if its a solution for your situation.

Interesting, could you tell me more? you mount a docker container redis that you have link to oauth2_proxy? Do you have an example configuration? ;)

from oauth2-proxy.

xXluki98Xx avatar xXluki98Xx commented on June 2, 2024

sure:

please note that is using the keydb, but i found that it does currently not run on amd cpus.

compose.yml:

...
oauth-cache:
    # image: redis:6.2-alpine
    image: eqalpha/keydb:latest
    restart: always
    networks:
        - localdev
    ports:
        - '6379:6379'
    command:
        - keydb-server
        - --save 20 1
        - --loglevel warning

oauth2proxy:
    image: quay.io/oauth2-proxy/oauth2-proxy:v7.5.1
    restart: unless-stopped
    networks:
        - localdev
    depends_on:
        - oauth-cache
    ports:
        - 4180:4180
    volumes:
        - ./oauth2proxy.config:/etc/config.cfg
    command: >
        --config "/etc/config.cfg"

oauth2proxy.config:

  ...
  # session handling
  session_store_type="redis"
  redis_connection_url = "redis://oauth-cache:6379/0"
  cookie_refresh = "30m"
  cookie_expire = "24h"

from oauth2-proxy.

devildant avatar devildant commented on June 2, 2024

sure:

please note that is using the keydb, but i found that it does currently not run on amd cpus.

compose.yml:

...

oauth-cache:

    # image: redis:6.2-alpine

    image: eqalpha/keydb:latest

    restart: always

    networks:

        - localdev

    ports:

        - '6379:6379'

    command:

        - keydb-server

        - --save 20 1

        - --loglevel warning



oauth2proxy:

    image: quay.io/oauth2-proxy/oauth2-proxy:v7.5.1

    restart: unless-stopped

    networks:

        - localdev

    depends_on:

        - oauth-cache

    ports:

        - 4180:4180

    volumes:

        - ./oauth2proxy.config:/etc/config.cfg

    command: >

        --config "/etc/config.cfg"

oauth2proxy.config:

  ...

  # session handling

  session_store_type="redis"

  redis_connection_url = "redis://oauth-cache:6379/0"

  cookie_refresh = "30m"

  cookie_expire = "24h"

perfect, I also wanted to use keydb instead of redis, that's good :)
Thx a lot

from oauth2-proxy.

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.