# Keycloak

Keycloak is an open source software product to allow single sign-on with identity and access management aimed at modern applications and services. This project was created to help us with our [Transition to Keycloak: Establishing auth.eclipse.org as the Primary Authentication Server](https://gitlab.eclipse.org/groups/eclipsefdn/it/websites/-/epics/70).

## Getting Started

Before getting started, ensure you have the following prerequisites installed on your system:

- Docker
- Docker Compose

### Configuration

1. **Environment Variables:**

   Review the `docker-compose.yml` file and configure the necessary environment variables according to your setup. These variables include:

   - `KEYCLOAK_USER`: Keycloak admin username.
   - `KEYCLOAK_PASSWORD`: Keycloak admin password.
   - `KEYCLOAK_DB`: Keycloak database name.
   - `KEYCLOAK_DB_USER`: Keycloak database username.
   - `KEYCLOAK_DB_PASS`: Keycloak database password.

2. **Host Entry:**

   Add a host entry for Keycloak. This is typically done by editing the `/etc/hosts` file and adding an entry like:

```plaintext
   127.0.0.1 keycloak
   127.0.0.1 keycloak.dev.docker
```

### Import Realms

Copy any realm configs to the `realm-export` directory to import them on start up.


### Starting the Services

To start the services, navigate to the directory containing the docker-compose.yml file and run:

```bash
make start-dev # This will create an ssl cert, download our custom theme, build the docker image and start your containers.
```

### Accessing Keycloak

Once the services are up and running, you can access Keycloak by navigating to: https://keycloak

## Author

**Christopher Guindon (Eclipse Foundation)**

- <https://twitter.com/chrisguindon>
- <https://github.com/chrisguindon>

## Trademarks

- Eclipse® is a Trademark of the Eclipse Foundation, Inc.
- Eclipse Foundation is a Trademark of the Eclipse Foundation, Inc.

## Copyright and license

Copyright 2024 the [Eclipse Foundation AISBL](https://www.eclipse.org) and the [eclipsefdn-webdev-toolkit authors](https://gitlab.eclipse.org/eclipsefdn/it/webdev/eclipsefdn-webdev-toolkit/-/graphs/main). Code released under the [Eclipse Public License Version 2.0 (EPL-2.0)](https://gitlab.eclipse.org/eclipsefdn/it/webdev/eclipsefdn-webdev-toolkit/-/raw/main/README.md).

