Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.
Version: 11.3.0

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.

note

Writing policies is an administrator task. 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 attributeWhat it tells you
connector.aws.bedrock.identity_sourceHow far AgentPass got in identifying the caller
connector.aws.bedrock.credential_typeWhat kind of AWS credential signed the request
connector.aws.bedrock.has_security_tokenWhether 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?"

ValueMeaning
CLOUDTRAILThe developer was resolved by name
STSThe caller's AWS account was resolved, but not the person
NONENeither could be resolved

To say "we could not name this person," write:

Block any Bedrock call that cannot be attributed to a named developer
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 policy form offers this expression as the example chip Bedrock: unattributed caller, alongside Bedrock: no MFA. Click either to load it into the form, then adjust it.

The MFA example is subject to the same rule

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.

  1. Open the Request Log and select a recent request through the Bedrock connector.
  2. In the detail panel, find the Bedrock caller section.
  3. 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.

Run the policy in Observe mode first

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:

Require an AWS SSO session, blocking Bedrock API keys
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.

AttributeTypeDescription
connector.aws.bedrock.identity_sourceStringCLOUDTRAIL (developer resolved), STS (account only) or NONE. Always present. Test this to require an attributed caller
connector.aws.bedrock.account_idStringThe caller's AWS account
connector.aws.bedrock.user_emailStringDeveloper, resolved via CloudTrail
connector.aws.bedrock.principal_typeStringAssumedRole, IAMUser or Root
connector.aws.bedrock.principal_arnStringFull principal ARN
connector.aws.bedrock.role_nameStringAssumed role name
connector.aws.bedrock.role_arnStringAssumed role ARN
connector.aws.bedrock.mfa_authenticatedBoolWhether the session was MFA-backed
connector.aws.bedrock.session_started_atStringSession start, ISO-8601
connector.aws.bedrock.account_matches_cloudtrailBoolFalse 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.

AttributeTypeDescription
connector.aws.bedrock.credential_typeStringTEMPORARY (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_tokenBoolWhether a session token is present. Always present
connector.aws.bedrock.access_key_idStringAccess key ID. It rotates every SSO session, so correlate with it, but never pin a rule to it
connector.aws.bedrock.scope_regionStringRegion the signature was scoped to
connector.aws.bedrock.scope_serviceStringService the signature was scoped to: bedrock on an AWS Bedrock connector; bedrock-mantle or bedrock on an AWS Bedrock Mantle connector
connector.aws.bedrock.projectStringAWS Bedrock Mantle only. The Bedrock project the request runs in: default, or a project ARN
connector.aws.bedrock.signed_atStringWhen the request was signed, ISO-8601
connector.aws.bedrock.signing_skew_msIntClient clock drift against the gateway's

Client​

The machine and tooling the request came from.

AttributeTypeDescription
connector.aws.bedrock.claude_code_session_idStringGroups many requests into one coding session
connector.aws.bedrock.client_osStringClient operating system
connector.aws.bedrock.client_archStringClient CPU architecture
connector.aws.bedrock.client_runtimeStringClient runtime
connector.aws.bedrock.client_runtime_versionStringClient runtime version
connector.aws.bedrock.sdk_versionStringSDK or user-agent version
connector.aws.bedrock.retry_countIntRetries of this same intent
connector.aws.bedrock.anthropic_betaStringBeta features requested on the call, if any

Network​

Where the request came from.

AttributeTypeDescription
connector.aws.bedrock.source_ipStringClient IP as the gateway saw it
connector.aws.bedrock.aws_observed_source_ipStringClient IP as AWS saw it
connector.aws.bedrock.source_ip_matches_awsBoolFalse when the two IPs differ. NAT and VPN egress do this legitimately
connector.aws.bedrock.gateway_hostStringGateway hostname the developer called

Example Conditions​

Block calls that cannot be attributed to a named developer
connector.template == "AWS_BEDROCK" && connector.aws.bedrock.identity_source != "CLOUDTRAIL"
Restrict a connector to developers from one email domain
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.

What these policies can and cannot do

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.