Skip to content

feat(notebooks): configure proxy-to-session key secret names - #1452

Merged
olevski merged 10 commits into
salimkayal/feat/ssh-keysfrom
salimkayal/feat/ssh-proxy-session-mounts
Oct 1, 2026
Merged

olevski merged 10 commits into
salimkayal/feat/ssh-keysfrom
salimkayal/feat/ssh-proxy-session-mounts

Conversation

@SalimKayal

@SalimKayal SalimKayal commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Mounts the two proxy-to-session key Secrets into every session pod via Amalthea extraVolumes/extraVolumeMounts, delivering the hop-2 keys the SSH buildpack and the proxy need. Stacked on the service-account authn branch (salimkayal/feat/ssh-proxy-service-account-authn).

Motivation and context

Hop 2 is now authenticated with static keypairs (see the renku proxy-to-session PR). Each session needs two files at fixed paths under its storage mount: the session host private key (dropbear -r) and the proxy auth public key (installed as authorized_keys by the buildpack). The Secrets are created once by the Helm keygen Job; data-services only mounts them. No per-session keys, no DB, and no hibernation/resume concern.

Behavior

  • Every session gets ${RENKU_MOUNT_DIR}/.ssh/dropbear_ed25519_host_key (Secret {fullname}-ssh-session-host-key, key hostKey) and ${RENKU_MOUNT_DIR}/.ssh/proxy_auth_key.pub (Secret {fullname}-ssh-proxy-session-auth-key, key authKeyPub), both read-only subPath file mounts.
  • No mounts when the chart does not provide the secret names, so existing deployments are unaffected.

Changes

  • components/renku_data_services/notebooks/config/dynamic.py: proxy_host_key_secret / proxy_auth_key_secret on _SessionSshConfig (env NB_SESSIONS__SSH__PROXY_{HOST,AUTH}_KEY_SECRET).
  • components/renku_data_services/notebooks/core_sessions.py: ssh_proxy_session_extras() builds the two ExtraVolume/ExtraVolumeMount pairs and is concatenated into session_extras in both start_session and patch_session. The Secrets are referenced via ExtraVolume.secret and deliberately not added to session_extras.secrets, because data-services must not create them.
  • test/components/renku_data_services/notebooks/test_ssh_proxy_session_extras.py (new): asserts volume names, secret names, items, mount paths/subPaths/readOnly, and the empty case.

Notes

  • Depends on the feat: ssh proxy session authn renku#4627 passing NB_SESSIONS__SSH__PROXY_{HOST,AUTH}_KEY_SECRET (session-env-secret.yaml).
  • Mounted into all sessions; OCI-label capability gating is deferred.
  • Two volumes cannot share a directory mountPath, hence the subPath file mounts inside .ssh.

PR Stack

@SalimKayal
SalimKayal added this pull request to stack #1445 September 21, 2026 08:39
@coveralls

coveralls commented Sep 21, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 36876237189

Warning

No base build found for commit 63b726b on salimkayal/feat/ssh-keys.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 85.284%

Details

  • Patch coverage: 4 uncovered changes across 2 files (23 of 27 lines covered, 85.19%).

Uncovered Changes

File Changed Covered %
components/renku_data_services/notebooks/config/dynamic.py 15 13 86.67%
components/renku_data_services/notebooks/core_sessions.py 12 10 83.33%

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 34732
Covered Lines: 29621
Line Coverage: 85.28%
Coverage Strength: 1.48 hits per line

💛 - Coveralls

