Home

Awesome

Keycloak Package

This is a Kurtosis package for starting a Keycloak server with a preconfigured application. This package simplifies and automates the step described in Keycloak getting started with the Docker version doc

Run this package

If you have Kurtosis installed, run:

kurtosis run github.com/kurtosis-tech/keycloak-package

When the package finishes initializing you will see a (green) message like this:

"Now you can use the realm's user credentials [ myuser | RealmPassword321 ] to login into the application already set through this URL: https://www.keycloak.org/app/#url=http://localhost:4770&realm=myrealm&client=myclient You can also use the admin credentials [ admin | admin ] to login into the admin panel throught this URL: http://localhost:4770"

Click on the first link to open the Keycloak application example. Using the credentials printed in the message, log in to see how this application is integrated with the Keycloak server that was created with this package.

If you don't have Kurtosis installed, click here to run this package on the Kurtosis playground.

To blow away the created enclave, run kurtosis clean -a.

Configuration

<details> <summary>Click to see configuration</summary>

You can configure this package using the following JSON structure (though note that // lines aren't valid JSON, so you must remove them!). The default value each parameter will take if omitted is shown here:

{
    // The Docker image that will be run
    "image": "quay.io/keycloak/keycloak:21.1.1",

    // The name given to the service that gets added
    "name": "keycloak-server",

    // The name of the realm that will be created
    "realm": "myrealm",

    // The name of the realm's user that will be created
    "realm-user": "myuser",

    // The password given to the created realm's user
    "realm-password": "RealmPassword321",

    // The first name given to the created realm's user
    "realm-user-first-name": "RealmUserFirstName",

    // The last name given to the created realm's user
    "realm-user-last-name": "RealmUserLastName",

    // The client id used for configuring the application
    "client-id": "myclient",
}

For example:

kurtosis run github.com/kurtosis-tech/postgres-package '{"realm": "myrealm",  "realm-user": "myuser", "realm-password": "RealmPassword321"}'
</details>

How this package can growth?

  1. Ingrate this package with Postgres package using composability
  2. Include a configure an SSL certificate
  3. Define your own app and connec it easily with Keycloak server

Develop on this package

  1. Install Kurtosis
  2. Clone this repo
  3. For your dev loop, run kurtosis clean -a && kurtosis run . inside the repo directory
<!-------------------------------- LINKS ------------------------------->