microsoft / VerifiableCredentials-Verification-SDK-Typescript

An SDK to help Relying Parties manages their Decentralized Identities and Verifiable Credentials.
MIT License
53 stars 14 forks source link

Create a delegate for fetching Open id Token Public Keys #107

Closed gproanomsft closed 3 years ago

gproanomsft commented 3 years ago

Create a delegate for fetching Open id Token Public Keys to allow caching of known public keys

Problem: Each validation of an Id Token has a 1:1 fetch of Open Id Configuration and then the jwks_uri in the configuration. Under minor load, this becomes a latency issue. Furthermore, there's a need to have telemetry in services to measure this latency

Solution: Split public key fetching from fetchKeyAndValidateSignatureOnIdToken into its own delegate

Validation: Existing tests continue to work

Type of change:

Risk:

Work Item links: https://identitydivision.visualstudio.com/Engineering/_workitems/edit/1215158