Repository navigation
Commit 6fdbd12
committed
fix(api): do not synthesize default grants in TokenVerifier when missing
When verifying a token that does not contain grant claims (such as video, sip, inference, or observability), TokenVerifier previously defaulted to instantiating empty grant objects. In particular, VideoGrants(**{}) synthesizes default room permissions (can_publish=True, can_subscribe=True, can_publish_data=True), incorrectly treating tokens minted without video grants as having full room publish/subscribe permissions.
Use _parse_grants consistently across video, sip, inference, and observability grants so that missing grants in claims remain None, matching agent, agent_endpoint, and agent_thread behavior.1 parent 462e103 commit 6fdbd12
2 files changed
Lines changed: 37 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | 311 | | |
338 | 312 | | |
339 | 313 | | |
340 | 314 | | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
345 | 319 | | |
346 | 320 | | |
347 | 321 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | | - | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
0 commit comments