-
Notifications
You must be signed in to change notification settings - Fork 88
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
Adopt EAR in Attestation Service #353
Comments
cc @jialez0 |
Another thing is that if we move to EAR, we can probably change the way we do the integration with Veraison. |
Well, let me share some thoughts after reading EAR Document Let me divide into four parts, s.t.
What we are doing now in CoCo-ASTo sum up, CoCo-AS does two things upon an evidence
Point 1 is achieved by verifying the signature of the evidence, together the claimed pubkey, to check if Point 2 is achieved by verifying the so-called "claims", s.t. the fields in evidence with specific semantics. For example, The part 1 is natural and I think almost all the remote attestation services should firstly ensure this. What the idea of EARTo my understanding, the core part of EAR is the The difference between what CoCo-AS is doing now and EAR is how thing 2 as mentioned. Concretely,
What does this mean? The How to integrate EAR into CoCo-AS and challenges.Let's see the EAR definition
The only one thing left is
So the core problem is to mapping evidence claims of CoCo-AS (so-called However, we know that different software components will be reflected by one (or more) parsed-claims directly (or indirectly).
So, to handle this, we should handle the following problems:
Potential influence upon KBSIf we have a good CoCo-AS implemented as mentioned, which would receice Currently, KBS would leverage CoCo-AS' attestation result to decide whether to authorize the KBS-client. If yes, a CoCo-AS token with a public key will be delivered to the KBS client. However, if we apply EAR on CoCo-AS, KBS would only care abstract result of the request and will not response the coupled CoCo-AS token thing. The policy design inside KBS would still break in some way. (Now the access to a resource is determined usually by some specific claims, which is somehow coupled with AS ability but works fine temporarily) So, we might need to decouple the things. That means there should be two parts of KBS:
|
Ok, I finally read @Xynnn007's response above and I have looked through the spec. I think we can integrate EAR, but there is one potential problem. First, the good news. EAR support can be separate from CoRIM support. The EAR crate can replace our existing token generation code. This is probably a good simplification. We can generate an EAR token in Rust like this
It's easy enough to populate these fields. The only one that really matters is the The submods contains a map of keys (e.g. "CPU") and appraisals. The appraisal struct looks like this.
The most important field here is the As Ding points out the question is really how do we generate a The
One possible approach would be to expect the OPA Policy to have at least one claim that matches the fields of this struct. We would fill in the others with default values. We'll have to think carefully about what these defaults should be. Another question is whether we should only set one submodule (the CPU one, presumably) or if we should somehow support mapping multiple policies onto different submodules. There are a few other values to figure out, but in general this seems relatively straightforward. We would keep the KBS policy engine roughly the same, although we would have to rework our default and example policies. Here's the not-so-great news. Currently our token contains the following fields.
The EAR spec is apparently extensible, but I don't think the Rust implementation supports adding arbitrary fields to the token. If not, we don't really have any equivalent of several of these fields. In fact, the only thing that is really represented by the EAR tokens is the |
Ok, I've actually started to work on this. PR should be ready in a few days. |
Following @thomas-fossati's excellent presentation about EAR in the community meeting, I think we should move towards replacing/reformating our attestation token to use EAR. There are a few pieces that we'll need to think about.
Currently the AS returns a JWT with these claims inside of it. Code for token issueing is here.
Part of the question is how we can map these claims onto EAR. I don't have a thorough knowledge of the EAR format yet, so I don't have a lot to say about this. I do wonder if we should drop the
reference-data
field. I am also not sure if there is something like theTEE
field. I guess EAR is supposed to be platform independent, but it is reasonable for a KBS to have policies based on this info (i.e. don't release secrets to a guest with the sample attester).There are two deeper questions that I am concerned about. First, how do we produce the EAR trustworthiness claims. Currently evidence validation in the AS is based on OPA. Each verifier plugin extracts a claims map (also stored in the
tcb-status
field of attestation token) which is fed into the OPA engine. The output of the policy evaluation is stored in thepolicies
field. Note that we support evaluation of multiple different policies. I'm not sure if we should continue with that or how to work it into the EAR format.The bigger issue is that we currently have very loose requirements for what the AS validation produces. The OPA policies can essentially return anything. It is up to the client to synchronize their AS policies with their resource policies in the KBS. This is quite different from the EAR approach where the format of the attestation results are more strongly structured. I'm not sure how we should account for this. Maybe we can provide OPA policies that transform claims maps into trustworthiness claims. Maybe we should get rid of the OPA engine in the AS entirely. This is related to some of the discussion here.
Another issue is how we handle
init_data
. Theinit_data
expresses the configuration of many components in the guests. This reflects crucial information about the guest TCB and potentially about the workload as well. Inidata is not hardware specific. Currently the AS ensures a binding between the hardware evidence and the initdata, then it is up to the policy to validate the initdata. Even without EAR I think we're a little uncertain whether the inidata should be validated in the AS or the KBS. Since it is closely related to the resources that are allowed, this should probably be handled by the KBS. I guess this means that it would not be part of the EAR? This flow is still unclear to me.Overall I think the EAR is a good approach, so let's see if we can get the ball rolling here.
cc: @Xynnn007 @mkulke @mythi @sameo
The text was updated successfully, but these errors were encountered: