-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.X, 7.1.X, 7.2.X, 7.3.X, Master
-
Fix Version/s: 7.1.X, 7.2.10 DXP FP17, 7.2.10.6 DXP SP6, 7.2.X, 7.3.X, 7.4.13 DXP GA1, 7.4.3.12 CE GA12, 7.4.13 DXP U8, 7.4.3.13 CE GA13, 7.4.3.22 CE GA22, Master
-
Component/s: Application Security > OpenID Connect
-
Branch Version/s:7.3.x, 7.2.x, 7.1.x
-
Backported to Branch:Committed
-
Story Points:3
-
Fix Priority:4
-
Sprint:AppSec Iteration 70, AppSec Iteration 71
-
Git Pull Request:
-
QA Test Name:
- LocalFile.InstanceSettings#CanCreateTwoFactoryConfigurations
- LocalFile.InstanceSettings#CanDeleteSiteLogoViaAppearance
- LocalFile.InstanceSettings#CanDisableSiteAdminToUseTheirOwnLogo
- LocalFile.InstanceSettings#CanUpdateGeneralInfos
- LocalFile.InstanceSettings#FactoryConfigurationAreInTheirProperScope
- LocalFile.InstanceSettings#FactoryConfigurationCanBeDeleted
- LocalFile.InstanceSettings#FactoryConfigurationCanBeEdited
- LocalFile.InstanceSettings#SingleConfigurationCanBeDeleted
- LocalFile.InstanceSettings#SingleConfigurationCanBeExported
- LocalFile.InstanceSettings#UserFieldsCanBeDisabled
- LocalFile.InstanceSettings#ViewContentSharingDisabledAcrossSitesViaAP
- LocalFile.InstanceSettings#ViewContentSharingEnabledAcrossSitesViaAP
- LocalFile.InstanceSettings#ViewDefaultUserAssociations
-
QA Test Score:49
This is a bug in Liferay's source that is causing it to not work with auth0. Auth0 supports two JWT algorithms, HS256 and RS256. They are returned in that order, as the supporting algorithms [ HS256, RS256 ].
Liferay 7.3 does not support HS256, only RS256. However, the OIDC module does not handle the list of supported algorithms properly. The code takes the first one in the list, HS256 in this case. What it should do is loop through the list looking for a supported algorithm and then select it.
This is the file with the problem:
portal-security-sso/portal-security-sso-openid-connect-impl/src/main/java/com/liferay/portal/security/sso/openid/connect/internal/OpenIdConnectMetadataFactoryImpl.java
Line 232:
if (ListUtil.isNotEmpty(jwsAlgorithms)) {
_oidcClientMetadata.setIDTokenJWSAlg(jwsAlgorithms.get(1));
}
Reproduction steps:
- In a browser, request the Auth0 Discovery Endpoint URL: https://dev-ticv2ops.us.auth0.com/.well-known/openid-configuration
- Assert that the JSON contents that is returned includes "id_token_signing_alg_values_supported":["HS256","RS256"]
- Create an Auth0 "application" and make note of its Client ID and Client Secret.
- Assert that the Auth0 application is using the RS256 signing algorithm (You may find this under its "Advanced" > "OAuth" section)
- Enable OIDC on portal
- Add a new OIDC Provider with the aforementioned Client ID, Client Secret and Discovery Endpoint URL
- Initiate a OIDC SSO using that provider
Expected result: The SSO completes successfully
Actual result: The SSO fails and the logs include a statement like "Signed JWT rejected"
- is fixed by
-
LPS-139642 As an Instance Administrator, I would like to have OAuth Authorization Server metadata and OAuth client info properly implemented when using Liferay as OpenId connect client
-
- In PM Review
-
- Testing discovered
-
LPS-140676 OpenId Connect does not support HMAC based signing algorithms for ID token validation
- Closed
- Wiki Page
-
Wiki Page Loading...