Skip to content

Insert correlation id if missing or not trusted

Mikhail Mazurskiy requested to merge ash2k/insert-correlation-id into master

Currently server correlation interceptors trust passed ID and do not insert an ID if it was not present. This MR makes it possible to disable trust for situations where gRPC request is coming from an untrusted source. It also changes the behavior to inject a random ID if none was present or if it's not trusted.

I'm exporting RandomIDWithFallback() because it's needed outside of LabKit too. (replaced with !80 (merged)) In Gitaly:

In Shell:

@andrewn, this is what we discussed. Please let me know if I misunderstood something.

Edited by Mikhail Mazurskiy

Merge request reports