Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSI v1 token revocation specification #5137

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

MSI v1 token revocation specification #5137

wants to merge 7 commits into from

Conversation

gladjohn
Copy link
Contributor

This pull request adds documentation for MSAL support for MSI v1 token revocation and capabilities. It introduces two optional parameters that developers can use to control token revocation and specify client capabilities when acquiring tokens via Managed Identity.

Key changes include:

  • Documentation Addition:
    • docs/msiv1_token_revocation.md: Added detailed documentation describing the bypass_cache and xms_cc parameters, their purposes, behaviors, and use cases.

@gladjohn gladjohn marked this pull request as ready for review February 12, 2025 00:37
@gladjohn gladjohn requested a review from a team as a code owner February 12, 2025 00:37
Copy link
Member

@bgavrilMS bgavrilMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No mapping between public APIs and the new MSI params.

@gladjohn gladjohn requested review from bgavrilMS and rayluo February 13, 2025 22:32

---

## 1. `bypass_cache`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this isn't signed off by Service Fabric? They want to know the exact token that needs to be invalidted.

Copy link
Member

@bgavrilMS bgavrilMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the design SF wanted.


---

## Overview
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs more details on the E2E, i.e. how does token revocation happen? i.e. what script do I run as a tenant admin?

Copy link
Contributor Author

@gladjohn gladjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good Bogdan, do we need to create another spec for MIA changes to support this? I have PR out there, and I can modify it based on the details from the diagram. But adding a one line on MSI design will be good to have for clarity

Copy link
Contributor

@rayluo rayluo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the original CAE design, the WithClientCapabilities is a per-app parameter in MSAL. That is one of the reason why xms_cc should not be used in the second last arrow in both diagrams, otherwise it would force SFRP to create new CCA instance per request, which would be too inefficient.

In the SF's MSIv1 token revocation design, their protocol accepts the claims parameter (signed off by eSTS architect), and it does not accept an xms_cc as a standalone parameter (which is not in original CAE protocol either). So, MSAL's ManagedIdentityApplication can simply relays the incoming WithClaims to SF.

I proposed suggestions on diagrams, accordingly.

You may also refer to this feature request for the same project.

MSAL->>MSAL: 2. Find and return token T in cache. <br/>If not found, goto next step.
end
rect rgb(215, 234, 132)
MSAL->>SF: 3. Call MITS_endpoint?xms_cc=cp1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either simply remove xms_cc

Suggested change
MSAL->>SF: 3. Call MITS_endpoint?xms_cc=cp1
MSAL->>SF: 3. Call MITS_endpoint

or do it in the standard CAE way which is MSAL automatically converts xms_cc=cp1 into a claims={"access_token": {"xms_cc": {"values": ["cp1"]}}} and send that blob to the wire.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MSAL needs to have that claims and capabilities separately, as they have different behavior. claims bypases cache, cp does not.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, if memory serves, the call to MITS is a GET call. So the claims parameter could lead to an URL too long issue. Not sure if this is really a problem since it's ussually browsers that refuse long urls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants