-
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
when MASA signs with raw public key, where does it put it? #230
Comments
Related question is when signing with MASA's PKIX cert identity: where to put MASA's signing certificate, as in the COSE format this isn't included. My answer to both would be like below: MASA can definitely include a "kid" field in the Voucher, which is useful ...
In case the Pledge is known to store only 1 trust anchor, then it's not so useful. I noticed we don't have text yet describing this "MASA MAY include kid" situation. (It was in the Thread spec ;-) ) This works in a similar/same way for RPK/cert trust anchors. So for a Pledge the raw public key itself isn't needed, only a KID to indicate it in very specific cases. Now the Registrar could also use the same "kid" field to validate the Voucher's signature. However in this case the "kid" generation method needs to be standardized as the Registrar otherwise doesn't know how it was created. And the Registrar would need to receive the MASA's raw public key in an out-of-band manner just like it receives the MASA's (PKIX) signing certificate in an out-of-band way. However 8995 says also:
which implies Registrar needn't always verify the Voucher? |
Just a note that Section 9.3 needs text to consider the case of Voucher signing and whether/if/when an x5bag would be needed in the Voucher. My take:
|
Discussion about how to get MASA signing key in some OOB way that the administrator of a Registrar would ask for. So an administrator could type in, "add manufacturer foo.example", and there would be an https://masa.foo.example/info.json... This might also be used like: https://auth0.com/docs/secure/tokens/json-web-tokens/json-web-key-sets |
Note for the record: my previous comment of 2022-06-27 on 'x5bag' and 'kid' is already integrated into the present draft. @mcr How the Registrar's administrator gets the information on approved MASAs (either certificates or raw pubkeys) and which protocol is used for that, is I believe out of scope of current BRSKI. If so , we don't need to write much on this. So to answer the original question of this issue, I don't think MASA has to put the (raw) signing pubkey anywhere in the constrained Voucher. Just like it does not include the signing certificate in the constrained Voucher. |
Yes, I agree. That's not to say that some kind of standard way to communicate this info via sales channel/email wouldn't be welcome.
It sure makes it hard to write a promiscuous registrar without a key to verify things. |
I don't see a problem here because
|
That certificate, and the chain that leads up from it might have no relationship to the EE identity that the MASA uses to sign the voucher. It could be anchored to the same CA (in a different branch) or it might be a totally different CA. It could also be a raw signature too.
Yes, but the MASA might be identified by arbitrary WebPKI anchor that has nothing to do with signatures on vouchers.
yes, that's true.
Agreed, it's not required, but it sure is NICE for an audit trail. |
Yes, for auditing purposes (including checking of the signature) there is a clear problem with the "potentially missing signer identity" i.e. knowing at minimum the public key of the signer, and ideally a bit more (e.g. a certificate chain associated with the signer if it has one.) This issue is not specific to RPK, same problem when MASA signs with a certificate-based identity but this identity differs from whatever the Registrar learns via other paths. This issue is specific to constrained-voucher which omits the cert chain from the Voucher. There are various solutions for this issue if we want to solve it; A) require the MASA to supply the signing key/cert in an out of band manner to the customer IF it signs with a key that the customer cannot know otherwise. In this case a vendor that doesn't provide any sales integration with its end customer, just needs to make sure that its MASA will sign with the same CA identity that the Pledge identities itself with. B) use unsecured 'x5bag' attribute in the Voucher to store entire MASA signer's chain. This is then stripped off by a Registrar who wants to reduce traffic. A protected 'x5bag' attribute in the Voucher is of course left untouched - this is one the Pledge may use in rare cases as we define in our draft. C) define a new HTTPS / REST resource at the MASA that Registrar can use to request the signing cert chain or RPK that the MASA will use for this particular Pledge. So Registrar can get the info without burdening the Voucher with it. Note that C) could be left entirely as future work, while A) and B) will require some wording already in the present draft to ensure forward compatibility if we define such solution in the future in more detail. |
D) define a multipart/ reply that has voucher and cert chain in a different part. |
(C) is also optional for the Registrar to perform and doesn't mess with the Voucher, so overall a good solution. For products that have the 'sales integration' with the end customer it is still an option that the vendor sends its MASA CA certificate, and Pledge identities (IDevID/serial), the MASA's signing cert if any and the public (RPK) signing key that the MASA will use, all to the customer. Then the Registrar can verify Voucher signature already without doing the option C) REST call. Do we want to leave (C) as future work - or define a solution in the present draft? It would fit in this draft because the issues comes from using the COSE_Sign1 structure which doesn't include the signing cert/key inside. |
Esko Dijk ***@***.***> wrote:
(C) is also optional for the Registrar to perform and doesn't mess with
the Voucher, so overall a good solution.
Do we want to leave (C) as future work - or define a solution in the
present draft? It would fit in this draft because the issues comes from
using the COSE_Sign1 structure which doesn't include the signing
cert/key inside.
Let's hack up some text this late afternoon during the hackathon, if you are
here, or in the pub during the week.
|
@mcr I did some reconsideration of all options; and the below option seems attractive: (E) include the full RPK in the "rpk" COSE header parameter in the unprotected bucket. Using "kid" is not quite right because it's intended for another purpose and might be already in use for some use cases as described in our draft. If the registrar gets the full RPK in a standard format in the "rpk" parameter, then it can easily verify it (signature) or look up the RPK in a list of RPKs if it has that. Because "rpk" is in the unprotected bucket, the Registrar can easily strip it out to save space and the voucher signature is unaffected, before sending it on to the Pledge. The Pledge doesn't ever need "rpk" because it either uses its builtin trusted key to verify, or in rare cases if multiple keys are present it looks up the right key using the "kid" field. It should be easy to get an assigment here: there's plenty of free namespace for COSE parameters. Value type is 'bstr'. Format can be exactly like 'pinned-domain-pubk' and 'proximity-registrar-pubk' fields i.e. the key and associated algorithm information. |
@mcr to provide pull request. |
In some version of my code, I had been putting the RPK into unprotected bucket with key 60299.
Why? I have no idea where that number came from, but it's been around in my code for awhile.
Probably a private use value, but even that seems wrong.
Where can the MASA put it's raw public key for signing vouchers?
If the Registrar does not have it, then it can't verify the Voucher, but maybe it has dubious value anyway.
Maybe in the RPK case, this does not matter. (Pledge already has it).
Maybe there should be a kid value?
The text was updated successfully, but these errors were encountered: