Skip to content

Generic HTTP/API-key notification target (extends existing Network Notifications) #1134

Description

@seeb73

Feature Description

QLog already has a generic real-time notification mechanism (Settings -> Network -> Notifications) that pushes JSON over UDP to whatever address the operator configures - it isn't tied to any single service, anyone can stand up a listener that speaks the format.

I'd like to propose the same idea over HTTP, for services that want the API key delivered as a login credential (POST body) rather than as a plain query parameter in a GET request - so the key never ends up sitting in a URL or an access log.

Concrete motivation: radiodyplom.pl, a Polish award/diploma tracking service for ham radio operators, runs a live-log feed that already receives hundreds of QSOs a day. For scale comparison, my own station currently pushes thousands of QSOs/day through the existing UDP Notifications to my own tooling - this class of feature clearly gets real, heavy use once it exists.

Proposed contract (two separate requests per logged QSO, deliberately):

  1. POST {url} body apikey= - the secret never appears in a URL/access log.
  2. GET {url}? - the QSO itself, as flat ADIF-named query parameters (same flattening AdiFormat::readContact() already produces on import). No API key here - if the server sets a session cookie on the POST response, QNetworkAccessManager's default cookie jar carries it into the GET automatically (the same login-then-act flow a browser would do).
    Both requests go through Qt's normal QNetworkAccessManager, so https:// is supported out of the box for both the login and the QSO upload - the endpoint URL is exactly what the operator configures, http:// or https:// alike, no separate switch needed. https:// is what actually makes the "key never in a URL/log" property meaningful end-to-end, so it's the expected real-world setup, not an afterthought.

The server decides how (or whether) to correlate the two requests; QLog wouldn't send any shared token/session id of its own beyond the above.

I already have a working implementation (core/QSOApiKeyQuery, core/QSOApiKeySender, wired into Settings -> Network the same way the existing Notifications are, with unit tests covering the query-flattening and the POST-then-GET flow against a fake HTTP server), on a branch cut from current master: diff (branch). Compiles and passes its tests on Linux, and I've also verified a full win64 and a universal macOS build against it. Happy to open a proper PR if this direction sounds reasonable, or to adjust the wire contract first if you'd rather it look different.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions