Skip to content

Commit 463c985

Browse files
Temporary Workaround for AAD JWT Token Signing Algorithm Issue (#4692)
force set IsSha2CredentialSupported to false Co-authored-by: Gladwin Johnson <gljohns@microsoft.com>
1 parent 6e129f6 commit 463c985

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

src/client/Microsoft.Identity.Client/AppConfig/AuthorityInfo.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,7 @@ private AuthorityInfo(
141141
/// <summary>
142142
/// True if SHA2 and PSS can be used for creating the client credential from a certificate
143143
/// </summary>
144-
internal bool IsSha2CredentialSupported =>
145-
AuthorityType != AuthorityType.Dsts &&
146-
AuthorityType != AuthorityType.Generic &&
147-
AuthorityType != AuthorityType.Adfs;
144+
internal bool IsSha2CredentialSupported => false;
148145

149146
#region Builders
150147
internal static AuthorityInfo FromAuthorityUri(string authorityUri, bool validateAuthority)

tests/Microsoft.Identity.Test.Unit/ApiConfigTests/AuthorityTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,15 @@ public void WithTenantIdAtRequestLevel_NonAad(string inputAuthority)
104104
}
105105

106106
[DataTestMethod]
107-
[DataRow(TestConstants.AuthorityCommonTenant, true)]
108-
[DataRow(TestConstants.AuthorityCommonPpeAuthority, true)]
107+
[DataRow(TestConstants.AuthorityCommonTenant, false)]
108+
[DataRow(TestConstants.AuthorityCommonPpeAuthority, false)]
109109
[DataRow(TestConstants.DstsAuthorityCommon, false)]
110110
[DataRow(TestConstants.DstsAuthorityTenanted, false)]
111-
[DataRow(TestConstants.CiamAuthorityMainFormat, true)]
112-
[DataRow(TestConstants.CiamAuthorityWithFriendlyName, true)]
113-
[DataRow(TestConstants.CiamAuthorityWithGuid, true)]
114-
[DataRow(TestConstants.B2CAuthority, true)]
115-
[DataRow(TestConstants.B2CCustomDomain, true)]
111+
[DataRow(TestConstants.CiamAuthorityMainFormat, false)]
112+
[DataRow(TestConstants.CiamAuthorityWithFriendlyName, false)]
113+
[DataRow(TestConstants.CiamAuthorityWithGuid, false)]
114+
[DataRow(TestConstants.B2CAuthority, false)]
115+
[DataRow(TestConstants.B2CCustomDomain, false)]
116116
[DataRow(TestConstants.ADFSAuthority, false)]
117117
public void IsSha2Supported(string inputAuthority, bool expected)
118118
{

0 commit comments

Comments
 (0)