Commit 506140c
committed
kbs/resource: Add splitapi plugin
This plugin (based on the Nebula plugin interface) delivers credentials (keys
and certificates) to a sandbox (i.e., confidential PODs or VMs), specifically
to the kata agent to initiate the SplitAPI proxy server so that a workload
owner can communicate with the proxy server using a secure tunnel.
The proxy server's credentials can be requested using the kbs-client:
kbs-client --url http://127.0.0.1:8080 \
get-resource \
--path 'plugin/splitapi/credential?ip=60.11.12.13&name=pod6&id=32348'
The IPv4 address, name, and the ID of the sandbox must be provided in the query
string to obtain the credential resources from the kbs.
After receiving the credential request, the splitapi plugin will create a key
pair for the server and client and sign them using the self-signed CA. The
generated ca.crt, server.crt, and server.key are stored in a directory specific
to the sandbox (the caller) and returned to the caller. In addition, ca.key,
client.key, and client.crt are also generated and stored to that particular
directory specific to the sandbox (i.e., caller)
During the credential generation, a directory manager creates a unique
directory specific to the sandbox (i.e., the caller). The manager creates the
unique directory using the sandbox parameters passed in the query string.
A mapping file is also maintained to store the mapping between the sandbox
name and the unique directory created for the sandbox.
The splitapi plugin itself is not initialized by default. To initialize it,
you need to add 'splitapi' to 'manager_plugin_config.enabled_plugins' in
the kbs-config.toml.
Depends on: confidential-containers#451
Signed-off-by: Salman Ahmed <sahmed@ibm.com>1 parent baf0bd6 commit 506140c
5 files changed
Lines changed: 662 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
18 | 24 | | |
19 | 25 | | |
20 | 26 | | |
| |||
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
38 | 47 | | |
39 | 48 | | |
40 | 49 | | |
| |||
0 commit comments