diff --git a/ntfy/README.org b/ntfy/README.org index 94dcaf2..4ab7621 100644 --- a/ntfy/README.org +++ b/ntfy/README.org @@ -18,6 +18,49 @@ Any option from the help of [[https://docs.ntfy.sh/config/][ntfy]] can be used, To setup ~firebase~, there are some slight differences you can find here. +*** Creating an admin account + +By default, =ntfy= doesn't provide any account nor permissions. This +charm will enforce a different stance, and by default will not allow +anything without permission. + +If you want to follow this route, you'll need to create an admin account: + +You need to attach to the ntfy container: + +#+begin_src sh +docker exec -ti myproject_ntfy_1 sh +#+end_src + +#+begin_src sh +ntfy user add --role=admin admin +#+end_src + +*** Adding user + +For listening topics + +#+begin_src sh +ntfy user add myuser +#+end_src + +To set access to topics + +#+begin_src sh +ntfy access myuser mytopic read-only +#+end_src + +*** Create a token for a user + +This allows to give a kind of secret key that is revokable. You would +do this to distribute access to services that would need to send +notification. + +To create a token from a user: + +#+begin_src sh +ntfy token add admin +#+end_src ** Connection with =Firebase=