Feature Request: Add authentication to ntfy hook #621
Labels
No labels
blocked
breaking
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No milestone
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
borgmatic-collective/borgmatic#621
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
I run a self hosted ntfy server with authentication enabled and no anonymous access as it's private instance.
Other notes / implementation ideas
The ntfy server supports authentication via basic authorization (Authorization-Header) or as a query parameter. (docs)
The configuration could be extend to support the authentication data and if present, the data could be added to the headers in line 52 of borgmatic/hooks/ntfy.py#L52
Environment
borgmatic version: 1.7.5
borgmatic installation method: pip
Borg version: 1.2.0
Python version: 3.10.6
Database version (if applicable): n/a
operating system and version: Ubuntu 22.04.1 LTS
Makes sense. Thanks for filing this! Sounds like borgmatic's ntfy configuration should also be changed as part of this implementation to allow configuration of a ntfy
usernameandpassword. And then Python'srequestslibrary could maybe handle the encoding:This will be part of the next release (1.7.8).
Just released. Thanks again!
Great! I just updated my config, and it works as expected.
Thanks to all involved. :)
Hmmz, just fyi in case someone else stumbles upon this, i noticed that in my upgraded version (i used
borgmatic config generate -s .. -d ...) this part of the config was missing...:Thanks for the comment. Would you mind filing a ticket with details about this issue? It sounds like it could be a bug.