Skip to content

Commit

Permalink
Add user auth using Keycloak (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixTJDietrich authored Oct 5, 2024
1 parent 4bde64b commit e61a46c
Show file tree
Hide file tree
Showing 54 changed files with 2,855 additions and 129 deletions.
7 changes: 6 additions & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ services:
app-network:
aliases:
- postgres
volumes:
- postgres-data:/var/lib/postgresql/data

networks:
app-network:
driver: bridge`
driver: bridge`

volumes:
postgres-data:
20 changes: 20 additions & 0 deletions server/application-server/HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@ This will start your application in a local development environment. You can acc

Setting environment variables works through profile-based `application.yml` files. For local development, create a `application-local.yml` file overwriting the original properties. See [Using the Plugin :: Spring Boot](https://docs.spring.io/spring-boot/maven-plugin/using.html#using.overriding-command-line) for more information.


### Keycloak Development Test Users

If you started server for development it will import the example config for Keycloak from `keycloak-hephaestus-realm-example-config.json`.

#### Admin Account

- Username: `admin`
- Password: `admin`

Has the `admin` role.

#### Test User Account

- Username: `testuser`
- Password: `testuser`

Does not have the `admin` role.


### Reference Documentation

For further reference, please consider the following sections:
Expand Down
26 changes: 25 additions & 1 deletion server/application-server/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Used for local development

services:
postgres:
image: 'postgres:latest'
Expand All @@ -6,4 +8,26 @@ services:
POSTGRES_PASSWORD: root
POSTGRES_USER: root
ports:
- '5432'
- '5432:5432'
networks:
- app-network

keycloak:
image: quay.io/keycloak/keycloak:26.0.0
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
KEYCLOAK_IMPORT: /opt/keycloak/data/import/hephaestus-realm.json
command:
- start-dev
- --import-realm
ports:
- '8081:8080'
volumes:
- ./keycloak-hephaestus-realm-example-config.json:/opt/keycloak/data/import/hephaestus-realm.json
networks:
- app-network

networks:
app-network:
driver: bridge
Loading

0 comments on commit e61a46c

Please sign in to comment.