[Feature Request]:Adding basic authentication
jakub-kubera opened this issue · comments
There is no possibility to created users or at least 1 user, so there is no possibility to use public domain.
+1
+1
you can set up Redis Insight on Docker behind a reverse proxy and integrate it with LDAP.
A sample setup to access Redis Insight behind a reverse proxy is here - https://github.com/RedisInsight/RedisInsight-reverse-proxy.
Also, starting from 2.48, Redis Insight supports subpath proxies using the RI_PROXY_PATH
environment variable.
it would be nice if you could provide any working examples with this new method, authentication seems such an important feature request and I don't know why its not implemented. But given thats the case, an example on how to use these workarounds for the new method would be much appreciated.
@luc4t , you can find some work-in-progress examples here - https://github.com/RedisInsight/RedisInsight-reverse-proxy/tree/RI-5041-v2-subpath-proxy-testing
they will be finalized in the upcoming days.
After some trial and error I found a solution if you only want to run Redis Stack (which also has its built in Insight web interface):
Docker compose yml:
services:
redis-stack:
image: redis/redis-stack:latest
networks:
- redis-network
nginx-basicauth:
image: nginx
volumes:
- ./nginx-basic-auth.conf.template:/etc/nginx/templates/nginx-basic-auth.conf.template
ports: - "${NGINX_PORT:-8001}:${NGINX_PORT:-8001}"
environment: - FORWARD_HOST=redis-stack
- FORWARD_PORT=8001
- NGINX_PORT=${NGINX_PORT:-8001}
- BASIC_USERNAME=${BASIC_USERNAME:-redis}
- BASIC_PASSWORD=${BASIC_PASSWORD:-password}
command: - bash
- -c
- |
printf "$$BASIC_USERNAME:$$(openssl passwd -1 $$BASIC_PASSWORD)\n" >> /etc/nginx/.htpasswd
/docker-entrypoint.sh nginx -g "daemon off;"
depends_on: - redis-stack
networks: - redis-network
networks:
redis-network:
driver: bridge
nginx-basic-auth.conf.template is the same