mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-06-24 05:35:10 +00:00
Move user credentials into HTTP request headers to prevent them being logged in the server logs
This commit is contained in:
@@ -17,9 +17,11 @@ info:
|
||||
|
||||
### 2.0
|
||||
|
||||
* POST `/spot` now supports upstream submission to external providers such as POTA and SOTA. The "add spot" API has a **breaking change** to enable this: instead of just posting the spot object itself as the JSON content of the POST, this has moved into a `spot` object within the structure. A new `handling` object alongside it contains the `submit_upstream`, `upstream_provider`, `upstream_credentials`, and `captcha_token` fields which control the server handling of the spot.
|
||||
* POST `/spot` now supports upstream submission to the spotting services associated with various SIGs.
|
||||
* **Breaking change:** The "add spot" API has changed to enable this: instead of just posting the spot object itself as the JSON content of the POST, this has moved into a `spot` object within the structure. A new `handling` object alongside it contains the `submit_upstream`, `upstream_provider`, `upstream_credentials`, and `captcha_token` fields which control the server handling of the spot.
|
||||
* POST `/spot` now supports Google reCaptcha and (if the site owner has set it up) now requires `captcha_token` in order to successfully submit. (This is used to lock down the submit function and prevent submission via Spothole by bots or third-party clients.)
|
||||
* GET `/options` now returns `spot_submit_providers`, a map of SIG names to the names of providers that support upstream spot submission for that SIG. (This allows clients to present the user with options of where a new spot can be sent to.)
|
||||
* **Breaking change:** A user's QRZ.com and HamQTH credentials are now supplied as request headers (`X-QRZ-Username`, `X-QRZ-Password`, `X-QRZ-Session-Key`, `X-HamQTH-Username`, `X-HamQTH-Password`, `X-HamQTH-Session-ID`) rather than query parameters, to keep credentials out of server logs.
|
||||
|
||||
### 1.3
|
||||
|
||||
@@ -398,39 +400,39 @@ paths:
|
||||
components:
|
||||
parameters:
|
||||
QrzUsername:
|
||||
name: qrz_username
|
||||
in: query
|
||||
description: "QRZ.com username for online callsign lookup, which will enrich the returned spots and alerts with extra data. Requires a QRZ.com XML Subscriber (paid) account. Supply together with `qrz_password`, or supply `qrz_session_key` instead."
|
||||
name: X-QRZ-Username
|
||||
in: header
|
||||
description: "QRZ.com username for online callsign lookup, which will enrich the returned spots and alerts with extra data. Requires a QRZ.com XML Subscriber (paid) account. Supply together with `X-QRZ-Password`, or supply `X-QRZ-Session-Key` instead."
|
||||
schema:
|
||||
type: string
|
||||
QrzPassword:
|
||||
name: qrz_password
|
||||
in: query
|
||||
description: "QRZ.com password. Supply together with `qrz_username`."
|
||||
name: X-QRZ-Password
|
||||
in: header
|
||||
description: "QRZ.com password. Supply together with `X-QRZ-Username`."
|
||||
schema:
|
||||
type: string
|
||||
QrzSessionKey:
|
||||
name: qrz_session_key
|
||||
in: query
|
||||
description: "A pre-obtained QRZ.com XML session key, as an alternative to supplying `qrz_username` and `qrz_password`. See https://www.qrz.com/docs/xml/current_spec.html for details on how to obtain one for the user."
|
||||
name: X-QRZ-Session-Key
|
||||
in: header
|
||||
description: "A pre-obtained QRZ.com XML session key, as an alternative to supplying `X-QRZ-Username` and `X-QRZ-Password`. See https://www.qrz.com/docs/xml/current_spec.html for details on how to obtain one for the user."
|
||||
schema:
|
||||
type: string
|
||||
HamqthUsername:
|
||||
name: hamqth_username
|
||||
in: query
|
||||
description: "HamQTH username for online callsign lookup, which will enrich the returned spots and alerts with extra data. Supply together with `hamqth_password`, or supply `hamqth_session_id` instead."
|
||||
name: X-HamQTH-Username
|
||||
in: header
|
||||
description: "HamQTH username for online callsign lookup, which will enrich the returned spots and alerts with extra data. Supply together with `X-HamQTH-Password`, or supply `X-HamQTH-Session-ID` instead."
|
||||
schema:
|
||||
type: string
|
||||
HamqthPassword:
|
||||
name: hamqth_password
|
||||
in: query
|
||||
description: "HamQTH password. Supply together with `hamqth_username`."
|
||||
name: X-HamQTH-Password
|
||||
in: header
|
||||
description: "HamQTH password. Supply together with `X-HamQTH-Username`."
|
||||
schema:
|
||||
type: string
|
||||
HamqthSessionId:
|
||||
name: hamqth_session_id
|
||||
in: query
|
||||
description: "A pre-obtained HamQTH session ID, as an alternative to supplying `hamqth_username` and `hamqth_password`. See https://www.hamqth.com/developers.php for details on how to retrieve one for a user."
|
||||
name: X-HamQTH-Session-ID
|
||||
in: header
|
||||
description: "A pre-obtained HamQTH session ID, as an alternative to supplying `X-HamQTH-Username` and `X-HamQTH-Password`. See https://www.hamqth.com/developers.php for details on how to retrieve one for a user."
|
||||
schema:
|
||||
type: string
|
||||
SpotSource:
|
||||
|
||||
Reference in New Issue
Block a user