Cấu hình Bedrock GovCloud

Cấu hình quy trình làm việc Codex cục bộ với Amazon Bedrock trong AWS GovCloud

Hướng dẫn này giải thích cách cấu hình Codex để thực hiện suy luận qua Amazon Bedrock trong GovCloud. Nội dung bao gồm quyền truy cập AWS, cài đặt thiết bị được quản lý và các biện pháp kiểm soát mạng.

Tài liệu tham khảo cấu hình Codex

Trách nhiệm chung

Xem mô hình trách nhiệm chung của AWS và tài liệu của các dịch vụ bạn đã chọn để hiểu những biện pháp kiểm soát do AWS cung cấp. Cơ quan bạn chịu trách nhiệm phê duyệt việc sử dụng các dịch vụ đó.

Trong một triển khai được hỗ trợ, Codex gửi yêu cầu suy luận đến điểm cuối Bedrock đã cấu hình bằng cơ chế xác thực AWS. Tổ chức của bạn bảo vệ các thiết bị chạy Codex, bao gồm thông tin xác thực, kho mã, bản ghi cục bộ và các dịch vụ bên thứ ba đã bật. Việc dùng GovCloud để suy luận không chứng minh rằng toàn bộ quy trình làm việc đáp ứng các yêu cầu của cơ quan bạn.

Danh sách kiểm tra xác minh · Cài đặt tính năng

Trước khi bắt đầu

Dùng ứng dụng máy tính phiên bản 26.1002.51308 trở lên, như hiển thị trong Giới thiệu.

Chuẩn bị Những gì bạn cần
Quyền truy cập AWS Tài khoản AWS GovCloud có quyền truy cập mô hình Bedrock mà bạn sẽ sử dụng.
Cấu hình requirements.toml đã được rà soát, các đích mạng đã được phê duyệt và hướng dẫn khôi phục cấu hình trước đó.
Quản lý thiết bị Quyền truy cập cấu hình hệ thống hoặc MDM, cùng các chính sách mạng cho ứng dụng, thiết bị và lệnh của tác nhân.

1. Triển khai các yêu cầu cho thiết bị

Triển khai requirements.toml thông qua cấu hình hệ thống hoặc MDM trước khi khởi chạy ứng dụng. Làm theo hướng dẫn Cấu hình được quản lý để biết vị trí tệp và cách phân phối qua MDM. Bảo vệ chính sách được quản lý và xác minh các thiết lập của chính sách trên máy chạy Codex ở bước 3.

requirements.toml được khuyến nghị

requirements.toml mặc định bên dưới được thiết kế để áp dụng các hạn chế nghiêm ngặt. Quản trị viên có thể bật thêm các tính năng nếu chấp nhận rủi ro mà chúng mang lại. Tham khảo tài liệu về tính năng và tài liệu về kiểm soát mạng.

requirements.toml

# Disable ChatGPT sign-in.
allowed_login_methods = ["api"]

# https://learn.chatgpt.com/docs/agent-approvals-security#common-sandbox-and-approval-combinations
allowed_sandbox_modes = ["read-only", "workspace-write"]

# Approval prompts are reviewed by the user.
allowed_approvals_reviewers = ["user"]
allowed_approval_policies = [
  { granular = { sandbox_approval = false, rules = true, mcp_elicitations = false, request_permissions = false, skill_approval = true } },
]

# Allow cached search only if your AWS GovCloud Region supports web search.
allowed_web_search_modes = ["disabled", "cached"]

# Block agent browser use and native-app control.
allow_browser_and_computer_use = false

# Appshots: https://learn.chatgpt.com/docs/appshots
allow_appshots = false

# Remote control: https://learn.chatgpt.com/docs/remote-connections#pick-up-work-from-another-device
allow_remote_control = false

# Managed hooks: https://learn.chatgpt.com/docs/enterprise/managed-configuration#enforce-managed-hooks-from-requirements
allow_managed_hooks_only = true

check_for_update_on_startup = false

# MCP servers, apps, and plugins are disabled by default.
# Admins can enable supported integrations after accepting the risks
# for their use case and configuring access and network controls.
# https://learn.chatgpt.com/docs/enterprise/managed-configuration
mcp_servers = {}

[features]
apps = false
enable_mcp_apps = false
plugins = false

# Enable the network proxy for sandboxed commands.
# https://learn.chatgpt.com/docs/agent-approvals-security#network-isolation
network_proxy = true

in_app_dictation = false
realtime_conversation = false

# Browser controls: https://learn.chatgpt.com/docs/enterprise/managed-configuration#disable-codex-feature-surfaces
# Note that both browser use and computer use are up to your organization's risk appetite.
# An agent using your browser or computer may navigate to any websites or applications that the
# computer has access to. OpenAI does not currently provide additional protections restricting
# the network paths that browser use and computer use may exercise.
in_app_browser = false
browser_use = false
browser_use_external = false
browser_use_full_cdp_access = false

# Computer Use: https://learn.chatgpt.com/docs/computer-use
# Enable after accepting the risks and configuring app and network access.
computer_use = false

# Set to true to let users update through the app.
# App-store, package-manager, and MDM updates are controlled separately.
# https://learn.chatgpt.com/docs/enterprise/manage-app-updates#turn-off-in-app-updates
in_app_updates = false

image_generation = false

# Memories: https://learn.chatgpt.com/docs/customization/memories
memories = false

# Computer History: https://learn.chatgpt.com/docs/customization/computer-history
chronicle = false

external_agent_memory_import = false

# We recommend that users review approval requests themselves.
# Admins can enable automatic review after accepting the risks for their use case.
# https://learn.chatgpt.com/docs/agent-approvals-security#automatic-approval-reviews
guardian_approval = false
guardianv2 = false

# Disable background skill-search experiments.
skill_search = false

# Hooks: https://learn.chatgpt.com/docs/hooks
hooks = false

# If you enable web search, use cached search through Bedrock Mantle
# where supported by your AWS GovCloud Region.
standalone_web_search = false

# Disable feedback submissions to OpenAI.
[feedback]
enabled = false

# Network controls for agent commands:
# https://learn.chatgpt.com/docs/enterprise/managed-configuration#configure-network-access-requirements
[experimental_network]
enabled = true
managed_allowed_domains_only = true

# No domains allowed by default. Add destinations approved for your use case.
domains = {}

# Add approved Unix socket paths here.
unix_sockets = {}

# Set to true when using an organization-approved upstream proxy.
allow_upstream_proxy = false

# Keep the command proxy bound to localhost.
dangerously_allow_non_loopback_proxy = false
dangerously_allow_all_unix_sockets = false

# Local/private networking: https://learn.chatgpt.com/docs/agent-approvals-security#local-and-private-destinations
allow_local_binding = false

# App network controls: https://learn.chatgpt.com/docs/enterprise/managed-configuration#control-desktop-app-network-destinations
[application.network]
enabled = true

# Example: Bedrock Mantle in us-gov-west-1.
# Replace this hostname with the Bedrock endpoint configured in config.toml.
[application.network.domains]
"bedrock-mantle.us-gov-west-1.api.aws" = "allow"

# OpenAI and ChatGPT endpoints.
# We recommend denying these endpoints to avoid any risk that user data is sent to commercial OpenAI infrastructure.
"api.openai.com" = "deny"
"chat.openai.com" = "deny"
"chatgpt.com" = "deny"
"ab.chatgpt.com" = "deny"
"platform.openai.com" = "deny"
"auth.openai.com" = "deny"
"gov.api.openai.com" = "deny"
"gov.chatgpt.com" = "deny"
"sdfedpreastus2.oaiusercontent.com" = "deny"
"o33249.ingest.us.sentry.io" = "deny"
"persistent.oaistatic.com" = "deny"
"oaisidekickupdates.blob.core.windows.net" = "deny"

# Windows only: https://learn.chatgpt.com/docs/config-file/config-reference#requirementstoml
[windows]
allowed_sandbox_implementations = ["elevated"]

2. Cấu hình định tuyến nhà cung cấp và các biện pháp kiểm soát mạng

Đặt nhà cung cấp, mô hình, khu vực và điểm cuối trong config.toml hoặc các giá trị mặc định được quản lý. Người dùng có thể thay đổi các giá trị mặc định này trong giới hạn do requirements.toml quy định.

config.toml được khuyến nghị

Ví dụ bên dưới sử dụng Mantle tại us-gov-west-1. Thay ID mô hình và hồ sơ AWS bằng các giá trị dùng cho bản triển khai của bạn. Với khu vực hoặc điểm cuối được hỗ trợ khác, hãy cập nhật đồng thời URL, khu vực và chính sách mạng.

Ví dụ này tắt các chức năng chẩn đoán tùy chọn và chia sẻ dữ liệu. Lưu thông tin xác thực AWS bên ngoài tệp TOML. Lưu hồ sơ AWS, thông tin xác thực và các tập lệnh hỗ trợ xác thực bên ngoài những thư mục mà Codex có thể sửa đổi.

config.toml

# Replace with your approved Bedrock model ID.
model = "openai.gpt-5.6-terra"
model_provider = "amazon-bedrock"
approval_policy = { granular = { sandbox_approval = false, rules = true, mcp_elicitations = false, request_permissions = false, skill_approval = true } }
sandbox_mode = "workspace-write"

# Set to "cached" only when supported by your model and GovCloud Region
# and approved for your deployment.
# https://docs.aws.amazon.com/bedrock/latest/userguide/web-search.html
web_search = "disabled"

# Example: Bedrock Mantle in us-gov-west-1.
[model_providers.amazon-bedrock]
base_url = "https://bedrock-mantle.us-gov-west-1.api.aws/openai/v1"
wire_api = "responses"
requires_openai_auth = false

[model_providers.amazon-bedrock.aws]
region = "us-gov-west-1"

# Replace with your AWS profile name.
profile = "codex-govcloud"

[sandbox_workspace_write]
# Command destinations are controlled by requirements.toml.
network_access = true

# Disable sending Codex usage analytics to OpenAI.
[analytics]
enabled = false

# OpenTelemetry exports are off by default.
# Admins can configure an approved collector for logs, traces, and metrics.
# https://learn.chatgpt.com/docs/config-file/config-advanced#observability-and-telemetry
[otel]
exporter = "none"
trace_exporter = "none"
metrics_exporter = "none"
log_user_prompt = false

Ví dụ này sử dụng thông tin xác thực AWS với Bedrock Mantle. Với Bedrock Runtime hoặc cổng kết nối, hãy làm theo hướng dẫn thiết lập nhà cung cấp.

Áp dụng các biện pháp kiểm soát mạng

Thêm các đích truy cập của ứng dụng đã được phê duyệt, bao gồm Bedrock, vào application.network.domains. Thêm các đích truy cập của lệnh đã được phê duyệt vào experimental_network.domains.

Các thiết lập mạng của Codex không thay thế tường lửa trên thiết bị của bạn.

3. Xác minh bản triển khai

  1. Xác nhận rằng chính sách của bạn đang có hiệu lực và Codex đang sử dụng đúng thông tin xác thực AWS cùng các thiết lập Bedrock dự kiến.
  2. Chạy một quy trình làm việc đã được phê duyệt với dữ liệu mẫu.
  3. Xác nhận rằng các thiết lập của người dùng không thể ghi đè các hạn chế được quản lý.
  4. Kiểm thử với thông tin xác thực không hợp lệ hoặc đã hết hạn và các lỗi định tuyến. Xác nhận rằng nội dung không được gửi đến đích chưa được phê duyệt.

Khắc phục các sự cố thường gặp

Sự cố Nội dung cần kiểm tra
Điểm cuối không được hỗ trợ Xác nhận với OpenAI rằng các phiên bản ứng dụng máy tính và app-server đã cài đặt hỗ trợ điểm cuối và mô hình đó.
Sai tài khoản hoặc vai trò AWS Kiểm tra thông tin xác thực đang được sử dụng và hồ sơ AWS đã chọn. API key của Bedrock có thể được ưu tiên hơn hồ sơ.
Các hạn chế không được áp dụng Xác nhận rằng đúng requirements.toml dự kiến đã được tải trên máy chạy Codex.
Tính năng vẫn chưa khả dụng Kiểm tra tài liệu về tính năng để biết các thiết lập bắt buộc và khả năng hỗ trợ của Bedrock, sau đó kiểm tra các biện pháp kiểm soát mạng.

Thiết lập tính năng

Người dùng không thể ghi đè các thiết lập tính năng do requirements.toml áp đặt.

Bảng này tóm tắt cấu hình ở trên. Bật nghĩa là được phép sử dụng khi có hỗ trợ; các quyền và biện pháp kiểm soát mạng khác vẫn được áp dụng.

Để biết khả năng hỗ trợ của nhà cung cấp, xem Các tính năng khả dụng trên Bedrock.

Tính năng Mặc định Ghi chú
Lập trình cục bộ, tệp, Git và tác nhân phụ Bật —
Tác vụ theo lịch cục bộ Bật —
Trình duyệt Tắt Bao gồm trình duyệt tích hợp, các trình duyệt được kết nối, khả năng điều khiển trình duyệt của tác nhân và chế độ Nhà phát triển.
Computer Use và Appshots Tắt —
Bộ nhớ và Lịch sử máy tính Tắt —
Tạo hình ảnh Tắt Không chặn hình ảnh đầu vào hoặc việc đọc các tệp hình ảnh hiện có.
Tìm kiếm trên web Tắt Tìm kiếm qua bộ nhớ đệm yêu cầu mô hình và khu vực GovCloud của bạn hỗ trợ. Các quy tắc mạng cho lệnh không hạn chế tìm kiếm được lưu trữ trên dịch vụ.
Ứng dụng và plugin Tắt —
MCP server đã cấu hình Tắt Quản trị viên có thể bật các máy chủ đã được phê duyệt sau khi chấp nhận rủi ro cho trường hợp sử dụng của mình và cấu hình quyền truy cập cùng các biện pháp kiểm soát mạng.
Ứng dụng MCP tương tác Tắt —
Nhập liệu bằng giọng nói Tắt —
Tự động xem xét yêu cầu phê duyệt Tắt —
Điều khiển từ xa Tắt Các kết nối SSH được xử lý riêng.
Cập nhật ứng dụng Tắt —

Để bật khả năng sử dụng trình duyệt của tác nhân hoặc Computer Use, bạn cũng cần đặt allow_browser_and_computer_use = true.