Skip to content

Secure Handshake and Pairing #4

@Batacek

Description

@Batacek

Description

The process of pairing a new Daemon with the Panel must be secure.

Goals

  1. Panel (C#) Implementation:
    • Generate a short alphanumeric registration_code for a new Node.
    • Store the hashed code in the database.
    • Expose API endpoints to generate and display the code in the admin UI.
  2. Daemon (Rust) Implementation:
    • Develop the RegisterPanel RPC method.
    • Exchange the registration_code for a long-term daemon_token (JWT or UUID).
    • Persist the token in the Daemon's SQLite database.
  3. Security Measures:
    • Implement an AuthInterceptor (gRPC middleware) in Rust that requires a valid daemon_token for all other RPC methods.
  4. Verification: Upon successful pairing, update the node's status in the Panel to Paired / Active.

Rationale

The handshake ensures that only authorized Panels can communicate with the Daemon. Without this, the Daemon remains open to unauthorized commands.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions