Repository navigation
feat: add support for ssh pubkeys storing / validating / retrieving - #1441
Merged
Merged
Conversation
Coverage Report for CI Build 38417907356Coverage at 85.264% (no base build to compare)Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
SalimKayal
added this pull request to stack #1445
September 14, 2026 12:33
SalimKayal
force-pushed
the
salimkayal/feat/ssh-keys
branch
from
September 17, 2026 14:44
020d506 to
f6a35d1
Compare
This was referenced Sep 18, 2026
SalimKayal
force-pushed
the
salimkayal/feat/ssh-keys
branch
from
September 24, 2026 09:02
f6a35d1 to
5aa5e56
Compare
This was referenced Sep 24, 2026
eikek
force-pushed
the
salimkayal/feat/ssh-keys
branch
from
September 25, 2026 08:37
5aa5e56 to
2a06105
Compare
SalimKayal
force-pushed
the
salimkayal/feat/ssh-keys
branch
from
September 29, 2026 13:20
2a06105 to
c4737aa
Compare
SalimKayal
removed this pull request from stack #1445
September 29, 2026 14:59
SalimKayal
added this pull request to stack #1465
September 29, 2026 15:05
SalimKayal
force-pushed
the
salimkayal/feat/ssh-keys
branch
from
September 29, 2026 16:49
c4737aa to
b6c64b4
Compare
Member
|
Question:
Why? A public keys is a public key is public. Restrictions on admin accessing public keys may make admin work more difficult, e.g. checking suspicious activity linked to a SSH key. |
olevski
marked this pull request as ready for review
September 30, 2026 13:49
olevski
removed this pull request from stack #1465
September 30, 2026 13:50
olevski
marked this pull request as draft
September 30, 2026 13:50
olevski
force-pushed
the
salimkayal/feat/ssh-keys
branch
from
September 30, 2026 13:57
92eca04 to
e04664f
Compare
Collaborator
Author
Not really for security reasons but mainly because
If it's useful to add this, I can do it. |
* feat(users): add ssh_keys table and models * feat(users): validate ssh public keys * feat(users): add SSHKeyRepository --------- Co-authored-by: Tasko Olevski <16360283+olevski@users.noreply.github.com>
* feat: export datasets to SciCat (#1432) * 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 * feat(authn): support service-scoped internal tokens for the ssh proxy * feat(ssh_proxy): add internal identity and session authorization endpoints * fix(ssh_proxy): use canonical ErrorResponse to satisfy apispec merge * refactor: consistency * revert: remove authn for service account for now * refactor: simplify api spec * fix(users): comment precision * refactor(ssh-proxy): serve authorize from the internal secret service * squashme: minor fixes --------- Co-authored-by: boucherjeanphi <49230173+boucherjeanphi@users.noreply.github.com> Co-authored-by: Tasko Olevski <16360283+olevski@users.noreply.github.com>
* Add frontend variant as session label * Don't comment on the pr due to token issue * Return frontend_variant with session details * reactivate pr comment * Add ssh to the frontend options * Extend builder-frontend combination * Add test for ssh build * Change frontend_variant label on patch
…1458) * Don't comment on the pr due to token issue * reactivate pr comment * feat(notebooks): mount proxy-to-session keys only for ssh frontends * feat: skip the auth proxy and ingress for ssh sessions * squashme: modify auth/ingress on patching --------- Co-authored-by: Eike Kettner <eike.kettner@sdsc.ethz.ch> Co-authored-by: Tasko Olevski <16360283+olevski@users.noreply.github.com>
olevski
force-pushed
the
salimkayal/feat/ssh-keys
branch
from
October 2, 2026 07:51
e40dd91 to
fa1a071
Compare
Contributor
|
You can access the deployment of this PR at https://renku-ci-ds-1441.dev.renku.ch |
SalimKayal
marked this pull request as ready for review
October 2, 2026 15:19
olevski
approved these changes
Oct 13, 2026
Contributor
|
Tearing down the temporary RenkuLab deployment for this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds SSH public keys to data-services: a per-user key store and API, plus the internal endpoints the SSH gateway uses to turn a presented key into a Renku user and check that the user may open a session. This is the integration PR for the SSH keys stack, landing the union of the three stacked PRs (store foundation, user API, proxy endpoints).
Motivation and context
Renku sessions are reachable over SSH through a new gateway. At the first hop the gateway has no user identity yet: it derives one from the public key the user offers. That needs two things data-services did not have: somewhere to register user public keys, and a machine callable endpoint that resolves a key to a user and authorizes the session. Internal services today either run in-process or call data-services with user scoped tokens, and neither fits a caller that has no user context yet.
The deployment already anticipates this: the umbrella Helm chart mounts the Renku internal authn key into the ssh-proxy pod, the same key data-services verifies for internal JWTs. So the proxy authenticates with the existing internal token mechanism, restricted by a new service scope, instead of introducing another credential.
Behavior
/user/ssh_keys. Each key is canonicalized (comment stripped) and fingerprinted exactly asssh-keygen -lreports.POST /internal/ssh_keys/identity, which returns the owning user id (200) or 404. Malformed and unknown keys are both a plain 404, so the proxy has one failure branch.GET /internal/sessions/{session_id}/authorize, which returns 204 for the session owner and 404 otherwise. Not-owner and not-found are indistinguishable, so session existence is never disclosed.ssh_proxyscoped Renku internal token. User tokens and ordinary session internal tokens are rejected with 401.Changes
users.ssh_keystable and Alembic migration;SSHKeyandUnsavedSSHKeymodels; OpenSSH compatible fingerprint plus key validation;SSHKeyRepository;/user/ssh_keysCRUD blueprint and spec.RenkuSelfAuthenticatorgains an optionalrequired_scope. The existing internal JWT is reused, with no new credential or secret.ssh_proxycomponent with its own spec and blueprint for the two internal endpoints, plus theSSH_PROXY_SCOPEconstant.DependencyManagerandapp.pyregister the new repository, authenticator, and blueprints; the merged OpenAPI spec includes the new component./user/ssh_keysend to end, service scope accept and reject, and internal endpoint tests (identity 200/404, authorize 401/404/422, owner versus other user)./deploy