Commit 0edb451
authored
Conditionally enable AllowHardBoundTokens in gengrpc (#1635)
This PR to conditionally enable AllowHardBoundTokens for three initial services:
- SecretManager
- Cloudkms
- Showcase
This change is safe for the following reasons:
1- Mtls Hard Bound Tokens flow requires S2A to be enabled as well for the auth library to even read the AllowHardBoundTokens internaloption as shown in: https://togithub.com/googleapis/google-cloud-go/blob/942c7707bd5119a62a4e7d92803179f6af865eaa/auth/grpctransport/grpctransport.go#L308. Currently, S2A is off by default in the client library and is only enabled internally for selected users.
2- Getting hard bound tokens is guarded behind an experiment in Metadata server. Meaning even if an application has both S2A and AllowHardBoundTokens internal options enabled they need to be allowlisted in the MDS experiment to fetch a hard-bound token.
3- Hard-bound token flow is in audit mode (no enforcement). If an application is using hard-bound tokens and they don't have a policy in place the binding is not enforced.1 parent b1e8dbd commit 0edb451
File tree
6 files changed
+13
-0
lines changed- internal/gengapic
- testdata
6 files changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
189 | 192 | | |
190 | 193 | | |
191 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
0 commit comments