← Back to Pull requests

[18.0][IMP] cetmix_tower_server: generate SSH keys #512

Closed
unknown closed this pull request without merging on Nov 12, 2026 17:39 UTC
View on GitHub
unknown unknown commented on Nov 04, 2026 13:29 UTC
Author

Giving a Server an SSH key meant running ssh-keygen elsewhere, pasting
the private key into Tower and keeping the public key somewhere else.
Tower now creates the pair itself.

  • Generate / Regenerate buttons on the SSH Key form open a small

  • wizard to pick the key type: Ed25519 (default), ECDSA nistp256 or
    RSA 4096. Regenerate asks for confirmation first, because the old
    private key cannot be recovered.
  • The private key is stored in the vault in OpenSSH format without a

  • passphrase. The new read-only Public Key field (Managers only)
    shows <algorithm> <base64> with a copy button.
  • Changing the private key by hand clears the public key, so the two

  • never disagree.

    paramiko is pinned to >=5.0. Releases 3.x and 4.x can only write
    RSA/ECDSA keys as PEM, and paramiko.pkey.OPENSSH does not exist there.
    Images built with an older paramiko (the local odoo-debug:18.0-tower
    has 3.5.1) will refuse to install or upgrade the module until rebuilt.

    Tested: cetmix_tower_server suite, 733 tests, 0 failed, on Odoo 18.0
    with paramiko 5.1.0 and cryptography 42.0.8. The form was not exercised
    in a browser.

    Docs for the new field and buttons are in a separate cetmix-tower-doc
    change.

    Task 3688

    🤖 Generated with Claude Code

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    New Features
    Generate Ed25519, ECDSA, or 4096-bit RSA SSH key pairs from the key form.
    View and copy the generated public key.
    Regenerate an existing key after confirmation; replacing it makes the previous private key unrecoverable.
    Choose the key type in the generation dialog, with Ed25519 selected by default.
    Compatibility
    * Paramiko 5.1.0 or later is required. Servers that support only SHA-1 key exchange, ssh-rsa signatures, or group-exchange moduli below 2048 bits must be updated before Tower can connect.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 257 lines (+192 / -65) across 3 files Reviewer: ivs-cetmix Review duration: 11769m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 257 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.332
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #512"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.1% (MEDIUM) · Higher = larger blast radius
    39.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.5% · Safe to merge
    15.5%