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:
alexsong-oai authored and copyberry committed 2026-08-24 21:39:48 +00:00
1 parent 219c203417
commit 4f6d43c267
60 files changed
+1464 -389

No files matched your search

@@ -199,43 +199,6 @@ impl ConfigManager {
.await
}
/// Clears a value from the active user config only when its current raw value matches.
pub(crate) async fn clear_user_value_if_matches(
&self,
key_path: &str,
expected_value: JsonValue,
) -> Result<(), ConfigManagerError> {
let layers = self
.load_thread_agnostic_config()
.await
.map_err(|err| ConfigManagerError::io("failed to load configuration", err))?;
let Some(user_layer) = layers.get_active_user_layer() else {
return Ok(());
};
let segments = parse_key_path(key_path).map_err(|message| {
ConfigManagerError::write(ConfigWriteErrorCode::ConfigValidationError, message)
})?;
let expected_value = parse_value(expected_value).map_err(|message| {
ConfigManagerError::write(ConfigWriteErrorCode::ConfigValidationError, message)
})?;
if value_at_path(&user_layer.config, &segments) != expected_value.as_ref() {
return Ok(());
}
let expected_version = Some(user_layer.version.clone());
self.apply_edits(
/*file_path*/ None,
expected_version,
vec![(
key_path.to_string(),
JsonValue::Null,
MergeStrategy::Replace,
)],
)
.await?;
Ok(())
}
pub(crate) async fn batch_write(
&self,
params: ConfigBatchWriteParams,