|
| 1 | +# Use this file to enable test OIDC login on a test server, e.g. |
| 2 | +# |
| 3 | +# ``` sh |
| 4 | +# # .env.docker.local |
| 5 | +# COMPOSE_FILES=…,docker-compose.server.oidc.yml |
| 6 | +# ``` |
| 7 | + |
| 8 | +services: |
| 9 | + idp-citizen: |
| 10 | + image: ghcr.io/geigerzaehler/oidc-provider-mock:latest |
| 11 | + restart: unless-stopped |
| 12 | + networks: |
| 13 | + - app |
| 14 | + - frontend |
| 15 | + labels: |
| 16 | + - "traefik.enable=true" |
| 17 | + - "traefik.docker.network=frontend" |
| 18 | + - "traefik.http.routers.idp-citizen_${COMPOSE_PROJECT_NAME}-http.rule=Host(`idp-citizen.${COMPOSE_SERVER_DOMAIN}`)" |
| 19 | + - "traefik.http.routers.idp-citizen_${COMPOSE_PROJECT_NAME}-http.entrypoints=web" |
| 20 | + - "traefik.http.routers.idp-citizen_${COMPOSE_PROJECT_NAME}-http.middlewares=redirect-to-https" |
| 21 | + - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" |
| 22 | + - "traefik.http.routers.idp-citizen_${COMPOSE_PROJECT_NAME}.rule=Host(`idp-citizen.${COMPOSE_SERVER_DOMAIN}`)" |
| 23 | + - "traefik.http.routers.idp-citizen_${COMPOSE_PROJECT_NAME}.entrypoints=websecure" |
| 24 | + - "traefik.http.services.idp-citizen_${COMPOSE_PROJECT_NAME}.loadbalancer.server.port=9400" |
| 25 | + command: |
| 26 | + [ |
| 27 | + "--user-claims", |
| 28 | + '{"sub": "citizen1", "dk_ssn": "1111111111", "name": "Anders And", "zip": "1111"}', |
| 29 | + "--user-claims", |
| 30 | + '{"sub": "citizen2", "dk_ssn": "2222222222", "name": "Bent Betjentsen", "zip": "2222"}', |
| 31 | + "--user-claims", |
| 32 | + '{"sub": "citizen3", "dk_ssn": "3333333333", "name": "Carsten Carlsen", "zip": "3333"}', |
| 33 | + "--user-claims", |
| 34 | + '{"sub": "citizen4", "dk_ssn": "4444444444", "name": "Dorte Dyhr", "zip": "4444"}', |
| 35 | + "--user-claims", |
| 36 | + '{"sub": "ikke-aarhusianer", "dk_ssn": "1705880000", "name": "Troels Bondetest"}', |
| 37 | + "--user-claims", |
| 38 | + '{"sub": "aarhusianer", "dk_ssn": "2611740000", "name": "Betina Henningsentest"}', |
| 39 | + ] |
| 40 | + |
| 41 | + idp-employee: |
| 42 | + image: ghcr.io/geigerzaehler/oidc-provider-mock:latest |
| 43 | + networks: |
| 44 | + - app |
| 45 | + - frontend |
| 46 | + labels: |
| 47 | + - "traefik.enable=true" |
| 48 | + - "traefik.docker.network=frontend" |
| 49 | + - "traefik.http.routers.idp-employee_${COMPOSE_PROJECT_NAME}-http.rule=Host(`idp-employee.${COMPOSE_SERVER_DOMAIN}`)" |
| 50 | + - "traefik.http.routers.idp-employee_${COMPOSE_PROJECT_NAME}-http.entrypoints=web" |
| 51 | + - "traefik.http.routers.idp-employee_${COMPOSE_PROJECT_NAME}-http.middlewares=redirect-to-https" |
| 52 | + - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" |
| 53 | + - "traefik.http.routers.idp-employee_${COMPOSE_PROJECT_NAME}.rule=Host(`idp-employee.${COMPOSE_SERVER_DOMAIN}`)" |
| 54 | + - "traefik.http.routers.idp-employee_${COMPOSE_PROJECT_NAME}.entrypoints=websecure" |
| 55 | + - "traefik.http.services.idp-employee_${COMPOSE_PROJECT_NAME}.loadbalancer.server.port=9400" |
| 56 | + command: |
| 57 | + [ |
| 58 | + "--user-claims", |
| 59 | + '{"sub": "user", "email": "user@example.com", "groups": ["authenticated"]}', |
| 60 | + "--user-claims", |
| 61 | + '{"sub": "page_editor", "email": "page_editor@example.com", "groups": ["page_editor"]}', |
| 62 | + "--user-claims", |
| 63 | + '{"sub": "public_meeting_editor", "email": "public_meeting_editor@example.com", "groups": ["public_meeting_editor"]}', |
| 64 | + "--user-claims", |
| 65 | + '{"sub": "dialogue_editor", "email": "dialogue_editor@example.com", "groups": ["dialogue_editor"]}', |
| 66 | + "--user-claims", |
| 67 | + '{"sub": "decision_editor", "email": "decision_editor@example.com", "groups": ["decision_editor"]}', |
| 68 | + "--user-claims", |
| 69 | + '{"sub": "project_editor", "email": "project_editor@example.com", "groups": ["project_editor"]}', |
| 70 | + "--user-claims", |
| 71 | + '{"sub": "hearing_editor", "email": "hearing_editor@example.com", "groups": ["hearing_editor"]}', |
| 72 | + "--user-claims", |
| 73 | + '{"sub": "citizen_proposal_editor", "email": "citizen_proposal_editor@example.com", "groups": ["citizen_proposal_editor"]}', |
| 74 | + "--user-claims", |
| 75 | + '{"sub": "administrator", "email": "administrator@example.com", "groups": ["administrator"]}', |
| 76 | + ] |
0 commit comments