Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for api tokens when sending message. #297

Closed
prabirshrestha opened this issue Jun 1, 2022 · 2 comments
Closed

add support for api tokens when sending message. #297

prabirshrestha opened this issue Jun 1, 2022 · 2 comments
Labels
prio:low Low priority server Relates to the main binary (server or client)

Comments

@prabirshrestha
Copy link

I would like each app to use separate tokens so I can easily track who and which app is sending the messages. I like how PushOver has done it where you create an app with name,description,icon and have a button to generate api token for it.

Should be able to set custom expiration for tokens. Some tokens I may have never expire.

This becomes crucial when LDAP is supported in #296. As I don't want to save my username and password in random scripts.

@prabirshrestha prabirshrestha mentioned this issue Jun 1, 2022
@binwiederhier binwiederhier added prio:low Low priority server Relates to the main binary (server or client) labels Jun 1, 2022
@binwiederhier
Copy link
Owner

The design of the auth feature is very rudimentary, but at the same time very powerful. I encourage you to read up on #19 of the designs we discussed there.

Fundamentally, I do not disagree that expiring tokens could be a good addition, but ... (and this may shock you :-)): A token is just a password without a user and a different name

For some reason, people think passwords are bad, but tokens are good, though they are fundamentally the same thing: a symmetric secret.

I don't want to save my username and password in random scripts.

You can do this already by just creating users and ACLs: https://ntfy.sh/docs/config/#access-control -- The only thing that's not supported is expiration, though you could probably script that server-side (that's very hacky though).

Anyway, since 99% of what you want are already there, I put this low on the list, though it sounds like fun to at least implement the user expiry, so I may do that sooner. I may even give you Bearer tokens implemented as users without a name if I feel like it :-D

@binwiederhier
Copy link
Owner

API tokens are implemented now with ntfy 2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio:low Low priority server Relates to the main binary (server or client)
Projects
None yet
Development

No branches or pull requests

2 participants