Add userpref for the packet signature policy default#11144
Conversation
Lets a fleet/packager build bake config.security.packet_signature_policy into the factory defaults instead of leaving every node on COMPATIBLE until a client changes it. Applied in installDefaultConfig alongside the other config userprefs, and only on builds that actually enforce it, so we never report a policy that is compiled out.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds a user-preference template entry for packet signature policy and conditionally applies that preference during default configuration installation when signature policy support is enabled. ChangesPacket signature policy configuration
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
⚡ Try this PR in the Web FlasherNote Building this pull request… the flash button, badges and supported-board |
Adds
USERPREFS_CONFIG_SECURITY_PACKET_SIGNATURE_POLICY, a build-time default for the existingconfig.security.packet_signature_policy(COMPATIBLE/BALANCED/STRICT).Until now that policy could only be set after flashing, via a client — so a fleet or event build had no way to ship nodes already on
BALANCEDorSTRICT. This applies it ininstallDefaultConfig()next to the other config userprefs, following the same pattern asUSERPREFS_CONFIG_DEVICE_ROLE.Notes:
MESHTASTIC_EXCLUDE_PKI/MESHTASTIC_EXCLUDE_XEDDSAso a build that compiles the checks out stays onCOMPATIBLErather than reporting a policy nothing enforces — same stanceAdminModule::handleSetConfigalready takes for remote sets.meshtastic_*enum constant, whichbin/platformio-custom.pypasses through unquoted; anything that isn't a valid enum constant fails at compile time rather than silently shipping.Verified with a native build that actually bakes the pref in (
BALANCED):test_packet_signingandtest_defaultpass, 73/73.Summary by CodeRabbit