Join our Newsletter — 33% off our NHI Course
Home› Guides› How to audit who can read secrets in…
Guide Secrets Management

How to audit who can read secrets in AWS Secrets Manager: effective access across every policy layer

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 28 November 2026 16 min read
On this page

Knowing that a secret exists in AWS Secrets Manager tells you nothing about who can read it: read access is the combined result of IAM identity policies, the secret's own resource policy, the KMS key policy and grants, and any organisation guardrails, and most teams only ever look at one of those. This runbook shows how to work out effective read access to a secret, which principals can call GetSecretValue and actually decrypt the result, in a single account and across accounts. It covers the evaluation logic AWS applies, the tools that answer each part (IAM Access Analyzer, the IAM policy simulator, GetResourcePolicy, CloudTrail), how to triage what you find and how to tighten access without breaking workloads. It is written for cloud security engineers and platform teams who own secrets in one account or across an AWS Organization. Rotation is covered separately in How to find unrotated secrets in AWS Secrets Manager; this page is the access question.

This is an independent guide from NHI Mgmt Group, based on AWS's public documentation as of November 2026. It is not sponsored or reviewed by AWS. Product features change, so confirm settings against AWS's current documentation.

Key takeaways

  • Effective read access needs two permissions, not one. A principal must be allowed secretsmanager:GetSecretValue on the secret and, for a customer managed key, kms:Decrypt on the key that encrypts it. Audit both or the answer is wrong.
  • The AWS managed key widens same-account access. The aws/secretsmanager key policy lets any caller in the account use the key through Secrets Manager, so for those secrets the IAM and resource policies are the only gate.
  • Cross-account reads need an allow on both sides. AWS requires an allow in the secret's resource policy and in the caller's identity policy, plus a customer managed key the caller can decrypt with.
  • No single AWS tool gives the full answer. IAM Access Analyzer external access findings cover cross-account and public exposure of secrets and keys; the policy simulator and identity policy review cover principals inside the account.
  • Who can change the policy matters as much as who can read. secretsmanager:PutResourcePolicy lets a principal grant itself access, and AWS documents it as a privilege escalation path.

When you need this

Run this audit when a secret holds a credential with real reach (a production database master password, a payment provider API key, a signing key), when an auditor asks who can read a given credential, after a role or account compromise, and before you share a secret with another account. It is also the evidence for a periodic privilege review under NIST SP 800-53 AC-6(7) Review of User Privileges, applied to non-human readers as well as people.

The question has a precise form: for secret S, which IAM principals can successfully call GetSecretValue or BatchGetSecretValue and receive a decrypted value? A principal that can call the API but cannot use the KMS key gets an error, not a secret. A principal that can decrypt with the key but has no Secrets Manager permission gets nothing either. Effective access is the intersection.

How AWS decides whether a read succeeds

AWS documents that Secrets Manager evaluates the resource-based policy attached to the secret and all identity-based policies attached to the calling user or role. The order is fixed: an explicit deny anywhere wins, then an explicit allow grants access, and anything not explicitly allowed is implicitly denied. For cross-account requests there must be an allow in both the secret's resource policy and the caller's identity policy.

On top of that sit two further layers. Because Secrets Manager calls AWS KMS Decrypt on behalf of the caller when it serves GetSecretValue, the caller also needs permission to use the KMS key, granted through the key policy, an IAM policy the key policy allows, or a grant. And in an AWS Organization, service control policies (SCPs) cap what principals can do and resource control policies (RCPs) cap what can be done to resources; AWS lists both secretsmanager and kms as RCP-supported services.

LayerWhere it livesWhat it can do to read accessHow to read it
Identity policyIAM users, groups, roles (managed and inline), permission sets via IAM Identity CenterGrants GetSecretValue in the same account; required for cross-accountIAM policy simulator, aws iam get-account-authorization-details
Permissions boundaryAttached to a user or roleCaps identity policy grants; never grantsSimulator (one boundary at a time)
Secret resource policyThe secretGrants to named principals, including other accounts; can deny by VPC endpoint or VPCaws secretsmanager get-resource-policy
KMS key policy and grantsThe key that encrypts the secretAllows or blocks kms:Decrypt; customer managed keys only can be shared cross-accountaws kms get-key-policy, aws kms list-grants
SCPAWS Organizations, member accountsCaps principals' maximum permissionsOrganizations console, simulator reports SCP outcome
RCPAWS Organizations, member accountsCaps access to resources, including from outside the organisationOrganizations console; not evaluated by the simulator

For the identity and policy fundamentals behind this table, see the AWS IAM Policies and Roles Guide.

Before you start

  • Audit role: a read-only role with secretsmanager:ListSecrets, DescribeSecret and GetResourcePolicy, kms:GetKeyPolicy, kms:ListGrants and kms:DescribeKey, IAM read actions including iam:SimulatePrincipalPolicy, and access-analyzer:List*. It needs no GetSecretValue: you are auditing access, not reading values.
  • Inventory: the list of secrets per Region from ListSecrets, with each secret's KmsKeyId. AWS notes that ListSecrets and DescribeSecret return no KMS key identifier for secrets that use the AWS managed key, so a blank value means aws/secretsmanager.
  • Analyzer: an IAM Access Analyzer external access analyzer with the account or organisation as the zone of trust, in every Region that holds secrets.
  • Logs: a CloudTrail trail delivering to S3 or CloudTrail Lake. Event history only keeps 90 days per Region, which is too short to answer "who has actually read this".
  • Scope: start with the secrets that matter most, tagged or named as production, rather than every secret at once.

Step-by-step audit

  1. Classify each secret by key type. Split the inventory into secrets on aws/secretsmanager and secrets on a customer managed key. For the first group the key adds no restriction inside the account: its key policy allows use only through Secrets Manager (kms:ViaService set to secretsmanager.<Region>.amazonaws.com) for callers in the account (kms:CallerAccount). So anyone in the account with GetSecretValue on the secret can read it. For the second group, note the key ARN; the key policy is a real gate.
  2. Pull every resource policy. Call get-resource-policy for each secret and store the JSON. Flag any statement with "Principal": "*" or "AWS": "*", account root principals (arn:aws:iam::<account>:root, which delegates to every principal in that account that its own IAM policies allow), principals in accounts outside your organisation, and service principals without aws:SourceArn and aws:SourceAccount conditions. AWS recommends both conditions on service principals to avoid a confused deputy.
  3. Read Access Analyzer external access findings. AWS states that the external access analyzer analyses secret policies, including conditions, and KMS key policies and grants, and raises a finding when an external entity can access them. Filter findings on AWS::SecretsManager::Secret and AWS::KMS::Key. An ACCESS_DENIED error finding on a key means the analyzer cannot read the key metadata; AWS documents a key policy statement for the AWSServiceRoleForAccessAnalyzer role to fix it. Until you fix it, that key is unaudited. See the IAM Access Analyzer Guide.
  4. Find the in-account readers. Access Analyzer's internal access analyzer does not cover Secrets Manager or KMS (AWS lists S3, RDS snapshots and DynamoDB as its resource types), so same-account readers come from identity policies. Export them with aws iam get-account-authorization-details and search for statements whose actions match secretsmanager:GetSecretValue, secretsmanager:BatchGetSecretValue, secretsmanager:Get*, secretsmanager:* or *, with a resource that matches the secret ARN (including * and prefix wildcards). This candidate list is usually much larger than teams expect, because broad administrative and developer policies match.
  5. Confirm each candidate with the policy simulator. Run aws iam simulate-principal-policy for each candidate role against secretsmanager:GetSecretValue and the secret ARN, and supply the secret's resource policy with --resource-policy: AWS notes that outside the console the simulator does not fetch resource policies for you. Supply values for condition keys the policies use (for example aws:SourceVpce or secretsmanager:ResourceTag/...), or the simulator denies the action. For cross-account cases, read EvalDecisionDetails, which shows the identity and resource policy decisions separately.
  6. Check the key for every confirmed reader. For secrets on a customer managed key, read the key policy and grants. If the key policy contains the default statement that gives the account root principal kms:*, IAM policies in the account can grant kms:Decrypt, so repeat the simulator check for kms:Decrypt on the key ARN. If the key policy names principals directly and has no root statement, only those principals (and grantees) can decrypt. Note any kms:ViaService or encryption context condition on kms:EncryptionContext:SecretARN, which narrows decryption to use through Secrets Manager or to specific secrets. See the AWS KMS Security Guide.
  7. Apply the organisation layers. Record any SCP or RCP that denies GetSecretValue or kms:Decrypt outside defined conditions. RCPs do not apply in the management account or to service-linked roles, and AWS states they do not restrict AWS managed KMS keys, so do not count them as a control in those cases. The simulator does not evaluate RCPs.
  8. Check who can change access. Repeat steps 4 and 5 for secretsmanager:PutResourcePolicy, secretsmanager:DeleteResourcePolicy, kms:PutKeyPolicy and kms:CreateGrant. Any principal holding these can widen read access later, which makes it a reader in practice.
  9. Compare permitted access with actual use. Query CloudTrail for GetSecretValue events with the secret in requestParameters, grouped by userIdentity.arn (for assumed roles, the role ARN in sessionContext.sessionIssuer). AWS documents that a BatchGetSecretValue call also produces a GetSecretValue entry, so one query catches both. KMS Decrypt events with invokedBy set to secretsmanager.amazonaws.com carry the SecretARN in their encryption context, which gives a second view of reads of secrets on customer managed keys.
  10. Record the result. For each secret: owner, key type, list of principals with effective read, how each was granted (identity, resource policy, cross-account), last observed read per principal, and principals who can change access. This register is the evidence for the review and the baseline for the next one.

