Commit 6fd6337
Add pre-minted CATs support for EdenAPI authentication
Summary:
Teach the `[cats]` config consumer to use the `platform_cats_lib` preminted
library when the winning config group is named `"preminted"` (set by
`dynamic_system.rs` when `ATLAS=1`).
The preminted file is a multi-token JSON blob keyed by verifier name
(verify_integrity, interngraph, crypto_auth_tokens, …). The old
`File::open` + `serde_json` path only extracts the `crypto_auth_tokens`
key. By routing through `read_merged_preminted_cats_for()` we get a
single merged token containing both verify_integrity and interngraph —
exactly what Mononoke/EdenAPI needs.
Behaviour per config group:
* **"preminted"** (Dev Docker Images, priority 60):
- File present → preminted library → merged tokens.
- File missing → expected during lease provisioning; debug log,
fall through to `try_preminted_cats()` fallback (which also
returns `None`), auth degrades to X.509 certs.
* **"sandcastle"** (priority 50) / other groups:
- File present → old `File::open` + JSON parse → crypto_auth_tokens.
- File missing → error propagated to caller.
* **No config groups at all:**
- `try_preminted_cats()` is tried as a final fallback.
Reviewed By: muirdm
Differential Revision: D95043384
fbshipit-source-id: 014c59f812db3e1cf1e8e04de6e8c998106a7c261 parent bedcf06 commit 6fd6337
2 files changed
Lines changed: 79 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
150 | 159 | | |
151 | | - | |
152 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
153 | 183 | | |
154 | | - | |
| 184 | + | |
| 185 | + | |
| 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 | + | |
155 | 215 | | |
| 216 | + | |
156 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
157 | 222 | | |
158 | 223 | | |
159 | 224 | | |
0 commit comments