ssh auto account creation - #1065
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 175a30918b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| except Exception as exc: | ||
| remove_container(user) | ||
| workspace_error = str(exc) | ||
| logger.warning("failed to start bootstrap workspace for user_id=%s: %s", user.id, workspace_error) |
There was a problem hiding this comment.
Return failure when bootstrap workspace startup fails
When start_challenge raises for a newly created SSH user, this handler only logs the exception and still returns "success": true, so sshpiper proceeds with login even though enter.py will reject the session because no container exists; on subsequent attempts the same key is treated as an existing user (created_user == false) so bootstrap is never retried. In practice, a transient Docker/startup error during first login can leave the account unable to use SSH until manual intervention.
Useful? React with 👍 / 👎.
| "upstream": { | ||
| "host": os.environ.get("SSH_PIPER_UPSTREAM_HOST", "127.0.0.1"), | ||
| "port": int(os.environ.get("SSH_PIPER_UPSTREAM_PORT", "2222")), | ||
| "user": "hacker", |
There was a problem hiding this comment.
Honor configured upstream SSH user in provisioning response
The response hard-codes upstream.user to "hacker", which overrides sshpiper’s fallback logic and ignores the new SSH_PIPER_UPSTREAM_USER configuration path added in this change. If a deployment sets a different upstream account, provisioning will still force hacker, causing authentication/routing failures despite the configuration being present.
Useful? React with 👍 / 👎.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
2962759 to
808a4a9
Compare
Adds an internal API endpoint and SSH Piper plugin that automatically provisions user accounts and workspaces when users connect via SSH with a public key not yet associated with any account. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
808a4a9 to
a965389
Compare
Must be carefully reviewed, but big if true. Combined with dojo cli, will free us from http