-
Notifications
You must be signed in to change notification settings - Fork 87
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
Support AuthenticationScheme interface to enable PoP bound access tokens #443
Conversation
) | ||
if !extExpiresOn.Equal(actualAt.ExtendedExpiresOn.T) { | ||
t.Errorf("Actual ext expires on %s differs from expected ext expires on %s", actualAt.ExtendedExpiresOn, extExpiresOn) | ||
} | ||
} | ||
|
||
func TestKeyForAccessToken(t *testing.T) { | ||
const want = "testhid-env-accesstoken-clientid-realm-user.read" | ||
const want = "testhid-env-accesstoken-clientid-realm-user.read-bearer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am concerned that this will break backwards and forwards compatibility with the token cache. It's ok if older MSALs can't read POP tokens, but they should continue to read bearer tokens. As such, when the auth scheme is beaerr, we should leave the key alone.
Here's the equivalent logic in MSAL.NET https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/blob/main/src/client/Microsoft.Identity.Client/AuthScheme/AuthSchemeHelper.cs
We should have some tests on this:
- old cache format + new MSAL
- new cache format (i.e. with POP and Bearer tokens )+ old MSAL (I guess this will have to be manual test)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Fixed how key is generated in items.go. Updated test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where can we find steps to to simulate
new cache format (i.e. with POP and Bearer tokens )+ old MSAL (I guess this will have to be manual test)
Co-authored-by: Bogdan Gavril <bogavril@microsoft.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
PR attempting to realize proposal - #439
This is to gather initial feedback. Comprehensive unit and integration tests will be added once code changes are agreed/acked.