dss icon indicating copy to clipboard operation
dss copied to clipboard

Include `sub` field in log output lines

Open jasonprado opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. When examining DSS logs I would like to quickly filter requests from a specific authorized USS client.

Describe the solution you'd like Include the sub field of the request's decoded JWT in a field in the JSON log entry for each request. req_sub would look parallel next to req_dump and similar fields.

Describe alternatives you've considered

  • Process logs and decode JWT headers then re-remit the log with the sub value extracted.
  • Extract the uss_base_url from certain operations and filter based on them. Not all requests have this, however.

Additional context I'd like to contribute this if we can get consensus on adding it and the format.

jasonprado avatar Jul 04 '24 00:07 jasonprado

My input would be that this seems like a useful change that doesn't present any concerns I'm thinking of, as long as we aren't promising a particular log format long term (essentially making a soft API). Making it easier for a human to troubleshoot using logs seems very worthwhile.

BenjaminPelletier avatar Jul 22 '24 19:07 BenjaminPelletier