Commit 108bc7a
committed
cdh: add sealed secret signing
Add mechanism to serialize and deserialize secrets with signatures.
When deserializing, use the KID in the JWS header to find the signing
key. The signing key will either be retrieved from the KBS (if it is a
resource URI) or it will be treated as a local credential. The second
approach is used for testing (although sadly the tests do require sudo
or some fiddling).
The key should be an EC PS256 JWK. There are hooks to support more key
types in the future.
When serializing, a signature will be created. The JWK and KID must be
provided. Note that the JWK has a KID field of its own, but we don't
care about this. The KID in the JWS is what matters.
Also update the secret_cli. Note that the CLI will no longer let you
create a secret without a signature.
Signed-off-by: Tobin Feldman-Fitzthum <tfeldmanfitz@nvidia.com>1 parent 4be23c4 commit 108bc7a
File tree
5 files changed
+285
-27
lines changed- confidential-data-hub/hub
- src
- bin
- secret
5 files changed
+285
-27
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
44 | 55 | | |
45 | 56 | | |
46 | 57 | | |
| |||
57 | 68 | | |
58 | 69 | | |
59 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
60 | 75 | | |
61 | 76 | | |
62 | 77 | | |
| |||
164 | 179 | | |
165 | 180 | | |
166 | 181 | | |
167 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
168 | 187 | | |
169 | 188 | | |
170 | 189 | | |
| |||
277 | 296 | | |
278 | 297 | | |
279 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
280 | 303 | | |
281 | 304 | | |
282 | 305 | | |
283 | 306 | | |
284 | 307 | | |
285 | | - | |
| 308 | + | |
286 | 309 | | |
287 | 310 | | |
288 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
28 | 43 | | |
0 commit comments