mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 06:41:13 +02:00
feat(compute): option to disable compute authentication
This commit is contained in:
3 files changed
+29
-3
No files matched your search
@@ -240,7 +240,10 @@ class Server:
|
||||
|
||||
self._set_config_defaults_from_command_line(args)
|
||||
config = Config.instance().settings
|
||||
if not config.Server.compute_password.get_secret_value():
|
||||
|
||||
if not config.Server.enable_http_auth:
|
||||
log.info("Compute authentication is disabled")
|
||||
elif not config.Server.compute_password.get_secret_value():
|
||||
alphabet = string.ascii_letters + string.digits + string.punctuation
|
||||
generated_password = ''.join(secrets.choice(alphabet) for _ in range(16))
|
||||
config.Server.compute_password = SecretStr(generated_password)
|
||||
|
||||
Reference in new issue
Block a user