Skip to content

App backend telemetry middleware is logging errors for custom APIs with custom auth #17080

@martinothamar

Description

@martinothamar

Description of the bug

digdir/oed has some custom APIs that take raw Maskinporten tokens. In these cases we don't recognize the authentication method and can't classify it. Thoughts

  • Log warnings when this happens for custom APIs
  • Better parsing that doesn't throw exception
  • Maybe have an Unknown member on Authenticated as this can happen in other parts of the code as well

Steps To Reproduce

Can't easily reproduce, but it is pretty obvious looking at the TelemetryEnrichingMiddleware code

Additional Information

No response

Metadata

Metadata

Assignees

Labels

kind/bugUsed when there is a defect / something is not working as it should.squad/kjøringIssues that belongs to the named squad.

Type

Projects

Status

No status

Status

📈 Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions