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:GetSecretValueon the secret and, for a customer managed key,kms:Decrypton the key that encrypts it. Audit both or the answer is wrong. - The AWS managed key widens same-account access. The
aws/secretsmanagerkey 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:PutResourcePolicylets 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.
| Layer | Where it lives | What it can do to read access | How to read it |
|---|---|---|---|
| Identity policy | IAM users, groups, roles (managed and inline), permission sets via IAM Identity Center | Grants GetSecretValue in the same account; required for cross-account | IAM policy simulator, aws iam get-account-authorization-details |
| Permissions boundary | Attached to a user or role | Caps identity policy grants; never grants | Simulator (one boundary at a time) |
| Secret resource policy | The secret | Grants to named principals, including other accounts; can deny by VPC endpoint or VPC | aws secretsmanager get-resource-policy |
| KMS key policy and grants | The key that encrypts the secret | Allows or blocks kms:Decrypt; customer managed keys only can be shared cross-account | aws kms get-key-policy, aws kms list-grants |
| SCP | AWS Organizations, member accounts | Caps principals' maximum permissions | Organizations console, simulator reports SCP outcome |
| RCP | AWS Organizations, member accounts | Caps access to resources, including from outside the organisation | Organizations 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,DescribeSecretandGetResourcePolicy,kms:GetKeyPolicy,kms:ListGrantsandkms:DescribeKey, IAM read actions includingiam:SimulatePrincipalPolicy, andaccess-analyzer:List*. It needs noGetSecretValue: you are auditing access, not reading values. - Inventory: the list of secrets per Region from
ListSecrets, with each secret'sKmsKeyId. AWS notes thatListSecretsandDescribeSecretreturn no KMS key identifier for secrets that use the AWS managed key, so a blank value meansaws/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
- Classify each secret by key type. Split the inventory into secrets on
aws/secretsmanagerand 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:ViaServiceset tosecretsmanager.<Region>.amazonaws.com) for callers in the account (kms:CallerAccount). So anyone in the account withGetSecretValueon the secret can read it. For the second group, note the key ARN; the key policy is a real gate. - Pull every resource policy. Call
get-resource-policyfor 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 withoutaws:SourceArnandaws:SourceAccountconditions. AWS recommends both conditions on service principals to avoid a confused deputy. - 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::SecretandAWS::KMS::Key. AnACCESS_DENIEDerror finding on a key means the analyzer cannot read the key metadata; AWS documents a key policy statement for theAWSServiceRoleForAccessAnalyzerrole to fix it. Until you fix it, that key is unaudited. See the IAM Access Analyzer Guide. - 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-detailsand search for statements whose actions matchsecretsmanager: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. - Confirm each candidate with the policy simulator. Run
aws iam simulate-principal-policyfor each candidate role againstsecretsmanager:GetSecretValueand 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 exampleaws:SourceVpceorsecretsmanager:ResourceTag/...), or the simulator denies the action. For cross-account cases, readEvalDecisionDetails, which shows the identity and resource policy decisions separately. - 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 grantkms:Decrypt, so repeat the simulator check forkms:Decrypton the key ARN. If the key policy names principals directly and has no root statement, only those principals (and grantees) can decrypt. Note anykms:ViaServiceor encryption context condition onkms:EncryptionContext:SecretARN, which narrows decryption to use through Secrets Manager or to specific secrets. See the AWS KMS Security Guide. - Apply the organisation layers. Record any SCP or RCP that denies
GetSecretValueorkms:Decryptoutside 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. - Check who can change access. Repeat steps 4 and 5 for
secretsmanager:PutResourcePolicy,secretsmanager:DeleteResourcePolicy,kms:PutKeyPolicyandkms:CreateGrant. Any principal holding these can widen read access later, which makes it a reader in practice. - Compare permitted access with actual use. Query CloudTrail for
GetSecretValueevents with the secret inrequestParameters, grouped byuserIdentity.arn(for assumed roles, the role ARN insessionContext.sessionIssuer). AWS documents that aBatchGetSecretValuecall also produces aGetSecretValueentry, so one query catches both. KMSDecryptevents withinvokedByset tosecretsmanager.amazonaws.comcarry theSecretARNin their encryption context, which gives a second view of reads of secrets on customer managed keys. - 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
| Finding | Risk | Typical fix |
|---|---|---|
| Resource policy with a wildcard principal | Public or very broad access, limited only by the KMS key and conditions | Replace with named role ARNs; reapply with --block-public-policy |
| Cross-account principal outside the organisation | Third party can read if its own policy allows | Confirm a current business need and owner; otherwise remove from both resource policy and key policy |
| Account root principal in a resource policy | Delegates to every principal the other account's IAM allows | Name the specific role instead |
Identity policy with secretsmanager:* or GetSecretValue on * | Role reads every secret in the account | Scope to secret ARNs or a name prefix, or use tag conditions |
Production secret on aws/secretsmanager | Key policy adds no restriction in the account | Move to a customer managed key with a key policy naming the readers |
Reader with no GetSecretValue in 90 days or more | Standing access nobody uses | Remove after confirming with the owner |
Principal holding PutResourcePolicy or kms:PutKeyPolicy without need | Can grant itself or others access | Restrict 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:ViaServiceand theSecretARNencryption 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; restrictTagResourceandUntagResourceif 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
- Test policy changes before applying them. Use the Access Analyzer custom policy checks:
CheckNoNewAccessconfirms a revised policy grants nothing new, andCheckAccessNotGrantedconfirms a policy does not grantsecretsmanager:GetSecretValue. AWS charges per check. - 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).
- Change one layer at a time. Tighten the resource policy first, then identity policies, then the key policy, re-running the simulator after each.
- Keep the old policy.
PutResourcePolicyreplaces any existing policy, so save the current JSON fromget-resource-policybefore every change. Rolling back is aput-resource-policywith the saved file. - Watch for errors after the change. Alert on
AccessDeniederrors onGetSecretValueand on KMSDecryptfor the changed secrets for at least a week.
Detection and measurement
Monitor these continuously, not only during the audit:
- Policy changes: CloudTrail
PutResourcePolicy,DeleteResourcePolicyon secrets andPutKeyPolicy,CreateGranton keys that protect secrets. - New external access: new active Access Analyzer findings on secrets and keys, routed to the owning team.
- Unusual readers:
GetSecretValuefrom 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
PutResourcePolicyorkms: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
| Framework | Reference | How this audit supports it |
|---|---|---|
| NIST SP 800-53 Rev 5 | AC-3 Access Enforcement; AC-6 Least Privilege; AC-6(7) Review of User Privileges | Defines and reviews who can read each credential |
| NIST SP 800-53 Rev 5 | AU-6 Audit Record Review, Analysis, and Reporting | CloudTrail comparison of permitted and actual reads |
| NIST SP 800-53 Rev 5 | SC-12 Cryptographic Key Establishment and Management; SC-28 Protection of Information at Rest | KMS key policy as a second gate on secret values |
| NIST CSF 2.0 | PR.AA-05; DE.CM-03 | Permissions managed and reviewed with least privilege; activity monitored |
| ISO/IEC 27001:2022 Annex A | A.5.15 Access control; A.5.18 Access rights; A.8.24 Use of cryptography | Access rights reviewed; key use controlled |
| MITRE ATT&CK v20 | T1555.006 Cloud Secrets Management Stores; T1078.004 Cloud Accounts | Reduces the set of identities an attacker can use to read stored secrets |
Common failure patterns
- Auditing only the resource policy. AWS itself notes that
BlockPublicPolicyand 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/secretsmanagersecrets 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
PutResourcePolicycan 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_DENIEDerror 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:Decryptfor 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
GetSecretValuehistory 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
- AWS: Determine who has permissions to your secrets
- AWS: Resource-based policies in Secrets Manager
- AWS: Cross-account access to Secrets Manager secrets
- AWS: Secret encryption and decryption in Secrets Manager
- AWS: Resource types supported by IAM Access Analyzer
- AWS: Testing IAM policies with the IAM policy simulator
- AWS: Resource control policies
- AWS: CloudTrail entries for Secrets Manager
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