Skip to content
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

SSH Tunnel: allow using OPENSSH key format #7198

Closed
marcosmarxm opened this issue Oct 19, 2021 · 9 comments · Fixed by #15833 or #16545
Closed

SSH Tunnel: allow using OPENSSH key format #7198

marcosmarxm opened this issue Oct 19, 2021 · 9 comments · Fixed by #15833 or #16545
Assignees
Labels
area/connectors Connector related issues type/enhancement New feature or request zendesk

Comments

@marcosmarxm
Copy link
Member

Enviroment

  • Airbyte version: Cloud
  • Source Connector and version: postgres
  • Severity: Very Low / Low / Medium / High / Critical
  • Step where error happened: Create a Source

Current Behavior

Airbyte uses BouncyCastle to validate the SSH key. Some users want to use the OPENSSH format and its not supported.

Expected Behavior

I want to use OPENSSH keys when trying to connect using SSH tunnels.

Logs

2021-10-19 21:56:09 INFO  2021-10-19 21:56:09 �[32mINFO�[m i.a.i.b.s.SshTunnel(getInstance):170 - {} - Starting connection with method: SSH_KEY_AUTH
2021-10-19 21:56:17 ERROR Exception in thread "main" java.lang.RuntimeException: java.io.IOException: unrecognised object: OPENSSH PRIVATE KEY
2021-10-19 21:56:17 ERROR 	at io.airbyte.integrations.base.ssh.SshTunnel.openTunnel(SshTunnel.java:286)
2021-10-19 21:56:17 ERROR 	at io.airbyte.integrations.base.ssh.SshTunnel.<init>(SshTunnel.java:134)
2021-10-19 21:56:17 ERROR 	at io.airbyte.integrations.base.ssh.SshTunnel.getInstance(SshTunnel.java:185)
2021-10-19 21:56:17 ERROR 	at io.airbyte.integrations.base.ssh.SshTunnel.sshWrap(SshTunnel.java:204)
2021-10-19 21:56:17 ERROR 	at io.airbyte.integrations.base.ssh.SshWrappedSource.check(SshWrappedSource.java:37)
2021-10-19 21:56:17 ERROR 	at io.airbyte.integrations.base.spec_modification.SpecModifyingSource.check(SpecModifyingSource.java:38)
2021-10-19 21:56:17 ERROR 	at io.airbyte.integrations.base.IntegrationRunner.run(IntegrationRunner.java:102)
2021-10-19 21:56:17 ERROR 	at io.airbyte.integrations.source.postgres.PostgresSourceStrictEncrypt.main(PostgresSourceStrictEncrypt.java:34)
2021-10-19 21:56:17 ERROR Caused by: java.io.IOException: unrecognised object: OPENSSH PRIVATE KEY
2021-10-19 21:56:17 ERROR 	at org.bouncycastle.openssl.PEMParser.readObject(Unknown Source)
2021-10-19 21:56:17 ERROR 	at io.airbyte.integrations.base.ssh.SshTunnel.getPrivateKeyPair(SshTunnel.java:234)
2021-10-19 21:56:17 ERROR 	at io.airbyte.integrations.base.ssh.SshTunnel.openTunnel(SshTunnel.java:267)
2021-10-19 21:56:17 ERROR 	... 7 more

Steps to Reproduce

Are you willing to submit a PR?

Remove this with your answer.

@marcosmarxm marcosmarxm added type/bug Something isn't working area/connectors Connector related issues labels Oct 19, 2021
@sherifnada
Copy link
Contributor

@marcosmarxm Is there a practical blocker to using the PEM format?

@marcosmarxm
Copy link
Member Author

No, but one cloud user was trying to sync a postgres with OPENSSH... and wasn't clear Airbyte doesn't handle this type of SSH Keys. Solution: user need to create a RSA key to connect to the database.

@sherifnada sherifnada added type/enhancement New feature or request and removed type/bug Something isn't working labels Nov 15, 2021
@cgardens cgardens added good first issue accepting-contributions Feel free to contribute to them labels Dec 18, 2021
@edgan
Copy link

edgan commented Jul 6, 2022

Just ran into this with a key generated by openssh 8.8p1's ssh-keygen. It would be nice if this was fixed.

@sherifnada
Copy link
Contributor

cc @grishick

@kimerinn
Copy link
Contributor

#14876

@kimerinn kimerinn linked a pull request Jul 20, 2022 that will close this issue
37 tasks
@danieldiamond
Copy link
Contributor

yeah surprising this still has not been resolved. Would probably opt to remove rather than users having access to broken feature.

@kimerinn
Copy link
Contributor

kimerinn commented Aug 2, 2022

It is fixed. I am waiting airbyte review

@marcosmarxm
Copy link
Member Author

Zendesk ticket #1780 has been linked to this issue.

@marcosmarxm
Copy link
Member Author

Comment made from Zendesk by Marcos Marx on 2022-08-02 at 14:27:

Any updates on #14876 I'll return to you. You can use RSA keys and it will work but not with OPENSSH keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues type/enhancement New feature or request zendesk
Projects
No open projects
Status: Backlog (unscoped)
9 participants