diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-12-20 22:01:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-20 22:01:52 +0200 |
commit | 7717ed5c70ba8a5dfc1ad2299e449e98b3ef99d2 (patch) | |
tree | 940a51bcf0086150ea855aacb3fbcaabdb954468 /src/services | |
parent | ac170ee4bb0af8189e56d5cf55da36815a7f5046 (diff) | |
parent | 495bf4732439ebd55edfbf6050af8b2064993d86 (diff) | |
download | vyos-1x-7717ed5c70ba8a5dfc1ad2299e449e98b3ef99d2.tar.gz vyos-1x-7717ed5c70ba8a5dfc1ad2299e449e98b3ef99d2.zip |
Merge pull request #2661 from dmbaturin/T5844
Allow the HTTPS API server to start without any configured keys when GraphQL JWT auth is configured
Diffstat (limited to 'src/services')
-rwxr-xr-x | src/services/vyos-http-api-server | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server index bfd50cc80..b64e58132 100755 --- a/src/services/vyos-http-api-server +++ b/src/services/vyos-http-api-server @@ -872,13 +872,15 @@ def initialization(session: ConfigSession, app: FastAPI = app): global server try: server_config = load_server_config() - keys = flatten_keys(server_config) except Exception as e: logger.critical(f'Failed to load the HTTP API server config: {e}') sys.exit(1) app.state.vyos_session = session - app.state.vyos_keys = keys + app.state.vyos_keys = [] + + if 'keys' in server_config: + app.state.vyos_keys = flatten_keys(server_config) app.state.vyos_debug = bool('debug' in server_config) app.state.vyos_strict = bool('strict' in server_config) |