Skip to content

Single User Mode #946

@mlucool

Description

@mlucool

Hi,

I'd like to run an enterprise gateway as the only user. There are a few reasons why one would want this including including no need for user impersonation and no noisy neighbors. The gateway is still very useful and lets me launch in other containers outside of the one my JupyterLab is running. This then becomes a direct replacement for remote_ikernel.

To make this work, two features would be very helpful:

2 can be done with below, but I'm not sure how we'd want to allow users to opt into this.

--- a/enterprise_gateway/services/processproxies/processproxy.py
+++ b/enterprise_gateway/services/processproxies/processproxy.py
@@ -340,12 +341,13 @@ class BaseProcessProxyABC(with_metaclass(abc.ABCMeta, object)):
         try:
             ssh = paramiko.SSHClient()
             ssh.load_system_host_keys()
-            ssh.set_missing_host_key_policy(paramiko.RejectPolicy())
+            ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
             host_ip = gethostbyname(host)
             if remote_pwd:
                 ssh.connect(host_ip, port=ssh_port, username=remote_user, password=remote_pwd)
             else:
-                ssh.connect(host_ip, port=ssh_port, username=remote_user)
+                ssh.connect(host_ip, port=ssh_port, gss_auth=True)
         except Exception as e:
             http_status_code = 500
             current_host = gethostbyname(gethostname())

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfuturePostpone for future consideration. May be closed and re-opened later.runtimesecurity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions