feat: configure and request LocalStats with remote-admin PKI

Open
#1,340 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Quiet
Tech stack
react, typescript
Domain
full-stack

Research direction

Start by locating the Security configuration controls, remote refresh flows, SDK request APIs, and their existing tests; the issue does not name specific files or test paths. Review how device configuration persistence and packet requests currently work, then add coverage for the listed channel, PKI, local-path, authorization, and retry cases. Done means the requested behavior and evidence are provided, including packet/log capture, screenshots, browser, and build.

Written by the indexing model from the issue text.

Description

Context

protobufs#1023 adds device-owned request policies for LocalStats and requested DeviceMetrics. Firmware enforcement is firmware#11247.

Owner settings

  • Add LocalStats Shared channel / Remote admins only to device Security configuration.
  • Add a separate DeviceMetrics Shared channel / Remote admins only control, but enable its remote-admin choice only while Device telemetry broadcast is disabled. Explain why it is unavailable while broadcasting.
  • Both controls write device configuration, not browser-local state, and verify persistence after reconnect. Do not show the remote-admin choice as effective until supported firmware reads it back.

Remote request flow

  • Never add NodeInfo/capability advertising or background probe traffic for these policies.
  • An attached client LocalStats refresh stays local and needs no transport choice.
  • Every user-initiated remote LocalStats or DeviceMetrics refresh opens a web dialog: Shared channel or Remote admin (PKI). Explain that PKI only succeeds for configured remote admins.
  • Add a purpose-built SDK request API. Shared channel uses the target channel; Remote admin uses TELEMETRY_APP, target public key, and explicit PKI fields. Never reuse the legacy admin sender. Disable PKI when the target public key is unavailable.
  • Never auto-retry or fall back between methods. The selected request is the only radio transmission.
  • Render Routing_Error.NOT_AUTHORIZED as an explicit result. A channel NAK can offer a user-initiated switch to PKI; a PKI NAK explains that this identity is not a configured remote admin. A timeout remains No response, not an authorization verdict.

Packet tests and evidence

Add SDK/UI tests for a non-zero target channel, PKI request fields, no legacy-admin fallback, attached/local path, NOT_AUTHORIZED request-ID correlation, and no automatic retry. Attach a real-device packet/log capture plus web screenshots for: owner LocalStats setting, owner DeviceMetrics setting with broadcast disabled, request-method dialog, selected Shared channel request, selected PKI request, LocalStats noise floor, authorized response, and NOT_AUTHORIZED state. Include browser and build.

Dominant language
TypeScript
Stars
861
Forks
316
Avg merge
2d 10h
Merged PRs (30d)
18

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from meshtastic/web

All issues in meshtastic/web

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.