AWS Bedrock AgentCore Gateway Policy Engine Set to Log Only
editAWS Bedrock AgentCore Gateway Policy Engine Set to Log Only
editIdentifies a successful UpdateGateway call against an Amazon Bedrock AgentCore Gateway that sets its policyEngineConfiguration mode to LOG_ONLY. UpdateGateway is a full-replace operation, and LOG_ONLY mode evaluates Cedar policy but no longer blocks a denied tool call, so this moves the gateway from enforcing authorization to merely observing it for every tool call the gateway proxies, even though the Cedar policies themselves remain unchanged and still look configured in the policy engine. A caller needs only UpdateGateway, GetGateway, and the ability to pass the gateway’s execution role to do this, and no Cedar policy permission is required.
Rule type: esql
Rule indices: None
Severity: medium
Risk score: 47
Runs every: 10m
Searches indices from: now-30m (Date Math format, see also Additional look-back time)
Maximum alerts per execution: 100
References:
Tags:
- Domain: Cloud
- Domain: GenAI
- Data Source: AWS
- Data Source: AWS CloudTrail
- Data Source: Amazon Web Services
- Use Case: Identity and Access Audit
- Resources: Investigation Guide
- Tactic: Defense Evasion
- Rule Type: ES|QL
- Platform: AWS
- Service: AWS Bedrock
- Mitre Atlas: AML.T0012
Version: 1
Rule authors:
- Elastic
Rule license: Elastic License v2
Investigation guide
editTriage and analysis
Investigating AWS Bedrock AgentCore Gateway Policy Engine Set to Log Only
This rule detects a successful UpdateGateway call that sets policyEngineConfiguration.mode to LOG_ONLY.
In LOG_ONLY mode the gateway still evaluates every tool call against its Cedar policies, but no longer blocks a denied call, so this moves the gateway from enforcing authorization to merely observing it, even though the Cedar policies themselves remain unchanged and still look "active" in the policy engine.
The caller only needs UpdateGateway, GetGateway, and iam:PassRole on the gateway’s execution role; no Cedar policy write permission is required to cause this effect, so look for this from principals who would not normally touch authorization policy.
Possible investigation steps
-
Review
aws.cloudtrail.user_identity.arn,aws.cloudtrail.user_identity.type,user_agent.original, andsource.ipfor the caller and confirm they are expected to update this Gateway’s configuration. -
Call
GetGatewayongatewayIdentifierfromaws.cloudtrail.request_parametersto confirm the currentpolicyEngineConfiguration.modeisLOG_ONLY. - Check whether the caller’s IAM permissions include any Cedar policy write action; if not, this is the privilege-inversion pattern this rule targets.
-
Look for subsequent tool invocations through the gateway (
InvokeGateway) from unexpected principals while enforcement was in log-only mode.
False positive analysis
-
Deliberate platform automation that intentionally sets
LOG_ONLYto test new Cedar policies before enforcing them. Validate against change tickets and known automation identities.
Response and remediation
-
Re-attach the gateway’s Cedar policy engine in
ENFORCEmode with anotherUpdateGatewaycall. -
Restrict
bedrock-agentcore:UpdateGatewayto principals who also hold Cedar policy-engine write permissions, or require a change-management check before anyUpdateGatewaythat touchespolicyEngineConfiguration. - Review all gateway invocations since enforcement was set to log-only for activity that Cedar policy would otherwise have denied.
Rule query
editfrom logs-aws.cloudtrail-* metadata _id, _version, _index
| where event.dataset == "aws.cloudtrail" and event.outcome == "success" and
event.provider == "bedrock-agentcore.amazonaws.com" and
event.action == "UpdateGateway" and
aws.cloudtrail.request_parameters is not null
| eval Esql.sets_log_only = aws.cloudtrail.request_parameters RLIKE """\{policyEngineConfiguration=\{[^}]*mode=LOG_ONLY.*""" or
aws.cloudtrail.request_parameters RLIKE """.*, policyEngineConfiguration=\{[^}]*mode=LOG_ONLY.*"""
| where Esql.sets_log_only
| keep _id, _version, _index, @timestamp, event.action, event.provider, event.outcome,
aws.cloudtrail.user_identity.arn, aws.cloudtrail.user_identity.type,
aws.cloudtrail.user_identity.access_key_id, user.name, user_agent.original,
source.ip, source.geo.country_name, cloud.account.id, cloud.region, data_stream.namespace,
aws.cloudtrail.request_id, aws.cloudtrail.request_parameters
Framework: MITRE ATT&CKTM
-
Tactic:
- Name: Defense Evasion
- ID: TA0005
- Reference URL: https://attack.mitre.org/tactics/TA0005/
-
Technique:
- Name: Impair Defenses
- ID: T1562
- Reference URL: https://attack.mitre.org/techniques/T1562/