How to authorize usage of the Gateway?


We are provisioning JupyterLab instances for our clients (by custom spinning on Kubernetes pods, we don’t use JupyterHub so far) and we would like to optionally allow connecting to the kernels from VSCode or PyCharm on clients’ computers. But we need to be able to authorize the users and deny unauthorized access.

I see that Enterprise Gateway does not support user authorization out of the box, the only way is probably using EG_AUTH_TOKEN env var but that would mean using the same token for all users, right? We would need to customize the auth process to distinguish the users and gather some information about usage.

Is there any recommended approach or tips on how to proceed? (I assume that JupyterHub is not the right tool as we don’t want to provision the notebooks themselves, just the kernels.)

Thanks a lot.