feat: add packet authenticity policy schema#983
Conversation
📝 WalkthroughWalkthroughAdds configurable remote packet signature policies, an XEdDSA verification capability flag, and formatting-only updates to interdevice protobuf declarations. ChangesPacket Authentication Schema
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 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 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
4a6ff65 to
19ab2d2
Compare
|
@coderabbitai review |
19ab2d2 to
ff286c3
Compare
ff286c3 to
223e20e
Compare
|
Follow-up: after rebasing on current |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
meshtastic/config.proto (1)
1296-1318: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider adding a reference to design issue 121.
The PR objectives mention that the schema references design issue 121, which documents the dependent firmware and client work. Adding this reference directly to the protobuf comments can help future developers understand the context of these policies.
💡 Proposed comment update
/* * Controls how the device authenticates remotely received mesh packets. + * Reference: Design issue 121 */ enum PacketSignaturePolicy {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@meshtastic/config.proto` around lines 1296 - 1318, Add a reference to design issue 121 in the protobuf documentation comments for PacketSignaturePolicy, preferably in the enum-level comment so it applies to all policy values. Preserve the existing policy descriptions and formatting.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@meshtastic/config.proto`:
- Around line 1296-1318: Add a reference to design issue 121 in the protobuf
documentation comments for PacketSignaturePolicy, preferably in the enum-level
comment so it applies to all policy values. Preserve the existing policy
descriptions and formatting.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 4b438c2a-ece3-4ae7-b800-35eef742b900
📒 Files selected for processing (3)
meshtastic/config.protomeshtastic/interdevice.protomeshtastic/mesh.proto
🚧 Files skipped from review as they are similar to previous changes (1)
- meshtastic/mesh.proto
What does this PR do?
Adds the shared protocol contract for a device-enforced packet authenticity policy:
Config.SecurityConfig.PacketSignaturePolicywith Compatible, Balanced, and Strict levels.packet_signature_policy = 9, with Balanced as the protobuf zero/default to preserve current behavior.DeviceMetadata.has_xeddsa = 14, allowing clients to expose the setting only when firmware can enforce it. Tag 13 is already claimed by Add Find Node buzzer admin protobufs #956.Strict represents authenticated-only receive behavior: firmware may accept a verified XEdDSA packet or a successfully authenticated PKI packet. The implementation and client behavior are coordinated in design#121.
Closes #982.
Validation
This is a draft while the dependent firmware and client implementations are reviewed. No hardware behavior changes are introduced by this schema-only PR.
Checklist before merging
Summary by CodeRabbit