-
Notifications
You must be signed in to change notification settings - Fork 8
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
attestation: add name to Validator as unique identifier #1095
base: main
Are you sure you want to change the base?
Conversation
c5805b5
to
dde0de0
Compare
dde0de0
to
e243f98
Compare
Wait for merge of #1082 |
…tor as unique identifier
e243f98
to
98e66b7
Compare
@@ -248,7 +250,7 @@ func verifyEmbeddedReport(validators []Validator, cert *x509.Certificate, peerPu | |||
return nil | |||
} | |||
// Otherwise, we'll keep track of the error and continue with the next validator. | |||
retErr = errors.Join(retErr, fmt.Errorf("validator %s failed: %w", validator.OID(), validationErr)) | |||
retErr = errors.Join(retErr, fmt.Errorf(" validator %s failed: %w ||", validator.String(), validationErr)) |
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.
retErr = errors.Join(retErr, fmt.Errorf(" validator %s failed: %w ||", validator.String(), validationErr)) | |
retErr = errors.Join(retErr, fmt.Errorf(" validator %s failed: %w", validator.String(), validationErr)) |
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.
Imo, the double dash serves better readability of the joined error, because we have no specific formatting implemented for now. But i can drop this, if it seems unnecessary.
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.
errors are already joined using newlines: https://cs.opensource.google/go/go/+/refs/tags/go1.23.4:src/errors/join.go;l=52-54
adding custom formatting here isn't idiomatic
@@ -260,6 +262,11 @@ func verifyEmbeddedReport(validators []Validator, cert *x509.Certificate, peerPu | |||
return ErrNoMatchingValidators | |||
} | |||
|
|||
// The joined error should reveal the atls nonce once to maintain readability. | |||
if retErr != nil { | |||
retErr = fmt.Errorf("AtlsConnectionNonce: %s || %w", hex.EncodeToString(nonce), retErr) |
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.
retErr = fmt.Errorf("AtlsConnectionNonce: %s || %w", hex.EncodeToString(nonce), retErr) | |
retErr = fmt.Errorf("with AtlsConnectionNonce %s: %w", hex.EncodeToString(nonce), retErr) |
This PR is a follow-up on #1027 and aims to enhance the logging of the different validation processes on the coordinator to reach better readability of the logs.
<attestation>-<reference-values-index>[-<product>]
The index corresponds to the position of the reference value separated by attestation type in manifest.json.