Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discord invite banner #10

Merged
merged 2 commits into from
Apr 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 72 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,72 @@
# Keycloak Event Listener for Temporal

This Keycloak SPI Event Listener integrates with Temporal Server, allowing you to publish events to it.

## Example Event

For instance, this is how an updated realm event triggered by an administrator might look:

- Queue: keycloak
- Namespace: default
- JSON:

```json
{
"id": "de158ae0-07d4-4581-b244-c85eee292c8c",
"time": 1712956881563,
"realmId": "40c965b1-ea85-4a21-85ee-0d6c86771279",
"authDetails": {
"realmId": "40c965b1-ea85-4a21-85ee-0d6c86771279",
"clientId": "a6ca059f-9726-483e-95e5-b1c0965aaf32",
"userId": "9548dde8-7089-4210-86f3-f0e03a215c01",
"ipAddress": null
},
"resourceType": "REALM",
"operationType": "UPDATE",
"resourcePath": "events/config",
"representation": null,
"error": null
}
```

## Installation

To get started:

1. [Download](https://github.com/InfinityFlowApp/keycloak-event-listener-temporal/releases) or build from source.
2. Copy the JAR file into your Keycloak installation.
3. Configure as described below.
4. Restart the Keycloak server.
5. Enable logging in the Keycloak UI by adding `event-listener-temporal`.


## Configuration

You can configure the listener using one of the following methods:


### Option 1: Command Parameters

Use the following command-line parameters:

| Parameter |
|--------------------------------------------------------------------|
| --spi-events-listener-event-listener-temporal-server=temporal:7233 |
| --spi-events-listener-event-listener-temporal-namespace=default |
| --spi-events-listener-event-listener-temporal-queue=keycloak |


### Option 2: Environment Variables

Alternatively, you can set these environmental variables:

| Variable | Value |
|---------------------------------------------------------|---------------|
| KC_SPI_EVENTS_LISTENER_EVENT_LISTENER_TEMPORAL_SERVER | temporal:7233 |
| KC_SPI_EVENTS_LISTENER_EVENT_LISTENER_TEMPORAL_NAMESPACE | default |
| KC_SPI_EVENTS_LISTENER_EVENT_LISTENER_TEMPORAL_QUEUE | keycloak |

# License
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
# Keycloak Event Listener for Temporal

[![Discord](https://discordapp.com/api/guilds/1148334798524383292/widget.png?style=banner2)](https://discord.gg/SqpBQwA3)

This Keycloak SPI Event Listener integrates with Temporal Server, allowing you to publish events to it.

## Example Event

For instance, this is how an updated realm event triggered by an administrator might look:

- Queue: keycloak
- Namespace: default
- JSON:

```json
{
"id": "de158ae0-07d4-4581-b244-c85eee292c8c",
"time": 1712956881563,
"realmId": "40c965b1-ea85-4a21-85ee-0d6c86771279",
"authDetails": {
"realmId": "40c965b1-ea85-4a21-85ee-0d6c86771279",
"clientId": "a6ca059f-9726-483e-95e5-b1c0965aaf32",
"userId": "9548dde8-7089-4210-86f3-f0e03a215c01",
"ipAddress": null
},
"resourceType": "REALM",
"operationType": "UPDATE",
"resourcePath": "events/config",
"representation": null,
"error": null
}
```

## Installation

To get started:

1. [Download](https://github.com/InfinityFlowApp/keycloak-event-listener-temporal/releases) or build from source.
2. Copy the JAR file into your Keycloak installation.
3. Configure as described below.
4. Restart the Keycloak server.
5. Enable logging in the Keycloak UI by adding `event-listener-temporal`.


## Configuration

You can configure the listener using one of the following methods:


### Option 1: Command Parameters

Use the following command-line parameters:

| Parameter |
|--------------------------------------------------------------------|
| --spi-events-listener-event-listener-temporal-server=temporal:7233 |
| --spi-events-listener-event-listener-temporal-namespace=default |
| --spi-events-listener-event-listener-temporal-queue=keycloak |


### Option 2: Environment Variables

Alternatively, you can set these environmental variables:

| Variable | Value |
|---------------------------------------------------------|---------------|
| KC_SPI_EVENTS_LISTENER_EVENT_LISTENER_TEMPORAL_SERVER | temporal:7233 |
| KC_SPI_EVENTS_LISTENER_EVENT_LISTENER_TEMPORAL_NAMESPACE | default |
| KC_SPI_EVENTS_LISTENER_EVENT_LISTENER_TEMPORAL_QUEUE | keycloak |

# License
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
Loading