This plugin enables Gotify to receive and process webhooks from Authentik. It parses and formats the login and login_failed events into notifications for administrators, while other events are displayed in their raw form.
I just couldn’t get the mappings in Authentik to work properly with Gotify...
- Login Events: Get notified when users successfully log in.
- Login Failed Events: Receive detailed notifications when login attempts fail.
- Custom Instance Name: Configure a friendly name for your Authentik instance instead of showing the server address.
-
Clone the repository:
git clone https://github.com/ckocyigit/gotify-authentik-plugin.git
-
Build the plugin: Navigate to the project directory and build the Go plugin using:
docker run --rm -v "$PWD/.:/proj" -w /proj gotify/build:1.22.4-linux-amd64 go build -a -installsuffix cgo -ldflags "-w -s" -buildmode=plugin -o plugin/authentik-plugin-amd64.so /proj
Alternatively, you can download the prebuilt plugin from the releases page.
-
Install the plugin into Gotify:
- Copy the generated
authentik-plugin-amd64.so(or the downloaded release file) into thepluginsfolder of your Gotify instance. - (Optional) Set a friendly name for your Authentik instance in the plugin settings via the Gotify web interface.
- The friendly name will replace the server address in notifications if configured.
- Copy the generated
To configure the webhook transport in Authentik, follow these steps:
-
Create a Notification Transport in Authentik with mode
Webhook (generic). -
Copy the webhook URL from Gotify:
- Copy the webhook URL from the Gotify plugin settings page.
-
Webhook Mapping:
- Leave the Webhook Mapping empty.
-
Enable the
Send onceoption. -
Create a Notification Rule:
- Example: Create a rule for the authentik Admins group and enable the newly created transport.
-
Set Severity Level:
- Select severity
Notice.
- Select severity
-
Create and bind Policies:
- Create two policies with the following actions (policy names can be freely chosen):
- Policy 1: Action →
Login Failed - Policy 2: Action →
Login
- Policy 1: Action →
- The rest of the configuration can remain empty.
- Create two policies with the following actions (policy names can be freely chosen):
Other rules/policies are currently not supported natively, but they will still be displayed in Gotify without being parsed.
This project is licensed under the MIT License – see the LICENSE file for details.
