-
Notifications
You must be signed in to change notification settings - Fork 9
CUBE_134 - Add attestation report to audit logs #137
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
base: main
Are you sure you want to change the base?
Conversation
| func (t *InstrumentedTransport) setResponseHeaders(resp *http.Response, result *AttestationResult, atlsExpected bool) { | ||
| // Always set TLS details when available (for audit logging) | ||
| if result.TLSVersion != "" { | ||
| resp.Header.Set(headerTLSVersion, result.TLSVersion) |
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.
check if nill and initialize if needed or this will panic
| func (t *InstrumentedTransport) setResponseHeaders(resp *http.Response, result *AttestationResult, atlsExpected bool) { | ||
| // Always set TLS details when available (for audit logging) | ||
| if result.TLSVersion != "" { | ||
| resp.Header.Set(headerTLSVersion, result.TLSVersion) |
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.
check if nill and initialize if needed or this will panic
| func (t *InstrumentedTransport) setResponseHeaders(resp *http.Response, result *AttestationResult, atlsExpected bool) { | ||
| // Always set TLS details when available (for audit logging) | ||
| if result.TLSVersion != "" { | ||
| resp.Header.Set(headerTLSVersion, result.TLSVersion) |
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.
check if nill and initialize if needed or this will panic
| } | ||
|
|
||
| // GetLastResult returns the last attestation result (thread-safe). | ||
| func (t *InstrumentedTransport) GetLastResult() *AttestationResult { |
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.
Any caller who mutates the returned map would race with other goroutines accessing lastResult.Report.
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
8c09009 to
b1eaf2c
Compare
What type of PR is this?
What does this do?
Which issue(s) does this PR fix/relate to?
Have you included tests for your changes?
Did you document any new/modified features?
Notes