{{ message }}
Repository navigation
Commit bd44656
Harden Entra marketplace access: cache scoping, race guards, error handling
Address rubber-duck review findings on the Entra ID marketplace path:
- Scope the cached access verdict to the marketplace it was computed against
(authProvider + accountId + serviceUrl), rejecting stale caches on any mismatch.
- Guard cache application and background validation with a monotonic epoch so a
session/account/config change mid-validation supersedes an in-flight result.
- Register session/account listeners before applying the cache, and the config
listener before initial validation, closing startup TOCTOU windows.
- Route transient auth-service and marketplace-fetch failures to Unreachable
instead of leaving a configured marketplace on a blank Unavailable view.
- Split 401 (missing/expired token -> RequiresSignIn, not cached) from 403
(durable denial -> AccessDenied, cached ineligible).
- Never follow redirects on token-bearing requests; only send the Entra token to
an HTTPS same-origin target; reject non-2xx and non-manifest 200 responses
before parsing.
- Restore the galleryservice:custom:marketplace telemetry on the GitHub path and
drop the unused server-provided eligibility reason from persisted cache.
Expand unit coverage to 45 tests across provider routing, eligibility, caching,
error classification, and the epoch race paths.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>1 parent 94a70a7 commit bd44656
6 files changed
Lines changed: 1148 additions & 142 deletions
File tree
- src/vs
- base/common
- platform/extensionManagement/common
- workbench
- contrib/extensions/browser
- services/extensionManagement
- electron-browser
- test/electron-browser
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
73 | 87 | | |
74 | 88 | | |
75 | 89 | | |
| |||
103 | 117 | | |
104 | 118 | | |
105 | 119 | | |
106 | | - | |
107 | | - | |
108 | | - | |
| 120 | + | |
| 121 | + | |
109 | 122 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
114 | 128 | | |
115 | | - | |
| 129 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | | - | |
368 | | - | |
| 367 | + | |
| 368 | + | |
369 | 369 | | |
370 | 370 | | |
| 371 | + | |
| 372 | + | |
371 | 373 | | |
372 | 374 | | |
373 | 375 | | |
| |||
376 | 378 | | |
377 | 379 | | |
378 | 380 | | |
379 | | - | |
| 381 | + | |
380 | 382 | | |
381 | 383 | | |
382 | 384 | | |
| |||
2162 | 2164 | | |
2163 | 2165 | | |
2164 | 2166 | | |
| 2167 | + | |
2165 | 2168 | | |
2166 | 2169 | | |
2167 | | - | |
| 2170 | + | |
2168 | 2171 | | |
2169 | 2172 | | |
2170 | 2173 | | |
2171 | | - | |
| 2174 | + | |
2172 | 2175 | | |
2173 | 2176 | | |
2174 | 2177 | | |
| |||

0 commit comments