Skip to content

gateway: Add PATCH /config support - #249

Open
doanac wants to merge 2 commits into
mainfrom
device-config-patch
Open

gateway: Add PATCH /config support#249
doanac wants to merge 2 commits into
mainfrom
device-config-patch

Conversation

@doanac

@doanac doanac commented Aug 27, 2026

Copy link
Copy Markdown
Member

Fixes issue #242

@doanac

doanac commented Aug 27, 2026

Copy link
Copy Markdown
Member Author

@mike-scott - this should fix your issue

Fixes issue #242

Signed-off-by: Andy Doan <doanac@qti.qualcomm.com>
@doanac
doanac force-pushed the device-config-patch branch from b7366bc to eb3618c Compare August 27, 2026 18:41
Signed-off-by: Andy Doan <doanac@qti.qualcomm.com>
@mike-scott

Copy link
Copy Markdown
Contributor

I'll test this in the morning. Looks great!

@mike-scott

Copy link
Copy Markdown
Contributor

I verified this works on real HW:

  • iq-9075-evk running qli-2.0 with Foundries components
  • registered to the latest main + this patchset
  • logged attempts for PATCH /config returned 201

@mike-scott mike-scott left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I didn't see any glaring security holes
  • code looks reasonable for handling wireguard and remote-actions (though I'm not that familiar with the code base)

@mike-scott

Copy link
Copy Markdown
Contributor

Claude seems to think we should take a look at the following:

  • Two findings look like blockers. The nil-map panic (handlers_config.go:68) is reachable from an operator PUT with "Files": null and then wedges every subsequent device PATCH. And ConfigCreate drops the public-key field the real fioconfig client sends on first boot — the review verified this against upstream fioconfig source — which silently breaks config encryption for devices whose config key differs from their TLS key.
  • A cluster of four findings shares one cause: the gateway path re-implements the config write at handler level and misses the UI path's purge, no-change dedup, and locking. Since fioconfig PATCHes on every check-in, the missing dedup plus never-purged history means device-controlled unbounded journal/blob growth. The last finding suggests how to fix it is: one storage-level PatchDeviceConfig primitive both APIs share, which addresses the race, purge, and dedup together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants