mirror of
https://github.com/openai/codex.git
synced 2026-11-22 07:13:50 +00:00
Support managed AWS access keys for Amazon Bedrock (#40481)
## What changed - Add the experimental `amazonBedrockAccessKeys` app-server login flow, persist its credentials in the configured auth store, and use them for SigV4-signed Bedrock requests. - Report `bedrockAccessKeys` as a distinct auth mode and document access-key login alongside AWS profile and environment credential setup. - Clear the selected Bedrock provider, AWS settings, and Bedrock-specific model on logout while leaving external AWS credentials and `.env` untouched. - Reject managed access-key login when higher-precedence configuration would prevent its region or profile settings from taking effect. ## Testing - Cover access-key login, storage, request signing, configuration conflicts, status reporting, and logout cleanup. GitOrigin-RevId: bbf297887c6503d3651ceb2aad85c4d626e32723
This commit is contained in:
1 parent
219c203417
commit
4f6d43c267
60 files changed
+1464
-389
No files matched your search
@@ -1602,7 +1602,9 @@ pub(crate) fn status_account_display_from_auth_mode(
|
||||
email: None,
|
||||
plan: plan_type.map(plan_type_display_name),
|
||||
}),
|
||||
Some(AuthMode::Headers) | Some(AuthMode::BedrockApiKey) => None,
|
||||
Some(AuthMode::Headers)
|
||||
| Some(AuthMode::BedrockApiKey)
|
||||
| Some(AuthMode::BedrockAccessKeys) => None,
|
||||
None => None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,6 +116,7 @@ mod tests {
|
||||
agent_identity: None,
|
||||
personal_access_token: None,
|
||||
bedrock_api_key: None,
|
||||
bedrock_access_keys: None,
|
||||
};
|
||||
save_auth(
|
||||
codex_home,
|
||||
@@ -170,6 +171,7 @@ mod tests {
|
||||
agent_identity: None,
|
||||
personal_access_token: None,
|
||||
bedrock_api_key: None,
|
||||
bedrock_access_keys: None,
|
||||
},
|
||||
AuthCredentialsStoreMode::File,
|
||||
AuthKeyringBackendKind::default(),
|
||||
|
||||
@@ -963,6 +963,7 @@ impl AuthModeWidget {
|
||||
ApiAuthMode::AgentIdentity => AuthMode::AgentIdentity,
|
||||
ApiAuthMode::PersonalAccessToken => AuthMode::PersonalAccessToken,
|
||||
ApiAuthMode::BedrockApiKey => AuthMode::BedrockApiKey,
|
||||
ApiAuthMode::BedrockAccessKeys => AuthMode::BedrockAccessKeys,
|
||||
})
|
||||
})
|
||||
.unwrap_or(LoginStatus::NotAuthenticated);
|
||||
|
||||
Reference in new issue
Block a user