Add support for SSH Tunnels, including Server Connections bound to the tunnels.
57 KB
72 KB
34 KB
97 KB
52 KB
60 KB
5 KB
2 KB
649 KB
I'd like for ADS to let me connect to a remote database via an SSH tunnel, as in configuring -L on the command for establishing a tunnel which I could then use on a "normal" server.
Currently I have a set of simple shell scripts to create tunnels to various servers for me which I run before opening a connection in ADS. Since there's SSH support baked into ADS now, I'd love to have the ability to tunnel a given connection over SSH, either by registering an SSH server and then picking it as the server to tunnel a DB server's connections with, or by supplying tunnel configuration within the individual server registrations. The former seems like it'd make more sense, as I'd imagine the general use case is to have multiple database servers on a single remote network you'd like to tunnel to. That way you'd only have to configure the tunnel to the remote network a single time, and then be able to use it for all databases on that network.
I know that this is an old request, I was wondering if ever implemented in ADS?
I know that this is an old request, I was wondering if ever implemented in ADS?
We're releasing ADS v18 in February & this feature will not be available. We're planning on supporting this in ADS v19. I've updated the target version to 19.
We're releasing ADS v18 in February & this feature will not be available. We're planning on supporting this in ADS v19. I've updated the target version to 19.
We'll enhance the SSH Connection dialogbox as follows (see Port-Forwarding.png):
When "Forwarded Ports" is non-empty, this SSH connection will be used only for port forwarding; otherwise the functionality is unchanged. If port forwarding, then the right-click menu "Open" option (see open.png) will open a new tab (see tab.png). There will be a single "Reconnect" icon in the taskbar. Clicking the "Reconnect" will re-initialize the connection. The content area should show the list of forwarded ports. For example: Local Port:1234 ==> 172.24.1.155:27040. Closing this tab will close the port forwarding on this SSH server. When ADS is launched, all previously open Port Forwarding tabs must be restored.
After the port forwarding has been opened, the user can then connect to the database server via 127.0.0.1:1234, or whatever the local port was configured in the SSH Connection properties.
We'll enhance the SSH Connection dialogbox as follows (see Port-Forwarding.png):
When "Forwarded Ports" is non-empty, this SSH connection will be used only for port forwarding; otherwise the functionality is unchanged. If port forwarding, then the right-click menu "Open" option (see open.png) will open a new tab (see tab.png). There will be a single "Reconnect" icon in the taskbar. Clicking the "Reconnect" will re-initialize the connection. The content area should show the list of forwarded ports. For example: Local Port:1234 ==> 172.24.1.155:27040. Closing this tab will close the port forwarding on this SSH server. When ADS is launched, all previously open Port Forwarding tabs must be restored.
After the port forwarding has been opened, the user can then connect to the database server via 127.0.0.1:1234, or whatever the local port was configured in the SSH Connection properties.
Hi Nhi,
I added a screenshot of Putty as an example.
Thanks, Tom
Hi Tom/Nhi,
Adding the requirements for this issue we have discussed so far, wanted to get your confirmation on the same.
1. Multiple port forwarding capability like putty in ADS by addition of Source & Destination port fields in ssh UI
2. New port forwarding details should get added in the new JTable in the ssh UI
3. User should be able to select and delete any of the forwarded port information from the Jtable.
4. Store ssh information in .ssh file in connections folder and retrieve from there while editing.
5. Once connected, user should be able to see all forwarded ports information by opening SSH terminal.
6. SSH terminal should be readonly for ssh connection.
7. 3 options from the submenu (connect, reconnect, disconnect) should be removed if it's a ssh connection
[Nhi] These 3 options should stay and work as before.
Hi Tom/Nhi,
Adding the requirements for this issue we have discussed so far, wanted to get your confirmation on the same.
1. Multiple port forwarding capability like putty in ADS by addition of Source & Destination port fields in ssh UI
2. New port forwarding details should get added in the new JTable in the ssh UI
3. User should be able to select and delete any of the forwarded port information from the Jtable.
4. Store ssh information in .ssh file in connections folder and retrieve from there while editing.
5. Once connected, user should be able to see all forwarded ports information by opening SSH terminal.
6. SSH terminal should be readonly for ssh connection.
7. 3 options from the submenu (connect, reconnect, disconnect) should be removed if it's a ssh connection
[Nhi] These 3 options should stay and work as before.
Hi Tom/Nhi/Asif,
Few more points
1. On connecting SSH connection via right click -> connect, will simply connect to SSH connection and no tunnel will be opened. SSH tunnel will be created when user starts terminal via right click -> open
2. There will be no limit on number of ports user can forward to. (Similar to putty)
3. Source port must be unique. Destination part has no uniqueness constraint (Similar to putty)
[Nhi] Correct
Hi Tom/Nhi/Asif,
Few more points
1. On connecting SSH connection via right click -> connect, will simply connect to SSH connection and no tunnel will be opened. SSH tunnel will be created when user starts terminal via right click -> open
2. There will be no limit on number of ports user can forward to. (Similar to putty)
3. Source port must be unique. Destination part has no uniqueness constraint (Similar to putty)
[Nhi] Correct
Hi Tom/Nhi/Asif
Few more updates
1. Forwarded ports table will have forwarded ports in following format
Local:8080==>10.1.1.1:8080 (Port-Forwarding.png):
2. Source Port: will be changed to Local Source Port: ( Port-Forwarding.png):
3. SSH terminal will be editable as existing because SSH tunnel is getting created over ssh connection only. So behavior is unchanged for SSH connection.
Also, tab.png will be replaced with tab_updated.png . [Nhi] Looks good. However the port forwarding info should be of "Local:8080 ==> 10.1.2.200:8080" format. Note that next to "Local:" should be the local source port, not an IP address.
Rather then showing ports being forwarded in terminal. They will be shown on the top panel of terminal. On mouse hover of forwarded ports label, complete list of forwarded list will be shown.
Hi Tom/Nhi/Asif
Few more updates
1. Forwarded ports table will have forwarded ports in following format
Local:8080==>10.1.1.1:8080 (Port-Forwarding.png):
2. Source Port: will be changed to Local Source Port: ( Port-Forwarding.png):
3. SSH terminal will be editable as existing because SSH tunnel is getting created over ssh connection only. So behavior is unchanged for SSH connection.
Also, tab.png will be replaced with tab_updated.png . [Nhi] Looks good. However the port forwarding info should be of "Local:8080 ==> 10.1.2.200:8080" format. Note that next to "Local:" should be the local source port, not an IP address.
Rather then showing ports being forwarded in terminal. They will be shown on the top panel of terminal. On mouse hover of forwarded ports label, complete list of forwarded list will be shown.
Functional Review
The tunneling feature seems to work fine based on my initial testing. However there is a backwards compatibility issue and some inconsistencies in the UI that need addressing:
1. When I right-click on an existing SSH connection (which was created prior to the implementation of this Port Forwarding feature) and select Server Properties, I get an error popup with the following stack trace:
java.lang.NullPointerException at com.aquafold.datastudio.mainframe.dialog.connection.SshConnectionDialog.setNode(SshConnectionDialog.java:561) at com.aquafold.datastudio.mainframe.dialog.connection.SshConnectionDialog.(SshConnectionDialog.java:453) at com.aquafold.datastudio.schematree.SshConnectionNode.displayProperties(SshConnectionNode.java:164) at com.aquafold.datastudio.mainframe.actions.tree.schema.SchemaProperties.processAction(SchemaProperties.java:48) at com.common.ui.frame.actions.CAction.processAction(CAction.java:83) at com.aquafold.datastudio.mainframe.ActionHandler.actionPerformed(ActionHandler.java:1419) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.AbstractButton.doClick(AbstractButton.java:376) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:842) at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:157) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:886) at java.awt.Component.processMouseEvent(Component.java:6539) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:866) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:650) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:381) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
2. The UI needs to conform to the general UI style of ADS. The background color of the new text fields should be white. The Remove button is not visible in the Server Properties dialog box, which is incorrect. The dialog box needs to be taller so that all UI controls are visible without having to manually resize the dialog box. Please see server-props.png.
Also, please add a comment in this issue for each SVN commit for this issue, stating the SVN revision and a brief description of the changes.
Functional Review
The tunneling feature seems to work fine based on my initial testing. However there is a backwards compatibility issue and some inconsistencies in the UI that need addressing:
1. When I right-click on an existing SSH connection (which was created prior to the implementation of this Port Forwarding feature) and select Server Properties, I get an error popup with the following stack trace:
java.lang.NullPointerException at com.aquafold.datastudio.mainframe.dialog.connection.SshConnectionDialog.setNode(SshConnectionDialog.java:561) at com.aquafold.datastudio.mainframe.dialog.connection.SshConnectionDialog.(SshConnectionDialog.java:453) at com.aquafold.datastudio.schematree.SshConnectionNode.displayProperties(SshConnectionNode.java:164) at com.aquafold.datastudio.mainframe.actions.tree.schema.SchemaProperties.processAction(SchemaProperties.java:48) at com.common.ui.frame.actions.CAction.processAction(CAction.java:83) at com.aquafold.datastudio.mainframe.ActionHandler.actionPerformed(ActionHandler.java:1419) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.AbstractButton.doClick(AbstractButton.java:376) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:842) at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:157) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:886) at java.awt.Component.processMouseEvent(Component.java:6539) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:866) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:650) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:381) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
2. The UI needs to conform to the general UI style of ADS. The background color of the new text fields should be white. The Remove button is not visible in the Server Properties dialog box, which is incorrect. The dialog box needs to be taller so that all UI controls are visible without having to manually resize the dialog box. Please see server-props.png.
Also, please add a comment in this issue for each SVN commit for this issue, stating the SVN revision and a brief description of the changes.
On MacOS, I am still observing the UI inconsistencies. The new text fields still has gray background initially (please fix this). The Forwarded Ports is still partially cut off, and the Remove button is still not visible.
The dialog box height should be 715 for MacOS, and 650 for other platforms. See possible fix below:
public SshConnectionDialog(JFrame parent, CTreeNode parentNode, SshConnectionNode node) { super(parent, TXT.get("SshConnectionDialog.title", "SSH Connection"), 600, (OS.isMacOSX() ? 715 : 650)); setMinimumSize(500, 500); ... }
On MacOS, I am still observing the UI inconsistencies. The new text fields still has gray background initially (please fix this). The Forwarded Ports is still partially cut off, and the Remove button is still not visible.
The dialog box height should be 715 for MacOS, and 650 for other platforms. See possible fix below:
public SshConnectionDialog(JFrame parent, CTreeNode parentNode, SshConnectionNode node) { super(parent, TXT.get("SshConnectionDialog.title", "SSH Connection"), 600, (OS.isMacOSX() ? 715 : 650)); setMinimumSize(500, 500); ... }
Hi Nhi,
we are process of fixing following 4 issues. There is little delay due to unavailability of Mac today.
1. text fields gray color - Mac only issue. Not reproducible in other env.
2. Remove button not visible - Mac only issue.
QA has raised following two issues which are also in progress.
10737 - Add & remove button enabling on selection
10738 - Insertion order maintain.
Hi Nhi,
we are process of fixing following 4 issues. There is little delay due to unavailability of Mac today.
1. text fields gray color - Mac only issue. Not reproducible in other env.
2. Remove button not visible - Mac only issue.
QA has raised following two issues which are also in progress.
10737 - Add & remove button enabling on selection
10738 - Insertion order maintain.
1. Fixed text field background color issue with OverlayFactory.
2. Adjusted height of ssh properties box to 715 for Mac.
3. Fixed 10737, 10738
Revision: 57132, 57148, 57155, 57161, 57165
1. Fixed text field background color issue with OverlayFactory.
2. Adjusted height of ssh properties box to 715 for Mac.
3. Fixed 10737, 10738
Revision: 57132, 57148, 57155, 57161, 57165
Code Review
Code Review
Hi Nhi.
Thank you for code review. I have included the changes in code.
2(b) DiagnosisUtil.testHostInfo() is not throwing exception. Catch(Exception) is being used for destinationField.getText().split(":")[1] as user might enter any other splitter then (:)
Hi Nhi.
Thank you for code review. I have included the changes in code.
2(b) DiagnosisUtil.testHostInfo() is not throwing exception. Catch(Exception) is being used for destinationField.getText().split(":")[1] as user might enter any other splitter then (:)
OK, I see. Then the message needs to be changed and internationalized. Please see Invalid-Destination.patch for suggested fix.
OK, I see. Then the message needs to be changed and internationalized. Please see Invalid-Destination.patch for suggested fix.
Thanks Nhi, I have included the changes.
Revision: 57212
Thanks Nhi, I have included the changes.
Revision: 57212
Successfully verified SSH tunneling functionality on Ubuntu platform using ADS dev build-73 .
Functionality is working as expected , we are able to register Single, Multiple servers using SSH tunnel.
Please find set of executed test cases here.
Thanks,
Aparna Jha
Successfully verified SSH tunneling functionality on Ubuntu platform using ADS dev build-73 .
Functionality is working as expected , we are able to register Single, Multiple servers using SSH tunnel.
Please find set of executed test cases here.
Thanks,
Aparna Jha
Assigning to automation team for further action on this
Thanks,
Laveena
Assigning to automation team for further action on this
Thanks,
Laveena
Hi Tom,
This has been verified. We had a discussion with Nhi on issue related to mapping test results with test rail. We are creating a new solution and trying to create a test run with results. We will update the ticket with the test run details accordingly.
Hi Tom,
This has been verified. We had a discussion with Nhi on issue related to mapping test results with test rail. We are creating a new solution and trying to create a test run with results. We will update the ticket with the test run details accordingly.
QE testing has completed. Please find the details below.
https://idera.testrail.net/index.php?/runs/view/2627&group_by=cases:section_id&group_order=asc&group_id=18404
Environment details:
Machine IP : 10.220.200.164
Machine Name :simpsons\administrator
VM OS: Windows 8.1 Enterprise
RAM: 4 GB and 64 Bit Type
DB Server Name :MYSQL 8.0
Build Used: 20.5.0-RC3
QE testing has completed. Please find the details below.
https://idera.testrail.net/index.php?/runs/view/2627&group_by=cases:section_id&group_order=asc&group_id=18404
Environment details:
Machine IP : 10.220.200.164
Machine Name :simpsons\administrator
VM OS: Windows 8.1 Enterprise
RAM: 4 GB and 64 Bit Type
DB Server Name :MYSQL 8.0
Build Used: 20.5.0-RC3
Issue #6017 |
Verified |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build 73 |
No time estimate |
I'd like for ADS to let me connect to a remote database via an SSH tunnel, as in configuring -L on the command for establishing a tunnel which I could then use on a "normal" server.
Currently I have a set of simple shell scripts to create tunnels to various servers for me which I run before opening a connection in ADS. Since there's SSH support baked into ADS now, I'd love to have the ability to tunnel a given connection over SSH, either by registering an SSH server and then picking it as the server to tunnel a DB server's connections with, or by supplying tunnel configuration within the individual server registrations. The former seems like it'd make more sense, as I'd imagine the general use case is to have multiple database servers on a single remote network you'd like to tunnel to. That way you'd only have to configure the tunnel to the remote network a single time, and then be able to use it for all databases on that network.