Skip to content

v0.0.2603

@setrofim setrofim tagged this 26 Feb 13:46
Switch to using CoRIM store, rather than the key-value store, for
endorsements and trust anchors. Endorsement and trust anchors are now
stored in a format that preserves the entire CoRIM/CoMID contents, and
is entirely scheme-agnostic. The more sophisticated structures allows
for more sophisticated a management life cycle to be implemented in the
future, and the more generic structure makes scheme implementation
easier.

This change has a huge knock-on effect on both provisioning and
verification pipelines implementations, and the scheme implementation
framework has been completely restructured:

- IEvidenceHander, IEndrosementHander, and IStoreHander interfaces are
  gone, replaced by the single ISchemeHander interface.
- A generic scheme wrapper implements ISchemeHander based on a smaller
  ISchemeImplementation interface and a SchemeDescriptor. Most schemes
  just need to implment ISchemeImplementation and provide the
  SchemeDescriptor.
- The SchemeDescriptor is a declarative element, grouping static
  information about the scheme, such as its name, supported media types,
  etc (in the past, this was defined on ad-hoc basis using multiple
  variables within old scheme implementations).
- Scheme version has also been added as part of the descriptor. This
  isn't really used at the moment. All existing schemes have been set to
  version 1.0. (note: this isn't used at the moment)
- ISchemeHander/ISchemeImplementation expose similar API to the old
  IEvidenceHander (verification pipeline stages remain the same), but
  the argument types differ; e.g. "keys" for endorsement/trust anchor
  lookup are now represented as comid.Environment's.
- Instead of IEndrosementHander methods, ISchemeHander has a single
  ValidateCorim (made option in the ISchemeImplementation by the
  wrapper). This allows schemes to supply custom validation for CoRIMs
  before they are added to the store (this can also be more cleanly done
  via CoRIM profiles).
- IStoreHander mothods are no longer necessary as the store interface is
  entirely scheme-agnostic.
- Protobuf types have been removed from the IStoreHander methods.
  Protobuf is an implementation of the underlying RPC mechanisms and
  should not be exposed to the schemes (effectively burdening them with
  partial serialisation for transport).

CoRIM store is initialized and managed by its own client. Deployments
have been updated to integrate it.

Since there is now a single scheme interface, the combined/split plugins
configuration has been removed. There is now always one plugin per
scheme. Plugin executables have also been renamed to be prefixed with
scheme- or coserv- depending on plugin types (as CoSERV plugins
currently reside under scheme/).

Since there is now a single interface for the entire scheme,
IPluggable.GetSupportedMediaTypes() has been changed to return a
map[string][]string instead of just []string. This allows to separate
provisioning from verification media types.

An "example" scheme has been added containing the boilerplate template
for imlementing new schemes.

BREAKING CHANGE: the scheme implementation framework is completely
different; old scheme implementations will not work with this update,
and will need to be re-written to implement the new
ISchemeImplementation interface. Legacy CoRIM media type
application/corim-usnigned+cbor has been removed.
IPluggable.GetSupportedMediaTypes() now returns a map[string][]string
instead of []string.

Signed-off-by: Sergei Trofimov <sergei.trofimov@arm.com>
Assets 2
Loading