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

RDB Loader: add support for SSH tunnels #22

Closed
chuwy opened this issue Aug 17, 2017 · 4 comments
Closed

RDB Loader: add support for SSH tunnels #22

chuwy opened this issue Aug 17, 2017 · 4 comments
Assignees
Milestone

Comments

@chuwy
Copy link
Contributor

chuwy commented Aug 17, 2017

Migrated from snowplow/snowplow#3280

@alexanderdean
Copy link
Member

High priority as without this we have to revert to running RDB Loader from a local box.

@ungn
Copy link

ungn commented Sep 20, 2017

I had started to make a first stab at this for operations-server using the JSch java library.

Assuming you parse the ssh-tunnel config file like we do in our scripts, you should be able to connect using something like the following: (based on their port forwarding example here)

import com.jcraft.jsch.*;
...
JSch jsch=new JSch();
jsch.addIdentity(${keyfile_path});
Session session=jsch.getSession(${bastion_user}, ${bastion_host}, ${bastion_port});
session.connect();
session.setPortForwardingL(${local_database_port}, ${database_host}, ${remote_database_port});

This is untested though!

@alexanderdean
Copy link
Member

Opens interesting questions about where/how to store the SSH key safely...

@jbeemster
Copy link
Member

AWS Parameter Store can keep up to 4096 bytes which should fit a Private Key with a bit of headroom. This value can be encrypted using the AWS Key Management Service so could be a viable option for this...

http://docs.aws.amazon.com/systems-manager/latest/APIReference/API_Parameter.html

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

No branches or pull requests

4 participants