Repository navigation
Commit 00c7684
committed
feat(gateway): verify supervisor workload assertions for provider grants
Authorize a dedicated supervisor's provider grant from its signed session
and two JWT-SVIDs, then perform the OAuth exchange in the gateway.
- The gateway derives the expected stable and launch SPIFFE IDs from the
session's sandbox and runtime generation. It verifies both signatures
against the Workload API trust bundle and requires the exact subject,
a single audience, and an unexpired token for each.
- The session and the provider attachment are rechecked before each
OAuth exchange and before a cached or new token is returned. A stopped
sandbox or a superseded generation is denied on cache hits too.
- The token cache key includes the generation, the attachment epoch, the
provider revision, and the resolved exchange subject. Token lifetime
is capped by the session, both assertions, and the subject expiry.
- Requests, cache misses, and OAuth exchanges have separate per-sandbox
limits, and the gateway-wide cap scales with them, so warm grants are
served while other grants wait on OAuth.
- A token service timeout is shared with queued requests whatever status
its response headers carried.
- The stored token-exchange subject stays in the gateway, and the direct
subject-exchange RPC is closed while this mode is configured.
Signed-off-by: Shiju <shiju@nvidia.com>1 parent e0d1639 commit 00c7684
6 files changed
Lines changed: 1568 additions & 227 deletions
File tree
- crates
- openshell-credential-issuer/src/embedded
- openshell-server/src
- auth
- grpc
- provider
- access_token
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
150 | 154 | | |
151 | 155 | | |
152 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
325 | 337 | | |
326 | 338 | | |
327 | 339 | | |
328 | | - | |
| 340 | + | |
329 | 341 | | |
330 | 342 | | |
331 | 343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2800 | 2800 | | |
2801 | 2801 | | |
2802 | 2802 | | |
2803 | | - | |
| 2803 | + | |
2804 | 2804 | | |
2805 | 2805 | | |
2806 | 2806 | | |
| |||
4828 | 4828 | | |
4829 | 4829 | | |
4830 | 4830 | | |
| 4831 | + | |
| 4832 | + | |
| 4833 | + | |
| 4834 | + | |
| 4835 | + | |
4831 | 4836 | | |
4832 | 4837 | | |
4833 | 4838 | | |
| |||
4919 | 4924 | | |
4920 | 4925 | | |
4921 | 4926 | | |
4922 | | - | |
| 4927 | + | |
4923 | 4928 | | |
4924 | 4929 | | |
4925 | 4930 | | |
| |||
5012 | 5017 | | |
5013 | 5018 | | |
5014 | 5019 | | |
5015 | | - | |
| 5020 | + | |
5016 | 5021 | | |
5017 | 5022 | | |
5018 | | - | |
| 5023 | + | |
| 5024 | + | |
5019 | 5025 | | |
5020 | 5026 | | |
5021 | 5027 | | |
5022 | 5028 | | |
5023 | 5029 | | |
5024 | | - | |
| 5030 | + | |
5025 | 5031 | | |
5026 | 5032 | | |
5027 | 5033 | | |
5028 | | - | |
| 5034 | + | |
5029 | 5035 | | |
5030 | 5036 | | |
5031 | 5037 | | |
5032 | 5038 | | |
5033 | 5039 | | |
5034 | | - | |
| 5040 | + | |
5035 | 5041 | | |
5036 | 5042 | | |
5037 | | - | |
| 5043 | + | |
5038 | 5044 | | |
5039 | 5045 | | |
5040 | 5046 | | |
| |||
5044 | 5050 | | |
5045 | 5051 | | |
5046 | 5052 | | |
5047 | | - | |
| 5053 | + | |
5048 | 5054 | | |
5049 | 5055 | | |
5050 | 5056 | | |
5051 | 5057 | | |
5052 | | - | |
| 5058 | + | |
5053 | 5059 | | |
5054 | 5060 | | |
5055 | 5061 | | |
| |||
5289 | 5295 | | |
5290 | 5296 | | |
5291 | 5297 | | |
5292 | | - | |
5293 | | - | |
5294 | | - | |
5295 | | - | |
5296 | | - | |
5297 | | - | |
5298 | | - | |
5299 | | - | |
5300 | | - | |
5301 | | - | |
5302 | | - | |
5303 | | - | |
5304 | | - | |
5305 | | - | |
5306 | | - | |
5307 | | - | |
5308 | | - | |
5309 | | - | |
5310 | 5298 | | |
5311 | 5299 | | |
5312 | 5300 | | |
| |||
6433 | 6421 | | |
6434 | 6422 | | |
6435 | 6423 | | |
6436 | | - | |
6437 | | - | |
| 6424 | + | |
| 6425 | + | |
| 6426 | + | |
| 6427 | + | |
| 6428 | + | |
6438 | 6429 | | |
6439 | 6430 | | |
6440 | 6431 | | |
| |||
12191 | 12182 | | |
12192 | 12183 | | |
12193 | 12184 | | |
| 12185 | + | |
| 12186 | + | |
| 12187 | + | |
| 12188 | + | |
| 12189 | + | |
| 12190 | + | |
| 12191 | + | |
12194 | 12192 | | |
12195 | | - | |
| 12193 | + | |
12196 | 12194 | | |
12197 | 12195 | | |
12198 | 12196 | | |
12199 | 12197 | | |
12200 | 12198 | | |
| 12199 | + | |
12201 | 12200 | | |
12202 | 12201 | | |
12203 | 12202 | | |
| |||
0 commit comments