Configure Single Sign-On for CockroachDB Dedicated With Google OAuth

Motivation

CockroachDB Dedicated is a fully-managed, reserved CockroachDB cluster ideal for a cloud database. We frequently get asked how to set up SSO for the individual CockroachDB Dedicated clusters and we have a detailed tutorial to walk you through that with a local, self-hosted cluster. What was unclear was that you can use the same steps to set up SSO with Dedicated. Based on this detailed document, CockroachDB Dedicated supports OIDC authentication. Today, we're going to provide details on how to leverage OIDC specifically with the Dedicated offering.

High-Level Steps

  • Provision Dedicated cluster
  • Configure OAuth Client ID
  • Configure CockroachDB with the OAuth details
  • Verify

Step by Step Instructions

Provision Dedicated Cluster

Follow this tutorial to set up a Dedicated cluster.

API Authentication Methods: An Overview

Authentication can be complex, and developers are forced to work within the framework of the APIs they’re integrating to.

If you’re building internal integrations, you’ll likely encounter easier to manage tokens, if they’re even necessary at all. But for productized integrations, you’ll have to manage your users’ credentials and tokens to third-party systems, which adds complexity and means more time and effort on your plate. 

Use Java EE and OpenID Connect to Secure Your Java API

In the early 2000s, Java developers used servlets and EJBs to develop their server applications. Hibernate and Spring came along in 2002 and 2004. Both technologies had a huge impact on Java developers everywhere, showing them it was possible to write distributed, robust applications without EJBs.

Fast forward to 2018, and Java EE certainly doesn’t look like it used to! Now, it’s mostly POJOs and annotations and far simpler to use.