Skip to content

[Feature Request]: SSH tunnel - Make dynamically allocated local port available as variable to support more complex JDBC connection strings #7450

Description

@hschildberg

What would you like to happen?

The native SSH tunnel support for database connections is a very welcome addition. Thank you for working on this feature.

While reviewing the implementation, I thought of a possible enhancement that could make it even more flexible.

Currently, the SSH tunnel integration constructs the database connection URL using:

        String tunnelUrl =
            databaseMeta
                .getIDatabase()
                .getURL(
                    "localhost",
                    String.valueOf(localPort),
                    resolve(databaseMeta.getDatabaseName()));
        url = resolve(tunnelUrl);

This works well for simple, standard connection URLs.

However, some database configurations require manually defined JDBC URLs, where the host and port are embedded in a more complex connection string.

For example:

jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCPS)(HOST=localhost)(PORT=<localPortOFSShTunnel>))(CONNECT_DATA=(SID=XYZ))

It would be great if native SSH tunnel support could also be used together with manually specified database URLs.

One possible approach could be exposing the assigned local tunnel port through a variable such as: ${sshTunnel.localPort}

This would allow users to reference the dynamically allocated tunnel port directly within custom JDBC URLs while keeping the flexibility of the existing manual URL configuration.

Just an idea for consideration, as it could help cover some more advanced connection scenarios.

Thanks again for the effort that went into this feature.

Issue Priority

Priority: 3

Issue Component

Component: Database

Metadata

Metadata

Assignees

No one assigned

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions