The External Secrets Inc. Audit & Compliance product suite is a premium product.
It requires a specific subscription. Contact us for more information.
GCP Secret Manager Provider
The Audit Listener can be configured to receive audit logs from GCP Secret Manager by utilizing a Pub/Sub Subscription and a Cloud Audit Logging Router. The illustration below demonstrates the setup:

Required Permissions
To set up the Listener, the following roles must be assigned:roles/secretmanager.secretAccessor
- on the GCP project level.roles/secretmanager.viewer
- on the GCP project level.roles/pubsub.subscriber
- on the designated Pub/Sub Subscription.
The Secret Accessor and Secret Viewer permissions are necessary for the listener to calculate duplicate entries.
Configuring the Provider
Setting up the provider may require configuration of the authentication methods during the listener installation process.Supported Authentication Methods
The Audit Listener supports the following Google Application Credentials authentication methods:- Using a Service Account Key defined in the runtime.
- Leveraging the GCE Metadata Server.
- Utilizing the GKE Metadata Server and Workload Identity.
Service Account Key
Service Account Key
Setup with Kustomize
Setup with Kustomize
Create a patch file named
gce-patch.yaml
with the following content:Setup with Helm
Setup with Helm
Add the following values to the helm install:
Setup on Standalone VMs
Setup on Standalone VMs
Execute the following command using an account with appropriate privileges:
systemd edit audit-listener.service
Then, edit the file to include the necessary environment variables:GCE Metadata Server
GCE Metadata Server
Setup with Kustomize
Setup with Kustomize
- This method is incompatible with Kubernetes installations.
Setup with Helm
Setup with Helm
- This method is incompatible with Kubernetes installations.
Setup on Standalone VMs
Setup on Standalone VMs
- No additional setup is required for authentication through the GCE Metadata Server. Proceed with configuring your GCP setup
GKE Metadata Server and Workload Identity
GKE Metadata Server and Workload Identity
Setup with Kustomize
Setup with Kustomize
Add the following gke-sa-patch.yaml to the kustomization file:
Setup with Helm
Setup with Helm
Add the following values to the helm install:
Setup on Standalone VMs
Setup on Standalone VMs
- This authentication method is not supported for standalone installations.
Creating a new Provider
After completing the listener setup, you can create a new provider.- Navigate to the Dashboard.
- Add a new provider:
- Select
GCP
as the provider type. - Specify the fields based on your installation:
ProjectId
: GCP Project ID.Topic
: Name of the Pub/Sub Topic.Subscription
: Name of the Pub/Sub Subscription.
Setting Up GCP
The final step is to configure GCP:- Enable Cloud Audit Logs for all Secret Manager events.
- Create a Pub/Sub Topic and Subscription.
- Set up a log router to route audit logs to the Topic.
- Create a Service Account and assign the necessary permissions.
- Add the necessary configuration based on your installation method.
Configure the project Cloud Audit Logs to send information on all SecretManager events
Enabling Audit Logging for Secret Manager
Creating a Pub/Sub Topic and Subscription
Creating a Log Router
Create a Service account and grant it the needed permissions
Add the needed configuration according to the installation method
Service Account Keys
Service Account Keys
GKE Metadata Server and Workload Identity
GKE Metadata Server and Workload Identity
GCE Metadata Server
GCE Metadata Server