push working config
This commit is contained in:
parent
8e9bee81af
commit
d7eeee16c7
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "keycloak-gatekeeper"]
|
||||||
|
path = keycloak-gatekeeper
|
||||||
|
url = https://github.com/oneconcern/keycloak-gatekeeper
|
||||||
38
README.md
38
README.md
@ -4,7 +4,41 @@
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
## déployer
|
## Configurer
|
||||||
|
|
||||||
|
### Keycloak
|
||||||
|
|
||||||
|
- Créer un client "sshwifty":
|
||||||
|
|
||||||
|
- Mapper aud -> clien id:
|
||||||
|
|
||||||
|
### Gatekeeper
|
||||||
|
|
||||||
|
- Editer le docker-compose.yml:
|
||||||
|
```bash
|
||||||
|
nano docker-compose.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
```yml
|
||||||
|
- "--discovery-url=https://<keycloak-dns>/auth/realms/<realm>/.well-known/openid-configuration"
|
||||||
|
- "--client-id=sshwifty"
|
||||||
|
- "--client-secret=<keycloak-client-secret>"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Si reverse-proxy devant
|
||||||
|
|
||||||
|
- Ajouter les directives suivantes pour le websocket dans la config du reverse-proxy:
|
||||||
|
```
|
||||||
|
location /sshwifty/socket {
|
||||||
|
proxy_pass http://sshwifty;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Déployer
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
@ -23,4 +57,4 @@ project and read their copyright statements.
|
|||||||
|
|
||||||
## Contribuer
|
## Contribuer
|
||||||
|
|
||||||
- [ ] traduire en français
|
- [ ] SSHWIFTY à traduire en français
|
||||||
|
|||||||
@ -9,65 +9,27 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
ports:
|
ports:
|
||||||
- 9133:8182
|
- 8182:8182
|
||||||
deploy:
|
|
||||||
labels:
|
|
||||||
- traefik.frontend.rule=Host:ssh.legaragenumerique.fr
|
|
||||||
- traefik.port=80
|
|
||||||
- traefik.frontend.auth.forward.address=http://traefik-forward-auth:4181
|
|
||||||
- traefik.frontend.auth.forward.authResponseHeaders=X-Forwarded-User
|
|
||||||
- traefik.frontend.auth.forward.trustForwardHeader=true
|
|
||||||
|
|
||||||
# TRAEFIK
|
|
||||||
traefik:
|
|
||||||
image: traefik:v2.10
|
|
||||||
container_name: traefik
|
|
||||||
restart: always
|
|
||||||
command:
|
|
||||||
# For web ui traefik DEV
|
|
||||||
# - "--api.insecure=true"
|
|
||||||
- "--providers.docker=true"
|
|
||||||
- "--providers.docker.swarmmode=false"
|
|
||||||
- "--log.level=DEBUG"
|
|
||||||
- "--providers.docker.exposedByDefault=false"
|
|
||||||
|
|
||||||
- "--entryPoints.web.address=:80"
|
|
||||||
# - "--entryPoints.websecure.address=:443"
|
|
||||||
# - "--certificatesResolvers.le.acme.email=${ACME_EMAIL}"
|
|
||||||
# - "--certificatesResolvers.le.acme.storage=/acme/acme.json"
|
|
||||||
# - "--certificatesResolvers.le.acme.httpChallenge=true"
|
|
||||||
# - "--certificatesResolvers.le.acme.httpChallenge.entryPoint=web"
|
|
||||||
# - "--certificatesresolvers.le.acme.caserver=https://acme-v02.api.letsencrypt.org/directory"
|
|
||||||
ports:
|
|
||||||
# - "4443:443"
|
|
||||||
- "8880:80"
|
|
||||||
# The Web UI (enabled by --api.insecure=true) DEV
|
|
||||||
# - "8082:8080"
|
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /etc/timezone:/etc/timezone:ro
|
||||||
# - ./acme:/acme
|
- /etc/localtime:/etc/localtime:ro
|
||||||
networks:
|
|
||||||
traefik_net:
|
|
||||||
|
|
||||||
# GATE KEEPER
|
# KEYCLOAK GATEKEEPER
|
||||||
traefik-forward-auth:
|
gatekeeper:
|
||||||
image: funkypenguin/traefik-forward-auth
|
container_name: gatekeeper
|
||||||
restart: always
|
restart: always
|
||||||
env_file: ./traefik-forward-auth.env
|
build:
|
||||||
networks:
|
context: ./keycloak-gatekeeper/.
|
||||||
- traefik_net
|
ports:
|
||||||
deploy:
|
- 8880:8880
|
||||||
labels:
|
depends_on:
|
||||||
- traefik.port=4181
|
- sshwifty
|
||||||
- traefik.frontend.rule=Host:id/legaragenumerique.fr
|
command:
|
||||||
- traefik.frontend.auth.forward.address=http://traefik-forward-auth:4181
|
- "--discovery-url=https://<keycloak-dns>/auth/realms/<realm>/.well-known/openid-configuration"
|
||||||
- traefik.frontend.auth.forward.trustForwardHeader=true
|
- "--client-id=sshwifty"
|
||||||
|
- "--client-secret="
|
||||||
|
- "--listen=0.0.0.0:8880"
|
||||||
# NETWORKS
|
- "--upstream-url=http://sshwifty:8182"
|
||||||
networks:
|
volumes:
|
||||||
traefik_net:
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
# VOLUMES
|
|
||||||
# volumes:
|
|
||||||
# acme: {}
|
|
||||||
1
keycloak-gatekeeper
Submodule
1
keycloak-gatekeeper
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 41596cbaf63bcfd380101686aa6582a44092f42d
|
||||||
Loading…
x
Reference in New Issue
Block a user