Coder Social home page Coder Social logo

corim's Introduction

This is not the repo you're looking for

This repository is no longer in use. Various aspects of Veraison have been split into separate repositories.

If you're looking for the main Veraison services repository, you can find it here:

https://github.com/veraison/services

Please look into the the project overview on Veraison Organization for the description of how Veraison code is organized and where to look for specific things:

https://github.com/veraison

This repository is now archived!

corim's People

Contributors

carl-wallace avatar dependabot[bot] avatar kakemone avatar sabreenkaur avatar setrofim avatar thomas-fossati avatar yogeshbdeshpande avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

corim's Issues

merge the lint targets into one

We need to merge the "extra" lint target into the "normal" one as we've have done for other packages.
All lint errors must be addressed, either changing the code or suppressing them (when there's a good reason to do so).

increase test coverage for CoTS

Carl's #62 has added CoTS support. Test coverage is below the current threshold and therefore cannot be merged directly into main.

This issue tracks the development of additional tests in the CoTS area.

BUG: “cocli corim sign” tool does not work with a key curve P-384

“cocli corim sign” tool does not work with a key curve P-384. It throws below error:

Error: error loading signing key from ec-p384.jwk: unknown elliptic curve {0xc00007e400}

The ec-p384.jwk file is as below:
{
"kty": "EC",
"d": "XiZ_ZEDMw3Hr9BjNc_4qbNxMG6VpkFHTN3KcdT1UlOc51pFwS1t6Yg_aFYJTGMBf",
"use": "sig",
"crv": "P-384",
"x": "Ay-c_vlONI_FNQn4PNHXwEswuoxOTqOEHNIQbSKv5OnC_KBLwAbg5uBQRHCRmFnu",
"y": "mJpRrG-ex0R08heh1qm-osCH7SSTKC1Bjx1SrFpUQZCiYQXdPLIokC0DGRAMYq41",
"alg": "ES384"
}

Extend Eat to have the additional claims in EatCWTClaim

Currently ConciseTaStore depends on EatCWTClaim where EatCWTClaim had four additional fields needed in this context. The four additional fields are named: HardwareModelLabel, HardwareVersionScheme, SoftwareNameLabel, SoftwareVersionScheme.

The original Eat{} situated in veraison/eat, should be extended to include these four additional fields and EatCWTClaim should be made obsolete. This will result in ConciseTaStore depending on the original Eat{} object in veraison/eat

Cleanup Unsigned CoRIM Container

Unsigned CoRIM has a profile field to set a specific implementation of CoRIM/CoMID using a Profile.

This github issue tracks the introduction of profile.

Add Concise Evidence support

https://github.com/TrustedComputingGroup/concise-evidence is based on CoRIM.

The structure of Concise Evidence is directly symmetric to the CoRIM structure (as it reuses the CoRIM CDDL definitions).
Corresponding Appraisal Procedures for Evidence can be boiled down to a minimum set of code that has to be implemented and would match the appraisal guidance that will come with CoRIM's default profile (DICE), PSA Endorsements, and future profiles.

Adding Concise Evidence support seems to be a quite low hanging fruit and provides an convenient alternative option to EAT in cases where Attester composition becomes a bit more complex.

Add interface to allow user provided extensions

Problem Statement:

Present Implementation of Base CoRIM and CoMID has PSA specific types embedded into the base types.
One example is the Environment Type which has a Class Identifier object inside it.
One type of Class Identifier is the PSA Specific Implementation ID, which is PSA specific.
The issue it raises it:

  1. Now any external library user uses the Class ID object will get the PSA specific Implementation ID as part of
    the library implementation, which is not required.

  2. Any new user of CoRIM, CoMID library, if they have their own ID types, will eventually pollute the library with their own types.

Solution

  1. Create Generic Objects (like Class types) which has ONLY the base types (like OID and UUID).
  2. Provide mechanism for adding dynamic types from the caller with API's for:

a. Registration
b. Validator
c. Getter and Setter.
d. JSON and CBOR encoder and decoder

Additional context

None

Add CoSWID template

It would be useful to have a CoSWID JSON template representing the structure of CoSWID. This template can be used in a future extension of the cocli tool that can manipulate CoSWIDs

Add command line interface

Add a CLI that can be used to:

  • create CoMIDs from a (JSON?) template
  • create (unsigned) CoRIMs from a template and the file-system location of child CoMIDs and CoSWIDs
  • validate CoMID
  • validate CoRIM
  • sign CoRIMs
  • verify CoRIMs
  • display CoRIMs content (as JSON)
  • display CoMIDs content (as JSON)
  • save CoMIDs and CoSWIDs embedded in a CoRIM to a directory as separate files

`cocli corim display` should be able to process unsigned CoRIMs too

If I try to use cocli to display an unsigned CoRIM:

> cocli corim display -f my-unsigned-corim.cbor -v

I get: "Error: error decoding signed CoRIM from my-unsigned-corim.cbor: failed CBOR decoding for COSE-Sign1 signed CoRIM: cbor: cannot unmarshal map into Go value of type cbor.RawTag"

Introduce Unit tests for MKey PSA refval-id and UUID

Introduce Unit tests for MKey PSA refval-id and UUID
Currently Marshal/UnMarshal, JSON/CBOR Negative tests and also specific Positive unit tests are missing from the CoRIM Repository!

This issue tracks the lack of tests!

Is CoRIM appropriate for TDX and SEV-SNP?

Hi y'all, I've been looking into CoRIM as a way we might endorse guest firmware for a confidential VM in a way that is usable across both TDX and SEV-SNP, hopefully more technologies in the future. I haven't seen anyone publicly say we should use CoRIM for VM firmware, but it seems the closest standard.

My understanding is that TCG RIM and IETF CoRIM come from the physical machine attestation space, and not virtual machine attestation. I don't see CoMID being useful for CVMs for instance, since guests will be able to request certificates directly from the hardware in their TCB in the future. We're then left with CoRIM as a wrapper for a singular CoSWID for the guest firmware, plus the CoRIM's security version number.

SEV-SNP already has the IDBlock to attest to the fact that the firmware is signed by the party, and has a certain security version number. TDX doesn't have anything similar, but we could use MROWNER to at least indicate the firmware vendor for where a user could download a certificate, named by the MRTD value.

So I'm left with a bit of a struggle with the weight of this format as compared to, say, just generating a throw-away public key and signing an X.509 certificate with information we want about firmware in an x509v3 extension. Basically we'd just have the firmware measurement and the security version number. That format could work very simply in existing code ecosystems that don't already support a new RFC like COSE. It's kind of against NIST SP 800-155 section 3.2.2.4's call for an open standard for firmware integrity, but with publication of the format, it might be open enough.

Provide a minimal implementation that allows provisioning PSA endorsements

A minimalist implementation of CoRIM / CoMID that can be used to ship PSA endorsements.

In particular, we need CBOR encoding and decoding, JSON encoding to ease creation of CoRIM/CoMID by humans.

Obviously, also all the PSA extension points and enough API surface to make it easy to extract PSA endorsements from CoRIM/CoMID.

Bug: cocli corim display

cocli corim display on a signed corim creates a json and prints "Meta:" and "CoRIM:" in https://github.com/veraison/corim/blob/main/cocli/cmd/corimDisplay.go#L88 and later.

This causes a problem when parsing the JSON file output through python or command line, and appears to be a non-conforming JSON.
Can you confirm this is a bug? and perhaps fix it?

Similarly cocli comid display also outputs the file name with >> at the top of the JSON file and makes it difficult to parse.

Validate binary MAC and IP addresses

The Valid method for the Measurement type has this comment:

// TODO(tho) MAC addr & friends

We need to check whether this still applies, and in that case provide validation code for MAC and IP addresses.

Correct the bug in the help output of all cocli commands

During cocli corim submit command testing a major bug is seen in the help output of all the comid and corim cocli commands.

The Long help output indicates command as cli, whereas the actual command is cocli.
Example:
cli comid create --template=t1.json
--template=t2.json
--template-dir=templates

Should be corrected to:
cocli comid create --template=t1.json
--template=t2.json
--template-dir=templates

CCA "config ID" is not an identifier

Two notes on the current implementation of CCA config claim:

  • Semantically, this claim is not an identifier, it's just a dump of the config register that describes the CCA features.
  • The type should be bytes rather than string (see §A7.2.3.2.5 of the RMM spec).

Add a `submit` subcommand to `cocli`

Add a submit sub-command to corim command in cocli that uses veraison/apiclient to supply a CoRIM to the provisioning interface of the verifier.

Something like:

cocli corim submit \
    --corim-file <CoRIM file> \
    --api-server <URI of the endorsement API server> \
    --media-type <media type associated with CoRIM file> 

UUID MKey should handle the (special) nil value

The IMkeyFactory requires every implementation to

// [...] accept nil as one of the inputs, and return the Zero value for
// implemented type.

Currently, the UUID implementation does not handle nil, which results in unmarshalling errors.

Bug: Missing 'name' field in CoMID measurement-values-map

Mval struct does not contain the ‘name’ field in it.
TCG document ([https://trustedcomputinggroup.org/wp-content/uploads/TCG-Endorsement-Architecture-for-Devices-r38_5May22.pdf] "section 5.5.3.1.12 measurement-values-map" lists the fields to be kept in measurement-values-map. It contains "name" field. Same is not reflected in [https://github.com/veraison/corim/blob/9a7830b4a3c319a5e0d5f14c986c828f8417a158/comid/measurement.go#L166]

Due to this, cocli does not support/add the name field while generating comid.cbor even if we manually add a name field in comid.json.

Add tagged-int-type into CoRIM

This issue tracks the addition of introducing tagged-int-type into the comid code base.

One specific type of class identifier is tagged integer.

Create a New Release for `CoRIM` package

This issue tracks the following:

  1. Create a new release V1.2.1 for the CoRIM Package
  2. Modify existing cocli templates to align with the new release
  3. Verify it works with the latest on veraison/services

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.