Triage what you find

FindingRiskTypical fix
Resource policy with a wildcard principalPublic or very broad access, limited only by the KMS key and conditionsReplace with named role ARNs; reapply with --block-public-policy
Cross-account principal outside the organisationThird party can read if its own policy allowsConfirm a current business need and owner; otherwise remove from both resource policy and key policy
Account root principal in a resource policyDelegates to every principal the other account's IAM allowsName the specific role instead
Identity policy with secretsmanager:* or GetSecretValue on *Role reads every secret in the accountScope to secret ARNs or a name prefix, or use tag conditions
Production secret on aws/secretsmanagerKey policy adds no restriction in the accountMove to a customer managed key with a key policy naming the readers
Reader with no GetSecretValue in 90 days or moreStanding access nobody usesRemove after confirming with the owner
Principal holding PutResourcePolicy or kms:PutKeyPolicy without needCan grant itself or others accessRestrict to a small administrative role

Decision guidance: which control to tighten

  • Identity policy or resource policy: in a single account, scoped identity policies are easier to review centrally. Use resource policies when you must grant cross-account access, or to add deny conditions (VPC endpoint, organisation ID) that hold no matter which identity policy is attached.
  • AWS managed key or customer managed key: the AWS managed key is simpler and has no key policy to maintain, but it cannot be used for cross-account access and gives no second gate. A customer managed key costs money and needs key policy care, and in exchange lets you name decryptors and bind use to kms:ViaService and the SecretARN encryption context. A per-application key is a reasonable step for high-value secrets.
  • Tag-based or ARN-based scoping: ARN prefixes (secret:prod/payments/*) are predictable. Tag conditions scale better but depend on who can change tags; restrict TagResource and UntagResource if you rely on them.
  • Small and large estates: a single account with a few dozen secrets can be audited with the simulator by hand. Across an organisation, run the external access analyzer with the organisation as zone of trust, collect authorisation details centrally, and script the simulator calls from a delegated security account.

Verify, roll out changes and roll back

  1. Test policy changes before applying them. Use the Access Analyzer custom policy checks: CheckNoNewAccess confirms a revised policy grants nothing new, and CheckAccessNotGranted confirms a policy does not grant secretsmanager:GetSecretValue. AWS charges per check.
  2. Use observed reads to avoid outages. Before removing a principal, confirm from CloudTrail that it has not read the secret over a full business cycle (month-end jobs and quarterly batch runs are common surprises).
  3. Change one layer at a time. Tighten the resource policy first, then identity policies, then the key policy, re-running the simulator after each.
  4. Keep the old policy. PutResourcePolicy replaces any existing policy, so save the current JSON from get-resource-policy before every change. Rolling back is a put-resource-policy with the saved file.
  5. Watch for errors after the change. Alert on AccessDenied errors on GetSecretValue and on KMS Decrypt for the changed secrets for at least a week.

Detection and measurement

Monitor these continuously, not only during the audit:

  • Policy changes: CloudTrail PutResourcePolicy, DeleteResourcePolicy on secrets and PutKeyPolicy, CreateGrant on keys that protect secrets.
  • New external access: new active Access Analyzer findings on secrets and keys, routed to the owning team.
  • Unusual readers: GetSecretValue from a principal not in the secret's register, or from outside the expected VPC endpoint. See Secrets Access Logging and Detection for baselining.

Metrics that show the programme is working (sample targets, set your own):

  • Percentage of production secrets with a recorded list of effective readers reviewed in the last 90 days.
  • Average and maximum number of principals with effective read per production secret.
  • Number of active Access Analyzer external access findings on secrets and keys, and median days to resolve.
  • Percentage of permitted readers that actually read the secret in the last 90 days (low values mean standing access to remove).
  • Number of principals outside the administrative role holding PutResourcePolicy or kms:PutKeyPolicy.

Where identity fits

Almost every reader of a production secret is a non-human identity: a Lambda execution role, an ECS task role, a CI/CD deployment role, an integration in another account. Those roles are rarely reviewed like human access, and broad roles created for a pipeline tend to accumulate secret reads over time. Treat each reader as an identity with an owner and a purpose, and remove it when the workload goes. See the How to find unused AWS IAM roles and access keys runbook for clearing the roles that drop out of this audit.

Framework mapping

FrameworkReferenceHow this audit supports it
NIST SP 800-53 Rev 5AC-3 Access Enforcement; AC-6 Least Privilege; AC-6(7) Review of User PrivilegesDefines and reviews who can read each credential
NIST SP 800-53 Rev 5AU-6 Audit Record Review, Analysis, and ReportingCloudTrail comparison of permitted and actual reads
NIST SP 800-53 Rev 5SC-12 Cryptographic Key Establishment and Management; SC-28 Protection of Information at RestKMS key policy as a second gate on secret values
NIST CSF 2.0PR.AA-05; DE.CM-03Permissions managed and reviewed with least privilege; activity monitored
ISO/IEC 27001:2022 Annex AA.5.15 Access control; A.5.18 Access rights; A.8.24 Use of cryptographyAccess rights reviewed; key use controlled
MITRE ATT&CK v20T1555.006 Cloud Secrets Management Stores; T1078.004 Cloud AccountsReduces the set of identities an attacker can use to read stored secrets

Common failure patterns

  • Auditing only the resource policy. AWS itself notes that BlockPublicPolicy and console validation only cover the policy on the secret, and recommends also inspecting identity policies and KMS key policies. Most same-account readers are granted by identity policies.
  • Treating the KMS key as a control when it is the AWS managed key. For aws/secretsmanager secrets the key allows any in-account caller through Secrets Manager, so it narrows nothing.
  • Ignoring wildcard administrative policies. Roles with "Action": "*" read every secret on an AWS managed key, and every secret on a customer managed key whose key policy lets IAM grant use. They belong in the reader list.
  • Running the simulator without the resource policy or context. From the CLI the simulator does not fetch resource policies, and missing condition values produce denies, so results can understate or overstate access.
  • Leaving cross-account grants after the project ends. The resource policy and the key policy statement both persist until someone removes them; remove both.
  • Overlooking who can edit policies. A principal with PutResourcePolicy can grant itself read access at any time, which AWS describes as a privilege escalation path.

Practitioner checklist

  • List every secret per Region with its KMS key, and mark those on aws/secretsmanager.
  • Export every secret resource policy and flag wildcard, root and external principals.
  • Run an external access analyzer per Region and resolve any KMS ACCESS_DENIED error findings.
  • Build the in-account reader list from identity policies and confirm each with simulate-principal-policy, supplying the resource policy and context keys.
  • Check kms:Decrypt for every reader of secrets on customer managed keys, including grants.
  • List principals who can change access (PutResourcePolicy, kms:PutKeyPolicy, kms:CreateGrant).
  • Compare permitted readers with CloudTrail GetSecretValue history and remove unused access.
  • Save every policy before changing it and test changes with CheckNoNewAccess.
  • Alert on policy changes and new external access findings for production secrets.

Standards and references

Related NHI Mgmt Group resources: AWS Secrets Manager · How to find unrotated secrets in AWS Secrets Manager · IAM Access Analyzer Guide · AWS KMS Security Guide · How to find AWS IAM policies with wildcard actions

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.