Commit d4b5e2c
authored
Allow selecting root public key by ID (#154)
In order to more easily accommodate rotating of root private keys when
issuing biscuits, allow consumers to choose which root public key to
use when verifying the biscuit based on the key ID embedded within it
at composition time, if any. Consumers can then accept biscuits signed
with several root keys, learning to accept signatures from a rolling
set of both older and newer keys.
Introduce the "(*Biscuit).AuthorizerFor" method as an eventual
replacement for the longstanding "(*Biscuit).Authorizer" method, along
with with two new options for supplying either a single public key or
a mapping from ID to public key (together with an optional default
public key to use when the biscuit in question embeds no root key
ID). Alternately, callers may supply a projection function that
consumes an optional root key ID.1 parent e51c1c2 commit d4b5e2c
2 files changed
+92
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
291 | 294 | | |
292 | 295 | | |
293 | 296 | | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
298 | 333 | | |
299 | 334 | | |
300 | 335 | | |
| |||
377 | 412 | | |
378 | 413 | | |
379 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
380 | 443 | | |
381 | 444 | | |
382 | 445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
291 | 292 | | |
292 | 293 | | |
293 | | - | |
| 294 | + | |
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
297 | 298 | | |
298 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
299 | 302 | | |
300 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
301 | 314 | | |
302 | | - | |
| 315 | + | |
303 | 316 | | |
304 | 317 | | |
305 | 318 | | |
| |||
434 | 447 | | |
435 | 448 | | |
436 | 449 | | |
437 | | - | |
| 450 | + | |
438 | 451 | | |
439 | 452 | | |
440 | 453 | | |
441 | | - | |
| 454 | + | |
442 | 455 | | |
443 | 456 | | |
444 | 457 | | |
| |||
465 | 478 | | |
466 | 479 | | |
467 | 480 | | |
468 | | - | |
| 481 | + | |
469 | 482 | | |
470 | 483 | | |
471 | 484 | | |
| |||
591 | 604 | | |
592 | 605 | | |
593 | 606 | | |
594 | | - | |
| 607 | + | |
595 | 608 | | |
596 | 609 | | |
597 | 610 | | |
| |||
0 commit comments