Skip to content

Prefer jwt as client identity for metering/logging

Shivam Bairoliya requested to merge sbairoliya/client_identity into master

Before raising this MR, consider whether the following are required, and complete if so:

  • Unit tests
  • Metrics
  • Documentation update(s)

If not required, please explain in brief why not.

Description

Previously only the client identity from the request headers were considered as for metering requests and logging them, this is to add support for using the jwt from the request metadata if provided

Changes proposed in this merge request:

  • Authorize before logging the requests in the named_rpc decorator
  • Set a context var for client identity which is the preferred identity

Validation

Unit Tests

Edited by Shivam Bairoliya

Merge request reports

Loading