MCPcopy Index your code
hub / github.com/cortexproject/cortex / setupRequestSigning

Method setupRequestSigning

pkg/cortex/cortex.go:415–427  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

413}
414
415func (t *Cortex) setupRequestSigning() {
416 if t.Cfg.Distributor.SignWriteRequestsEnabled {
417 util_log.WarnExperimentalUse("Distributor SignWriteRequestsEnabled")
418 t.Cfg.Server.GRPCMiddleware = append(t.Cfg.Server.GRPCMiddleware, grpcclient.UnarySigningServerInterceptor)
419
420 // When signing keys are configured, authenticate PushStream connections.
421 // All keys in the list are accepted by the server; the first key is used by
422 // the client to sign. Multiple keys enable zero-downtime key rotation.
423 if keys := t.Cfg.Distributor.SignWriteRequestsKeys.Value(); len(keys) > 0 {
424 t.Cfg.Server.GRPCStreamMiddleware = append(t.Cfg.Server.GRPCStreamMiddleware, grpcclient.NewStreamSigningServerInterceptor(keys...))
425 }
426 }
427}
428
429// Run starts Cortex running, and blocks until a Cortex stops.
430func (t *Cortex) Run() error {

Callers 1

NewFunction · 0.95

Calls 2

ValueMethod · 0.45

Tested by

no test coverage detected