Repository navigation
feat: approval through ntfy - #147
Merged
Merged
Conversation
Refs #24 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #24 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #24 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #24 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The audit decision entry gets an optional channel field, ntfy:TOPIC. Refs #24 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A reader of the answer topic could turn a seen Deny into an Approve, because all buttons of a request had the same value. Each button now has its own random value, and an answer must carry the value of its own action. Refs #24 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #24 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The warning for a line that is too long (and other bad lines) now uses the same budget as refused answers. The reconnect wait resets only after a message or keepalive event, not after the open event that ntfy sends on every connection. Refs #24 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fitBody cut only the text at 4,096 bytes, but ntfy refuses a JSON publish body over 8,192 bytes, and json.Marshal made <, > and & six bytes each. The body is now encoded without HTML escaping, and the text is shortened until the whole body, with the buttons, fits. Refs #24 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #24 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The channel (Telegram or ntfy) is picked once at start and takes the place of Telegram in the start and stop order. A refused ntfy token ends with exit code 77, as a refused Telegram token does. Refs #24 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ntfy cannot tell who tapped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y or fragment in the URL Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #24
An ntfy approver, as a second approval channel next to Telegram.
Decisions on the open questions
[telegram]or[ntfy], not both. Leaner: one approver, one Run loop, no merge of two answer streams. Both at once can come later.auth-default-access: deny-all, withupstream-base-urlfor iOS. The Firebase question then does not need an answer for v1.Progress
internal/ntfy: the approver (Ask, End, Notify, Run) with a fake ntfy server[ntfy]config section; the core takes answers without a user ID with[ntfy](audit gets achannelfield)channel), 14, 15, 17 (7516e0b)Tests pass on Go 1.27.1 and 1.26.0 with CI=true (vet, -race); new tests stressed with -count=20 -cpu 1,2,4.
Next: merge on green CI. The manual phone test stays open on #24 (needs Geno).
Open review findings (internal/ntfy, all low)
openevent, so a server that closes at once gets ~1 connect per second. Fix: reset only after a message or keepalive. Fixed in 4a08396.clear: truehides the buttons. Fails closed; usability only.Inform); alerts and the security-release notice stay high.[ntfy]and[standing]does not load (fail closed). Standing grants on ntfy can come later. The example unit now loads thentfy-tokencredential.🤖 Generated with Claude Code