Skip to content

Commit e6d4bfa

Browse files
committed
Add read of SSL environment variable for HubAuth
1 parent a5e55bb commit e6d4bfa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

batchspawner/singleuser.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import sys
23

34
from runpy import run_path
@@ -9,6 +10,9 @@
910
def main(argv=None):
1011
port = random_port()
1112
hub_auth = HubAuth()
13+
hub_auth.client_ca = os.environ.get('JUPYTERHUB_SSL_CLIENT_CA', '')
14+
hub_auth.certfile = os.environ.get('JUPYTERHUB_SSL_CERTFILE', '')
15+
hub_auth.keyfile = os.environ.get('JUPYTERHUB_SSL_KEYFILE', '')
1216
hub_auth._api_request(method='POST',
1317
url=url_path_join(hub_auth.api_url, 'batchspawner'),
1418
json={'port' : port})

0 commit comments

Comments
 (0)