Commit 4e91c54
feat: Auto enable mTLS when supported certificates are detected (#1637)
The Python SDK will use a hybrid approach for mTLS enablement:
If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is set
(either true or false or any value), the SDK will respect that setting.
This is necessary for test scenarios and users who need to explicitly
control mTLS behavior.
If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not
set, the SDK will automatically enable mTLS only if it detects Managed
Workload Identity (MWID) or X.509 Workforce Identity Federation (WIF)
certificate sources. In other cases where the variable is not set, mTLS
will remain disabled.
---------
Signed-off-by: Radhika Agrawal <[email protected]>
Co-authored-by: Chandra Shekhar Sirimala <[email protected]>1 parent 4c6d549 commit 4e91c54
File tree
4 files changed
+268
-50
lines changed- google/cloud
- _storage_v2/services/storage
- storage
- tests/unit/gapic/storage_v2
4 files changed
+268
-50
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
187 | 215 | | |
188 | 216 | | |
189 | 217 | | |
| |||
390 | 418 | | |
391 | 419 | | |
392 | 420 | | |
393 | | - | |
| 421 | + | |
394 | 422 | | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | 423 | | |
400 | 424 | | |
401 | 425 | | |
402 | 426 | | |
403 | 427 | | |
404 | 428 | | |
405 | 429 | | |
406 | | - | |
| 430 | + | |
407 | 431 | | |
408 | 432 | | |
409 | 433 | | |
| |||
435 | 459 | | |
436 | 460 | | |
437 | 461 | | |
438 | | - | |
439 | | - | |
440 | | - | |
| 462 | + | |
441 | 463 | | |
442 | 464 | | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | 465 | | |
448 | 466 | | |
449 | 467 | | |
450 | 468 | | |
451 | | - | |
| 469 | + | |
452 | 470 | | |
453 | 471 | | |
454 | 472 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | 114 | | |
119 | 115 | | |
120 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
222 | 230 | | |
223 | 231 | | |
224 | 232 | | |
| |||
0 commit comments