mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #550] New action: message #416
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#416
Loading…
Add table
Add a link
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?
Originally created by @doits on GitHub (Dec 17, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/550
It would be nice to have action buttons that simply send a message back when pressed, for example:
When clicked, the message
Yes, turn down the A/C(key:message) is sent to the topic with priority4(key:priority) by the client.This could be used by other subscribers of the topic to:
What do you think about the idea?
@wunter8 commented on GitHub (Jan 17, 2023):
You can send messages to ntfy topics using the existing HTTP action, but creating a shorthand action to do this might be nice.
(I didn't test the above command specifically, but I've done it in the past and this is the idea)
@doits commented on GitHub (Jan 29, 2023):
Ah right good idea that you can simply do it like this. Couldn't test it yet, maybe you know if this works with credentials? E.g. if the topic can only be accessed/posted to with authentication, will it use the same credentials the topic is subscribed with?
@wunter8 commented on GitHub (Jan 29, 2023):
I'm pretty sure it won't use the same credentials the topic is subscribed with. You could test it out and see. If I'm right and it doesn't include the authentication automatically, you can just add an
Authorizationheader into the HTTP action: https://docs.ntfy.sh/publish/#send-http-request@doits commented on GitHub (Jan 29, 2023):
Yeah, I thought about this, too, though this would give write access to everybody receiving the message (might be OK, depending on the scenario), BUT if the authorization header could be extracted from the message (probably not with the default ntfy client, but in theory since it is sent to the client) it could be used to write arbitrary things to the topic, even at a later time when the user is removed from that topic (unless the shared credentials are rotated ...).
So I feel this is not the best way to implement this scenario securely (in fact every scenario where a long lived, shared authorization header is sent, because it could be misused for other things or at a later time where maybe a user should not have access anymore).
I'll test a little bit and see what I can come up with for my scenario.
@wunter8 commented on GitHub (Jan 29, 2023):
Automatically sending a client's authentication to every HTTP action wouldn't be great either because you'd be leaking creds. But the client could probably be updated to check if the URL of the HTTP action is one that has saved credentials already, then send the HTTP request using the saved credentials. That doesn't sound too bad to me.
@wunter8 commented on GitHub (Jan 29, 2023):
binwiederhier is also working on revokable access tokens right now. So you could send a short lived (they can be created with an expiration date/time) access token as a header in the HTTP action instead of a specific user:pass combination
@doits commented on GitHub (Jan 29, 2023):
Yeah, of course, it should be sent only if sending a message to the topic where on actually is subscribed to with some credentials (not in general for a REST message, that was never the idea). That would be possible with a separate action (which this issue is about in the first place).
👍 that would solve it.
This would solve it, too. So let's see where this goes.