Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pacovk/keycloak-vault
This is an example Terraform implementation of a Keycloak Vault integration.
https://github.com/pacovk/keycloak-vault
Last synced: about 7 hours ago
JSON representation
This is an example Terraform implementation of a Keycloak Vault integration.
- Host: GitHub
- URL: https://github.com/pacovk/keycloak-vault
- Owner: PacoVK
- License: apache-2.0
- Created: 2021-02-10T20:58:08.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-31T05:55:52.000Z (8 months ago)
- Last Synced: 2024-04-20T00:49:53.898Z (6 months ago)
- Language: HCL
- Size: 18.6 KB
- Stars: 37
- Watchers: 2
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Integrate Keycloak with HashiCorp Vault
This is an example Terraform implementation of a Keycloak Vault integration.
The project refers to a [medium post on this topic](https://pascal-euhus.medium.com/integrate-keycloak-with-hashicorp-vault-5264a873dd2f).**This version is compatible with Quarkus, for Keyloak on Wildfly see [here](https://github.com/PacoVK/keycloak-vault/releases/tag/legacy-wildfly)**
## Prerequisite
### Keycloak frontend name resolution
You need to set the following entry in ``/etc/hosts`` or `C:\Windows\System32\drivers\etc\hosts`.
```text
127.0.0.1 keycloak
```This change should be done on the operating system that the end-user's browser is running on (when using WSL the change needs to be done on windows system).
The keycloak name resolution for the backend (vault->keycloak) is done through the docker service name.
### Make
Install make. Ex for debian-like systems:
```
sudo apt install make
```Alternatively check the `Makefile` and manually run the commands.
For example to run the stack in the foreground and display all logs in the standard output, instead of `make up` you can use:
```
docker-compose up
```## Usage
Use makefile:
```make [help | up | down | init | provision | deprovision | destroy | shell]```1. Start the local environment (Docker) ````make up````
2. Initialize Terraform ````make init````
3. Apply the Terraform configuration ````make provision````
4. Shutdown the local environment (Docker) ````make down````### Makefile
| Command | Description |
| ------------- |:-------------:|
| up | start docker container |
| down | stop docker container |
| init | terraform init |
| provision | terraform apply |
| deprovision | terraform destroy |
| destroy | terraform destroy and remove all terraform related files/states |
| shell | open a shell with terraform binary |