-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A network without any entries in public:ccf.gov.nodes.snp.uvm_endorsements
does not accept SNP nodes on the basis of hardcoded roots of trust
#6482
Comments
@andpiccione CCF/src/node/rpc/node_frontend.h Line 1576 in 5661eef
It is not updated again automatically, expecting instead that the governance will add to the table with Roots of trust for UVMs have been pinned in the code since #5867, so the following two changes are possible:
|
@achamayou It makes sense to keep the map for future flexibility, to allow users to add more trusted roots in the future. However, I would still expect a node to be able to join the network if its UVM endorsements successfully verify against the roots of trust pinned in the code. I'm not sure if it's possible, but we could try verifying the endorsements against both the hardcoded roots of trust and the UVM endorsements in the map; if either check passes, the node should be allowed to join. This way, we can support both new SNP nodes joining a SGX network without having to add the UVM roots of trust and the scenario where custom roots of trust can be used. Nonetheless, if dropping the map is easier, I'm fine with that too. |
Agreed, both options proposed would meet this requirement
Yes, that's the first option - The only area of doubt is that we currently "self-check" the attestation on node start, before we join, and so that means the table could allow extending the set but only if intersects with what is being started. I don't think that's an issue, just want to make it clear.
Adding a did -> (feed, svn) entry via governance prior to the SGX migration should not be major blocker, it's quite a stable value, but I agree it'd be better not to have to do that. |
That should be fine for now, we can revisit this later on if needed.
It's not a blocker of course and it's definitely doable, but it would be better if we can avoid it just to remove one extra step to perform during code upgrades. |
@andpiccione changed in #6486, but I think this puts us in an awkward spot audit-wise: we record the root of trust for a Start node (with the idea that roots of trust would be managed through governance and kept up to date in the future). That will need to be removed through governance, when the SVN revs up. To avoid this corner case, we could stop populating it, and treat the map as entirely optional additions to the built-ins roots. Assuming we do this, the map is there purely optionally, to enable potential rollover to new did/feeds, but remains similarly error prone (you have to not forget to remove the old did -> (feed, svn) once the upgrade has passed). Aside from the questionable usability, this weakens our audit story, because the UVM roots of trust are no longer explicitly captured in the ledger, except on (did, feed) change, and are instead implicitly captured by the code of the primary. I think it may be more consistent to use the following logic:
This also requires a change (at the moment, it's effectively the intersection of what's hardcoded in the primary and what the KV allows), and does require a manual governance action on SGX systems being upgraded, but has the benefit of being regular (every root of trust upgrade requires the same action), and easily auditable. What do you think? |
public:ccf.gov.nodes.snp.uvm_endorsements
should still accept SNP nodes on the basis of hardcoded roots of trust
To add some detail on the expected flow for SVN upgrades:
DID/FEED upgrades
Q: Why does the second scenario require a two-phase add and removal? Q: Can scenario 1 be done implicitly, without governance, if we use built-in roots for validation? Q: Can scenario 1 be done implicitly, without governance, if we use built-in roots for validation? |
Summary of further discussion, @andpiccione please correct any mistake. We want to maintain auditability of UVM roots of trusts, nodes should never be accepted in the network without the root of trust for their UVM being present in the ledger/KV at the time. #6482 would go against this and is therefore closed.
The built-in TS/JS API will continue to use hardcoded roots of trust for now, for compatibility reasons. |
public:ccf.gov.nodes.snp.uvm_endorsements
should still accept SNP nodes on the basis of hardcoded roots of trustpublic:ccf.gov.nodes.snp.uvm_endorsements
does not accept SNP nodes on the basis of hardcoded roots of trust
verify_uvm_endorsements()
checks endorsements against both internal hardcoded roots of trust, and entries in thepublic:ccf.gov.nodes.snp.uvm_endorsements
map. Only attestations endorsed collateral meeting both requirements are currently allowed through.This means that a network being updated to SGX requires a governance action to set at least one entry in
public:ccf.gov.nodes.snp.uvm_endorsements
before nodes can join.The text was updated successfully, but these errors were encountered: