-
Notifications
You must be signed in to change notification settings - Fork 1
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
Return meaningful EAT in chares #37
base: main
Are you sure you want to change the base?
Conversation
04f8b0c
to
3ddb4a5
Compare
Thanks @thomas-fossati for your review, I've switched to |
Endpoint chares now gathers the output of GetEvidence() from each sub-attesters, combines them into a CMW collection, and wrap it as an EAT in its response. If there are multiple supported format available from a sub-attesters, ratsd core picks the first available format from GetSupportedFormats() Signed-off-by: Ian Chin Wang <[email protected]>
Signed-off-by: Ian Chin Wang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments as per f2f discussion with @cowbon
|
||
// Use a map until we finalize ratsd output format | ||
eat := make(map[string]interface{}) | ||
collection := cmw.NewCollection("tag:ietf.org,2025:ratsd") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
collection := cmw.NewCollection("tag:ietf.org,2025:ratsd") | |
collection := cmw.NewCollection("tag:github.com,2025:veraison/ratsd/cmw") |
return | ||
} | ||
|
||
for _, pn := range s.manager.GetPluginList() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for _, pn := range s.manager.GetPluginList() { | |
for _, pn := range pl { |
|
||
formatOut := attester.GetSupportedFormats() | ||
if !formatOut.Status.Result || len(formatOut.Formats) == 0 { | ||
errMsg := fmt.Sprintf("no supported formats from attester %s: %s ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should fail hard rather than soft here: we should either return the complete view of the sub-attesters or an error.
s.reportProblem(w, p) | ||
return | ||
} | ||
eat["cmw"] = serialized | ||
w.Header().Set("Content-Type", respCt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are not yet signing the EAT, the correct media type is an UCS. See https://www.ietf.org/archive/id/draft-ietf-rats-eat-media-type-12.html#section-6.8 for the details.
Endpoint chares now gathers the output of GetEvidence() from each sub-attesters, combines them into a CMW collection, and wrap it as an EAT in its response. If there are multiple supported format available from a sub-attester, ratsd core picks the first available format from GetSupportedFormats()