AzureAD / microsoft-authentication-library-for-js

Microsoft Authentication Library (MSAL) for JS
http://aka.ms/aadv2
MIT License
3.6k stars 2.64k forks source link

[Engineering task] Implement Claims API to Bypass Cache When Claims are Present in MSAL with Managed Identity #7206

Open gladjohn opened 1 month ago

gladjohn commented 1 month ago

Core Library

MSAL Node (@azure/msal-node)

Wrapper Library

MSAL Node Extensions (@azure/msal-node-extensions)

Public or Confidential Client?

Confidential

Description

MSAL client type

Managed identity

Problem Statement

MSAL client type

Confidential

Problem Statement

Task type Development

Description Currently, MSAL with Managed Identity does not expose any API claims API. With CAE (Continuous Access Evaluation) being enabled by default, we need to implement a mechanism to bypass the cache if claims are detected in the token request.

Steps to Reproduce:

note : msi v1 endpoint is unchanged so there is no need to pass any claims to the endpoint itself, this feature is done so MSAL will bypass the cache.

Observe that the cache is not bypassed, leading to potential stale token usage.

Expected Behavior: When claims are present in the token request, the cache should be bypassed to ensure that the latest token is used, in line with CAE requirements.

Proposed solution

Alternatives

No response

Source

Internal (Microsoft)

github-actions[bot] commented 1 month ago

Invalid Issue Template: Please update the original issue and make sure to fill out the entire issue template so we can better assist you.