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

Serve HTTPS connections to enable JDBC connection #8

Merged
merged 1 commit into from Mar 5, 2024

Conversation

ohaibbq
Copy link

@ohaibbq ohaibbq commented Mar 5, 2024

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.

Copy link

@recidinick recidinick left a comment

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
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants