1. Resources
  2. Detection rules
  3. Secret Manager Secrets Read or Shared in Google Cloud

Secret Manager Secrets Read or Shared in Google Cloud detection rules

An attacker who controls an identity with Secret Manager Secret Accessor or Owner reads secret payloads, or changes the allow policy of a secret so an identity they control can, and collects the passwords, keys and tokens stored there.

Platform
Google Cloud
Severity
High
Log source
Google Cloud Audit Logs
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
The secretmanager.versions.access permission on the secret or above it, or the right to set the secret's allow policy and grant that access to another identity.
Impact
Working credentials for whatever the secrets protect, used outside Google Cloud where Cloud Audit Logs see nothing and valid until each secret is rotated.
Response
Rotate every secret the identity read, production first, by changing the credential in the system it protects, and remove the binding that gave the reader access.
Mitigation
Grant Secret Manager Secret Accessor on individual secrets to the service account of the workload that needs them, not on projects, folders or the organization.
API methods
google.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersiongoogle.cloud.secretmanager.v1.SecretManagerService.SetIamPolicy

How the attack works

Secret Manager stores passwords, API keys and tokens as secret versions. The permission secretmanager.versions.access returns the payload of a version. It is part of the roles Secret Manager Secret Accessor and Secret Manager Admin, and of the basic role Owner; Editor and Viewer do not include it. The roles can be granted on one secret or on a project, folder or organization, and a binding above the secret covers every secret below it.

Attackers who reach an identity with that permission read the payloads. What they collect are credentials for other systems, such as databases, SaaS platforms and deployment pipelines, so the compromise spreads beyond Google Cloud. The allow policy of a secret is a second path: secretmanager.secrets.setIamPolicy, part of Secret Manager Admin, lets an identity add a reader of its choice, for example an account that will keep access after the compromised identity has been cleaned up.

The two paths leave different records. A read is an AccessSecretVersion entry from secretmanager.googleapis.com in the Data Access audit logs. Except for BigQuery, Data Access audit logs are disabled by default, so unless they have been enabled for Secret Manager a read leaves no audit entry at all. A change to the allow policy of a secret is a SetIamPolicy entry in the Admin Activity audit logs, which are always written. Workloads read their secrets constantly, so the read rule here looks only at reads made by user accounts. A threshold rule covers every caller, service accounts included, and counts how many different secret versions one identity reads within a short time.

What an attacker needs

  • secretmanager.versions.access on the secret, through Secret Manager Secret Accessor, Secret Manager Admin or Owner granted on the secret or on a project, folder or organization above it.
  • Or secretmanager.secrets.setIamPolicy on the secret (Secret Manager Admin), to grant that access to another identity first.

Impact

The attacker holds working credentials for whatever the secrets protect. Those credentials are used outside Google Cloud, where Cloud Audit Logs see nothing, and they stay valid until each secret is rotated. A binding added to the allow policy of a secret keeps it readable after the compromised identity has been cleaned up.

Detection rules

Many Secret Manager Secrets Read by One Principal in Google Cloud

Counts, per caller (principalEmail), how many different secret versions (protoPayload.resourceName) had their payload read with AccessSecretVersion. Ten or more within 15 minutes fits collection: an identity reading whatever secrets it can reach rather than the few its workload needs. Unlike the user account rule on this page, the count includes service accounts, so a stolen workload credential that sweeps the secrets of a project is counted as well. The count is of resource names, so read them in the matching entries to see how many different secrets they cover. The count and the window are starting points to tune. These are Data Access audit entries, so the rule needs Data Access audit logs enabled for Secret Manager.

Fires when one protoPayload.authenticationInfo.principalEmail has at least 10 different protoPayload.resourceName values within 15 minutes.

Threshold ruleLevelMediumStatusExperimentalLog sourceGoogle Cloud Audit Logs
title: Secret Manager Secret Payload Read in Google Cloud (Bulk Read Base Event)
id: 513607e5-0b27-4a68-bb46-871bf57dc309
name: gcp_secret_manager_payload_read_bulk
status: experimental
description: >-
  Base event of the threshold rule in this file. A Data Access audit entry
  (DATA_READ) for AccessSecretVersion, the method that returns the payload of
  a Secret Manager secret version, by any caller.
logsource:
  product: gcp
  service: gcp.audit
detection:
  selection:
    protoPayload.serviceName: secretmanager.googleapis.com
    protoPayload.methodName: google.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersion
  condition: selection
level: low
---
title: Many Secret Manager Secrets Read by One Principal in Google Cloud
id: a51dfe8b-a8d1-4bb0-a5b7-2beee1b80f7e
status: experimental
description: >-
  Counts, per caller (principalEmail), how many different secret versions
  (protoPayload.resourceName) had their payload read with AccessSecretVersion.
  Ten or more within 15 minutes fits collection: an identity reading
  whatever secrets it can reach rather than the few its workload needs.
  Unlike the user account rule on this page, the count includes service
  accounts, so a stolen workload credential that sweeps the secrets of a
  project is counted as well. The count is of resource names, so read them in
  the matching entries to see how many different secrets they cover. The
  count and the window are starting points to tune. These are Data Access audit entries, so the rule needs Data Access
  audit logs enabled for Secret Manager.
references:
  - https://docs.cloud.google.com/secret-manager/docs/audit-logging
  - https://docs.cloud.google.com/logging/docs/reference/audit/auditlog/rest/Shared.Types/AuditLog
  - https://docs.cloud.google.com/logging/docs/audit/configure-data-access
  - https://attack.mitre.org/techniques/T1555/006/
author: Forestall
date: 2026-11-18
tags:
  - attack.credential-access
  - attack.t1555.006
correlation:
  type: value_count
  rules:
    - gcp_secret_manager_payload_read_bulk
  group-by:
    - protoPayload.authenticationInfo.principalEmail
  timespan: 15m
  condition:
    field: protoPayload.resourceName
    gte: 10
falsepositives:
  - Applications that load all of their configuration from Secret Manager when they start, and secret synchronization tools that copy secrets into a cluster or another store on a schedule. Their service accounts read the same set of secrets each time. Measure what they read and raise the count for them, or exclude them by principalEmail in the base rule.
  - Administrators who rotate or verify many secrets in one session.
  - The values of 10 secret versions and 15 minutes are starting points, not tested limits.
level: medium

False positives

  • Applications that load all of their configuration from Secret Manager when they start, and secret synchronization tools that copy secrets into a cluster or another store on a schedule. Their service accounts read the same set of secrets each time. Measure what they read and raise the count for them, or exclude them by principalEmail in the base rule.
  • Administrators who rotate or verify many secrets in one session.
  • The values of 10 secret versions and 15 minutes are starting points, not tested limits.

Allow Policy Changed on a Secret Manager Secret in Google Cloud

Detects any change to the allow policy of a single Secret Manager secret (SetIamPolicy, Admin Activity audit log, always written). The allow policy decides who may read the payload, so a new binding is a way to obtain or keep access to a secret. The rule does not read the policy: it cannot tell a new reader from a removed one, so use it as a baseline signal where such changes are rare, or scope it to the secrets that matter. Grants made on a project, folder or organization are Cloud Resource Manager events and are not matched here.

LevelLowStatusExperimentalLog sourceGoogle Cloud Audit Logs
title: Allow Policy Changed on a Secret Manager Secret in Google Cloud
id: 24774df2-7cc9-4da7-9a36-9ab71050a354
status: experimental
description: >-
  Detects any change to the allow policy of a single Secret Manager secret
  (SetIamPolicy, Admin Activity audit log, always written). The allow policy
  decides who may read the payload, so a new binding is a way to obtain or keep
  access to a secret. The rule does not read the policy: it cannot tell a new
  reader from a removed one, so use it as a baseline signal where such changes
  are rare, or scope it to the secrets that matter. Grants made on a project,
  folder or organization are Cloud Resource Manager events and are not matched
  here.
references:
  - https://docs.cloud.google.com/secret-manager/docs/audit-logging
  - https://docs.cloud.google.com/secret-manager/docs/manage-access-to-secrets
  - https://docs.cloud.google.com/secret-manager/docs/access-control
  - https://attack.mitre.org/techniques/T1555/006/
author: Forestall
date: 2026-11-14
tags:
  - attack.credential-access
  - attack.t1555.006
logsource:
  product: gcp
  service: gcp.audit
detection:
  selection:
    protoPayload.serviceName: secretmanager.googleapis.com
    protoPayload.methodName: google.cloud.secretmanager.v1.SecretManagerService.SetIamPolicy
  condition: selection
falsepositives:
  - Infrastructure-as-code runs and deployment pipelines that give a workload access to its secret. Add the pipeline identity to a filter_* selection on protoPayload.authenticationInfo.principalEmail, or limit the rule to privileged secrets by protoPayload.resourceName.
  - Calls that only remove bindings also match.
level: low

False positives

  • Infrastructure-as-code runs and deployment pipelines that give a workload access to its secret. Add the pipeline identity to a filter_* selection on protoPayload.authenticationInfo.principalEmail, or limit the rule to privileged secrets by protoPayload.resourceName.
  • Calls that only remove bindings also match.

Secret Manager Secret Payload Read by a User Account in Google Cloud

Detects a user account (not a service account) reading the payload of a Secret Manager secret version (AccessSecretVersion). Workloads read their secrets through service accounts, so a person reading a payload directly is uncommon in production. These are Data Access audit log entries (DATA_READ): enable Data Access audit logs for Secret Manager first, otherwise the rule never fires. Federated callers without a principalEmail are not matched, and a read that is denied may be logged without the principal email and is then not matched either.

LevelMediumStatusExperimentalLog sourceGoogle Cloud Audit Logs
title: Secret Manager Secret Payload Read by a User Account in Google Cloud
id: 1ff44d7f-10e4-4a3f-af2f-412fb34abc68
status: experimental
description: >-
  Detects a user account (not a service account) reading the payload of a
  Secret Manager secret version (AccessSecretVersion). Workloads read their
  secrets through service accounts, so a person reading a payload directly is
  uncommon in production. These are Data Access audit log entries (DATA_READ):
  enable Data Access audit logs for Secret Manager first, otherwise the rule
  never fires. Federated callers without a principalEmail are not matched, and
  a read that is denied may be logged without the principal email and is then
  not matched either.
references:
  - https://docs.cloud.google.com/secret-manager/docs/audit-logging
  - https://docs.cloud.google.com/secret-manager/docs/best-practices
  - https://docs.cloud.google.com/logging/docs/audit
  - https://attack.mitre.org/techniques/T1555/006/
author: Forestall
date: 2026-11-14
tags:
  - attack.credential-access
  - attack.t1555.006
logsource:
  product: gcp
  service: gcp.audit
detection:
  selection:
    protoPayload.serviceName: secretmanager.googleapis.com
    protoPayload.methodName: google.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersion
    protoPayload.authenticationInfo.principalEmail|contains: '@'
  filter_service_accounts:
    protoPayload.authenticationInfo.principalEmail|endswith: .gserviceaccount.com
  condition: selection and not 1 of filter_*
falsepositives:
  - Administrators and developers who read a secret on purpose, for example while debugging or rotating it by hand, and people who run infrastructure-as-code from their own account. Add approved readers to a filter_* selection per secret (principalEmail together with protoPayload.resourceName) and review everyone else.
  - Projects used for development, where people read their own test secrets. Scope the rule to the projects that hold production secrets.
level: medium

False positives

  • Administrators and developers who read a secret on purpose, for example while debugging or rotating it by hand, and people who run infrastructure-as-code from their own account. Add approved readers to a filter_* selection per secret (principalEmail together with protoPayload.resourceName) and review everyone else.
  • Projects used for development, where people read their own test secrets. Scope the rule to the projects that hold production secrets.

Detection logic

Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.

Allow policy of a secret changed and the secret read by a new reader soon after

Detection hypothesisSequence of eventsNeeds a baseline

Changing the allow policy of a secret is the second path to its payload: the attacker adds a reader of their choice and reads the secret through it. A policy change followed within hours by a read from an identity that had not read that secret before ties the change to its use, which the policy rule alone cannot show.

  1. A google.cloud.secretmanager.v1.SecretManagerService.SetIamPolicy entry from secretmanager.googleapis.com, the event of the allow policy rule on this page. Note the secret in protoPayload.resourceName and the caller in authenticationInfo.principalEmail.
  2. Within 24 hours, google.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersion entries (Data Access, DATA_READ) whose protoPayload.resourceName is a version of the same secret.
  3. Raise a reader in authenticationInfo.principalEmail that did not read this secret in the 30 days before the policy change. Give it high priority when the reader is the caller of the policy change, a user account or an identity from outside your organization.

