-
Notifications
You must be signed in to change notification settings - Fork 4.3k
fix: openssh key parsing issue #41369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release
Are you sure you want to change the base?
Conversation
|
/build-deploy-preview skip-tests=true |
|
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/19168275199. |
WalkthroughThe PR extends SSH key handling to support RSA PKCS#1 private keys by converting them to PKCS#8 format. A new helper method handles the ASN.1 conversion transparently. Tests are refactored to use BouncyCastleProvider with dynamic RSA key generation. Changes
Sequence DiagramsequenceDiagram
participant Client
participant SSHUtils
participant KeyDetection
participant PKCS1Converter
participant PKCS8KeyFile
Client->>SSHUtils: parseKey(keyContent)
SSHUtils->>KeyDetection: Detect key format
alt PKCS#8 Format
KeyDetection-->>PKCS8KeyFile: Feed directly
else PKCS#1 Format (RSA)
KeyDetection->>PKCS1Converter: convertRsaPkcs1ToPkcs8(keyContent)
Note over PKCS1Converter: Parse ASN.1, build PrivateKeyInfo,<br/>encode to PKCS#8 PEM
PKCS1Converter-->>KeyDetection: PKCS#8 PEM string
KeyDetection->>PKCS8KeyFile: Feed converted key
else OpenSSH/Other
KeyDetection-->>PKCS8KeyFile: Handle via existing path
end
PKCS8KeyFile-->>Client: KeyFile object
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Deploy-Preview-URL: https://ce-41369.dp.appsmith.com |
Description
Tip
Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).
Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.
Fixes #
Issue Numberor
Fixes
Issue URLWarning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
Automation
/ok-to-test tags="@tag.Datasource"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/19168276106
Commit: d156b8d
Cypress dashboard.
Tags:
@tag.DatasourceSpec:
Fri, 07 Nov 2025 13:06:53 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit