Commit 74451d7
committed
Extend V1/V2 per-audience token support to all SDK extensions
- Pass authorization/auth_handler_name/turn_context to list_tool_servers
in OpenAI and Semantic Kernel extensions so _attach_per_audience_tokens
runs for all frameworks (Google ADK already staged in prior commit)
- Replace shared single-token header injection with per-server header
merge ({**base_headers, **server.headers}) in OpenAI and SK extensions
- Use explicit scope for V2 token resolution: {audience}/{scope} when
scope is present, {audience}/.default as pre-consented fallback
- Fix api:// V2 audience handling — only ATG AppId in api:// URI form
is treated as V1; all other api:// audiences are correctly V2
- Add comprehensive tests for resolve_token_scope_for_server covering
all V1/V2/null/api:// scenarios including test env audience handling
- Add CHANGELOG entry for microsoft-agents-a365-tooling package
Backward compatible: V1 agents (null/ATG audience) continue using the
shared ATG token unchanged. V2 blueprint + old SDK is by design not
supported — upgrade to this SDK is the migration path.1 parent d84c41d commit 74451d7
4 files changed
Lines changed: 32 additions & 8 deletions
File tree
- libraries
- microsoft-agents-a365-tooling-extensions-openai/microsoft_agents_a365/tooling/extensions/openai
- microsoft-agents-a365-tooling-extensions-semantickernel/microsoft_agents_a365/tooling/extensions/semantickernel/services
- microsoft-agents-a365-tooling
- tests/tooling
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
165 | 168 | | |
166 | 169 | | |
167 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
12 | 28 | | |
13 | 29 | | |
14 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
327 | 330 | | |
328 | 331 | | |
329 | 332 | | |
| |||
420 | 423 | | |
421 | 424 | | |
422 | 425 | | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
428 | 431 | | |
429 | 432 | | |
430 | 433 | | |
| |||
0 commit comments