critical
The node has three HTTP interfaces — the configuration files API (§ 8.2), the configuration API (§ 8.3) and the command API (§ 8.4) — and all three answer on one port together with the web monitor. They share an admission rule, and it consists of two halves.
The first half is the access level by address. It comes from http-access: monitor reads the state, operator additionally reads the configuration and runs commands, admin also edits the configuration.
The second half is the key http-api-key in the X-API-Key header. The manual states its power three times and identically: a valid key overrides the address restriction, and the request is accepted from any address.
Hence a simple rule. For reading you do not need to give out a key — the operator level from an allowed address is enough. For changes a key is always required: writing a configuration file, editing lists and sending addresses, submitting a command.
A request that passes neither half gets a 403. And the response is talkative: the body of the refusal names the configuration file path, the monitor log path and a ready-made http-access <address> admin line — verified on a fleet node.
🔴 Our weak spot is not the scheme but the channel: the key goes to the node over plain http://, because the template has http-redirect-to-https set to false. The stronger half — and it is exactly that half that travels in the clear.
The mechanism has no values of its own: two directives set them.
| What is needed | How it is achieved | Default |
|---|---|---|
| reading the state | http-access at the monitor level | none, that is, closed |
| reading the configuration, commands | the operator level | closed |
| editing the configuration | http-api-key in the header | no keys |
Different applications get different keys: revoking one does not break the others.
# reading — by address, changes — by key http-mgmt-port 1000 http-access 127.0.0.1 admin http-access 10.0.0.5 monitor http-api-key abcd_0123_abcd_0123_abcd_0123_ab
what people get wrong and how it ends3 mistakes▶
§ 8.2
§ 8.3
our experience
3 relations
curl -s -o /dev/null -w '%{http_code}\n' http://NODE:1000/status
3 articles
◇What protects the web monitor and what that protection is notThree different protections — an address list, encryption and advice not to expose the monitor to the internet; there is not a single account.◇The activation key is a prerequisite for installation, not a step after itWithout an activation key from SparkPost support the engine neither installs nor runs, and the license tier sets the outbound connection ceiling: on Standard everything above 200 is ignored.◇Cloud restrictionsClouds restrict outbound mail on port 25 until you ask them to lift the limit, and mailbox providers treat their address ranges with suspicion.