Skip to content

Commit

Permalink
fix(jans-auth-server): npe in discovery if SSA endpoint is absent #2497
Browse files Browse the repository at this point in the history
… (#2498)

docs: no docs
#2497
  • Loading branch information
yuriyz committed Sep 29, 2022
1 parent 61c83e3 commit c3b00b4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions jans-auth-server/server/conf/jans-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,11 @@
"PS384",
"PS512"
],
"ssaConfiguration": {
"ssaEndpoint":"${config.oxauth.contextPath}/restv1/ssa",
"ssaSigningAlg": "RS256",
"ssaExpirationInDays": 30
},
"backchannelClientId": "123-123-123",
"backchannelRedirectUri": "https://ce.gluu.info:8443/ciba/home.htm",
"backchannelUserCodeParameterSupported": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ protected void processRequest(HttpServletRequest servletRequest, HttpServletResp
cibaConfigurationService.processConfiguration(jsonObj);

// SSA
if (appConfiguration.isFeatureEnabled(FeatureFlagType.SSA)) {
if (appConfiguration.isFeatureEnabled(FeatureFlagType.SSA) && appConfiguration.getSsaConfiguration() != null) {
jsonObj.put(SSA_ENDPOINT, appConfiguration.getSsaConfiguration().getSsaEndpoint());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,11 @@
"cibaMaxExpirationTimeAllowedSec": 1800,
"backchannelLoginHintClaims": ["inum", "uid", "mail"],
"cibaEnabled": false,
"ssaConfiguration": {
"ssaEndpoint":"https://%(hostname)s/jans-auth/restv1/ssa",
"ssaSigningAlg": "RS256",
"ssaExpirationInDays": 30
},
"cibaEndUserNotificationConfig": {
"apiKey": "",
"authDomain": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,11 @@
"cibaMaxExpirationTimeAllowedSec": 1800,
"backchannelLoginHintClaims": ["inum", "uid", "mail"],
"cibaEnabled": false,
"ssaConfiguration": {
"ssaEndpoint":"https://%(hostname)s/jans-auth/restv1/ssa",
"ssaSigningAlg": "RS256",
"ssaExpirationInDays": 30
},
"cibaEndUserNotificationConfig": {
"apiKey": "",
"authDomain": "",
Expand Down

0 comments on commit c3b00b4

Please sign in to comment.