-
Notifications
You must be signed in to change notification settings - Fork 4
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
Network Segregation/Authentication Token Logic #779
Comments
Open to discussion. One thing I still need to nail down is if we want to embed the Both function identically but the reference method enables us to reduce the amount of data sent and even lets us cache parent claims for verification. For example, the authority claims will be very common across all of the access claims, so if we can send much less extra data overall if we only send it if an verifying node hasn't seen it before. Under this current spec its not really required. But I think its definitely something to explore when working on the smarter generic version of these tokens for our capability system. |
You've already started on this @amydevs with trying to add the claims to the claims domain. Be sure to link a PR to the linear issue. |
Ok, based on further design discussion. The implementation of this needs to be further generalised. While yes, we do need to have a network authority claim and a network access claim. It needs to be pivoted to a org authority claim where we can refine the kind of authority we want to give out. We need to convert the network access claim to something like a org group claim. But that may come later? In any case, the main point I'm trying to make here is we have the need for different kinds of claims. Not just claims for access to a network but claims that allow…
The possibilities are endless! |
Let's separate any discussion on further sigchain claim expansion in #791. This should focus solely on being able to have segregated networks, and the ability to authenticate to PKE orgs. Other delegated authorities should wait until consider CVP 4. and decentralized trust infrastructure. Also I prefer not using the word "tokens" to describe this. If you're talking about sigchain claims, use the word "claim". Token is too generic, as it can be confused as a shared secret token. |
Is this issue actually completed by #775? I thought this would also end up having to deal with the private network. If you need to, you need a new issue for |
Yeah, technically this isn't fully completed without handling the private networks. I'm going to re-open this issue. |
Can we update the scope - indicating what's left @amydevs ? |
So basically, the actual logic itself for mainnet and testnet can be done super simply by simply doing a string equality comparison with the designated Especially in terms of matching:
With the |
Specification
In order to form a network securely, we need some way to verify cryptographically whether a node should be able to access a network. To do this we need to make use of tokens as a portable, scale-able and secure method for proving access to a network. To do this the tokens need to encode details about the network authority, the subject node and provide a signature.
For out needs, we need a single network authority that defines the network itself. The details of this can be decided but all we require is a secure key pair to act as the trust anchor for the network authority. But we need to be able to issue access tokens in a decentralized way. Ideally using seed nodes issues for network access tokens.
We are going to be doing this with 2 types of tokens:
ClaimNetworkAuthority
- This is a token issued by the network authority authorizing the ability for nodes to mintClaimnetworkAccess
tokens.ClaimNetworkAccess
- This token is minted for a specific node to prove access to a network.Both tokens are required to be provided as a
token chain
to prove access to a network. They need to encode the following facts to prove this. Note that the ids for all purposes will just beNodeIds
of nodes in the network as a way to identify a node and key interchangeably.Minting tokens
The
ClaimNetworkAuthority
token exists to prove that a node can mint tokens on the authority of the network. This means minters can be dynamic and not know ahead of time so long as they hold the authority token and the authority is known. This is important for dynamic scaling of minter nodes.In the most basic form this
ClaimNetworkAuthority
needs to encode the following information.ClainNetworkAuthority
.Succinctly this proves that the subject (sub) has the authority of the network authority (iss) to mint access tokens for that network. This is verified with the signature. This for fills the facts 1, 2 and 4 above.
The
ClaimNetworkAccess
token exists to prove that a node has access to the network. This can be issued by any node that has a validClaimNetworkAuthority
token.In its most basic form the
ClaimNetworkAccess
token needs to encode the following information.ClaimNetworkAccess
.Succinctly this proves that the subject (sub) has access to the network under the authority of the network authority. This is verified with the signature. This for fills the facts 2, 3 and 5. Note that the fact 2 is common between the two claims and helps verify the chain.
The
ClaimNetworkAccess
needs to include extra metadata refers theClaimNetworkAuthority
in some way. While this data isn't strictly required to verify the chain. It should provide a way to find all the required information needed to verify the chain. This can take two forms.ClaimNetworkAuthority
claim within theClaimNetworkAccess
claim. Simple but bloats the information.claimId
of theClaimNetworkAuthority
, TheNodeId
of the node we can get the token from. And optionally a hash of the token.So long as the verify-er has the contents of both tokens then it can verify it.
Verifying tokens
Much like a certificate chain in TLS, the tokens form a
token chain
. Where verifying the tokens in order can prove a chain of trust that verifies access to a network. To verify all of the following facts.NodeId
.sub
of theClaimNetworkAccess
token matches the connected node.ClaimNetworkAccess
token is signed buy it'siss
.iss
of theClaimNetworkAccess
token matches thesub
of theClaimNetworkAuthority
token.iss
of theClaimNetworkAccess
token matches the network we are authorised under.claimNetworkAccess
token is signed bu theiss
.If all these facts are true and the network matches one we allow then we allow the connection. Otherwise we reject and kill the connection.
To expand on this we may want to enforce a strict mode where we only allow the node to access a single network. To do this we can can requests the access tokens as part of their sigchain. If we only see one network access token within their chain then that meets the strict condition.
Additional context
Parent: #770
Tasks
ClaimNetworkAuthority
andClaimNetworkAccess
claims within theclaims
domain.The text was updated successfully, but these errors were encountered: