Protect workload identity auth in app-server account RPCs (#38426)

## Why

Workload identity credentials are owned by the app-server host and must not be replaced, removed, or exported through client account operations.

## What changed

- Reject account login and logout RPCs while workload identity is selected.
- Continue reporting the active authentication method from `getAuthStatus`, but omit the host-owned token even when `includeToken` is requested.

GitOrigin-RevId: 750c9d07ed2f4ba7007bbe75f188573e79749647
This commit is contained in:
cooper-oai
2026-08-13 20:04:57 +00:00
committed by copyberry
parent 990218bbbd
commit 5ed321ce00
2 changed files with 40 additions and 23 deletions
+4
View File
@@ -2612,6 +2612,10 @@ impl AuthManager {
self.external_auth_provider().is_some()
}
pub fn is_workload_identity_selected(&self) -> bool {
self.workload_identity_selected
}
pub fn is_external_chatgpt_auth_active(&self) -> bool {
self.auth_cached()
.as_ref()