Repository navigation
feat(security): remote trigger signature v2 (canonical form + replay protection) - #89
Merged
Merged
Conversation
… form + replay protection) - v2=<hex> over a length-prefixed canonical string, with x-native-wm-timestamp (+-300s) and a persisted, bounded x-native-wm-nonce store - identical logic + test vector in Kotlin, Swift and doc/examples/remote_trigger_sign_v2.py - v1 still accepted (deprecated, logged); unsigned native_wm commands still accepted but warned
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.
Closes the two items from the v1.4.0 security backlog.
v2 signature:
x-native-wm-signature: v2=<hex>, HMAC over a length-prefixed canonical string (so values with | or = can't collide), plus x-native-wm-timestamp (+-300s) and x-native-wm-nonce (persisted, bounded store) for replay protection. Signature is checked before the nonce is stored, so forged messages can't fill it.Compat
Parity: same vector (dca042f1...) in Kotlin test, Swift test and doc/examples/remote_trigger_sign_v2.py; a Dart test checks the three still reference it. Swift tests ran in a temp macOS package (8 pass), Kotlin 10 pass, iOS example builds.
Not tested end-to-end on a device (needs a real FCM/APNs push). Backends must change to use v2; spec in doc/REMOTE_TRIGGER_SIGNING.md. Meant for its own minor release.