Coder Social home page Coder Social logo

feat: Ability to disable auth about zero-ui HOT 4 CLOSED

dec0dos avatar dec0dos commented on September 4, 2024 1
feat: Ability to disable auth

from zero-ui.

Comments (4)

maltegrosse avatar maltegrosse commented on September 4, 2024 1

as the priority is low, I decided to create a quick no-auth proxy.
@cptechie see https://github.com/maltegrosse/zero-ui-noauth
lets see how many proxies we can pipe (no-auth, https, auth :)

from zero-ui.

maltegrosse avatar maltegrosse commented on September 4, 2024

would appreciate this feature and set the UI behind an auth proxy e.g. https://github.com/8gears/keycloak-auth-proxy or https://github.com/oauth2-proxy/oauth2-proxy

perhaps add some variable like process.env.ZU_DISABLE_AUTH

from zero-ui.

maltegrosse avatar maltegrosse commented on September 4, 2024

okay, finally got it working: zeroui->no-auth->oauth2 proxy (via keycloak and traefik)

comparable to my post at benjaminbear/docker-ddns-server#16 (comment)
where I used a similar scenario, traefik, oauth service nearly stay the same, the docker-compose for no-auth is like following:

version: "3.7"

services:
  zt-ui-noauth:
    image: maltegrosse/zero-ui-noauth:1.0.0
    container_name: zu-ui-noauth-proxy
    restart: unless-stopped
    expose:
      - "9999"
    ports:
      - "9999"
    environment:
      - PROTOCOL=http
      - AUTH_PATH=/auth/login
      - EXPOSE_PORT=9999
      - CONNECT_HOST=zero-ui
      - CONNECT_PORT=4000
      - USER=admin
      - PASSWORD=zero-ui
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=traefik_default"
      - "traefik.http.routers.zt.rule=Host(`zt.example.com`)"
      - "traefik.http.routers.zt.entrypoints=https"
      - "traefik.http.routers.zt.tls.certresolver=tx"
      - "traefik.http.routers.zt.middlewares=oauth-errors@file,oauth-auth@file"
      # exclude the api endpoint as I run into some issues...
      - "traefik.http.routers.zt-noauth.rule=Host(`zt.example.com`) && PathPrefix(`/api/`)"
      - "traefik.http.routers.zt-noauth.entrypoints=https"
      - "traefik.http.routers.zt-noauth.tls.certresolver=tx"
      # but overwrite the login api endpoint ..
      - "traefik.http.routers.zt-nologin.entrypoints=https"
      - "traefik.http.routers.zt-nologin.tls.certresolver=tx"
      - "traefik.http.routers.zt-nologin.rule=Host(`zt.example.com`) && PathPrefix(`/api/login`)"
      - "traefik.http.routers.zt-nologin.middlewares=redirect-zt-nologin"
      - "traefik.http.middlewares.redirect-zt-nologin.redirectregex.regex=(.)*"
      - "traefik.http.middlewares.redirect-zt-nologin.redirectregex.replacement=https://zt.example.com"
      - "traefik.http.middlewares.redirect-zt-nologin.redirectregex.permanent=false"

    networks:
      - web
  oauth:
    image: quay.io/oauth2-proxy/oauth2-proxy:v7.2.1
# see other post linked in this comment
....
# dont forget to stay in the same traefik network
networks:
  web:
    external:
      name: traefik_default

@dec0dOS in order to provide a oidc sign-out link, could you introduce a new route, e.g. /signout , where u forward here:
https://github.com/dec0dOS/zero-ui/blob/main/frontend/src/components/Bar/Bar.jsx#L39
so i could overwrite /signout with my router and redirect to the openid signout url.

I am not really into react, otherwise I would help :)

from zero-ui.

dec0dOS avatar dec0dOS commented on September 4, 2024

Added in the ZeroUI v1.3.0. Many thanks to https://github.com/9p4 for the PR.

from zero-ui.

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.