{"id":15002516,"url":"https://github.com/googlecloudplatform/cloud-sql-jdbc-socket-factory","last_synced_at":"2025-05-16T01:04:56.019Z","repository":{"id":37601525,"uuid":"54581770","full_name":"GoogleCloudPlatform/cloud-sql-jdbc-socket-factory","owner":"GoogleCloudPlatform","description":"A collection of Java libraries for connecting securely to Cloud SQL","archived":false,"fork":false,"pushed_at":"2025-05-12T19:15:47.000Z","size":3944,"stargazers_count":242,"open_issues_count":24,"forks_count":121,"subscribers_count":42,"default_branch":"main","last_synced_at":"2025-05-12T19:55:40.328Z","etag":null,"topics":["cloud-sql","java","libraries","mysql","postgresql","sql-server"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoogleCloudPlatform.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-03-23T17:58:22.000Z","updated_at":"2025-05-12T19:15:31.000Z","dependencies_parsed_at":"2023-10-14T20:16:23.139Z","dependency_job_id":"7fc20ee2-97bc-4ed5-b2d9-daf9e950a22f","html_url":"https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory","commit_stats":{"total_commits":1564,"total_committers":47,"mean_commits":"33.276595744680854","dds":"0.38107416879795397","last_synced_commit":"93461176c2426e6a62c15d4b2e101f4283e1e92b"},"previous_names":["googlecloudplatform/cloud-sql-mysql-socket-factory"],"tags_count":76,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fcloud-sql-jdbc-socket-factory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fcloud-sql-jdbc-socket-factory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fcloud-sql-jdbc-socket-factory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fcloud-sql-jdbc-socket-factory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoogleCloudPlatform","download_url":"https://codeload.github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254448579,"owners_count":22072764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud-sql","java","libraries","mysql","postgresql","sql-server"],"created_at":"2024-09-24T18:50:56.777Z","updated_at":"2025-05-16T01:04:55.989Z","avatar_url":"https://github.com/GoogleCloudPlatform.png","language":"Java","readme":"## Cloud SQL Connector for Java\n\n[![CI][ci-badge]][ci-build]\n\n[ci-badge]: https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/actions/workflows/tests.yml/badge.svg?event=push\n[ci-build]: https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/actions/workflows/tests.yml?query=event%3Apush+branch%3Amain\n\nThe 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](https://cloud.google.com/sql/docs/mysql/connect-overview) page for more information on connecting to a Cloud SQL instance.\n\n## Usage\nFor usage information specific to your database engine and driver, see the pages below:\n\n* [Connecting to Cloud SQL using JDBC](docs/jdbc.md)\n* [Connecting to Cloud SQL using R2DBC](docs/r2dbc.md)\n\nFor examples of this library being used in the context of an application, check out the sample applications located \n[here](https://github.com/GoogleCloudPlatform/java-docs-samples/tree/master/cloud-sql).\n\n### Authentication\n\nThis library uses the [Application Default Credentials (ADC)][adc] strategy for\nresolving credentials. Please see [these instructions for how to set your ADC][set-adc]\n(Google Cloud Application vs Local Development, IAM user vs service account credentials).\n\n[adc]: https://cloud.google.com/docs/authentication#adc\n[set-adc]: https://cloud.google.com/docs/authentication/provide-credentials-adc\n---\n\n### Building the Drivers\nTo 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:\n\n```mvn -P jar-with-dependencies clean package -DskipTests```\n\nThis will create a *target* sub-folder within each of the module directories. Within these target directories you'll find the JDBC driver files.\n\nExample:\n```\nmysql-socket-factory-connector-j-8–1.8.0-jar-with-dependencies.jar\npostgres-socket-factory-1.8.0-jar-with-dependencies.jar\n```\n\n### Debug Logging\n\nThe Java Connector supports optional debug logging to help diagnose problems with\nthe background certificate refresh. To enable it, add the following to the file\n`/src/main/resources/application.yml`:\n\n```\nlogging.level.root=DEBUG\n```\n\n---\n\n### Firewall configuration\n\nThe Cloud SQL proxy establishes connections to Cloud SQL instances using port 3307. Applications \nthat are protected by a firewall may need to be configured to allow outgoing connections on TCP port\n3307. A connection blocked by a firewall typically results in an error stating connection failure \n(e.g. `com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure`).\n\n### Connect with IntelliJ\n \nIn order to [connect IntelliJ](https://www.jetbrains.com/help/datagrip/connect-to-google-cloud-sql-instances.html) \nto your Cloud SQL instance, you will need to add this library as a jar with dependencies in\n\"Additional Files\" section on the driver settings page. Prebuilt fat jars are no longer provided (since v1.14.0).\n \n## Troubleshooting\n\nHere are some troubleshooting tips to resolve common issues that come up when using the Java Connector:\n\n1. 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.\n1. 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. \n\n## Support policy\n\n### Major version lifecycle\nThis project uses [semantic versioning](https://semver.org/), and uses the\nfollowing lifecycle regarding support for a major version:\n\n**Active** - Active versions get all new features and security fixes (that\nwouldn’t otherwise introduce a breaking change). New major versions are\nguaranteed to be \"active\" for a minimum of 1 year.\n**Deprecated** - Deprecated versions continue to receive security and critical\nbug fixes, but do not receive new features. Deprecated versions will be publicly\nsupported for 1 year.\n**Unsupported** - Any major version that has been deprecated for \u003e=1 year is\nconsidered publicly unsupported.\n\n### Supported JDK versions\n\nWe test and support at minimum, any publically supported LTS JDK version.\nChanges in supported versions will be considered a minor change, and will be\nlisted in the realease notes.\n\n### Release cadence\nThis project aims for a minimum monthly release cadence. If no new\nfeatures or fixes have been added, a new PATCH version with the latest\ndependencies is released.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecloudplatform%2Fcloud-sql-jdbc-socket-factory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglecloudplatform%2Fcloud-sql-jdbc-socket-factory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecloudplatform%2Fcloud-sql-jdbc-socket-factory/lists"}