opentdf / platform

OpenTDF Platform monorepo enabling the development and integration of _forever control_ of data into new and existing applications. The concept of forever control stems from an increasingly common concept known as zero trust.
BSD 3-Clause Clear License
15 stars 4 forks source link

refactor(core): remove extra jwt parse from authn interceptor #1020

Closed strantalis closed 5 days ago

strantalis commented 1 week ago

Parsing a jwt is not a free operation and in authn we were first parsing the token to extract the issuer. Currently this is not necessary because we only support 1 issuer in our authn configuration.

This pull request removes that unnecessary parse call and moves to passing the keyset directly into the jwt parse call.

The reason this came about is when we were profiling our service under load it was obvious there was some slight over head doing this twice.

image