From b246cbc295a4fb32872a18acda803013b554ddd9 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Wed, 2 Jun 2021 17:20:39 +0300 Subject: [PATCH] Add docs service api token --- deployer/hub.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deployer/hub.py b/deployer/hub.py index c52e0dc3e..a342839f6 100644 --- a/deployer/hub.py +++ b/deployer/hub.py @@ -294,9 +294,11 @@ def apply_hub_template_fixes(self, generated_config, secret_key): } + docs_token = hmac.new(secret_key, f'docs-{self.spec["name"]}'.encode(), hashlib.sha256).hexdigest() if 'docs_service' in self.spec['config'].keys() and self.spec['config']['docs_service']['enabled']: generated_config['jupyterhub']['hub']['services']['docs'] = { - 'url': f'http://docs-service.{self.spec["name"]}' + 'url': f'http://docs-service.{self.spec["name"]}', + 'apiToken': docs_token }