AzureAD / microsoft-authentication-library-common-for-android

Common code used by both the Active Directory Authentication Library (ADAL) and the Microsoft Authentication Library (MSAL)
MIT License
41 stars 35 forks source link

Add JWT header field for KDF version #2220

Closed iamgusain closed 10 months ago

iamgusain commented 1 year ago

What

Adding new jwt header field to enable sending Key Derivation Function (KDF) version

Why

With kdf_ver=2, the ctx value used in the KDF is derived from JWT payload which includes a nonce.  This ensures that once a key is derived from a ctx value it can not be used indefinitely and is only valid till the nonce in JWT payload is valid. More details in below spec. https://msazure.visualstudio.com/DefaultCollection/One/_git/ESTS-Docs?path=/Protocols/Windows/DerivedKeyExport.md&_a=preview&anchor=sample-assertion

How

Adding the header field in the JwtRequestHeader class

Testing

Verified sending request with kdf_ver=2 locally

related

Broker PR: https://github.com/AzureAD/ad-accounts-for-android/pull/2584