eikek
eikek previously approved these changes Sep 25, 2026
@SalimKayal
SalimKayal force-pushed the salimkayal/feat/ssh-proxy-session-mounts branch from 83a697e to 0826723 Compare September 29, 2026 13:20
@SalimKayal
SalimKayal removed this pull request from stack #1445 September 29, 2026 14:59
@SalimKayal
SalimKayal changed the base branch from salimkayal/feat/ssh-proxy-service-account-authn to salimkayal/feat/ssh-keys_proxy-api September 29, 2026 15:00
@SalimKayal
SalimKayal added this pull request to stack #1465 September 29, 2026 15:05
@SalimKayal
SalimKayal force-pushed the salimkayal/feat/ssh-proxy-session-mounts branch from 0826723 to 6293222 Compare September 29, 2026 16:49
@SalimKayal
SalimKayal force-pushed the salimkayal/feat/ssh-keys_proxy-api branch from dfdbe18 to a9f2a2c Compare September 29, 2026 17:46
@SalimKayal
SalimKayal force-pushed the salimkayal/feat/ssh-proxy-session-mounts branch from 6293222 to 3c23bec Compare September 29, 2026 17:46
@olevski
olevski removed this pull request from stack #1465 September 30, 2026 13:50
@olevski
olevski force-pushed the salimkayal/feat/ssh-keys_proxy-api branch from a9f2a2c to c8f21e6 Compare September 30, 2026 14:16
Base automatically changed from salimkayal/feat/ssh-keys_proxy-api to salimkayal/feat/ssh-keys October 1, 2026 12:50
boucherjeanphi and others added 7 commits October 1, 2026 14:54
* feat: add scicat in api spec

* wip: update route post_deposit

* wip: add ScicatAPIClient with create/get deposit

* wip: add scicat in ProviderKind & update post_deposit for scicat

* wip: add scicat in DepositConfig

* fix: fix bug in _request_saved_secret_creation

* wip: update deposit routes & upload job for scicat

* wip: add init-certificates container

* wip: update ScicatConfig & metadata for configmap

* chore: add __get_scicat_token method

* chore: add alembic migration for scicat

* fix: update generate_code_verifier

* wip: update scicat-cli args & add default_deposit_data

* wip: remove unset oidc_issuer_url and remove test_scicat file

* chore: remove useless ca_certs init container

* wip: small updates

* wip: update scicat upload job config & oidc_issuer_url checks

* wip: simplify ScicatAPIClient

* wip: move fetching deposit data outside of create_deposit_upload

* chore: update scicat urls to production

* chore: add test file for scicat

* fix: fix error with owner reference in _request_saved_secret_creation

* fix: handle errors in get_dc_deposit_logs

* chore: add test_env var in ScicatConfig

* chore: update ScicatAPIClient
@olevski
olevski force-pushed the salimkayal/feat/ssh-proxy-session-mounts branch from 3c23bec to 4f6be2a Compare October 1, 2026 13:05
@olevski
olevski force-pushed the salimkayal/feat/ssh-proxy-session-mounts branch from 349e5de to 1c4f28f Compare October 1, 2026 14:22
@olevski
olevski marked this pull request as ready for review October 1, 2026 14:26
@olevski
olevski requested review from a team and sgaist as code owners October 1, 2026 14:26
@olevski
olevski merged commit 60fa4a8 into salimkayal/feat/ssh-keys Oct 1, 2026
17 checks passed
@olevski
olevski deleted the salimkayal/feat/ssh-proxy-session-mounts branch October 1, 2026 15:01
olevski added a commit that referenced this pull request Oct 13, 2026
* feat(users): store ssh keys (#1442)

* feat(users): add /user/ssh_keys CRUD API (#1444)

* feat: proxy api for ssh keys (#1446)

* feat(notebooks): configure proxy-to-session key secret names (#1452)

* feat: Add frontend variant as session label (#1455)

* feat(notebooks): mount proxy-to-session keys only for ssh frontends (#1458)

* feat: return ssh url for sessions with ssh frontend (#1467)

Co-authored-by: Tasko Olevski <16360283+olevski@users.noreply.github.com>
Co-authored-by: boucherjeanphi <49230173+boucherjeanphi@users.noreply.github.com>
Co-authored-by: eikek <701128+eikek@users.noreply.github.com>
Co-authored-by: Eike Kettner <eike.kettner@sdsc.ethz.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants