GithubHelp home page GithubHelp logo

hessjcg / cloud-sql-jdbc-socket-factory Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlecloudplatform/cloud-sql-jdbc-socket-factory

0.0 0.0 0.0 2.25 MB

A collection of Java libraries for connecting securely to Cloud SQL

License: Apache License 2.0

Shell 5.69% Java 94.06% Batchfile 0.24%

cloud-sql-jdbc-socket-factory's Introduction

Cloud SQL Connector for Java

CI

The Cloud SQL Connector for Java is a library that provides IAM-based authorization and encryption when connecting to a Cloud SQL instance. It can not provide a network path to a Cloud SQL instance if one is not already present. See the Connecting Overview page for more information on connecting to a Cloud SQL instance.

Usage

For usage information specific to your database engine and driver, see the pages below:

JDBC:

R2DBC:

For examples of this library being used in the context of an application, check out the sample applications located here.

Authentication

This library uses the Application Default Credentials (ADC) strategy for resolving credentials. Please see these instructions for how to set your ADC (Google Cloud Application vs Local Development, IAM user vs service account credentials).

---

Building the Drivers

To build a fat JAR containing the JDBC driver with the bundles Socket Factory dependencies you can issue the following Maven command from the location containing the project pom.xml:

mvn -P jar-with-dependencies clean package -DskipTests

This will create a target sub-folder within each of the module directories. Within these target directories you'll find the JDBC driver files.

Example:

mysql-socket-factory-connector-j-8–1.8.0-jar-with-dependencies.jar
postgres-socket-factory-1.8.0-jar-with-dependencies.jar

Firewall configuration

The Cloud SQL proxy establishes connections to Cloud SQL instances using port 3307. Applications that are protected by a firewall may need to be configured to allow outgoing connections on TCP port 3307. A connection blocked by a firewall typically results in an error stating connection failure (e.g. com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure).

Connect with IntelliJ

In order to connect IntelliJ to your Cloud SQL instance, you will need to add this library as a jar with dependencies in "Additional Files" section on the driver settings page. Prebuilt fat jars can be found on the Releases page for this purpose.

Troubleshooting

Here are some troubleshooting tips to resolve common issues that come up when using the Java Connector:

  1. Make sure you are using the latest version of the Cloud SQL Connector and your database driver to avoid incompatibilities. Some older versions of drivers are not supported
  2. The Java connector provides authorization for connections, but it does not provide new paths to connectivity. For example, in order to connect to a Cloud SQL instance using a Private IP address, your application must already have VPC access.

Support policy

Major version lifecycle

This project uses semantic versioning, and uses the following lifecycle regarding support for a major version:

Active - Active versions get all new features and security fixes (that wouldn’t otherwise introduce a breaking change). New major versions are guaranteed to be "active" for a minimum of 1 year. Deprecated - Deprecated versions continue to receive security and critical bug fixes, but do not receive new features. Deprecated versions will be publicly supported for 1 year. Unsupported - Any major version that has been deprecated for >=1 year is considered publicly unsupported.

Supported JDK versions

We test and support at minimum, any publically supported LTS JDK version. Changes in supported versions will be considered a minor change, and will be listed in the realease notes.

Release cadence

This project aims for a minimum monthly release cadence. If no new features or fixes have been added, a new PATCH version with the latest dependencies is released.

cloud-sql-jdbc-socket-factory's People

Contributors

anuraaga avatar dependabot[bot] avatar dirkluijk avatar dmitry-s avatar enocom avatar github-actions[bot] avatar google-cloud-policy-bot[bot] avatar hessjcg avatar infra-db-release-bot avatar jackwotherspoon avatar joaoandremartins avatar kirbyquerby avatar kurtisvg avatar lesv avatar meltsufin avatar mpeddada1 avatar mscheong01 avatar piaxc avatar polyomino24 avatar release-please[bot] avatar renovate-bot avatar sergei-ivanov avatar shubha-rajan avatar stigkj avatar suztomo avatar t1ngj13 avatar vadimberezniker avatar vhajdari avatar vladimirov001 avatar yhrn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.