-
Notifications
You must be signed in to change notification settings - Fork 163
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
TrustStore: Add chain push handler #3501
TrustStore: Add chain push handler #3501
Conversation
83701a3
to
7cd6086
Compare
Add certificate chain push handler to the trust store. Currently, unit tests are missing. fixes scionproto#3486
5fee5ed
to
edccd3d
Compare
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.
Reviewed 1 of 2 files at r1, 4 of 4 files at r2.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @scrye)
go/lib/infra/modules/trust/v2/handlers.go, line 36 at r2 (raw file):
// HandlerTimeout is the lifetime of the handlers. const HandlerTimeout = 3 * time.Second
from @lukedirtwalker review. Drop this. The default handler timeout should be enough.
go/lib/infra/modules/trust/v2/handlers.go, line 45 at r2 (raw file):
func (h *chainPushHandler) Handle() *infra.HandlerResult { if h.request == nil {
log this as an error?
go/lib/infra/modules/trust/v2/handlers.go, line 63 at r2 (raw file):
rw, ok := infra.ResponseWriterFromContext(h.request.Context()) if !ok { logger.Warn("[TrustStore:chainPushHandler] Unable to service request, no Messenger found")
s/Messenger/ResponseWriter
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.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @oncilla)
go/lib/infra/modules/trust/v2/handlers.go, line 45 at r2 (raw file):
Previously, Oncilla wrote…
log this as an error?
Log to package then? There's no context available to extract the proper logger yet.
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.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @scrye)
go/lib/infra/modules/trust/v2/handlers.go, line 45 at r2 (raw file):
Previously, scrye (Sergiu Costea) wrote…
Log to package then? There's no context available to extract the proper logger yet.
IMO, yes.
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.
Reviewable status: 3 of 5 files reviewed, 3 unresolved discussions (waiting on @lukedirtwalker and @oncilla)
go/lib/infra/modules/trust/v2/handlers.go, line 36 at r2 (raw file):
Previously, Oncilla wrote…
from @lukedirtwalker review. Drop this. The default handler timeout should be enough.
Done.
go/lib/infra/modules/trust/v2/handlers.go, line 45 at r2 (raw file):
Previously, Oncilla wrote…
IMO, yes.
Done.
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.
Reviewed 1 of 2 files at r3.
Reviewable status: 4 of 5 files reviewed, 1 unresolved discussion (waiting on @oncilla)
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.
Reviewed 1 of 2 files at r3.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @oncilla)
go/lib/infra/modules/trust/v2/handlers.go, line 63 at r2 (raw file):
Previously, Oncilla wrote…
s/Messenger/ResponseWriter
Done.
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.
Reviewed 1 of 1 files at r4.
Reviewable status:complete! all files reviewed, all discussions resolved
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.
Reviewable status: all files reviewed, 1 unresolved discussion
go/lib/infra/modules/trust/v2/handlers.go, line 64 at r4 (raw file):
return infra.MetricsErrInternal } subCtx, cancelF := context.WithTimeout(h.request.Context(), messenger.DefaultHandlerTimeout)
you don't need a subctx
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @oncilla)
go/lib/infra/modules/trust/v2/handlers.go, line 64 at r4 (raw file):
Previously, Oncilla wrote…
you don't need a subctx
Done.
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.
Reviewed 1 of 1 files at r5.
Reviewable status:complete! all files reviewed, all discussions resolved
Add certificate chain push handler to the trust store.
Currently, unit tests are missing.Edited by @scrye: added unit tests.fixes #3486
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)