diff --git a/Client/pom.xml b/Client/pom.xml index 67b9d136dd..2c8ce8600e 100644 --- a/Client/pom.xml +++ b/Client/pom.xml @@ -9,7 +9,7 @@ org.gluu oxauth - 4.3.1-SNAPSHOT + 4.3.1.Final diff --git a/Model/pom.xml b/Model/pom.xml index 6ce93225ef..fef1f722e8 100644 --- a/Model/pom.xml +++ b/Model/pom.xml @@ -10,7 +10,7 @@ org.gluu oxauth - 4.3.1-SNAPSHOT + 4.3.1.Final diff --git a/Model/src/main/java/org/gluu/oxauth/model/configuration/AppConfiguration.java b/Model/src/main/java/org/gluu/oxauth/model/configuration/AppConfiguration.java index 472d9ca776..cdf0d8f778 100644 --- a/Model/src/main/java/org/gluu/oxauth/model/configuration/AppConfiguration.java +++ b/Model/src/main/java/org/gluu/oxauth/model/configuration/AppConfiguration.java @@ -149,7 +149,6 @@ public class AppConfiguration implements Configuration { private int sessionIdUnusedLifetime; private int sessionIdUnauthenticatedUnusedLifetime = 120; // 120 seconds - private Boolean sessionIdEnabled; private Boolean sessionIdPersistOnPromptNone; private Boolean sessionIdRequestParameterEnabled = false; // #1195 private Boolean changeSessionIdOnAuthentication = true; @@ -1430,14 +1429,6 @@ public void setSessionIdRequestParameterEnabled(Boolean sessionIdRequestParamete this.sessionIdRequestParameterEnabled = sessionIdRequestParameterEnabled; } - public Boolean getSessionIdEnabled() { - return sessionIdEnabled; - } - - public void setSessionIdEnabled(Boolean p_sessionIdEnabled) { - sessionIdEnabled = p_sessionIdEnabled; - } - public int getConfigurationUpdateInterval() { return configurationUpdateInterval; } diff --git a/Server/integrations.deprecatred/toopher/sdk/pom.xml b/Server/integrations.deprecatred/toopher/sdk/pom.xml index 1d731c5acf..e8ba223f43 100644 --- a/Server/integrations.deprecatred/toopher/sdk/pom.xml +++ b/Server/integrations.deprecatred/toopher/sdk/pom.xml @@ -14,17 +14,17 @@ repository.jboss.org JBoss Repository - http://repository.jboss.org/nexus/content/groups/public-jboss/ + https://repository.jboss.org/nexus/content/groups/public-jboss/ bouncycastle Bouncy Castle - http://repo2.maven.org/maven2/org/bouncycastle + https://repo2.maven.org/maven2/org/bouncycastle gluu Gluu repository - http://ox.gluu.org/maven + https://maven.gluu.org/maven diff --git a/Server/integrations/basic.multi_auth_conf/BasicMultiAuthConfExternalAuthenticator.py b/Server/integrations/basic.multi_auth_conf/BasicMultiAuthConfExternalAuthenticator.py index 879fc94154..91908e7407 100644 --- a/Server/integrations/basic.multi_auth_conf/BasicMultiAuthConfExternalAuthenticator.py +++ b/Server/integrations/basic.multi_auth_conf/BasicMultiAuthConfExternalAuthenticator.py @@ -237,11 +237,11 @@ def createLdapExtendedEntryManagers(self, authConfiguration): else: value_string = str(value) - ldapProperties.setProperty(persistenceType + "." + key, value_string) + ldapProperties.setProperty(persistenceType + "#" + key, value_string) if StringHelper.isNotEmptyString(ldapConfiguration.getBindPassword()): - ldapProperties.setProperty(persistenceType + ".bindPassword", ldapConfiguration.getBindPassword()) - + ldapProperties.setProperty(persistenceType + "#bindPassword", ldapConfiguration.getBindPassword()) + ldapEntryManager = ldapEntryManagerFactory.createEntryManager(ldapProperties) ldapExtendedEntryManagers.append({ "ldapConfiguration" : ldapConfiguration, "ldapProperties" : ldapProperties, "loginAttributes" : ldapExtendedConfiguration["loginAttributes"], "localLoginAttributes" : ldapExtendedConfiguration["localLoginAttributes"], "ldapEntryManager" : ldapEntryManager }) diff --git a/Server/integrations/fido2/Fido2ExternalAuthenticator.py b/Server/integrations/fido2/Fido2ExternalAuthenticator.py index 797b4913c0..3ba0ae3832 100644 --- a/Server/integrations/fido2/Fido2ExternalAuthenticator.py +++ b/Server/integrations/fido2/Fido2ExternalAuthenticator.py @@ -4,9 +4,7 @@ # Author: Yuriy Movchan # -from javax.ws.rs.core import Response -from org.jboss.resteasy.client import ClientResponseFailure -from org.jboss.resteasy.client.exception import ResteasyClientException +from javax.ws.rs import ClientErrorException from javax.ws.rs.core import Response from org.gluu.model.custom.script.type.auth import PersonAuthenticationType from org.gluu.fido2.client import Fido2ClientFactory @@ -178,7 +176,7 @@ def prepareForStep(self, configurationAttributes, requestParameters, step): identity.setWorkingParameter("platformAuthenticatorAvailable", "true") else: identity.setWorkingParameter("platformAuthenticatorAvailable", "false") - except ClientResponseFailure, ex: + except ClientErrorException, ex: print "Fido2. Prepare for step 2. Failed to start assertion flow. Exception:", sys.exc_info()[1] return False else: @@ -202,7 +200,7 @@ def prepareForStep(self, configurationAttributes, requestParameters, step): #, separators=(',', ':')) attestationResponse = attestationService.register(attestationRequest).readEntity(java.lang.String) - except ClientResponseFailure, ex: + except ClientErrorException, ex: print "Fido2. Prepare for step 2. Failed to start attestation flow. Exception:", sys.exc_info()[1] return False @@ -270,18 +268,11 @@ def getMetaDataConfiguration(self): try: self.metaDataConfiguration = metaDataConfigurationService.getMetadataConfiguration().readEntity(java.lang.String) return self.metaDataConfiguration - except ClientResponseFailure, ex: + except ClientErrorException, ex: # Detect if last try or we still get Service Unavailable HTTP error if (attempt == max_attempts) or (ex.getResponse().getResponseStatus() != Response.Status.SERVICE_UNAVAILABLE): raise ex - java.lang.Thread.sleep(3000) - print "Attempting to load metadata: %d" % attempt - except ResteasyClientException, ex: - # Detect if last try or we still get Service Unavailable HTTP error - if attempt == max_attempts: - raise ex - java.lang.Thread.sleep(3000) print "Attempting to load metadata: %d" % attempt finally: diff --git a/Server/integrations/pingid/pom.xml b/Server/integrations/pingid/pom.xml index eb4f4f9623..686a479f8b 100644 --- a/Server/integrations/pingid/pom.xml +++ b/Server/integrations/pingid/pom.xml @@ -9,7 +9,7 @@ UTF-8 1.8 1.8 - 2.13.3 + 2.17.1 @@ -73,7 +73,7 @@ gluu Gluu repository - https://ox.gluu.org/maven + https://maven.gluu.org/maven diff --git a/Server/integrations/u2f/U2fExternalAuthenticator.py b/Server/integrations/u2f/U2fExternalAuthenticator.py index 13d3eebbd1..505ad45715 100644 --- a/Server/integrations/u2f/U2fExternalAuthenticator.py +++ b/Server/integrations/u2f/U2fExternalAuthenticator.py @@ -8,7 +8,7 @@ import sys from javax.ws.rs.core import Response from javax.ws.rs import WebApplicationException -from org.jboss.resteasy.client.exception import ResteasyClientException +from javax.ws.rs import ClientErrorException from org.gluu.model.custom.script.type.auth import PersonAuthenticationType from org.gluu.oxauth.client.fido.u2f import FidoU2fClientFactory from org.gluu.oxauth.model.config import Constants @@ -171,7 +171,7 @@ def prepareForStep(self, configurationAttributes, requestParameters, step): try: authenticationRequestService = FidoU2fClientFactory.instance().createAuthenticationRequestService(self.metaDataConfiguration) authenticationRequest = authenticationRequestService.startAuthentication(user.getUserId(), None, u2f_application_id, session.getId()) - except ClientResponseFailure, ex: + except ClientErrorException, ex: if (ex.getResponse().getResponseStatus() != Response.Status.NOT_FOUND): print "U2F. Prepare for step 2. Failed to start authentication workflow. Exception:", sys.exc_info()[1] return False diff --git a/Server/pom.xml b/Server/pom.xml index 02cfc7ffb7..60938990e6 100644 --- a/Server/pom.xml +++ b/Server/pom.xml @@ -9,7 +9,7 @@ org.gluu oxauth - 4.3.1-SNAPSHOT + 4.3.1.Final diff --git a/Server/src/main/java/org/gluu/oxauth/auth/Authenticator.java b/Server/src/main/java/org/gluu/oxauth/auth/Authenticator.java index 3b238c379f..27c044dc8c 100644 --- a/Server/src/main/java/org/gluu/oxauth/auth/Authenticator.java +++ b/Server/src/main/java/org/gluu/oxauth/auth/Authenticator.java @@ -692,10 +692,10 @@ public String prepareAuthenticationForStep(SessionId sessionId) { } } - public boolean authenticateBySessionId(String p_sessionId) { - if (StringUtils.isNotBlank(p_sessionId) && appConfiguration.getSessionIdEnabled()) { + public boolean authenticateBySessionId(String sessionIdString) { + if (StringUtils.isNotBlank(sessionIdString)) { try { - SessionId sessionId = sessionIdService.getSessionId(p_sessionId); + SessionId sessionId = sessionIdService.getSessionId(sessionIdString); return authenticateBySessionId(sessionId); } catch (Exception e) { logger.trace(e.getMessage(), e); diff --git a/Server/src/main/java/org/gluu/oxauth/authorize/ws/rs/ConsentGatheringSessionService.java b/Server/src/main/java/org/gluu/oxauth/authorize/ws/rs/ConsentGatheringSessionService.java index d4fc730962..d72dd9e6bd 100644 --- a/Server/src/main/java/org/gluu/oxauth/authorize/ws/rs/ConsentGatheringSessionService.java +++ b/Server/src/main/java/org/gluu/oxauth/authorize/ws/rs/ConsentGatheringSessionService.java @@ -89,7 +89,7 @@ public SessionId getConsentSession(HttpServletRequest httpRequest, HttpServletRe public void setAuthenticatedSessionState(HttpServletRequest httpRequest, HttpServletResponse httpResponse, SessionId sessionId) { SessionId connectSession = getConnectSession(httpRequest); - sessionIdService.setSessionIdStateAuthenticated(httpRequest, httpResponse, sessionId, connectSession.getDn()); + sessionIdService.setSessionIdStateAuthenticated(httpRequest, httpResponse, sessionId, connectSession.getUserDn()); } public boolean isSessionStateAuthenticated(HttpServletRequest httpRequest) { diff --git a/Server/src/main/java/org/gluu/oxauth/service/UserService.java b/Server/src/main/java/org/gluu/oxauth/service/UserService.java index 5d3fc36679..e2e2a4a092 100644 --- a/Server/src/main/java/org/gluu/oxauth/service/UserService.java +++ b/Server/src/main/java/org/gluu/oxauth/service/UserService.java @@ -12,6 +12,7 @@ import javax.inject.Inject; import org.apache.commons.lang.StringUtils; +import org.gluu.fido2.model.entry.Fido2RegistrationEntry; import org.gluu.oxauth.model.config.StaticConfiguration; import org.gluu.oxauth.model.configuration.AppConfiguration; import org.gluu.oxauth.model.fido.u2f.DeviceRegistration; @@ -69,7 +70,7 @@ public long countFido2RegisteredDevices(String username) { Filter registeredFilter = Filter.createEqualityFilter("oxStatus", "registered"); Filter filter = Filter.createANDFilter(userInumFilter, registeredFilter); - long countEntries = persistenceEntryManager.countEntries(baseDn, CustomEntry.class, filter); + long countEntries = persistenceEntryManager.countEntries(baseDn, Fido2RegistrationEntry.class, filter); return countEntries; } diff --git a/Server/src/main/webapp/login.xhtml b/Server/src/main/webapp/login.xhtml index 51e356fc48..1fa6dd085e 100644 --- a/Server/src/main/webapp/login.xhtml +++ b/Server/src/main/webapp/login.xhtml @@ -7,7 +7,7 @@ template="/WEB-INF/incl/layout/login-template.xhtml"> - + @@ -110,29 +110,6 @@