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

SOCKS5 Proxy with Vertica #47

Open
Zeevbd opened this issue Oct 25, 2023 · 5 comments
Open

SOCKS5 Proxy with Vertica #47

Zeevbd opened this issue Oct 25, 2023 · 5 comments

Comments

@Zeevbd
Copy link

Zeevbd commented Oct 25, 2023

trying to connect to a Vertica DataSource behind a proxy but with no luck

used the Recommendations under the Grafana Document:
https://grafana.com/docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/#known-limitations

Below is the example used under Grafana.ini

#################################### Secure Socks5 Datasource Proxy #####################################
[secure_socks_datasource_proxy]
enabled = true
; root_ca_cert = /etc/ca.crt
; client_key = /etc/client.key
; client_cert = /etc/client.crt
; server_name = proxy.grafana.svc.cluster.local

The address of the socks5 proxy datasources should connect to

proxy_address = localhost:10020
show_ui = true

######################################################################################################

initiated all the Keys externally, all i need is to be able to use the proxy with the localhost:10020 (with port 10020)
(i can connect with DBEAVER to the database: using the proxy tab to the specific port:

below the main TAB would have an IP:5433

image

The Vertica DataSource would not show any other option than the screen shot

image

However when connecting through DBEAVER
i do use an IP connection with a proxy connection:

image

image

as can see the definition is located under two tabs:
Main - Host IP && Port in my case: (10.228.10.155:5433)
Proxy: Host && Port (Localhost:10020)

Only when both are defined it is possible to connect to the DB

Results from the Test Connection:

image

It leads to a Question:
how can one define a Grafana Datasource to allow a connection with a DB like shown above via Dbeaver App?

@tanvipise
Copy link
Collaborator

Hello Ze'ev,

The data source proxy settings are offered by Grafana and only to the built-in core Grafana plugins and not to the external ones. The list can be found here: https://grafana.com/docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/#pdc-known-limitations. Vertica plugin is an external data source developed by us and not by Grafana and hence it is not supported for Proxy setup in Grafana.

Thanks,
Tanvi

@sitingren
Copy link
Member

SSH tunnel might be helpful for you: https://docs.vertica.com/23.4.x/en/connecting-to/proxy-connections/

@tanvipise
Copy link
Collaborator

@Zeevbd, we have looked through Grafana docs and also reached out to Grafana. Are trying to use the PDC or trying to set up your own socks5 proxy? It would be better to understand if you provided some graphical representation of how your pieces are binding together.

@Zeevbd
Copy link
Author

Zeevbd commented Nov 7, 2023

Hi @tanvipise i tried working with the Instruction on the PDC Grafana docs,
and used the recommended keys.

it does not seems to be doing something...

####################################
Secure Socks5 Datasource Proxy
#####################################
[secure_socks_datasource_proxy]
enabled = true
; root_ca_cert = /etc/ca.crt
; client_key = /etc/client.key
; client_cert = /etc/client.crt
; server_name = proxy.grafana.svc.cluster.local

@verticacrossman
Copy link
Contributor

@Zeevbd,
We've been in touch with Grafana and it doesn't seem what you are trying is going to work. Grafana server side PDC needs to have a pdc-agent running on the database side. An extract from https://grafana.com/blog/2023/10/05/unify-and-query-private-network-data-in-grafana-cloud-private-data-source-connect-is-now-ga/ describes it. "The PDC agent establishes an SSH tunnel, facilitating data transmission between your private data sources and Grafana Cloud. The SSH client uses reverse dynamic forwarding, acting as a SOCKS proxy to direct queries to Grafana."

They confirmed that Vertica is not on the PDC supported datasource list, and that PDC on the server side will not work with a user's local socks proxy on the database side. It has to talk to the pdc-agent. That same url page shows a graphic of the pdc setup.

They also noted that they do not currently have a developer's toolkit for integrating the PDC, but it is on their roadmap. We're taking a look at what might need ot be added to our datasource for it to talk to the local pdc-agent to see if anything can be implemented in a future release.

Please confirm that your configuration is trying to use PDC on the Grafana server side and your own local proxy on the Vertica side.

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