Use access tokens instead of passwords
Requirement
Allow users to forward Grafana notifications to Matrix using access tokens instead of passwords.
Value Proposition
Implementing this feature will enhance security and convenience for users by allowing them to authenticate with access tokens, rather than account passwords. Access tokens can be revoked without the need to change passwords.
Design Ideas
- Create Access Token:
curl -X POST -H "Content-Type: application/json" -d '{"type": "m.login.password", "identifier": {"type": "m.id.user", "user": "<bot_username>"}, "password": "<bot_password>", "initial_device_display_name": "Grafana To Matrix Forwarder"}' "http://<your_server>/_matrix/client/r0/login"
- Pass this token to the forwarder using an argument or environment variable instead of the password.
This approach uses in the Uptime Kuma project, for example.