diff --git a/openid-connect-client/src/main/java/org/mitre/openid/connect/client/service/impl/StaticClientConfigurationService.java b/openid-connect-client/src/main/java/org/mitre/openid/connect/client/service/impl/StaticClientConfigurationService.java index df31018047..486c702175 100644 --- a/openid-connect-client/src/main/java/org/mitre/openid/connect/client/service/impl/StaticClientConfigurationService.java +++ b/openid-connect-client/src/main/java/org/mitre/openid/connect/client/service/impl/StaticClientConfigurationService.java @@ -22,11 +22,10 @@ import java.util.Map; -import javax.annotation.PostConstruct; - import org.mitre.oauth2.model.RegisteredClient; import org.mitre.openid.connect.client.service.ClientConfigurationService; import org.mitre.openid.connect.config.ServerConfiguration; +import org.springframework.beans.factory.InitializingBean; /** * Client configuration service that holds a static map from issuer URL to a ClientDetails object to use at that issuer. @@ -36,7 +35,7 @@ * @author jricher * */ -public class StaticClientConfigurationService implements ClientConfigurationService { +public class StaticClientConfigurationService implements ClientConfigurationService, InitializingBean { // Map of issuer URL -> client configuration information private Map clients; @@ -66,7 +65,7 @@ public RegisteredClient getClientConfiguration(ServerConfiguration issuer) { return clients.get(issuer.getIssuer()); } - @PostConstruct + @Override public void afterPropertiesSet() { if (clients == null || clients.isEmpty()) { throw new IllegalArgumentException("Clients map cannot be null or empty"); diff --git a/openid-connect-client/src/main/java/org/mitre/openid/connect/client/service/impl/StaticServerConfigurationService.java b/openid-connect-client/src/main/java/org/mitre/openid/connect/client/service/impl/StaticServerConfigurationService.java index ebca40c1e4..02423b2884 100644 --- a/openid-connect-client/src/main/java/org/mitre/openid/connect/client/service/impl/StaticServerConfigurationService.java +++ b/openid-connect-client/src/main/java/org/mitre/openid/connect/client/service/impl/StaticServerConfigurationService.java @@ -22,10 +22,10 @@ import java.util.Map; -import javax.annotation.PostConstruct; import org.mitre.openid.connect.client.service.ServerConfigurationService; import org.mitre.openid.connect.config.ServerConfiguration; +import org.springframework.beans.factory.InitializingBean; /** * Statically configured server configuration service that maps issuer URLs to server configurations to use at that issuer. @@ -33,7 +33,7 @@ * @author jricher * */ -public class StaticServerConfigurationService implements ServerConfigurationService { +public class StaticServerConfigurationService implements ServerConfigurationService, InitializingBean { // map of issuer url -> server configuration information private Map servers; @@ -60,7 +60,7 @@ public ServerConfiguration getServerConfiguration(String issuer) { return servers.get(issuer); } - @PostConstruct + @Override public void afterPropertiesSet() { if (servers == null || servers.isEmpty()) { throw new IllegalArgumentException("Servers map cannot be null or empty."); diff --git a/openid-connect-client/src/main/java/org/mitre/openid/connect/client/service/impl/StaticSingleIssuerService.java b/openid-connect-client/src/main/java/org/mitre/openid/connect/client/service/impl/StaticSingleIssuerService.java index c72b655236..f3637d68fc 100644 --- a/openid-connect-client/src/main/java/org/mitre/openid/connect/client/service/impl/StaticSingleIssuerService.java +++ b/openid-connect-client/src/main/java/org/mitre/openid/connect/client/service/impl/StaticSingleIssuerService.java @@ -20,19 +20,19 @@ */ package org.mitre.openid.connect.client.service.impl; -import javax.annotation.PostConstruct; import javax.servlet.http.HttpServletRequest; import org.mitre.openid.connect.client.model.IssuerServiceResponse; import org.mitre.openid.connect.client.service.IssuerService; import com.google.common.base.Strings; +import org.springframework.beans.factory.InitializingBean; /** * @author jricher * */ -public class StaticSingleIssuerService implements IssuerService { +public class StaticSingleIssuerService implements IssuerService, InitializingBean { private String issuer; @@ -60,7 +60,7 @@ public IssuerServiceResponse getIssuer(HttpServletRequest request) { return new IssuerServiceResponse(getIssuer(), null, null); } - @PostConstruct + @Override public void afterPropertiesSet() { if (Strings.isNullOrEmpty(issuer)) { diff --git a/openid-connect-client/src/main/java/org/mitre/openid/connect/client/service/impl/ThirdPartyIssuerService.java b/openid-connect-client/src/main/java/org/mitre/openid/connect/client/service/impl/ThirdPartyIssuerService.java index b26b91c897..59feeceb0f 100644 --- a/openid-connect-client/src/main/java/org/mitre/openid/connect/client/service/impl/ThirdPartyIssuerService.java +++ b/openid-connect-client/src/main/java/org/mitre/openid/connect/client/service/impl/ThirdPartyIssuerService.java @@ -24,12 +24,12 @@ import java.util.HashSet; import java.util.Set; -import javax.annotation.PostConstruct; import javax.servlet.http.HttpServletRequest; import org.apache.http.client.utils.URIBuilder; import org.mitre.openid.connect.client.model.IssuerServiceResponse; import org.mitre.openid.connect.client.service.IssuerService; +import org.springframework.beans.factory.InitializingBean; import org.springframework.security.authentication.AuthenticationServiceException; import com.google.common.base.Strings; @@ -41,7 +41,7 @@ * @author jricher * */ -public class ThirdPartyIssuerService implements IssuerService { +public class ThirdPartyIssuerService implements IssuerService, InitializingBean { private String accountChooserUrl; @@ -128,7 +128,7 @@ public void setBlacklist(Set blacklist) { this.blacklist = blacklist; } - @PostConstruct + @Override public void afterPropertiesSet() { if (Strings.isNullOrEmpty(this.accountChooserUrl)) { throw new IllegalArgumentException("Account Chooser URL cannot be null or empty"); diff --git a/openid-connect-common/src/main/java/org/mitre/jwt/encryption/service/impl/DefaultJWTEncryptionAndDecryptionService.java b/openid-connect-common/src/main/java/org/mitre/jwt/encryption/service/impl/DefaultJWTEncryptionAndDecryptionService.java index dbe8a530bb..b1f7aa6e06 100644 --- a/openid-connect-common/src/main/java/org/mitre/jwt/encryption/service/impl/DefaultJWTEncryptionAndDecryptionService.java +++ b/openid-connect-common/src/main/java/org/mitre/jwt/encryption/service/impl/DefaultJWTEncryptionAndDecryptionService.java @@ -25,8 +25,6 @@ import java.util.Map; import java.util.Set; -import javax.annotation.PostConstruct; - import org.mitre.jose.keystore.JWKSetKeyStore; import org.mitre.jwt.encryption.service.JWTEncryptionAndDecryptionService; import org.slf4j.Logger; @@ -50,12 +48,13 @@ import com.nimbusds.jose.jwk.JWK; import com.nimbusds.jose.jwk.OctetSequenceKey; import com.nimbusds.jose.jwk.RSAKey; +import org.springframework.beans.factory.InitializingBean; /** * @author wkim * */ -public class DefaultJWTEncryptionAndDecryptionService implements JWTEncryptionAndDecryptionService { +public class DefaultJWTEncryptionAndDecryptionService implements JWTEncryptionAndDecryptionService, InitializingBean { /** * Logger for this class @@ -116,7 +115,7 @@ public DefaultJWTEncryptionAndDecryptionService(JWKSetKeyStore keyStore) throws } - @PostConstruct + @Override public void afterPropertiesSet() { if (keys == null) { diff --git a/openid-connect-common/src/main/java/org/mitre/oauth2/service/impl/UriEncodedClientUserDetailsService.java b/openid-connect-common/src/main/java/org/mitre/oauth2/service/impl/UriEncodedClientUserDetailsService.java index 335efbf184..eed1f4544f 100644 --- a/openid-connect-common/src/main/java/org/mitre/oauth2/service/impl/UriEncodedClientUserDetailsService.java +++ b/openid-connect-common/src/main/java/org/mitre/oauth2/service/impl/UriEncodedClientUserDetailsService.java @@ -91,7 +91,7 @@ public UserDetails loadUserByUsername(String clientId) throws UsernameNotFoundE } else { throw new UsernameNotFoundException("Client not found: " + clientId); } - } catch (UnsupportedEncodingException | InvalidClientException e) { + } catch (IllegalArgumentException | InvalidClientException e) { throw new UsernameNotFoundException("Client not found: " + clientId); } diff --git a/openid-connect-common/src/main/java/org/mitre/openid/connect/config/ConfigurationPropertiesBean.java b/openid-connect-common/src/main/java/org/mitre/openid/connect/config/ConfigurationPropertiesBean.java index 9d286518f1..f3bf236b86 100644 --- a/openid-connect-common/src/main/java/org/mitre/openid/connect/config/ConfigurationPropertiesBean.java +++ b/openid-connect-common/src/main/java/org/mitre/openid/connect/config/ConfigurationPropertiesBean.java @@ -20,11 +20,10 @@ import java.util.List; import java.util.Locale; -import javax.annotation.PostConstruct; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.BeanCreationException; +import org.springframework.beans.factory.InitializingBean; import org.springframework.util.StringUtils; import com.google.common.collect.Lists; @@ -40,7 +39,7 @@ * @author AANGANES * */ -public class ConfigurationPropertiesBean { +public class ConfigurationPropertiesBean implements InitializingBean { /** * Logger for this class @@ -72,14 +71,16 @@ public class ConfigurationPropertiesBean { private boolean allowCompleteDeviceCodeUri = false; public ConfigurationPropertiesBean() { - } + @Override + public void afterPropertiesSet() throws Exception { + checkConfigConsistency(); + } /** * Endpoints protected by TLS must have https scheme in the URI. - * @throws HttpsUrlRequiredException + * @throws BeanCreationException */ - @PostConstruct public void checkConfigConsistency() { if (!StringUtils.startsWithIgnoreCase(issuer, "https")) { if (this.forceHttps) { @@ -273,4 +274,6 @@ public boolean isAllowCompleteDeviceCodeUri() { public void setAllowCompleteDeviceCodeUri(boolean allowCompleteDeviceCodeUri) { this.allowCompleteDeviceCodeUri = allowCompleteDeviceCodeUri; } + + } diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/application-context.xml b/openid-connect-server-webapp/src/main/webapp/WEB-INF/application-context.xml index 480b5780ca..1c703e4e08 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/application-context.xml +++ b/openid-connect-server-webapp/src/main/webapp/WEB-INF/application-context.xml @@ -17,214 +17,233 @@ limitations under the License. --> - + - + - - + + - - - - + + + + - - - - - - - - + + + + + + + + - + - - - - + + + + - - - - - - - + + + + + + + - + - + - + - + - + - + - + - + - - - - - - - + + + + + + + - - - - + + + + - - - + + + - - - + + + - - + + - + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - - - - - + + + + + + + - - - - - + use-expressions="true" + entry-point-ref="oauthAuthenticationEntryPoint" + create-session="stateless" + authentication-manager-ref="clientAuthenticationManager"> + + + + + - - + + - + - - + + - + - + @@ -236,47 +255,54 @@ - - - + + + - - - - + + + + - - + + + + + + - + - - + + - + - - + + - + - + - + @@ -284,31 +310,31 @@ - + - - - - + + + + - + - - + + - + - + diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/user-context.xml b/openid-connect-server-webapp/src/main/webapp/WEB-INF/user-context.xml index 2aff943637..501303d764 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/user-context.xml +++ b/openid-connect-server-webapp/src/main/webapp/WEB-INF/user-context.xml @@ -30,9 +30,12 @@ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd"> + + + diff --git a/openid-connect-server/pom.xml b/openid-connect-server/pom.xml index 84fe62198e..ace88fcc9e 100644 --- a/openid-connect-server/pom.xml +++ b/openid-connect-server/pom.xml @@ -72,11 +72,26 @@ org.eclipse.persistence.jpa test - org.apache.commons commons-io + + javax.xml.bind + jaxb-api + + + com.sun.xml.bind + jaxb-core + + + com.sun.xml.bind + jaxb-impl + + + javax.activation + activation + OpenID Connect server libraries for Spring and Spring Security. diff --git a/openid-connect-server/src/main/java/org/mitre/oauth2/service/impl/BlacklistAwareRedirectResolver.java b/openid-connect-server/src/main/java/org/mitre/oauth2/service/impl/BlacklistAwareRedirectResolver.java index fc45ed20b9..13664bd410 100644 --- a/openid-connect-server/src/main/java/org/mitre/oauth2/service/impl/BlacklistAwareRedirectResolver.java +++ b/openid-connect-server/src/main/java/org/mitre/oauth2/service/impl/BlacklistAwareRedirectResolver.java @@ -43,11 +43,6 @@ public class BlacklistAwareRedirectResolver extends DefaultRedirectResolver { @Autowired private BlacklistedSiteService blacklistService; - @Autowired - private ConfigurationPropertiesBean config; - - private boolean strictMatch = true; - /* (non-Javadoc) * @see org.springframework.security.oauth2.provider.endpoint.RedirectResolver#resolveRedirect(java.lang.String, org.springframework.security.oauth2.provider.ClientDetails) */ @@ -63,43 +58,4 @@ public String resolveRedirect(String requestedRedirect, ClientDetails client) th } } - /* (non-Javadoc) - * @see org.springframework.security.oauth2.provider.endpoint.DefaultRedirectResolver#redirectMatches(java.lang.String, java.lang.String) - */ - @Override - protected boolean redirectMatches(String requestedRedirect, String redirectUri) { - - if (isStrictMatch()) { - // we're doing a strict string match for all clients - return Strings.nullToEmpty(requestedRedirect).equals(redirectUri); - } else { - // otherwise do the prefix-match from the library - return super.redirectMatches(requestedRedirect, redirectUri); - } - - } - - /** - * @return the strictMatch - */ - public boolean isStrictMatch() { - if (config.isHeartMode()) { - // HEART mode enforces strict matching - return true; - } else { - return strictMatch; - } - } - - /** - * Set this to true to require exact string matches for all redirect URIs. (Default is false) - * - * @param strictMatch the strictMatch to set - */ - public void setStrictMatch(boolean strictMatch) { - this.strictMatch = strictMatch; - } - - - } diff --git a/openid-connect-server/src/main/java/org/mitre/openid/connect/service/impl/MITREidDataServiceSupport.java b/openid-connect-server/src/main/java/org/mitre/openid/connect/service/impl/MITREidDataServiceSupport.java index c4e787c9eb..9d1414d311 100644 --- a/openid-connect-server/src/main/java/org/mitre/openid/connect/service/impl/MITREidDataServiceSupport.java +++ b/openid-connect-server/src/main/java/org/mitre/openid/connect/service/impl/MITREidDataServiceSupport.java @@ -25,6 +25,7 @@ import org.springframework.format.datetime.DateFormatter; public abstract class MITREidDataServiceSupport { + public static final String DATE_TIME_ISO = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"; private final DateFormatter dateFormatter; /** * Logger for this class @@ -32,8 +33,7 @@ public abstract class MITREidDataServiceSupport { private static final Logger logger = LoggerFactory.getLogger(MITREidDataServiceSupport.class); public MITREidDataServiceSupport() { - dateFormatter = new DateFormatter(); - dateFormatter.setIso(ISO.DATE_TIME); + dateFormatter = new DateFormatter(DATE_TIME_ISO); } protected Date utcToDate(String value) { diff --git a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ClientAPI.java b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ClientAPI.java index 45ba59901c..f07d1f521d 100644 --- a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ClientAPI.java +++ b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ClientAPI.java @@ -51,6 +51,8 @@ import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.core.Authentication; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.oauth2.common.util.OAuth2Utils; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; @@ -212,6 +214,16 @@ public PKCEAlgorithm deserialize(JsonElement json, Type typeOfT, JsonDeserializa } } }) + .registerTypeAdapter(GrantedAuthority.class, new JsonDeserializer() { + @Override + public GrantedAuthority deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { + if (json.isJsonPrimitive()) { + return new SimpleGrantedAuthority(json.getAsString()); + } else { + return null; + } + } + }) .setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ") .create(); diff --git a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/DynamicClientRegistrationEndpoint.java b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/DynamicClientRegistrationEndpoint.java index a96f8209ea..6ea1f155c5 100644 --- a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/DynamicClientRegistrationEndpoint.java +++ b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/DynamicClientRegistrationEndpoint.java @@ -246,10 +246,6 @@ public String registerNewClient(@RequestBody String jsonString, Model m) { m.addAttribute(HttpCodeView.CODE, HttpStatus.CREATED); // http 201 return ClientInformationResponseView.VIEWNAME; - } catch (UnsupportedEncodingException e) { - logger.error("Unsupported encoding", e); - m.addAttribute(HttpCodeView.CODE, HttpStatus.INTERNAL_SERVER_ERROR); - return HttpCodeView.VIEWNAME; } catch (IllegalArgumentException e) { logger.error("Couldn't save client", e); @@ -293,7 +289,7 @@ public String readClientConfiguration(@PathVariable("id") String clientId, Model m.addAttribute(HttpCodeView.CODE, HttpStatus.OK); // http 200 return ClientInformationResponseView.VIEWNAME; - } catch (UnsupportedEncodingException e) { + } catch (IllegalArgumentException e) { logger.error("Unsupported encoding", e); m.addAttribute(HttpCodeView.CODE, HttpStatus.INTERNAL_SERVER_ERROR); return HttpCodeView.VIEWNAME; @@ -319,7 +315,7 @@ public String readClientConfiguration(@PathVariable("id") String clientId, Model */ @PreAuthorize("hasRole('ROLE_CLIENT') and #oauth2.hasScope('" + SystemScopeService.REGISTRATION_TOKEN_SCOPE + "')") @RequestMapping(value = "/{id}", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) - public String updateClient(@PathVariable("id") String clientId, @RequestBody String jsonString, Model m, OAuth2Authentication auth) { + public String updateClient(@PathVariable("id") String clientId, @RequestBody String jsonString, Model m, OAuth2Authentication auth) throws UnsupportedEncodingException { ClientDetailsEntity newClient = null; @@ -382,10 +378,6 @@ public String updateClient(@PathVariable("id") String clientId, @RequestBody Str m.addAttribute(HttpCodeView.CODE, HttpStatus.OK); // http 200 return ClientInformationResponseView.VIEWNAME; - } catch (UnsupportedEncodingException e) { - logger.error("Unsupported encoding", e); - m.addAttribute(HttpCodeView.CODE, HttpStatus.INTERNAL_SERVER_ERROR); - return HttpCodeView.VIEWNAME; } catch (IllegalArgumentException e) { logger.error("Couldn't save client", e); diff --git a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ProtectedResourceRegistrationEndpoint.java b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ProtectedResourceRegistrationEndpoint.java index 9e2e89b336..0db921246d 100644 --- a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ProtectedResourceRegistrationEndpoint.java +++ b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ProtectedResourceRegistrationEndpoint.java @@ -177,10 +177,6 @@ public String registerNewProtectedResource(@RequestBody String jsonString, Model m.addAttribute(HttpCodeView.CODE, HttpStatus.CREATED); // http 201 return ClientInformationResponseView.VIEWNAME; - } catch (UnsupportedEncodingException e) { - logger.error("Unsupported encoding", e); - m.addAttribute(HttpCodeView.CODE, HttpStatus.INTERNAL_SERVER_ERROR); - return HttpCodeView.VIEWNAME; } catch (IllegalArgumentException e) { logger.error("Couldn't save client", e); @@ -245,7 +241,7 @@ public String readResourceConfiguration(@PathVariable("id") String clientId, Mod m.addAttribute(HttpCodeView.CODE, HttpStatus.OK); // http 200 return ClientInformationResponseView.VIEWNAME; - } catch (UnsupportedEncodingException e) { + } catch (IllegalArgumentException e) { logger.error("Unsupported encoding", e); m.addAttribute(HttpCodeView.CODE, HttpStatus.INTERNAL_SERVER_ERROR); return HttpCodeView.VIEWNAME; @@ -356,10 +352,6 @@ public String updateProtectedResource(@PathVariable("id") String clientId, @Requ m.addAttribute(HttpCodeView.CODE, HttpStatus.OK); // http 200 return ClientInformationResponseView.VIEWNAME; - } catch (UnsupportedEncodingException e) { - logger.error("Unsupported encoding", e); - m.addAttribute(HttpCodeView.CODE, HttpStatus.INTERNAL_SERVER_ERROR); - return HttpCodeView.VIEWNAME; } catch (IllegalArgumentException e) { logger.error("Couldn't save client", e); diff --git a/openid-connect-server/src/test/java/org/mitre/oauth2/service/impl/TestBlacklistAwareRedirectResolver.java b/openid-connect-server/src/test/java/org/mitre/oauth2/service/impl/TestBlacklistAwareRedirectResolver.java index 3698ec9e05..51214ba304 100644 --- a/openid-connect-server/src/test/java/org/mitre/oauth2/service/impl/TestBlacklistAwareRedirectResolver.java +++ b/openid-connect-server/src/test/java/org/mitre/oauth2/service/impl/TestBlacklistAwareRedirectResolver.java @@ -87,15 +87,6 @@ public void testResolveRedirect_safe() { assertThat(res1, is(equalTo(goodUri))); - // set the resolver to non-strict and test the path-based redirect resolution - - resolver.setStrictMatch(false); - - String res2 = resolver.resolveRedirect(pathUri, client); - - assertThat(res2, is(equalTo(pathUri))); - - } @Test(expected = InvalidRequestException.class) @@ -106,52 +97,4 @@ public void testResolveRedirect_blacklisted() { } - @Test - public void testRedirectMatches_default() { - - // this is not an exact match - boolean res1 = resolver.redirectMatches(pathUri, goodUri); - - assertThat(res1, is(false)); - - // this is an exact match - boolean res2 = resolver.redirectMatches(goodUri, goodUri); - - assertThat(res2, is(true)); - - } - - @Test - public void testRedirectMatches_nonstrict() { - - // set the resolver to non-strict match mode - resolver.setStrictMatch(false); - - // this is not an exact match (but that's OK) - boolean res1 = resolver.redirectMatches(pathUri, goodUri); - - assertThat(res1, is(true)); - - // this is an exact match - boolean res2 = resolver.redirectMatches(goodUri, goodUri); - - assertThat(res2, is(true)); - - } - - @Test - public void testHeartMode() { - when(config.isHeartMode()).thenReturn(true); - - // this is not an exact match - boolean res1 = resolver.redirectMatches(pathUri, goodUri); - - assertThat(res1, is(false)); - - // this is an exact match - boolean res2 = resolver.redirectMatches(goodUri, goodUri); - - assertThat(res2, is(true)); - } - } diff --git a/openid-connect-server/src/test/java/org/mitre/openid/connect/service/impl/TestMITREidDataService_1_0.java b/openid-connect-server/src/test/java/org/mitre/openid/connect/service/impl/TestMITREidDataService_1_0.java index 6d5e7ec7ca..777f77336f 100644 --- a/openid-connect-server/src/test/java/org/mitre/openid/connect/service/impl/TestMITREidDataService_1_0.java +++ b/openid-connect-server/src/test/java/org/mitre/openid/connect/service/impl/TestMITREidDataService_1_0.java @@ -130,8 +130,7 @@ public class TestMITREidDataService_1_0 { @Before public void prepare() { - formatter = new DateFormatter(); - formatter.setIso(ISO.DATE_TIME); + formatter = new DateFormatter(MITREidDataServiceSupport.DATE_TIME_ISO); Mockito.reset(clientRepository, approvedSiteRepository, authHolderRepository, tokenRepository, sysScopeRepository, wlSiteRepository, blSiteRepository); } @@ -967,4 +966,4 @@ public void testExportDisabled() throws IOException { dataService.exportData(writer); } -} \ No newline at end of file +} diff --git a/openid-connect-server/src/test/java/org/mitre/openid/connect/service/impl/TestMITREidDataService_1_1.java b/openid-connect-server/src/test/java/org/mitre/openid/connect/service/impl/TestMITREidDataService_1_1.java index d7ab851fd4..855d8192ba 100644 --- a/openid-connect-server/src/test/java/org/mitre/openid/connect/service/impl/TestMITREidDataService_1_1.java +++ b/openid-connect-server/src/test/java/org/mitre/openid/connect/service/impl/TestMITREidDataService_1_1.java @@ -128,8 +128,7 @@ public class TestMITREidDataService_1_1 { @Before public void prepare() { - formatter = new DateFormatter(); - formatter.setIso(ISO.DATE_TIME); + formatter = new DateFormatter(MITREidDataServiceSupport.DATE_TIME_ISO); Mockito.reset(clientRepository, approvedSiteRepository, authHolderRepository, tokenRepository, sysScopeRepository, wlSiteRepository, blSiteRepository); } diff --git a/openid-connect-server/src/test/java/org/mitre/openid/connect/service/impl/TestMITREidDataService_1_2.java b/openid-connect-server/src/test/java/org/mitre/openid/connect/service/impl/TestMITREidDataService_1_2.java index 594900ae29..555f0c7e6c 100644 --- a/openid-connect-server/src/test/java/org/mitre/openid/connect/service/impl/TestMITREidDataService_1_2.java +++ b/openid-connect-server/src/test/java/org/mitre/openid/connect/service/impl/TestMITREidDataService_1_2.java @@ -131,8 +131,7 @@ public class TestMITREidDataService_1_2 { @Before public void prepare() { - formatter = new DateFormatter(); - formatter.setIso(ISO.DATE_TIME); + formatter = new DateFormatter(MITREidDataServiceSupport.DATE_TIME_ISO); Mockito.reset(clientRepository, approvedSiteRepository, authHolderRepository, tokenRepository, sysScopeRepository, wlSiteRepository, blSiteRepository); } diff --git a/openid-connect-server/src/test/java/org/mitre/openid/connect/service/impl/TestMITREidDataService_1_3.java b/openid-connect-server/src/test/java/org/mitre/openid/connect/service/impl/TestMITREidDataService_1_3.java index 29a04d932d..3b195fd0f0 100644 --- a/openid-connect-server/src/test/java/org/mitre/openid/connect/service/impl/TestMITREidDataService_1_3.java +++ b/openid-connect-server/src/test/java/org/mitre/openid/connect/service/impl/TestMITREidDataService_1_3.java @@ -142,8 +142,8 @@ public class TestMITREidDataService_1_3 { @Before public void prepare() { - formatter = new DateFormatter(); - formatter.setIso(ISO.DATE_TIME); + formatter = new DateFormatter(MITREidDataServiceSupport.DATE_TIME_ISO); + //formatter.setIso(ISO.DATE_TIME); Mockito.reset(clientRepository, approvedSiteRepository, authHolderRepository, tokenRepository, sysScopeRepository, wlSiteRepository, blSiteRepository); } diff --git a/pom.xml b/pom.xml index 6824f13603..5b2c5007a6 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,8 @@ See the License for the specific language governing permissions and limitations under the License. --> - + 4.0.0 org.mitre openid-connect-parent @@ -27,7 +28,7 @@ org.sonatype.oss oss-parent 9 - + @@ -48,7 +49,8 @@ scm:git:https://github.com/mitreid-connect/OpenID-Connect-Java-Spring-Server.git - scm:git:git@github.com:mitreid-connect/OpenID-Connect-Java-Spring-Server.git + scm:git:git@github.com:mitreid-connect/OpenID-Connect-Java-Spring-Server.git + https://github.com/mitreid-connect/OpenID-Connect-Java-Spring-Server.git HEAD @@ -71,9 +73,12 @@ 1.8 - 1.7.25 + 1.7.26 - A reference implementation of OpenID Connect (http://openid.net/connect/), OAuth 2.0, and UMA built on top of Java, Spring, and Spring Security. The project contains a fully functioning server, client, and utility library. + A reference implementation of OpenID Connect (http://openid.net/connect/), OAuth 2.0, and UMA built on + top of Java, Spring, and Spring Security. The project contains a fully functioning server, client, and utility + library. + https://github.com/mitreid-connect @@ -81,27 +86,27 @@ org.apache.maven.plugins maven-jar-plugin - 3.0.2 + 3.1.2 org.apache.maven.plugins maven-war-plugin - 3.0.0 + 3.2.3 org.apache.maven.plugins maven-javadoc-plugin - 2.10.4 + 3.1.1 org.jacoco jacoco-maven-plugin - 0.7.9 + 0.8.4 org.apache.maven.plugins maven-checkstyle-plugin - 2.10 + 3.1.0 org.apache.maven.plugins @@ -111,17 +116,17 @@ org.apache.maven.plugins maven-source-plugin - 3.0.1 + 3.1.0 org.apache.maven.plugins maven-compiler-plugin - 3.6.1 + 3.8.1 org.eclipse.jetty jetty-maven-plugin - 9.4.3.v20170317 + 9.4.19.v20190610 true @@ -137,12 +142,12 @@ org.apache.maven.plugins maven-site-plugin - 3.6 + 3.7.1 org.apache.maven.plugins maven-project-info-reports-plugin - 2.9 + 3.0.0 @@ -168,7 +173,7 @@ - + @@ -193,6 +198,11 @@ wro4j-extensions 1.8.0 + + org.mockito + mockito-core + 2.18.0 + @@ -209,7 +219,7 @@ MITREid Connect v. ${project.version} MITREid Connect v. ${project.version} ${basedir}/src/main/javadoc/overview.html - -Xdoclint:none + none @@ -282,74 +292,79 @@ org.apache.maven.plugins maven-site-plugin + + + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + + false + + + + + index + ci-management + dependencies + dependency-convergence + + dependency-management + help + issue-management + licenses + mailing-lists + modules + plugin-management + plugins + team + scm + summary + + + + + + org.apache.maven.plugins + maven-javadoc-plugin - - - org.apache.maven.plugins - maven-project-info-reports-plugin - - false - false - - - index - cim - dependencies - dependency-convergence - - dependency-management - help - issue-tracking - license - mailing-list - modules - plugin-management - plugins - project-team - scm - summary - - - - org.apache.maven.plugins - maven-javadoc-plugin - - true - true - true - true - MITREid Connect ${project.name} v. ${project.version} - MITREid Connect ${project.name} v. ${project.version} - ${basedir}/src/main/javadoc/overview.html - -Xdoclint:none - - - - org.apache.maven.plugins - maven-checkstyle-plugin - - checkstyle.xml - - - - org.apache.maven.plugins - maven-surefire-plugin - - junit:junit - - **/*_Roo_* - - - - - org.jacoco - jacoco-maven-plugin - - + true + true + true + true + MITREid Connect ${project.name} v. ${project.version} + MITREid Connect ${project.name} v. ${project.version} + ${basedir}/src/main/javadoc/overview.html + none + + org.apache.maven.plugins + maven-checkstyle-plugin + + checkstyle.xml + + + + org.apache.maven.plugins + maven-surefire-plugin + + junit:junit + + **/*_Roo_* + + + + + org.jacoco + jacoco-maven-plugin + - + + https://github.com/mitreid-connect/OpenID-Connect-Java-Spring-Server/issues GitHub Issues @@ -365,7 +380,7 @@ org.springframework spring-framework-bom - 4.3.22.RELEASE + 5.1.8.RELEASE pom import @@ -374,26 +389,26 @@ com.fasterxml.jackson.core jackson-databind - 2.9.8 + 2.9.9.1 com.fasterxml.jackson.core jackson-annotations - 2.9.8 + 2.9.9 org.springframework.security spring-security-bom - 4.2.11.RELEASE + 5.1.5.RELEASE pom import org.springframework.security.oauth spring-security-oauth2 - 2.1.0.RELEASE + 2.3.6.RELEASE @@ -419,17 +434,17 @@ mysql mysql-connector-java - 5.1.42 + 5.1.47 org.hsqldb hsqldb - 2.3.4 + 2.5.0 org.postgresql postgresql - 42.0.0.jre7 + 42.2.6 com.oracle @@ -449,7 +464,7 @@ com.zaxxer HikariCP - 2.6.1 + 3.3.1 @@ -511,13 +526,13 @@ org.easymock easymock - 3.4 + 4.0.2 test org.mockito mockito-all - 1.9.5 + 1.10.19 test @@ -564,17 +579,17 @@ com.google.guava guava - 27.0-jre + 28.0-jre com.google.code.gson gson - 2.8.0 + 2.8.5 org.apache.httpcomponents httpclient - 4.5.3 + 4.5.9 commons-logging @@ -585,7 +600,7 @@ com.nimbusds nimbus-jose-jwt - 5.4 + 7.4 org.bouncycastle @@ -607,6 +622,27 @@ wro4j-extensions 1.8.0 + + + javax.xml.bind + jaxb-api + 2.3.0 + + + com.sun.xml.bind + jaxb-core + 2.3.0 + + + com.sun.xml.bind + jaxb-impl + 2.3.0 + + + javax.activation + activation + 1.1.1 +