Skip to content

ssh auto account creation - #1065

Open
zardus wants to merge 2 commits into
masterfrom
feature/ssh-auto-account-creation
Open

ssh auto account creation#1065
zardus wants to merge 2 commits into
masterfrom
feature/ssh-auto-account-creation

Conversation

@zardus

@zardus zardus commented Feb 12, 2026

Copy link
Copy Markdown
Member

Must be carefully reviewed, but big if true. Combined with dojo cli, will free us from http

Copilot AI review requested due to automatic review settings February 12, 2026 23:12

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +169 to +172
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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment thread dojo_plugin/api/v1/ssh_auto_account.py Outdated
"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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@codecov

codecov Bot commented Feb 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.91241% with 33 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
dojo_plugin/api/v1/ssh_auto_account.py 73.38% 33 Missing ⚠️

📢 Thoughts on this report? Let us know!

@zardus
zardus force-pushed the feature/ssh-auto-account-creation branch from 2962759 to 808a4a9 Compare February 14, 2026 18:45
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>
@zardus
zardus force-pushed the feature/ssh-auto-account-creation branch from 808a4a9 to a965389 Compare February 18, 2026 19:23
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.

2 participants