Page MenuHomeVyOS Platform

HTTPS API doesn't start without configured keys even when GraphQL authentication type is set to token
Closed, ResolvedPublicBUG

Description

Consider the following config:

vyos@vyos# show service 
 https {
     api {
         graphql {
             authentication {
                 type token
             }
         }
    }

Logically, it's a usable configuration: if the user only wants the new GraphQL API and only with PAM auth, it should give them that.

However, now it doesn't actually work: commit succeeds, but the API process doesn't start.

Dec 18 15:56:46 systemd[1]: Started vyos-http-api.service - VyOS HTTP API service.
Dec 18 15:56:46 vyos-http-api[4389]: Enter main loop...
Dec 18 15:56:46 vyos-http-api[4389]: Failed to load the HTTP API server config: 'keys'
Dec 18 15:56:46 systemd[1]: vyos-http-api.service: Main process exited, code=exited, status=1/FAILURE
Dec 18 15:56:46 systemd[1]: vyos-http-api.service: Failed with result 'exit-code'.
Dec 18 15:56:47 systemd[1]: vyos-http-api.service: Scheduled restart job, restart counter is at 4.
Dec 18 15:56:47 systemd[1]: Stopped vyos-http-api.service - VyOS HTTP API service.

We should allow that configuration and, likely, issue a warning that the classic API will be unavailable.

Details

Difficulty level
Easy (less than an hour)
Version
1.5-rolling-202312180024
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)