recursor: Does empty webservice.api_key disable the API? #16541
|
I want to enable the portal, but not the API. Does setting Seeing the source code, it seems it does that, but the docs are not clear about this. |
Replies: 2 comments 2 replies
|
Ah, it seems like - unlike in dnsdist - the API is impossible to turn off, and the graphic webserver is using the REST API. edit: when I am looking at the source code, it actually looks like a bug. I will make a PR |
|
For anyone landing here later: this was fixed by #16543, which shipped in Recursor 5.4.0. The 5.3.0 to 5.4.0 upgrade notes say:
So from 5.4.0, leaving One thing to watch: if you set neither webservice:
webserver: true
address: 127.0.0.1
password: <hashed with rec_control hash-password>
allow_from: [127.0.0.1, ::1]On 5.3 and earlier the web server doesn't work without an API key, so there you'd need to upgrade. |
For anyone landing here later: this was fixed by #16543, which shipped in Recursor 5.4.0. The 5.3.0 to 5.4.0 upgrade notes say:
So from 5.4.0, leaving
webservice.api_keyunset does what you wanted. Looking atweb.rs, the only API endpoints that accept the web server password areGET /jsonstat,GET /api/v1/servers/localhostandGET /api/v1/servers/localhost/statistics, which the front page uses. Everything else (cache flush, config, zones and so on) returns 401 "API Key missing in conf…