Eventsgoogle.cloud.secretmanager.v1.SecretManagerService.SetIamPolicygoogle.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersion

LimitsGiving a new workload access to its secret produces the same sequence, followed by reads from the workload's service account, so new deployments need to be recognised. Grants made on a project, folder or organization are Cloud Resource Manager events and are not seen here. Without Data Access audit logs for Secret Manager there is no read to find. The 24 hours and 30 days are starting points.

Triage

  • Identify the reader (protoPayload.authenticationInfo.principalEmail) and the secret (protoPayload.resourceName). A person reading a production secret needs a reason.
  • Check the caller IP address and user agent in protoPayload.requestMetadata against the normal working pattern of that person.
  • Look for ListSecrets entries and for more AccessSecretVersion entries from the same principal. Reading many secrets in a short time is collection, not maintenance.
  • For SetIamPolicy, read the current allow policy of the secret named in protoPayload.resourceName and find the new member and role. A user account, an external identity or a service account from another project needs an owner and a reason.
  • If the activity is not explained, rotate the secret, remove the binding and review what the stolen credential gives access to.

Response

Once the attack is confirmed:

  1. Rotate every secret the identity read, starting with those that protect production systems. Rotating means changing the credential in the system it protects and storing the new value as a new version. A new version alone leaves the stolen value working.
  2. Disable the old secret versions once the new ones are in use, and destroy them when you are sure that nothing depends on them.
  3. Remove the binding that gave the reader access. Check the allow policy of each affected secret and of the project, folder and organization above it, because a binding above the secret covers every secret below it.
  4. Contain the identity that read the secrets or changed the allow policy. Suspend the user or disable the service account, and reset its credentials, until the compromise is understood.
  5. Review the systems the secrets protect for use of the stolen credentials since the first read. That use happens outside Google Cloud, so it shows in the logs of the database, SaaS platform or pipeline and not in Cloud Audit Logs.
  6. Where Data Access audit logs were not enabled for Secret Manager, there is no record of reads. In that case rotate every secret the identity could reach, not only the ones with a logged read.

Mitigation

  • Grant Secret Manager Secret Accessor on individual secrets, or limit it with IAM Conditions, to the service account of the workload that needs the secret. Avoid granting it on projects, folders or the organization.
  • Keep Owner off day-to-day accounts in projects that hold secrets, because Owner includes the permission to read payloads.
  • Put applications and environments (staging, production) in separate projects, so one binding never covers secrets of unrelated systems.
  • Enable Data Access audit logs for Secret Manager, at least in the projects that hold production secrets; without them a read cannot be detected or investigated.
  • Rotate secrets on a schedule, and immediately after a read that nobody can explain.

Frequently asked questions

Why did the secret read rule never fire in our environment?

A read is an `AccessSecretVersion` entry in the Data Access audit logs, and except for BigQuery those logs are disabled by default. Unless they are enabled for Secret Manager, a read leaves no audit entry and the rule has nothing to match. The rule for allow policy changes on a secret has no such dependency, because `SetIamPolicy` is an Admin Activity entry and is always written.

Why does the read rule ignore service accounts?

Workloads read their secrets through service accounts all the time, so the rule looks only at reads by user accounts, which are uncommon in production. A compromised service account that reads a few secrets is therefore not caught by it. One that reads many different secrets in a short time is counted by the threshold rule on this page, which includes every caller. Federated callers without a `principalEmail`, and denied reads that are logged without the principal, are not matched either.

Does the allow policy rule show who was given access to the secret?

No. It fires on any `SetIamPolicy` call on a single secret and does not read the policy, so it cannot tell a new reader from a removed one. Read the current allow policy of the secret named in `protoPayload.resourceName` to find the new member and role. Grants made on a project, folder or organization are Cloud Resource Manager events and are not matched by this rule.

Is the incident over once the reader's access has been removed?

No. The attacker already holds the passwords, keys or tokens that were stored in the secrets, and they are used outside Google Cloud, where Cloud Audit Logs see nothing. Each of them stays valid until it is rotated in the system it protects.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.