Skip to content

Commit

Permalink
implement authentication and authorization with Keycloak gatekeeper
Browse files Browse the repository at this point in the history
  • Loading branch information
mk2301 committed Feb 15, 2023
1 parent 4f5b01b commit 7efb117
Show file tree
Hide file tree
Showing 136 changed files with 4,367 additions and 6,029 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10
FROM python:3.11
ARG TAPIR_VERSION
ENV TAPIR_VERSION=$TAPIR_VERSION
ENV PYTHONUNBUFFERED=1
Expand Down
22 changes: 2 additions & 20 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,16 @@
version: "3.9"
services:
keycloak-server:
keycloak:
build:
context: ./docker/keycloak
dockerfile: Dockerfile

ports:
- "8080:8080"

volumes:
- ./docker/keycloak/import:/opt/keycloak/data/import

environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin

openldap:
image: "osixia/openldap"
environment:
LDAP_ORGANISATION: "WirGarten Lüneburg"
LDAP_DOMAIN: "lueneburg.wirgarten.com"
LDAP_ADMIN_PASSWORD: "admin"
LDAP_READONLY_USER: "true"
ports:
- "389:389"
volumes:
- ./ldap_testdata.ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom/50-testdata.ldif
# Required so that the container doesn't modify the testdata ldif
command: --copy-service

web:
build: .
Expand All @@ -40,10 +23,9 @@ services:
VIRTUAL_HOST: localhost
DEBUG: 1
depends_on:
- openldap
- db
- selenium
- keycloak-server
- keycloak

nginx-proxy:
image: jwilder/nginx-proxy
Expand Down
7 changes: 3 additions & 4 deletions docker/keycloak/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
FROM quay.io/keycloak/keycloak:20.0.1
FROM quay.io/keycloak/keycloak:20.0.3

COPY ./import/*.json /opt/keycloak/data/import/

#RUN /opt/keycloak/bin/kc.sh import --dir /opt/keycloak/data/import
RUN /opt/keycloak/bin/kc.sh import --dir /opt/keycloak/data/import

ENV ROOT_LOGLEVEL=ALL

ENV KEYCLOAK_LOGLEVEL=DEBUG
ENV KEYCLOAK_LOGLEVEL=ALL

CMD ["start-dev"]

0 comments on commit 7efb117

Please sign in to comment.