Skip to content

Serve HTTPS connections to enable JDBC connection#8

Merged
ohaibbq merged 1 commit into
candidate/rb20240228from
dan/ssl-jdbc
Mar 5, 2024
Merged

Serve HTTPS connections to enable JDBC connection#8
ohaibbq merged 1 commit into
candidate/rb20240228from
dan/ssl-jdbc

Conversation

@ohaibbq

@ohaibbq ohaibbq commented Mar 5, 2024

Copy link
Copy Markdown

Data exploration tools such as JetBrains DataGrip or DBeaver are immensely valuable during development of projects using the emulator.

To connect the BigQuery Emulator to these tools from the JDBC, specify the following connection URL with your project ID:

jdbc:bigquery://https://localhost:9050;ProjectId=EMULATOR_PROJECT_ID;

The following options must also be specified:

Option Value Description
RootURL https://localhost:9070 This overwrites the URL used in the JDBC driver
SSLTrustStore /ssl/truststore.jks This must point to the JKS TrustStore that contains the SSL certificates for both the BigQuery Emulator, as well as oauth2.googleapis.com. A bundled truststore is located in the repository at ssl/truststore.jks. If using the Docker distribution, a volume can be created to access this data.
SSLTrustStorePwd test@123 This is the password for the trust store. The default password for the bundled store is test@123.

Known limitation: There is no documented method to bypass the JDBC OAuth flow, so a valid GCP OAuth credential is required to connect to the emulator.
See Configuring Authentication in this document for a list of valid authentication methods.
Exercise caution when using this feature with untrusted distributions of the BigQuery Emulator, as the OAuth Bearer token will be sent to the emulator server.

@recidinick recidinick left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it!

@ohaibbq ohaibbq merged commit d1b9768 into candidate/rb20240228 Mar 5, 2024
@ohaibbq ohaibbq deleted the dan/ssl-jdbc branch November 19, 2025 05:49
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

Successfully merging this pull request may close these issues.

2 participants