Amazon Bedrock AgentCore で Chrome エンタープライズポリシーによる AI エージェントの閲覧制御が可能に
AWS は Amazon Bedrock AgentCore に Chrome エンタープライズポリシーとカスタムルート CA のサポートを追加し、AI エージェントのブラウザ操作におけるセキュリティリスクを管理する機能を強化した。
キーポイント
Chrome エンタープライズポリシーの統合
450 以上の Chrome 設定(URL フィルタリング、ダウンロード制限、パスワードマネージャー制御など)を JSON 形式で適用可能になり、エージェントの行動範囲を厳格に管理できる。
内部サービスへの接続サポート
カスタムルート CA 証明書をサポートすることで、社内 SSL 中間者プロキシやプライベート CA を使用する内部サービスに対する HTTPS 接続エラーを解消し、エージェントが安全にアクセスできるようになる。
セキュリティリスクの軽減
権限のないドメインへのナビゲーション防止、機密情報のブラウザ保存阻止、承認外のファイルダウンロードブロックなど、無制限なウェブアクセスに伴う重大なセキュリティリスクを技術的に封じ込める。
Chrome エンタープライズポリシーによるアクセス制御
ポリシー設定により、許可されたドメイン(例:docs.aws.amazon.com)へのアクセスは成功し、ブロックされたドメイン(例:www.wikipedia.org)ではエラーページが表示されることを実証しています。
Playwright での安定したテスト手法
AWS ドキュメントのような継続的な背景ネットワーク活動があるページに対し、デフォルトのロードイベントではなく wait_until="domcontentloaded" を使用して待機状態を解決しています。
DOM 変更への対応策
テキスト抽出や操作において、Playwright のセレクターエンジンがタイムアウトするのを防ぐため、page.evaluate() を使用してブラウザコンテキスト内で直接 JavaScript を実行します。
ブラウザレベルでの強制的な制限
Chrome ポリシーによるブロックは、エージェントの推論やプロンプトとは無関係に、ブラウザレベルで発生するため、意図的な回避が困難です。
影響分析・編集コメントを表示
影響分析
この発表は、AI エージェントの実用化における最大の障壁の一つである「セキュリティとガバナンス」の解決策を明確に示すものであり、大規模企業が内部環境で AI ブラウザエージェントを導入する際の心理的・技術的ハードルを大幅に低下させる。特に、450 以上の設定項目をサポートすることで、組織ごとの細やかなポリシー適用が可能となり、AI の自律性と企業のセキュリティ要件の両立が現実的なものとなる。
編集コメント
AI エージェントの「自律性」を制限するのではなく、企業環境で安全に自律性を発揮させるためのインフラ整備が加速しています。これは単なる機能追加ではなく、エンタープライズ向け AI 実装の標準的なセキュリティ基準を再定義する重要な一歩です。
制限のないウェブアクセスを持つ AI エージェントは、重大なセキュリティリスクをもたらします。ブラウザの動作を制御する Chrome 企業向けポリシーがない場合、エージェントが許可されていないドメインに移動したり、ブラウザのパスワードマネージャーに認証情報を保存したり、承認されたワークフローの外でファイルをダウンロードしたりする可能性があります。プライベート証明書発行者 (CA) を使用して内部サービスを利用している組織には、追加の障壁が存在します。これらのサービスへのすべての HTTPS 接続は、証明書の検証エラーによって失敗します。
Amazon Bedrock AgentCore Browser は now Chrome enterprise policies と custom root CA certificates をサポートしており、組織がエージェントのブラウザ動作と接続性を細かく制御できるようになりました。Chrome ポリシーを使用すると、URL フィルタリング、ダウンロード制限、パスワードマネージャー制御など、450 以上のブラウザ設定を、慣れ親しんだ Chrome 企業向け JSON 構成を通じて構成できます。カスタムルート CA サポートにより、エージェントは内部サービスに接続でき、組織の証明書発行者 (CA) を信頼することで、企業の SSL 中間者プロキシと連携して動作できるようになります。利用可能な設定の完全なリファレンスは、Chrome Enterprise policy list を参照してください。
本記事では、ブラウザエージェントを特定のウェブサイトに制限するための Chrome エンタープライズポリシーを設定し、セッション記録を通じてポリシーの適用状況を確認し、公開テストサイトを使用してカスタムルート CA 証明書の実装デモンストレーションを行います。この手順により、エンタープライズのブラウザ制限下で動作しながら Amazon Bedrock AgentCore のドキュメントを調査できる実用的なソリューションが構築されます。
AI エージェントに対するブラウザポリシーの適用理由
Chrome エンタープライズポリシー は、AI ブラウザエージェントに適用する際、組織の 3 つのニーズに対応します。
第一に、エージェントのスコープを承認されたドメインに制限できます。URL のホワイトリストとブラックリストにより、エージェントがアクセス可能な場所を限定できます。特定のポータルで請求書処理を担当するエージェントに、ソーシャルメディアや検索エンジンへのアクセスは不要です。これらの境界線は、エージェントのプロンプトや推論とは無関係に、ブラウザレベルでポリシーによって強制されます。
第二に、リスクのあるブラウザ機能を無効化できます。Chrome ポリシーを使用すれば、パスワードマネージャーの無効化、ファイルダウンロードのブロック、自動入力機能の停止など、数十種類のブラウザ機能を制御することが可能です。機密システムと対話するデータ入力エージェントにとって、これらの制御は、意図しないデータの保存や漏洩のリスクを低減します。
第三に、ポリシー管理とエージェント開発を分離できます。マネージドポリシーは、コントロールプレーン API を通じてブラウザレベルで構成され、そのブラウザから作成されるすべてのセッションに適用されます。これにより、セキュリティチームが承認されたブラウザ設定を定義する一方で、開発チームはアプリケーションコードにポリシー決定を組み込むことなく、エージェントロジックの構築に集中できます。
Chrome ポリシーとルート CA 証明書の適用方法
本統合には、2 つ層のポリシー強制機能と、オプションの証明書信頼構成があります。
マネージドポリシーはブラウザレベルで動作します。コントロールプレーン API を通じてブラウザを作成する際、Amazon Simple Storage Service (Amazon S3) に保存された Chrome エンタープライズポリシー JSON ファイルを提供する必要があります。これらのポリシーはサービスによって保存され、そのブラウザから作成されるすべてのセッションで強制されます。マネージドポリシーは、Chrome の /etc/chromium/policies/managed/ ディレクトリにマッピングされます。セッションレベルの設定では上書きできません。
推奨ポリシーはセッションレベルで動作します。データプレーン API を通じてブラウザセッションを開始する際、オプションで追加のポリシー JSON ファイルを提供できます。これらは Chrome の /etc/chromium/policies/recommended/ ディレクトリにマッピングされ、ユーザー設定として機能します。同じ設定項目についてマネージドポリシーと推奨ポリシーが競合する場合、マネージドポリシーが優先されます。これはデフォルトの Chrome の動作です。
組織のルート CA 証明書は、AWS Secrets Manager に保存し、ブラウザまたは AgentCore Code Interpreter を作成する際に参照することで、カスタムルート CA 証明書を使用できます。このサービスは証明書を証明書の信頼ストアにインポートするため、内部サービスへの接続や SSL 傍受プロキシへの接続も、証明書検証を無効化せずに成功します。
ソリューションアーキテクチャ
以下の図は、Chrome ポリシー JSON ファイルとルート CA 証明書が、お客様の環境から Amazon Bedrock AgentCore のコントロールプレーンおよびデータプレーンを経由して、隔離されたブラウザセッションにどのように流れるかを示しています。
Figure 1: お客様の環境から Amazon Bedrock AgentCore を介して隔離されたブラウザセッションへのポリシー強制データフロー。
- ご自身の環境では、Chrome ポリシーの JSON ファイルを Amazon S3 に保存し、オプションとしてルート CA 証明書(Root CA Certificate)を AWS Secrets Manager に保管します。
- コントロールプレーン(Control Plane)は、CreateBrowser API を呼び出す際に(矢印 1)、S3 バケットからポリシー JSON ファイルを取得し、設定されている場合は AWS Secrets Manager からルート CA 証明書を取得します(矢印 2。破線で示される通り、このステップはオプションです)。
- ご自身のアプリケーションは CreateBrowser API を呼び出し(矢印 3)、その後 StartBrowserSession API を呼び出します(矢印 4)。
- コントロールプレーンは、ブラウザ設定のメタデータをデータプレーン(Data Plane)に渡します(矢印 5)。
- データプレーンは、管理ポリシー、推奨ポリシー、およびルート CA 証明書を隔離されたブラウザセッションへ展開します(矢印 6)。Chrome は起動時にマージされた構成を読み込み、セッション全体を通じてポリシーを強制適用します。
前提条件
開始する前に、以下の項目が揃っていることを確認してください:
- Python 3.10 以降
- Amazon Bedrock AgentCore のアクセス権限が有効化された AWS アカウント
- 設定済みの AWS 認証情報。aws sts get-caller_identity コマンドで確認できます。
- Amazon Bedrock AgentCore が利用可能な AWS リージョン(AgentCore ドキュメントの「対応している AWS リージョン」をご参照ください)
- エージェントを駆動するための AI モデルへのアクセス権限。本記事では Amazon Bedrock を介して Anthropic Claude を使用しています。AgentCore はモデル非依存であり、他のモデルプロバイダーやエージェントフレームワークに置き換えることも可能です。Strands Agents フレームワークで異なるモデルを設定する方法の詳細については、Strands Agents ドキュメントの「モデルプロバイダー」をご参照ください。
このノートブックは、S3 バケット、AWS Identity and Access Management (IAM) 実行ロール、AgentCore Browser、および AgentCore Code Interpreter を含む必要な AWS リソースを自動的に作成します。この自動プロビジョニングはデモンストレーション目的のためのものです。本番環境での展開では、セキュリティチームがレビューした最小権限の IAM ポリシーを持つ既存のリソースを使用すべきです。完全な IAM ポリシーの詳細については、サンプルリポジトリの README をご参照ください。
重要: AWS IAM Identity Center または AWS Security Token Service (AWS STS) から一時的な認証情報を取得してください。長期有効なアクセスキーを使用しないでください。IAM 権限を設定する際は、最小権限の原則に従ってください。
環境の設定
このウォークスルーの完全なコードは、サンプルリポジトリ の Jupyter ノートブックとして利用可能です。これをクローンして、セルを順次実行してください。
リポジトリのクローン
git clone https://github.com/awslabs/amazon-bedrock-agentcore-samples.git
cd amazon-bedrock-agentcore-samples/01-tutorials/05-AgentCore-tools/02-Agent-Core-browser-tool/13-browser-chrome-policies
環境の設定
python3 -m venv .venv
source .venv/bin/activate # Windows の場合: .venv\Scripts\activate
pip install -r requirements.txt
認証情報の設定
export AWS_REGION=us-west-2
重要: 一時的な認証情報を使用してください。認証情報をソース管理にコミットしないでください。
ノートブックの実行
jupyter notebook browser-chrome-policies.ipynb
セルを順次実行してください。パート 1 では Chrome エンタープライズポリシーについて説明します。パート 2 ではカスタムルート CA 証明書について説明します。以下のセクションでは、各パートの役割と重要なコード部分を解説します。
チェックアウト
このノートブックは2つのパートに整理されています。パート1では、Chrome エンタープライズポリシーを作成し、カスタム AgentCore Browser に適用して、Playwright を使用して許可された URL が読み込まれ、ブロックされた URL が拒否されることを検証します。パート2では、AgentCode Interpreter との連携におけるカスタムルート CA 証明書の実装を示します。
Chrome エンタープライズポリシーの定義
最初のノートブックセルでは、ブラウザを AWS ドキュメントに制限し、エージェントが不要な機能を無効にする Chrome エンタープライズポリシーを定義しています。このポリシー JSON は、標準的な Chrome エンタープライズポリシー設定を使用します。
policy = {
"URLBlocklist": ["*"],
"URLAllowlist": [
"docs.aws.amazon.com",
".aws.amazon.com",
".amazonaws.com",
],
"PasswordManagerEnabled": False,
"DownloadRestrictions": 3,
"DeveloperToolsAvailability": 0,
"BookmarkBarEnabled": False,
"AutofillAddressEnabled": False,
"AutofillCreditCardEnabled": False,
}
以下の表は、各ポリシー設定について説明しています。
| ポリシー | 値 | 効果 |
|---|---|---|
| URLBlocklist (URL ブロックリスト) | ["*"] | デフォルトで URL をブロックします |
| URLAllowlist (URL 許可リスト) | docs.aws.amazon.com, .aws.amazon.com, .amazonaws.com | AWS ドキュメントおよび関連ドメインを許可します |
| PasswordManagerEnabled (パスワードマネージャー有効化) | false | 認証情報の保存をブロックします |
| DownloadRestrictions (ダウンロード制限) | 3 | ダウンロードをブロックします |
DeveloperToolsAvailability
0
DevTools を有効化(CDP/Playwright 自動化に必須)
BookmarkBarEnabled
false
ブックマークバーを非表示にする
AutofillAddressEnabled
false
住所の自動入力を無効化する
AutofillCreditCardEnabled
false
クレジットカードの自動入力を無効化する
URLAllowlist は、一般的な glob パターンとは異なる Chrome の URL フィルタパターン形式を使用することに注意してください。ドメインパターン(例:docs.aws.amazon.com)は完全一致するドメインにマッチします。先頭にドットを付けた場合(例:.aws.amazon.com)、サブドメインにもマッチします。完全なパターン構文については、URLAllowlist ポリシーのドキュメント を参照してください。
また、Playwright やその他の CDP ベースの自動化で使用するブラウザでは、DeveloperToolsAvailability を 0 に設定するか省略する必要があります。AgentCore ブラウザ自動化は Chrome DevTools Protocol (CDP) を使用します。このポリシーを 2 に設定すると、Chrome レベルで CDP が無効化され、自動化が静かに失敗します。WebSocket 接続はプロキシ層では成功しますが、Chrome が CDP コマンドを拒否するためタイムアウトが発生します。
マネージドポリシーを持つブラウザの作成
次のノートブックセルでは、すべてのセッションでポリシーを適用するカスタムブラウザを作成します。重要な API 呼び出しでは、enterprise_policies パラメータに type を MANAGED に設定して使用します。また、セッション記録も有効化されており、後でそのセッションを再生することができます。
from bedrock_agentcore.tools import BrowserClient
client = BrowserClient(REGION)
response = client.create_browser(
name="docs_research_browser",
execution_role_arn=EXECUTION_ROLE_ARN,
network_configuration={"networkMode": "PUBLIC"},
enterprise_policies=[
{
"location": {
"s3": {
"bucket": BUCKET_NAME,
"prefix": POLICY_KEY,
}
},
"type": "MANAGED",
}
],
recording={
"enabled": True,
"s3Location": {
"bucket": BUCKET_NAME,
"prefix": "policy-demo",
},
},
)
The notebook then polls get_browser() until the status transitions from CREATING to READY.
*See the sample notebook for the complete code.*
Demonstrate Chrome policy enforcement with Playwright
The notebook starts a browser session and uses Playwright to navigate to two URLs. The first URL, docs.aws.amazon.com, is allowed by the policy, so the page loads successfully. The second URL, www.wikipedia.org, is blocked by the policy, so Chrome displays an error page.
このテストでは、デフォルトのロードイベントではなく wait_until="domcontentloaded" を使用します。AWS のドキュメントページには、分析スクリプトやトラッキングピクセルによる継続的なバックグラウンドネットワークアクティビティがあり、これが Playwright の networkidle およびデフォルトのロード状態が解決されるのを防いでいます。同様に、テキスト抽出では page.evaluate() を使用してブラウザコンテキスト内で直接 JavaScript を実行し、継続的な DOM 変更があるページにおける Playwright のセレクターエンジンタイムアウトを回避します。
このセルを実行した後、以下のような出力が表示されるはずです:
TEST 1: docs.aws.amazon.com へナビゲート (許可)
ページのタイトル:Overview - Amazon Bedrock AgentCore
ページのテキストプレビュー:Amazon Bedrock AgentCore ...
結果:ページが正常に読み込まれました
TEST 2: www.wikipedia.org へナビゲート (ブロック)
ページのタイトル:
結果:Chrome ポリシーがこの URL をブロックしました
これが Chrome ポリシーの中核的な価値です。この制限は、エージェントの推論やプロンプト指示とは無関係に、ブラウザレベルで発生します。
セルの実行中は、Amazon Bedrock AgentCore コンソールでブラウザをライブで確認できます。組み込みツールへ移動し、ブラウザ (docs_research_browser) を選択して、アクティブなセッションに対して ライブセッションの表示 を選択してください。
*完全なコードについては、サンプルノートブック を参照してください。*
セッション記録の確認
ブラウザ作成時にセッション記録を有効化しているため、ポリシーの適用状況を観察するためにセッションを再生できます。
AWS Bedrock AgentCore コンソールを開きます。ナビゲーションペインで組み込みツールを選択します。対象となるブラウザツール(docs_research_browser)を選択し、ブラウザセッションセクションでステータスが終了済みの完了したセッションを見つけて、記録の表示をクリックしてください。
セッション再生インターフェースには、タイムラインスクラバーを備えた対話型ビデオ再生機能が含まれており、各ナビゲーションイベントとブロックされた試行を含むタイムスタンプ付きのユーザーアクション、および許可されたトラフィックのみが成功したことを確認するネットワークイベントが表示されます。
制限されたブラウザを使用した Strands エージェントの実行(オプション)
このノートブックには、ポリシーで制限されたブラウザを使用して Strands エージェントを作成するオプションのセルが含まれています。このエージェントは、許可されたドメイン内で AgentCore のドキュメントを調査します。不正な URL へのナビゲーションを試みると、ページがブロックされていることを確認し、アクセス可能なページでの作業を継続します。
このサンプルでは、Amazon Bedrock を介して Anthropic Claude を使用しています。AgentCore はモデル非依存です。他のモデルプロバイダーに置き換えることも可能です。モデル設定については、Strands Agents ドキュメントの Model Providers を参照してください。
Chrome エンタープライズポリシーを使用して、Amazon Bedrock AgentCore の AI エージェントが閲覧できる場所を制御する方法については、サンプルノートブックをご覧ください。
原文を表示
AI agents with unrestricted web access pose significant security risks. Without Chrome enterprise policies to control browser behavior, an agent might navigate to unauthorized domains, store credentials in the browser’s password manager, or download files outside approved workflows. Organizations with internal services that use a private certificate authority (CA) face an additional barrier. Every HTTPS connection to those services fails with certificate validation errors.
Amazon Bedrock AgentCore Browser now supports Chrome enterprise policies and custom root CA certificates to give organizations granular control over agent browser behavior and connectivity. With Chrome policies, you can configure over 450 browser settings, including URL filtering, download restrictions, and password manager controls, applied through familiar Chrome enterprise JSON configuration. Custom root CA support lets your agents connect to internal services and work with corporate SSL-intercepting proxies by trusting your organization’s certificate authority. For the full reference of available settings, see the Chrome Enterprise policy list.
In this post, you will configure Chrome enterprise policies to restrict a browser agent to a specific website, observe the policy enforcement through session recording, and demonstrate custom root CA certificates using a public test site. The walkthrough produces a working solution that researches Amazon Bedrock AgentCore documentation while operating under enterprise browser restrictions.
Why enforce browser policies for AI agents
Chrome enterprise policies address three organizational needs when applied to AI browser agents.
First, you can restrict agent scope to approved domains. URL allowlists and denylists limit where agents can navigate. An agent tasked with processing invoices on a specific portal doesn’t need access to social media or search engines. Policies enforce these boundaries at the browser level, independent of the agent’s prompt or reasoning.
Second, you can disable risky browser features. With Chrome policies, you can turn off the password manager, block file downloads, disable autofill, and control dozens of other browser capabilities. For data-entry agents that interact with sensitive systems, these controls reduce the risk of unintended data storage or exfiltration.
Third, you can separate policy management from agent development. Managed policies are configured at the browser level through the control plane API and apply to every session created from that browser. This lets your security team define approved browser configurations while your development team focuses on agent logic, without embedding policy decisions in application code.
How Chrome policies and root CA certificates are applied
The integration has two layers of policy enforcement and an optional certificate trust configuration.
Managed policies operate at the browser level. You provide Chrome enterprise policy JSON files stored in Amazon Simple Storage Service (Amazon S3) when creating a browser through the control plane API. These policies are stored by the service and enforced on every session created from that browser. Managed policies map to Chrome’s /etc/chromium/policies/managed/ directory. They can’t be overridden by session-level settings.
Recommended policies operate at the session level. You can optionally provide additional policy JSON files when starting a browser session through the data plane API. These map to Chrome’s /etc/chromium/policies/recommended/ directory and function as user preferences. If a managed policy and a recommended policy conflict on the same setting, the managed policy takes precedence. This is default Chrome behavior.
You can use custom root CA certificates to store your organization’s root CA certificate in AWS Secrets Manager and reference it when creating a browser or AgentCore Code Interpreter. The service imports the certificate into the certificate trust store, so connections to internal services and SSL-intercepting proxies succeed without disabling certificate validation.
Solution architecture
The following diagram shows how Chrome policy JSON files and root CA certificates flow from your environment through the Amazon Bedrock AgentCore control plane and data plane into the isolated browser session.
Figure 1: Policy enforcement data flow from your environment through Amazon Bedrock AgentCore to the isolated browser session.
- In your environment, you store Chrome policy JSON files in Amazon S3 and optional root CA certificates in AWS Secrets Manager.
- The control plane fetches policy JSON from your S3 bucket when you call CreateBrowser (arrow 1) and fetches the root CA certificate from AWS Secrets Manager if configured (arrow 2, dashed to indicate this step is optional).
- Your application calls the CreateBrowser API (arrow 3) and then the StartBrowserSession API (arrow 4).
- The control plane passes browser configuration metadata to the data plane (arrow 5).
- The data plane deploys managed policies, recommended policies, and root CA certificates to the isolated browser session (arrow 6). Chrome reads the merged configuration on startup and enforces the policies throughout the session.
Prerequisites
Before you begin, verify that you have the following:
- Python 3.10 or later
- An AWS account with Amazon Bedrock AgentCore access enabled
- AWS credentials configured. You can verify with aws sts get-caller-identity
- An AWS Region where Amazon Bedrock AgentCore is available (see Supported AWS Regions in the AgentCore documentation)
- Access to an AI model to drive the agent. This post uses Anthropic Claude through Amazon Bedrock. AgentCore is model-agnostic. Other model providers and agent frameworks can be substituted. For details on configuring different models with the Strands Agents framework, see Model Providers in the Strands Agents documentation.
The notebook creates the required AWS resources automatically, including the S3 bucket, AWS Identity and Access Management (IAM) execution role, AgentCore Browser, and AgentCore Code Interpreter. This automatic provisioning is intended for demonstration purposes. Production deployments should use pre-existing resources with least-privilege IAM policies reviewed by your security team. Refer to the sample repository’s README for the complete IAM policy details.
Important: Use temporary credentials from AWS IAM Identity Center or AWS Security Token Service (AWS STS). Don’t use long-lived access keys. Follow the principle of least privilege when configuring IAM permissions.
Set up the environment
The complete code for this walkthrough is available as a Jupyter notebook in the sample repository. Clone it and run the cells in sequence.
Clone the repository
git clone https://github.com/awslabs/amazon-bedrock-agentcore-samples.git
cd amazon-bedrock-agentcore-samples/01-tutorials/05-AgentCore-tools/02-Agent-Core-browser-tool/13-browser-chrome-policiesSet up the environment
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txtConfigure credentials
export AWS_REGION=us-west-2Important: Use temporary credentials. Do not commit credentials to source control.
Run the notebook
jupyter notebook browser-chrome-policies.ipynbRun the cells sequentially. Part 1 covers Chrome enterprise policies. Part 2 covers custom root CA certificates. The following sections explain what each part does and highlight the key code.
Walkthrough
The notebook is organized into two parts. Part one creates a Chrome enterprise policy, applies it to a custom AgentCore Browser, and uses Playwright to verify that allowed URLs load while blocked URLs are rejected. Part two demonstrates custom root CA certificates with AgentCore Code Interpreter.
Define the Chrome enterprise policy
The first notebook cells define a Chrome enterprise policy that restricts the browser to AWS documentation and disables features that your agent doesn’t need. The policy JSON uses standard Chrome enterprise policy settings.
policy = {
"URLBlocklist": ["*"],
"URLAllowlist": [
"docs.aws.amazon.com",
".aws.amazon.com",
".amazonaws.com",
],
"PasswordManagerEnabled": False,
"DownloadRestrictions": 3,
"DeveloperToolsAvailability": 0,
"BookmarkBarEnabled": False,
"AutofillAddressEnabled": False,
"AutofillCreditCardEnabled": False,
}The following table describes each policy setting.
Policy
Value
Effect
URLBlocklist
[“*”]
Blocks URLs by default
URLAllowlist
docs.aws.amazon.com, .aws.amazon.com, .amazonaws.com
Permits AWS documentation and related domains
PasswordManagerEnabled
false
Blocks credential storage
DownloadRestrictions
3
Blocks downloads
DeveloperToolsAvailability
0
Allows DevTools (required for CDP/Playwright automation)
BookmarkBarEnabled
false
Hides the bookmark bar
AutofillAddressEnabled
false
Disables address autofill
AutofillCreditCardEnabled
false
Disables credit card autofill
Note that URLAllowlist uses Chrome’s URL filter pattern format, which differs from typical glob patterns. Domain patterns such as docs.aws.amazon.com match the exact domain. A leading dot, such as .aws.amazon.com, matches subdomains. For the full pattern syntax, see the URLAllowlist policy documentation.
Also note that DeveloperToolsAvailability must be set to 0 (or omitted) for browsers that will be used with Playwright or other CDP-based automation. AgentCore Browser automation uses the Chrome DevTools Protocol (CDP). Setting this policy to 2 disables CDP at the Chrome level, which silently breaks automation. The WebSocket connection succeeds at the proxy layer, but Chrome refuses CDP commands, causing timeouts.
Create a browser with managed policies
The next notebook cells create a custom browser that enforces the policy on every session. The key API call uses the enterprise_policies parameter with type set to MANAGED. Session recording is also enabled so you can replay the session afterward.
from bedrock_agentcore.tools import BrowserClient
client = BrowserClient(REGION)
response = client.create_browser(
name="docs_research_browser",
execution_role_arn=EXECUTION_ROLE_ARN,
network_configuration={"networkMode": "PUBLIC"},
enterprise_policies=[
{
"location": {
"s3": {
"bucket": BUCKET_NAME,
"prefix": POLICY_KEY,
}
},
"type": "MANAGED",
}
],
recording={
"enabled": True,
"s3Location": {
"bucket": BUCKET_NAME,
"prefix": "policy-demo",
},
},
)The notebook then polls get_browser() until the status transitions from CREATING to READY.
*See the sample notebook for the complete code.*
Demonstrate Chrome policy enforcement with Playwright
The notebook starts a browser session and uses Playwright to navigate to two URLs. The first URL, docs.aws.amazon.com, is allowed by the policy, so the page loads successfully. The second URL, www.wikipedia.org, is blocked by the policy, so Chrome displays an error page.
The test uses wait_until=”domcontentloaded” instead of the default load event. AWS documentation pages have continuous background network activity from analytics scripts and tracking pixels, which helps prevent Playwright’s networkidle and default load states from resolving. Similarly, text extraction uses page.evaluate() to run JavaScript directly in the browser context, which avoids Playwright’s selector engine timeouts on pages with continuous DOM mutations.
After running this cell, you should see output like the following:
TEST 1: Navigate to docs.aws.amazon.com (ALLOWED)
Page title: Overview - Amazon Bedrock AgentCore
Page text preview: Amazon Bedrock AgentCore ...
Result: PAGE LOADED SUCCESSFULLY
TEST 2: Navigate to www.wikipedia.org (BLOCKED)
Page title:
Result: CHROME POLICY BLOCKED THIS URLThis is the core value of Chrome policies. The restriction happens at the browser level, independent of the agent’s reasoning or prompt instructions.
While the cell runs, you can watch the browser live in the Amazon Bedrock AgentCore console. Navigate to Built-in tools, select your browser (docs_research_browser), and choose View live session for the active session.
*See the sample notebook for the complete code.*
Review the session recording
Because you enabled session recording when creating the browser, you can replay the session to observe the policy enforcement.
Open the Amazon Bedrock AgentCore console. In the navigation pane, choose Built-in tools. Select your browser tool (docs_research_browser). In the Browser sessions section, find the completed session with Terminated status and choose View Recording.
The session replay interface provides interactive video playback with a timeline scrubber, timestamped user actions including each navigation event and the blocked attempt, and network events confirming that only allowed traffic succeeded.
Run a Strands Agent with the restricted browser (optional)
The notebook includes an optional cell that creates a Strands agent using the policy-restricted browser. The agent researches AgentCore documentation within the allowed domain. When it attempts to navigate to an unauthorized URL, it observes that the page is blocked and continues working with the accessible pages.
This sample uses Anthropic Claude through Amazon Bedrock. AgentCore is model-agnostic. Other model providers can be substituted. For model configuration, see Model Providers in the Strands Agents documentation.
See the sample notebook
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み