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, with other events displayed in their raw form.
I just could not work the mappings in authentik to work with gotify..
- Login Events: Get notified when users successfully log in.
- Login Failed Events: Receive detailed notifications when login attempts fail.
-
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
or just download the plugin from the releases and copy the plugin into the gotify plugin directory
-
Configure Gotify:
- Place the generated
authentik_plugin.so
in theplugins
folder of your Gotify instance.
- Place 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:
- Keep Webhook Mapping empty.
-
Enable 'Send once' option.
-
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'.
-
Create and bind Policies:
- Action: Login Failed
- App: authentik Core
- Action: Login
- App: authentik Core
- The rest of the configuration should remain empty.
- Action: Login Failed
Other Rules/Policies are currently not supported natively, but will still be displayed in Gotify without being parsed correctly.
This project is licensed under the MIT License - see the LICENSE file for details.