Tokens and access
Give each script or tool its own token that may only send to its topic. Make one on a topic's Send to this topic tab with New token, or under Settings → Access tokens. The secret is shown once: copy it into the tool then.
What a token can do#
A token acts for you, with at most your rights. It works where scripts and apps work: sending to a topic, reading a topic's messages, and asking which topics it may use. It never signs in to Skirl's pages, cannot make tokens, and cannot change people, who may use a topic, or any setting.
A token's rights are checked each time it is used, against yours at that moment: if you lose access to a topic, so does the token; if you are disabled, it stops working (People and roles).
Making a token#
Settings → Access tokens → New token:
- Name: what uses it ("backup script"), so you know which to revoke.
- Limit to one topic: the token works for that topic only. Empty: every topic you can use, now and later, and it may make new topics by sending to a new name if you may make topics.
- It may: Send messages, Read messages, or both.
- Expires: Never, In 7 days, In 30 days, In 90 days or In a year.
Create token shows the secret once: "Copy the secret for … now. It will not be shown again." Copy, paste it into the tool, then I have copied it. Skirl keeps only a fingerprint of it; the lists show its last four characters, never the whole secret.
New token on a topic's Send to this topic tab does all of this in one click: it makes a token named after the topic, such as backups-publish, that may send to that topic and nothing else, cannot read, and never expires, and fills its secret into the steps on that page until you leave it. That is what a tool that only notifies needs: if it leaks, someone can send to that one topic, nothing more. When the topic already has one, Rotate next to it gives that one a new secret instead of making another.
A token limited to a topic you cannot use is refused when you make it. An admin may limit a token to any topic.
How many tokens#
Each person holds at most 100 tokens that are neither revoked nor expired. The 101st is refused with "You hold 100 tokens, the most there can be. Revoke one first." Revoked and expired tokens do not count.
Expiry#
An expired token stops working (the tool gets 401) and leaves your list in Settings → Access tokens. It cannot be brought back: make a new one. Admins still see it in Admin → Tokens with Show revoked and expired.
Rotating and revoking#
In Settings → Access tokens each token shows what it may do, when it expires and when it was last used, with three buttons:
- Rename changes its name only.
- Rotate gives it a new secret and keeps its name, its topic, its rights and its expiry date. The old secret stops working at once: paste the new one into the tool.
- Revoke, then Revoke now, ends it for good. Keep cancels.
A token nobody has used for a long time is easy to find by "never used" or its last use. Rotate a token you think has leaked; revoke one nothing uses any more. Only a token that still works can be rotated.
Everyone's tokens#
Admin → Tokens shows admins everyone's tokens, never their secrets: the Token (its name and last four characters), its Owner, what it is Limited to ("every topic" when nothing), what it May do, Last used, Expires and its State: Active, Expired or Revoked. Only active ones are listed until you tick Show revoked and expired.
Revoke, then Revoke now, ends anyone's token at once. There is no Rotate here: each person makes and rotates their own, in Settings → Access tokens.
Signing in from a tool#
- A tool with a field for a token or an access token: paste the token there.
- A tool that asks for a user name and password but can take a token: leave the user name empty and put the token as the password.
- A tool that signs in with a user name and password and makes its own token (Home Assistant's ntfy integration does): give it your user name and password. The token it makes shows in Settings → Access tokens, named "Created by an ntfy client" unless the tool names it. It may read and send on every topic you can use, and lasts 72 hours unless the tool asks for another lifetime or extends it.
A password works for sending too, but a token is better: it can be limited to one topic and revoked without changing your password. Every wrong password or unknown, revoked or expired token counts as a failed sign-in from that address: Rate limits.
Who may read and send on a topic is set on its Access tab: The Access tab. What each role may do: People and roles.