comid: add dependency-triples (triples-map key 4)#258
comid: add dependency-triples (triples-map key 4)#258yogeshbdeshpande merged 1 commit intoveraison:mainfrom
Conversation
05f4321 to
73cdb31
Compare
|
Hi @rsampaio thanks very much for your contribution. LGTM apart from a small formatting issue in ➜ comid git:(feature/add-dependency-triples) gofmt -d triples.go
diff triples.go.orig triples.go
--- triples.go.orig
+++ triples.go
@@ -12,12 +12,12 @@
)
type Triples struct {
- ReferenceValues *ValueTriples `cbor:"0,keyasint,omitempty" json:"reference-values,omitempty"`
- EndorsedValues *ValueTriples `cbor:"1,keyasint,omitempty" json:"endorsed-values,omitempty"`
- DevIdentityKeys *KeyTriples `cbor:"2,keyasint,omitempty" json:"dev-identity-keys,omitempty"`
- AttestVerifKeys *KeyTriples `cbor:"3,keyasint,omitempty" json:"attester-verification-keys,omitempty"`
- DomainDependencies *DomainDependencyTriples `cbor:"4,keyasint,omitempty" json:"dependency-triples,omitempty"`
- CondEndorseSeries *CondEndorseSeriesTriples `cbor:"8,keyasint,omitempty" json:"conditional-endorsement-series,omitempty"`
+ ReferenceValues *ValueTriples `cbor:"0,keyasint,omitempty" json:"reference-values,omitempty"`
+ EndorsedValues *ValueTriples `cbor:"1,keyasint,omitempty" json:"endorsed-values,omitempty"`
+ DevIdentityKeys *KeyTriples `cbor:"2,keyasint,omitempty" json:"dev-identity-keys,omitempty"`
+ AttestVerifKeys *KeyTriples `cbor:"3,keyasint,omitempty" json:"attester-verification-keys,omitempty"`
+ DomainDependencies *DomainDependencyTriples `cbor:"4,keyasint,omitempty" json:"dependency-triples,omitempty"`
+ CondEndorseSeries *CondEndorseSeriesTriples `cbor:"8,keyasint,omitempty" json:"conditional-endorsement-series,omitempty"`
Extensions
}Please run: gofmt -w comid/triples.goand commit the changes. |
|
@thomas-fossati thank you for the review! I just pushed a commit with the fix |
yogeshbdeshpande
left a comment
There was a problem hiding this comment.
I have left some comment, but in general LGTM.
Once you add the API and insert tests,. I will approve it!
|
Nice, thanks! Before merging, could you please squash the 5 commits into one with title "feat(comid): add domain dependency triples”? |
|
@rsampaio : The changes LGTM One thing, I forgot to mention, please do so in a separate PR, where We need to exercise, all triples as part of examples, so please see: https://github.com/veraison/corim/blob/main/comid/example_test.go#L15 And add your triple in this test also. |
yogeshbdeshpande
left a comment
There was a problem hiding this comment.
Please see my latest comment, remember to do it!
As suggested by Thomas, Please squash commits
Also, Make sure you follow the commit template
You have my approval for this one!
Implement DomainDependencyTriple per draft-ietf-rats-corim §5.1.11.2, including validation, serialisation hooks and AddDomainDependency(). Signed-off-by: Rodrigo Sampaio Vaz <rvaz@nvidia.com>
6737732 to
7edf95f
Compare
|
@thomas-fossati @yogeshbdeshpande thanks for the feedback, I believe I addressed all the comments and I will open a separate PR for the example_test.go |
|
Please squash all the commits to one commit |
Implements domain-dependency-triple-record as defined in draft-ietf-rats-corim 5.1.11.2.
A Domain Dependency Triple (DDT) expresses a trust relationship between domains: the trustworthiness of a domain-id depends on one or more trustee domains having been appraised first. Both fields are typed as environment-map per the spec.
Adds DomainDependencyTriple and DomainDependencyTriples types with Valid() and IsEmpty(), and wires DomainDependencies (CBOR key 4, JSON dependency-triples) into the Triples struct alongside the existing triple categories.
Includes unit tests covering the happy path and all validation error cases.