You can use GCP Identity and Access Management (IAM) and Workload Identity authentication to connect to the Google Cloud Postgres database that you use for Kong Gateway. This page explains how to configure IAM and Workload Identity authentication to secure your database settings and connections.
With authentication enabled, you don’t need a password to connect to a database instance. Instead, you use a temporary authentication token. Because GCP manages the authentication externally, the database doesn’t store user credentials. If you’re using Google Cloud Postgres for Kong Gateway’s database, you can enable authentication on your running cluster. This eliminates the need to store user credentials on both the Kong Gateway (pg_password) and Google Cloud Postgres sides.