Commit 30fda79
authored
New CC token verification mechanism (#3829)
### Summary
This PR introduces a new confidential computing token verification
mechanism to replace the previous job-based verification approach.
Previously, the verification mechanism was tied to specific jobs, which
required generating a new set of tokens for each new job. This approach
was inefficient and error-prone. The new mechanism provides a
persistent, cross-site token validation system that ensures secure and
consistent communication between components.
### Implementation Details
1. Client Registration
When a client sends a registration request to the server:
- The client includes its token in the request.
- The server validates the client’s token.
- The server responds with its own token.
- The client validates the server’s token.
2. Periodic Cross-Site Validation
Each site (server or client) periodically triggers a cross-site token
validation event (e.g., every 5–10 minutes):
- The initiating site (e.g., siteA) starts the validation event.
- All sites, including siteA, generate new tokens for this event.
- siteA validates tokens from all participating sites.
3. Failure Handling
If any token validation fails:
The affected site will shut itself down.
Optionally, it may attempt to trigger a system-wide shutdown to prevent
inconsistent states.
4. Benefits
- Removes dependency on per-job token generation.
- Enables periodic, automated validation to detect and isolate
compromised sites.
### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Quick tests passed locally by running `./runtest.sh`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated.1 parent 02ae6e1 commit 30fda79
File tree
17 files changed
+786
-470
lines changed- docs/user_guide/confidential_computing
- examples/advanced/cc_provision
- docker
- jobs/hello-pt_cifar10_fedavg
- app_server/config
- app_site-1/config
- nvflare
- apis
- app_opt/confidential_computing
- lighter/cc_provision
- impl
- private/fed
- client
- server
- tests/unit_test/app_opt/confidential_computing
17 files changed
+786
-470
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
89 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
90 | 100 | | |
91 | | - | |
92 | 101 | | |
93 | | - | |
94 | | - | |
| 102 | + | |
| 103 | + | |
95 | 104 | | |
96 | | - | |
| 105 | + | |
97 | 106 | | |
98 | | - | |
| 107 | + | |
99 | 108 | | |
100 | | - | |
101 | | - | |
| 109 | + | |
102 | 110 | | |
103 | | - | |
| 111 | + | |
104 | 112 | | |
105 | | - | |
| 113 | + | |
| 114 | + | |
106 | 115 | | |
107 | | - | |
108 | 116 | | |
109 | | - | |
| 117 | + | |
110 | 118 | | |
111 | 119 | | |
112 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
113 | 134 | | |
114 | | - | |
115 | | - | |
116 | | - | |
| 135 | + | |
117 | 136 | | |
118 | | - | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 43 | | |
48 | 44 | | |
49 | 45 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| 129 | + | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
| |||
0 commit comments