Skip to content

Commit

Permalink
Temporary Workaround for AAD JWT Token Signing Algorithm Issue (#4692)
Browse files Browse the repository at this point in the history
force set IsSha2CredentialSupported to false

Co-authored-by: Gladwin Johnson <[email protected]>
  • Loading branch information
gladjohn and GladwinJohnson authored Apr 2, 2024
1 parent 6e129f6 commit 463c985
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,7 @@ private AuthorityInfo(
/// <summary>
/// True if SHA2 and PSS can be used for creating the client credential from a certificate
/// </summary>
internal bool IsSha2CredentialSupported =>
AuthorityType != AuthorityType.Dsts &&
AuthorityType != AuthorityType.Generic &&
AuthorityType != AuthorityType.Adfs;
internal bool IsSha2CredentialSupported => false;

#region Builders
internal static AuthorityInfo FromAuthorityUri(string authorityUri, bool validateAuthority)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ public void WithTenantIdAtRequestLevel_NonAad(string inputAuthority)
}

[DataTestMethod]
[DataRow(TestConstants.AuthorityCommonTenant, true)]
[DataRow(TestConstants.AuthorityCommonPpeAuthority, true)]
[DataRow(TestConstants.AuthorityCommonTenant, false)]
[DataRow(TestConstants.AuthorityCommonPpeAuthority, false)]
[DataRow(TestConstants.DstsAuthorityCommon, false)]
[DataRow(TestConstants.DstsAuthorityTenanted, false)]
[DataRow(TestConstants.CiamAuthorityMainFormat, true)]
[DataRow(TestConstants.CiamAuthorityWithFriendlyName, true)]
[DataRow(TestConstants.CiamAuthorityWithGuid, true)]
[DataRow(TestConstants.B2CAuthority, true)]
[DataRow(TestConstants.B2CCustomDomain, true)]
[DataRow(TestConstants.CiamAuthorityMainFormat, false)]
[DataRow(TestConstants.CiamAuthorityWithFriendlyName, false)]
[DataRow(TestConstants.CiamAuthorityWithGuid, false)]
[DataRow(TestConstants.B2CAuthority, false)]
[DataRow(TestConstants.B2CCustomDomain, false)]
[DataRow(TestConstants.ADFSAuthority, false)]
public void IsSha2Supported(string inputAuthority, bool expected)
{
Expand Down

0 comments on commit 463c985

Please sign in to comment.