-
Notifications
You must be signed in to change notification settings - Fork 57
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
Potential UX improvement for SSH tunnel configuration #513
Comments
Also worth noting that the "Host/Port to Address" change to |
Okay, since #563 is implemented, I suppose the remaining part for us here is to avoid showing Network Tunnel config for connectors that do not expose the |
Pretty much, yeah. It should be trivial to make that change when we're ready, but before doing that I still need to update For instance, the "Amazon S3" capture has an "AWS Endpoint" property (which is presumably an AWS Service Endpoint URL), and it seems like it could theoretically be useful to have the capability to expose a self-hosted S3 clone over an SSH tunnel, but that may be more effort than it's worth at this time. |
@willdonnelly one thing I just noticed is that, given the e.g. what happens if I create a postgres materialization with |
That's a bit of a grey area. Currently And I actually think that's a reasonable solution for the moment, and I think if we want to make things more consistent between SSH-forwarding and direct connections the way to go is figuring out how to give the connector proxy information about what the default port number should be if So my recommendation would be that |
I think that the configuration process for SSH tunneling can be made a lot better without a lot of difficulty.
Ideally the user shouldn't need to pick an arbitrary local port, and they shouldn't need to remember to point the main connector config at
127.0.0.1
and then put the real destination IP/hostname in the SSH forwarding config. The reason this is tricky is because the underlying connector's configuration is treated as a black box, and it's left entirely up to the user to point the connector at the SSH tunnel.I think this can be improved significantly if we're willing to be a little bit Opinionated about how connectors represent their target address configuration. A proposal:
The 'Connector Config Guidelines' should strongly recommend representing host/port configuration as a top-level
/address
property with a value like"host:port"
. This seems desirable in general for consistency across connectors, but embracing a specific name also makes the next part very simple.When asked to do actual work (validate/discover/read/etc), the connector proxy inspects the config. If
/networkTunnel/sshForwarding/{forwardHost,forwardPort,localPort}
are all unset and an/address
property is present it:/address
field to fill out itsforwardHost
andforwardPort
information.localPort
from of some reasonable range./address
with"127.0.0.1:<localPort>"
before giving the configuration to the underling connector.Finally, when asked for a config spec the connector proxy should do something intelligent depending on whether an
/address
property is described in the underlying connector's config spec. I'm not sure what would be best here, but options include:/address
exists./address
property is present, since SaaS connectors which don't take a target host/port can't benefit from SSH forwarding in the first place.The main thing that makes me uncomfortable about this design is the reliance on a hard-coded property name
/address
, but I think that this satisfies the main goals of providing a better UX while being very straightforward to implement, and it wasn't clear to me that doing something clever with JSON schema annotations to indicate "This here is the address property" would actually buy us anything.Since the logic would still accept manually specified
forwardHost
/forwardPort
/localPort
settings this change would be mostly backwards-compatible, except thatmaterialize-postgres
would need to be modified to replace the current host and port config properties with a combined "Address". But that's probably a good idea even without this proposal, just for consistency withsource-mysql
andsource-postgres
.The text was updated successfully, but these errors were encountered: