Repository navigation
Commit 3139855
fix(integrations): use the mTLS Model Armor endpoint when mTLS is enabled
ModelArmorPlugin passed the plain regional host as an explicit api_endpoint,
so it never switched to the regional mTLS host. Certificate-bound credentials,
such as Agent Identity on Agent Runtime and Cloud Run, are rejected by the
plain host, so every screening call failed with UNAUTHENTICATED and, with the
default block_on_screening_failure, every prompt was blocked.
The endpoint is now resolved with _mtls_utils.get_api_endpoint, as other
regional Google API clients in ADK do.
Fixes #7553
Co-authored-by: Jason Zhang <jasoncz@google.com>
PiperOrigin-RevId: 10002698141 parent 0491606 commit 3139855
2 files changed
Lines changed: 33 additions & 8 deletions
File tree
- src/google/adk/integrations/model_armor
- tests/unittests/integrations/model_armor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
474 | 475 | | |
475 | 476 | | |
476 | 477 | | |
477 | | - | |
478 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
479 | 484 | | |
480 | 485 | | |
481 | 486 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
550 | 551 | | |
551 | 552 | | |
552 | 553 | | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
559 | 579 | | |
560 | 580 | | |
561 | 581 | | |
| |||
0 commit comments