Web Access¶
Web access lets users open a workspace in their browser.
Jupyter K8s supports two authentication flows:
OIDC flow¶
The user navigates to the workspace URL. The Auth middleware (if in use) detects no valid session cookie and initiates an OAuth2/OIDC login:
Browser is redirected to the identity provider login page.
User authenticates (e.g. via GitHub).
IdP redirects back with an authorization code.
IdP exchanges the code for an ID token, verifies it, and sends it to Auth middleware
Auth middleware checks the user’s authorization via Create:ConnectionAccessReview.
Auth middleware sets a signed JWT cookie, scoped to the workspace path.
Subsequent requests present the cookie — no redirect needed.
Refer to the AWS-OIDC guided chart for an example implementation.
Bearer token flow¶
For programmatic access or environments without an IdP:
User creates a Connection resource via
kubectlor the K8s API.The Extension API signs a bearer token and returns a URL with the token embedded.
User opens the URL in their browser.
Auth middleware validates the bearer token via Create:BearerTokenReview (calling back to the Extension API).
Auth middleware sets a signed JWT cookie — subsequent requests use the cookie.
Refer to the AWS-Hyperpod guided chart for an example implementation.
Creating a web connection¶
kubectl create -f - <<EOF
apiVersion: connection.workspace.jupyter.org/v1alpha1
kind: WorkspaceConnection
metadata:
namespace: team-alice
spec:
workspaceName: alice-notebook
workspaceConnectionType: web-ui
EOF
The response includes the connection URL in status.workspaceConnectionUrl.