Repository navigation
Commit 2191f10
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 and the persisted launch. 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, the launch, and the provider attachment are rechecked
before each OAuth exchange and before a cached or new token is
returned. A stopped or superseded launch is denied on cache hits too.
- The token cache key includes the launch, 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 6c824e7 commit 2191f10
5 files changed
Lines changed: 1600 additions & 230 deletions
File tree
- crates
- openshell-credential-issuer/src/embedded
- openshell-server/src
- 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 | |
|---|---|---|---|
| |||
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