Export and import feeder identity from the Identity tile#29
Merged
Conversation
…/restore Privileged wrappers under files/usr/local/lib/airplanes-webconfig invoke apl-feed backup - and apl-feed restore /dev/stdin --force. Dashboard gains Export (downloads the canonical backup JSON) and Import (paste JSON or type the UUID + claim secret pair).
021cf50 to
1893809
Compare
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.
The Identity tile on the dashboard gains two actions: Export, which downloads the feeder's UUID + claim secret + claim version as a canonical apl-feed backup JSON file, and Import, which accepts the same envelope (paste it whole, or fill in the UUID + claim secret pair) and restores it onto this feeder.
Both flow through fixed-argv sudoers wrappers under
/usr/local/lib/airplanes-webconfig/. Export invokesapl-feed backup -(stdout mode) so the JSON arrives without an intermediate file; import pipes the validated envelope throughapl-feed restore /dev/stdin --force, which writes UUID first then secret with rollback semantics and restarts the feed and mlat daemons when the UUID actually changes.The stdout mode for
apl-feed backupis added in airplanes-live/feed#99; this PR's runtime path only works once that lands and is deployed.