Skip to content

feat(gateway): test a key against the gateway's current one in Settings › Gateway access - #449

Merged
gx1400 merged 2 commits into
mainfrom
feat/test-api-key
Oct 28, 2026
Merged

gx1400 merged 2 commits into
mainfrom
feat/test-api-key

Conversation

@gx1400

@gx1400 gx1400 commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Closes #447.

The gateway keeps only a hash of its API key, so it can't show the key. This adds a way to check a key you have, from a desktop app's settings or a password manager.

  • Test, always there beside Apply in the admin web app's Settings › Gateway access, checks the key in the field against the saved one and saves nothing. It answers:
    • "That's the gateway's current key."
    • "That isn't the gateway's current key. Apps using it can only watch." (in the warning colour)
    • "No key is saved, so apps can only watch."
  • IEngineService.CheckApiKeyAsync(key) answers ApiKeyCheck: Accepted, Refused or None.
    • It's for a signed-in operator only, whatever AllowSettingsChanges says.
    • The desktop's own engine answers gateway.api-key-not-here.
    • Spaces from pasting are trimmed.

Verified

  • Release build and all tests pass; csharpier is clean.
  • Gateway test (the real hub): None with no key; Accepted for the key, also with pasted spaces; Refused for another key. Testing saves nothing, and a viewer is refused.
  • UI test: the messages and colours, Test disabled with an empty field, and nothing saved.

…gs › Gateway access

A Test button beside Apply checks the key in the field against the saved one, saving nothing. It answers that's the
current key, that isn't, or that no key is saved. It's operator only (CheckApiKeyAsync); the desktop's own engine has
no key.

Closes #447
@gx1400
gx1400 merged commit 972d792 into main Oct 28, 2026
11 checks passed
@gx1400
gx1400 deleted the feat/test-api-key branch October 28, 2026 02:30
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.

Gateway access: test a key against the gateway's current one

1 participant