Bedrock Caller Policies
On an AWS Bedrock connector, HYPR AgentPass™ identifies the AWS caller behind each request before forwarding it. It makes what it learned available to your policies as connector.aws.bedrock.* attributes. You can then write rules such as "block any Bedrock call we cannot attribute to a named developer" or "flag sessions that were not backed by MFA". They are enforced at the gateway, not reviewed afterward.
These attributes are available on AWS Bedrock and AWS Bedrock Mantle connectors only. To write a rule for one of the two, guard it with connector.template == "AWS_BEDROCK" or connector.template == "AWS_BEDROCK_MANTLE". For the attributes available on every connector, see the Attribute Reference.
You need Policies: Add to create a policy, Policies: Edit to change one and Policies: Delete to delete one. Admin holds all three for every policy. Operator and Supervisor hold them for the policies they own. This page assumes you are comfortable writing a policy by hand, and have an AWS Bedrock or AWS Bedrock Mantle connector configured.
Build the Rule on an Attribute That Is Always Present
These attributes describe the AWS caller as far as AgentPass could identify them. When a detail could not be resolved, the attribute is absent, and a condition that tests a missing attribute is never true.
A block written on user_email alone therefore allows every request on a connector where no developer is being named. Nothing in the Request log shows the rule is idle. How Policies Are Evaluated explains this behavior for every namespace.
Three attributes are always present on a Bedrock request, and are safe to build a rule on.
| Always-present attribute | What it tells you |
|---|---|
connector.aws.bedrock.identity_source | How far AgentPass got in identifying the caller |
connector.aws.bedrock.credential_type | What kind of AWS credential signed the request |
connector.aws.bedrock.has_security_token | Whether the credential carried a session token |
Every other attribute on this page is best-effort and may be missing.
The Safe Pattern
connector.aws.bedrock.identity_source is always present. It answers the question "did we manage to name this person?"
| Value | Meaning |
|---|---|
CLOUDTRAIL | The developer was resolved by name |
STS | The caller's AWS account was resolved, but not the person |
NONE | Neither could be resolved |
To say "we could not name this person," write:
connector.template == "AWS_BEDROCK" && connector.aws.bedrock.identity_source != "CLOUDTRAIL"
This rule fires on exactly the requests you meant, whether or not attribution is working, because the attribute it tests is always there.
The New policy wizard offers this expression under Examples on its Logic step, as Bedrock: unattributed caller, alongside Bedrock: no MFA. Click either to load it into the editor, then adjust it.
connector.aws.bedrock.mfa_authenticated is not always present. It is resolved only when the caller's identity was. A rule reading it acts on sessions AgentPass identified, and stays silent on the ones it did not. To also catch unidentified callers, pair it with an identity_source rule.
Check Whether Your Connector Can Name Developers
Before you rely on any best-effort attribute, confirm it is actually being populated on your traffic.
- Open the Request Log and select a recent request through the Bedrock connector.
- In the detail panel, find the Bedrock caller section.
- Check which details are filled in. A detail that is blank in the panel is also missing for a policy, so a condition testing it will not match.
If the panel shows a developer, rules that read user_email and the other identity attributes will work. If it shows only an AWS account, or nothing, those rules never fire. On AWS Bedrock Mantle, see Naming the developer behind a request.
Naming a developer requires the connector's optional identity enrichment. It is an IAM role or an access key that lets AgentPass read CloudTrail in your AWS account. Without it, requests are attributed to the AWS account, not a person. See Naming the developer behind a request for how to turn it on.
Observe mode is the quickest way to prove a caller rule works before it can block anything. Save it in Observe, send a Bedrock request, and confirm the match appears on the connector's Policies tab. A rule that matches nothing in Observe mode does nothing in Enforce mode either.
Policies Are What Governs API-Key Callers
A Bedrock connector accepts either an AWS SSO session or a Bedrock API key, and the developer's own machine decides which arrives. That matters because approval-based onboarding holds SSO sign-ins only. An API key belongs to an AWS account, not a person, so there is no supervisor to route an approval to.
Policies have no such limitation. A policy is evaluated on every Bedrock request, whichever credential it carried and whatever the connector's onboarding mode. When you need a control that reaches API-key traffic, write it as a policy:
connector.template == "AWS_BEDROCK" && connector.aws.bedrock.credential_type != "TEMPORARY"
Pair that with Require Approval, and every caller is covered. SSO developers are held for their supervisor, and the policy refuses API-key callers. Policy Examples collects more caller rules, for long-term IAM keys, MFA and email domains.
Attribute Reference
These attributes are grouped as in the Bedrock caller panel of the Request log, so a field reads the same in both places.
Identity
Who AgentPass believes made the call.
| Attribute | Type | Description |
|---|---|---|
connector.aws.bedrock.identity_source | String | CLOUDTRAIL (developer resolved), STS (account only) or NONE. Always present. Test this to require an attributed caller |
connector.aws.bedrock.account_id | String | The caller's AWS account |
connector.aws.bedrock.user_email | String | Developer, resolved via CloudTrail |
connector.aws.bedrock.principal_type | String | AssumedRole, IAMUser or Root |
connector.aws.bedrock.principal_arn | String | Full principal ARN |
connector.aws.bedrock.role_name | String | Assumed role name |
connector.aws.bedrock.role_arn | String | Assumed role ARN |
connector.aws.bedrock.mfa_authenticated | Bool | Whether the session was MFA-backed |
connector.aws.bedrock.session_started_at | String | Session start, ISO-8601 |
connector.aws.bedrock.account_matches_cloudtrail | Bool | False when the two accounts AgentPass resolved disagree |
Credential
The shape of the AWS credential that signed the request. No credential secret is exposed to a policy. The signature, session token and API key are never captured.
| Attribute | Type | Description |
|---|---|---|
connector.aws.bedrock.credential_type | String | TEMPORARY (SSO session), LONG_TERM (IAM key), BEARER (Bedrock API key) or UNKNOWN. Always present. A connector accepts all of these, so this is how a rule distinguishes them |
connector.aws.bedrock.has_security_token | Bool | Whether a session token is present. Always present |
connector.aws.bedrock.access_key_id | String | Access key ID. It rotates every SSO session, so correlate with it, but never pin a rule to it |
connector.aws.bedrock.scope_region | String | Region the signature was scoped to |
connector.aws.bedrock.scope_service | String | Service the signature was scoped to: bedrock on an AWS Bedrock connector; bedrock-mantle or bedrock on an AWS Bedrock Mantle connector |
connector.aws.bedrock.project | String | AWS Bedrock Mantle only. The Bedrock project the request runs in: default, or a project ARN |
connector.aws.bedrock.signed_at | String | When the request was signed, ISO-8601 |
connector.aws.bedrock.signing_skew_ms | Int | Client clock drift against the gateway's |
Client
The machine and tooling the request came from.
| Attribute | Type | Description |
|---|---|---|
connector.aws.bedrock.claude_code_session_id | String | Groups many requests into one coding session |
connector.aws.bedrock.client_os | String | Client operating system |
connector.aws.bedrock.client_arch | String | Client CPU architecture |
connector.aws.bedrock.client_runtime | String | Client runtime |
connector.aws.bedrock.client_runtime_version | String | Client runtime version |
connector.aws.bedrock.sdk_version | String | SDK or user-agent version |
connector.aws.bedrock.retry_count | Int | Retries of this same intent |
connector.aws.bedrock.anthropic_beta | String | Beta features requested on the call, if any |
Network
Where the request came from.
| Attribute | Type | Description |
|---|---|---|
connector.aws.bedrock.source_ip | String | Client IP as the gateway saw it |
connector.aws.bedrock.aws_observed_source_ip | String | Client IP as AWS saw it |
connector.aws.bedrock.source_ip_matches_aws | Bool | False when the two IPs differ. NAT and VPN egress do this legitimately |
connector.aws.bedrock.gateway_host | String | Gateway hostname the developer called |
Example Conditions
connector.template == "AWS_BEDROCK" && connector.aws.bedrock.identity_source != "CLOUDTRAIL"
connector.template == "AWS_BEDROCK"
&& connector.aws.bedrock.identity_source == "CLOUDTRAIL"
&& !connector.aws.bedrock.user_email.endsWith("@example.com")
The second is the safe form of a domain rule. It acts only on callers AgentPass identified, and a companion identity_source != "CLOUDTRAIL" rule catches the rest. The full set, including MFA, long-term keys and API keys, is in Policy Examples.
A policy on the AWS caller can only narrow what a developer may do. AWS still validates the developer's signature, and authorizes the call against their own IAM permissions. A rule here adds restriction on top of your AWS controls, and can never grant access AWS would have refused.
A Bedrock policy must also inspect and deny, not rewrite. Changing a Bedrock request body or header invalidates the developer's AWS signature.
Related
- How Policies Are Evaluated — modes, actions, and why an absent attribute never matches
- Creating a Policy — the wizard these rules are written in
- Policy Examples — every caller rule, deduplicated