diff --git a/.gitignore b/.gitignore
index 93b4fba2..74223ea6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,4 +5,5 @@
/*.iml
.idea
.springBeans
+.DS_Store
overlays
diff --git a/NOTICE b/NOTICE
index bdac0a71..f5e06cae 100644
--- a/NOTICE
+++ b/NOTICE
@@ -23,10 +23,9 @@ This project includes:
Apache Ant Launcher under The Apache Software License, Version 2.0
Apache Commons CLI under Apache License, Version 2.0
Apache Commons Codec under Apache License, Version 2.0
- Apache Commons Compress under Apache License, Version 2.0
+ Apache Commons Compress under Apache-2.0
Apache Commons IO under Apache License, Version 2.0
Apache Commons Lang under Apache License, Version 2.0
- Apache Commons Logging under The Apache Software License, Version 2.0
Apache Commons Math under Apache License, Version 2.0
Apache Commons Pool under Apache License, Version 2.0
Apache Groovy under The Apache Software License, Version 2.0
@@ -42,19 +41,24 @@ This project includes:
Byte Buddy (without dependencies) under Apache License, Version 2.0
Byte Buddy agent under Apache License, Version 2.0
cglib under Apache License, Version 2.0
+ Checker Qual under The MIT License
com.sun:tools under COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
Commons Lang under The Apache Software License, Version 2.0
commons-collections under Apache License, Version 2.0
dom4j under BSD License
Dough Lea's util.concurrent package under Public domain, Sun Microsoystems
Ehcache Core under The Apache Software License, Version 2.0
- Ehcache Spring Annotations - Core under Apache 2
Ehcache Web Filters under The Apache Software License, Version 2.0
+ error-prone annotations under Apache 2.0
fastinfoset under Apache License, Version 2.0
- Guava: Google Core Libraries for Java under The Apache Software License, Version 2.0
+ FindBugs-jsr305 under The Apache Software License, Version 2.0
+ Guava InternalFutureFailureAccess and InternalFutures under The Apache Software License, Version 2.0
+ Guava ListenableFuture only under The Apache Software License, Version 2.0
+ Guava: Google Core Libraries for Java under Apache License, Version 2.0
Hamcrest Core under New BSD License
Hibernate Commons Annotations under GNU LESSER GENERAL PUBLIC LICENSE
istack common utility code runtime under CDDL 1.1 or GPL2 w/ CPE
+ J2ObjC Annotations under The Apache Software License, Version 2.0
Jackson-annotations under The Apache Software License, Version 2.0
Jackson-core under The Apache Software License, Version 2.0
jackson-databind under The Apache Software License, Version 2.0
@@ -63,29 +67,25 @@ This project includes:
Jasig CAS Client for Java - Core under Apache License Version 2.0
JASYPT: Java Simplified Encryption under The Apache Software License, Version 2.0
Java Portlet Specification V2.0 under Commons Development and Distribution License, Version 1.0
+ Java Servlet API under CDDL + GPLv2 with classpath exception
Java Transaction API under Common Development and Distribution License or GNU General Public License, Version 2 with the Classpath Exception
JavaBeans Activation Framework API jar under CDDL/GPLv2+CE
Javassist under MPL 1.1 or LGPL 2.1 or Apache License 2.0
javax.annotation API under CDDL + GPLv2 with classpath exception
- JAXB Core under CDDL 1.1 or GPL2 w/ CPE
+ JAXB Core under CDDL+GPL License
JAXB Reference Implementation under CDDL 1.1 or GPL2 w/ CPE
jaxb-api under CDDL 1.1 or GPL2 w/ CPE
JAXB2 Basics - Runtime under BSD-Style License
JBoss Logging 3 under GNU Lesser General Public License, version 2.1
- JCL 1.2 implemented over SLF4J under Apache License, Version 2.0
JGroups under Apache License 2.0
JJWT :: API under Apache License, Version 2.0
- JJWT :: Extensions :: Jackson under Apache License, Version 2.0
- JJWT :: Impl under Apache License, Version 2.0
Joda-Time under Apache License, Version 2.0
JPA 2.0 API under Sun Binary Code License
jsoup Java HTML Parser under The MIT License
jsr173_api under Commons Development and Distribution License, Version 1.0
jstl under Commons Development and Distribution License, Version 1.0
- JUL to SLF4J bridge under MIT License
JUnit under Eclipse Public License 1.0
LDAPTIVE CORE under Apache 2 or GNU Lesser General Public License
- Log4j Implemented Over SLF4J under Apache Software Licenses
Logback Classic Module under Eclipse Public License - v 1.0 or GNU Lesser General Public License
Logback Core Module under Eclipse Public License - v 1.0 or GNU Lesser General Public License
mockito-core under The MIT License
@@ -97,15 +97,19 @@ This project includes:
Person Directory Implementations under Apache License, Version 2.0
Portlet JDBC Utilities under Apache License Version 2.0
Portlet MVC Utilities under Apache License Version 2.0
+ Portlet Servlet Adapter under Apache License, Version 2.0
+ PortletMVC4Spring Framework under Apache License, Version 2.0
+ PortletMVC4Spring Security under Apache License, Version 2.0
+ Project Lombok under The MIT License
Resource Server API under Apache License Version 2.0
Resource Server Content under Apache License Version 2.0
Resource Server Core under Apache License Version 2.0
Resource Server Utilities under Apache License Version 2.0
- servlet-api under Commons Development and Distribution License, Version 1.0
SLF4J API Module under MIT License
Spring AOP under Apache License, Version 2.0
Spring Beans under Apache License, Version 2.0
Spring Binding under The Apache Software License, Version 2.0
+ Spring Commons Logging Bridge under Apache License, Version 2.0
Spring Context under Apache License, Version 2.0
Spring Context Support under Apache License, Version 2.0
Spring Core under Apache License, Version 2.0
@@ -120,7 +124,6 @@ This project includes:
Spring Web under Apache License, Version 2.0
Spring Web Flow under The Apache Software License, Version 2.0
Spring Web MVC under Apache License, Version 2.0
- Spring Web Portlet under Apache License, Version 2.0
spring-ldap-core under The Apache Software License, Version 2.0
spring-modules-cache under Apache License, Version 2.0
spring-security-core under The Apache Software License, Version 2.0
diff --git a/README.md b/README.md
index c0a4e7eb..57a98a59 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,7 @@ is rendered within the portlet window. Web Proxy Portlet is often used to incor
are built and run in non-Java environments allowing a site flexibility for integrating content with many different
technologies.
-WebproxyPortlet v2 Gateway SSO is a feature that allows uPortal to sign on to any remote system even if the remote system
+WebproxyPortlet v2 Gateway SSO (DEPRECATED) is a feature that allows uPortal to sign on to any remote system even if the remote system
does not share any authentication information with uPortal. Gateway SSO will submit login information to the remote
system and then redirect to that remote system. Other SSO solution assume that uPortal has authenticated to some system,
such as CAS and will then trust CAS to say the user is authenticated. In this system, the authentication information is
@@ -53,7 +53,7 @@ Web Proxy Portlet
- Clipping to get subsections of the targeted URL
- Uses AJAX to request and replace portlet content from whitelist of proxy URLs
-Gateway SSO
+Gateway SSO (DEPRECATED)
- Log into remote services for users based on user attributes
XSLT Portlet
diff --git a/docs/gateway_config.md b/docs/gateway_config.md
index c2390786..de124dfb 100644
--- a/docs/gateway_config.md
+++ b/docs/gateway_config.md
@@ -1,4 +1,5 @@
# Gateway SSO Configuration
+*THIS PORTLET TYPE IS DEPRECATED*
![Example](Gateway SSO example.png)
diff --git a/pom.xml b/pom.xml
index 4d85720a..9abd219f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,9 +21,10 @@
MinimizedStateHandlerInterceptor class.
diff --git a/src/main/java/org/jasig/portlet/proxy/mvc/ThemeNameViewSelectorImpl.java b/src/main/java/org/jasig/portlet/proxy/mvc/ThemeNameViewSelectorImpl.java index 240f52eb..8e748458 100644 --- a/src/main/java/org/jasig/portlet/proxy/mvc/ThemeNameViewSelectorImpl.java +++ b/src/main/java/org/jasig/portlet/proxy/mvc/ThemeNameViewSelectorImpl.java @@ -18,10 +18,9 @@ */ package org.jasig.portlet.proxy.mvc; -import javax.portlet.PortletRequest; +import lombok.extern.slf4j.Slf4j; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import javax.portlet.PortletRequest; /** *ThemeNameViewSelectorImpl class.
@@ -29,14 +28,13 @@ * @author bjagg * @version $Id: $Id */ +@Slf4j public class ThemeNameViewSelectorImpl implements IViewSelector { private static final String THEME_NAME_PROPERTY = "themeName"; private static final String MOBILE_THEMES_KEY = "mobileThemes"; private String[] mobileThemesDefault = new String[]{ "UniversalityMobile" }; - protected final Logger logger = LoggerFactory.getLogger(this.getClass()); - /** {@inheritDoc} */ public boolean isMobile(PortletRequest request) { @@ -46,7 +44,7 @@ public boolean isMobile(PortletRequest request) { // if no theme name can be found, just assume the request is for a // desktop client if (themeName == null) { - logger.debug("No theme name found, assuming desktop environment"); + log.debug("No theme name found, assuming desktop environment"); return false; } @@ -54,12 +52,12 @@ public boolean isMobile(PortletRequest request) { // mobile themes for (String theme : mobileThemes) { if (themeName.equals(theme)) { - logger.debug("Theme name {} matches configured list of mobile themes", themeName); + log.debug("Theme name {} matches configured list of mobile themes", themeName); return true; } } - logger.debug("No match found for theme name {}, assuming desktop environment", themeName); + log.debug("No match found for theme name {}, assuming desktop environment", themeName); return false; } diff --git a/src/main/java/org/jasig/portlet/proxy/mvc/portlet/gateway/BaseGatewayPortletController.java b/src/main/java/org/jasig/portlet/proxy/mvc/portlet/gateway/BaseGatewayPortletController.java index 0cd5bd27..886f956a 100644 --- a/src/main/java/org/jasig/portlet/proxy/mvc/portlet/gateway/BaseGatewayPortletController.java +++ b/src/main/java/org/jasig/portlet/proxy/mvc/portlet/gateway/BaseGatewayPortletController.java @@ -29,6 +29,7 @@ * @author James Wennmacher, jwennmacher@unicon.net * @version $Id: $Id */ +@Deprecated // No known usage of this portlet type. Remove when we jump to Java 17. public class BaseGatewayPortletController { /** *removeInaccessibleEntries.
diff --git a/src/main/java/org/jasig/portlet/proxy/mvc/portlet/gateway/GatewayEntry.java b/src/main/java/org/jasig/portlet/proxy/mvc/portlet/gateway/GatewayEntry.java index 0a0987b3..e8ffb0e4 100644 --- a/src/main/java/org/jasig/portlet/proxy/mvc/portlet/gateway/GatewayEntry.java +++ b/src/main/java/org/jasig/portlet/proxy/mvc/portlet/gateway/GatewayEntry.java @@ -37,6 +37,7 @@ * @author Jen Bourey, jennifer.bourey@gmail.com * @version $Id: $Id */ +@Deprecated // No known usage of this portlet type. Remove when we jump to Java 17. public class GatewayEntry { private String name; diff --git a/src/main/java/org/jasig/portlet/proxy/mvc/portlet/gateway/GatewayPortletController.java b/src/main/java/org/jasig/portlet/proxy/mvc/portlet/gateway/GatewayPortletController.java index c869263d..0682cde2 100644 --- a/src/main/java/org/jasig/portlet/proxy/mvc/portlet/gateway/GatewayPortletController.java +++ b/src/main/java/org/jasig/portlet/proxy/mvc/portlet/gateway/GatewayPortletController.java @@ -18,23 +18,22 @@ */ package org.jasig.portlet.proxy.mvc.portlet.gateway; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; import org.jasig.portlet.proxy.mvc.IViewSelector; import org.jasig.portlet.proxy.service.IFormField; import org.jasig.portlet.proxy.service.web.HttpContentRequestImpl; import org.jasig.portlet.proxy.service.web.IAuthenticationFormModifier; import org.jasig.portlet.proxy.service.web.interceptor.IPreInterceptor; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.InvalidPropertyException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.portlet.ModelAndView; -import org.springframework.web.portlet.bind.annotation.RenderMapping; -import org.springframework.web.portlet.bind.annotation.ResourceMapping; +import org.springframework.web.servlet.ModelAndView; +import com.liferay.portletmvc4spring.bind.annotation.RenderMapping; +import com.liferay.portletmvc4spring.bind.annotation.ResourceMapping; import javax.annotation.PostConstruct; import javax.annotation.Resource; @@ -56,11 +55,11 @@ */ @Controller @RequestMapping("VIEW") +@Slf4j +@Deprecated // No known usage of this portlet type. Remove when we jump to Java 17. public class GatewayPortletController extends BaseGatewayPortletController { private static final String HTTPS = "HTTPS"; - protected final Logger logger = LoggerFactory.getLogger(this.getClass()); - @Resource(name="gatewayEntries") private ListgetView.
* * @param request a {@link javax.portlet.RenderRequest} object - * @return a {@link org.springframework.web.portlet.ModelAndView} object + * @return a {@link org.springframework.web.servlet.ModelAndView} object */ @RenderMapping public ModelAndView getView(RenderRequest request){ @@ -114,7 +113,7 @@ public ModelAndView getView(RenderRequest request){ mv.addObject("openInNewPage", openInNewPage); final String view = viewSelector.isMobile(request) ? mobileViewName : viewName; - mv.setView(view); + mv.setViewName(view); return mv; } @@ -199,7 +198,7 @@ private void prepareGatewayResponse(ResourceRequest portletRequest, ResourceResp if (entry.isRequireSecure() && StringUtils.isNotBlank(contentRequest.getProxiedLocation()) && contentRequest.getProxiedLocation().length() >= HTTPS.length()) { if (!HTTPS.equalsIgnoreCase(contentRequest.getProxiedLocation().substring(0, HTTPS.length()))) { - logger.error("Proxied location '" + contentRequest.getProxiedLocation() + "' for gateway entry " + log.error("Proxied location '" + contentRequest.getProxiedLocation() + "' for gateway entry " + entry.getName() + " is not secure - discarding entry!!!"); contentRequest.setParameters(new HashMapGatewayPortletEditController class.
@@ -58,6 +56,7 @@ */ @Controller @RequestMapping("EDIT") +@Deprecated // No known usage of this portlet type. Remove when we jump to Java 17. public class GatewayPortletEditController extends BaseGatewayPortletController { /** ConstantINCONSISTENT_FIELD_VALUES="edit.proxy.error.message.inconsistent.f"{trunked}
*/
public static final String INCONSISTENT_FIELD_VALUES = "edit.proxy.error.message.inconsistent.field.values";
@@ -67,7 +66,6 @@ public class GatewayPortletEditController extends BaseGatewayPortletController {
public static final String ERROR_KEY = "error";
/** Constant GATEWAY_ENTRY="gatewayEntry"
*/
public static final String GATEWAY_ENTRY = "gatewayEntry";
- protected final Logger logger = LoggerFactory.getLogger(this.getClass());
@Resource(name="gatewayEntries")
private ListJsonPortletController class.
@@ -48,6 +47,7 @@ */ @Controller @RequestMapping("VIEW") +@Slf4j public class JsonPortletController { /** ConstantCONTENT_LOCATION_KEY="location"
*/
@@ -58,9 +58,7 @@ public class JsonPortletController {
protected static final String MAIN_VIEW_KEY = "mainView";
/** Constant MOBILE_VIEW_KEY="mobileView"
*/
protected static final String MOBILE_VIEW_KEY = "mobileView";
-
- protected final Logger log = LoggerFactory.getLogger(this.getClass());
-
+
private ApplicationContext applicationContext;
/**
@@ -89,7 +87,7 @@ public void setViewSelector(IViewSelector viewSelector) {
* showContent.
* * @param request a {@link javax.portlet.PortletRequest} object - * @return a {@link org.springframework.web.portlet.ModelAndView} object + * @return a {@link org.springframework.web.servlet.ModelAndView} object */ @RequestMapping public ModelAndView showContent(PortletRequest request) { diff --git a/src/main/java/org/jasig/portlet/proxy/mvc/portlet/proxy/EditProxyController.java b/src/main/java/org/jasig/portlet/proxy/mvc/portlet/proxy/EditProxyController.java index fbafd44b..97864811 100644 --- a/src/main/java/org/jasig/portlet/proxy/mvc/portlet/proxy/EditProxyController.java +++ b/src/main/java/org/jasig/portlet/proxy/mvc/portlet/proxy/EditProxyController.java @@ -30,6 +30,7 @@ import javax.portlet.PortletPreferences; import javax.portlet.PortletRequest; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; import org.jasig.portlet.proxy.search.ISearchService; import org.jasig.portlet.proxy.service.GenericContentRequestImpl; @@ -40,16 +41,14 @@ import org.jasig.portlet.proxy.service.web.interceptor.PortletPreferencesBasicAuthenticationPreInterceptor; import org.jasig.portlet.proxy.service.web.interceptor.ProxyCASAuthenticationPreInterceptor; import org.jasig.portlet.proxy.service.web.interceptor.UserInfoBasicAuthenticationPreInterceptor; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Required; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.portlet.bind.annotation.ActionMapping; -import org.springframework.web.portlet.bind.annotation.RenderMapping; +import com.liferay.portletmvc4spring.bind.annotation.ActionMapping; +import com.liferay.portletmvc4spring.bind.annotation.RenderMapping; /** * ProxyConfigController @@ -59,10 +58,9 @@ */ @Controller @RequestMapping("CONFIG") +@Slf4j public class EditProxyController { - protected final Logger log = LoggerFactory.getLogger(this.getClass()); - private MapPREF_CHARACTER_ENCODING="sourcePageCharacterEncoding"
*/
@@ -84,7 +83,6 @@ public class ProxyPortletController {
protected static final String CONTENT_SERVICE_KEY = "contentService";
/** Constant FILTER_LIST_KEY="filters"
*/
protected static final String FILTER_LIST_KEY = "filters";
- protected final Logger log = LoggerFactory.getLogger(this.getClass());
private static final String PROXY_RESPONSE_KEY = "proxyResponse";
@Autowired
private ApplicationContext applicationContext;
diff --git a/src/main/java/org/jasig/portlet/proxy/mvc/portlet/xslt/XsltPortletController.java b/src/main/java/org/jasig/portlet/proxy/mvc/portlet/xslt/XsltPortletController.java
index acf0c596..d384dc35 100644
--- a/src/main/java/org/jasig/portlet/proxy/mvc/portlet/xslt/XsltPortletController.java
+++ b/src/main/java/org/jasig/portlet/proxy/mvc/portlet/xslt/XsltPortletController.java
@@ -21,17 +21,16 @@
import javax.portlet.PortletPreferences;
import javax.portlet.PortletRequest;
+import lombok.extern.slf4j.Slf4j;
import org.jasig.portlet.proxy.mvc.IViewSelector;
import org.jasig.portlet.proxy.service.IContentRequest;
import org.jasig.portlet.proxy.service.IContentResponse;
import org.jasig.portlet.proxy.service.IContentService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.portlet.ModelAndView;
+import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.xslt.XsltView;
/**
@@ -42,6 +41,7 @@
*/
@Controller
@RequestMapping("VIEW")
+@Slf4j
public class XsltPortletController {
/** Constant CONTENT_LOCATION_KEY="location"
*/
@@ -53,8 +53,6 @@ public class XsltPortletController {
/** Constant MOBILE_XSLT_KEY="mobileXslt"
*/
protected static final String MOBILE_XSLT_KEY = "mobileXslt";
- protected final Logger log = LoggerFactory.getLogger(this.getClass());
-
private ApplicationContext applicationContext;
/**
@@ -83,7 +81,7 @@ public void setViewSelector(IViewSelector viewSelector) {
* showContent.
* * @param request a {@link javax.portlet.PortletRequest} object - * @return a {@link org.springframework.web.portlet.ModelAndView} object + * @return a {@link org.springframework.web.servlet.ModelAndView} object */ @RequestMapping public ModelAndView showContent(PortletRequest request) { diff --git a/src/main/java/org/jasig/portlet/proxy/search/AnchorSearchStrategy.java b/src/main/java/org/jasig/portlet/proxy/search/AnchorSearchStrategy.java index 8af5d631..c2c46143 100644 --- a/src/main/java/org/jasig/portlet/proxy/search/AnchorSearchStrategy.java +++ b/src/main/java/org/jasig/portlet/proxy/search/AnchorSearchStrategy.java @@ -27,6 +27,7 @@ import javax.portlet.PortletMode; import javax.portlet.WindowState; +import lombok.extern.slf4j.Slf4j; import org.apereo.portal.search.PortletUrl; import org.apereo.portal.search.PortletUrlParameter; import org.apereo.portal.search.PortletUrlType; @@ -36,8 +37,6 @@ import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Required; /** @@ -46,9 +45,8 @@ * @author bjagg * @version $Id: $Id */ +@Slf4j public class AnchorSearchStrategy implements ISearchStrategy { - protected final Logger log = LoggerFactory.getLogger(this.getClass()); - private ISearchService contentSearchProvider; /** *Setter for the field contentSearchProvider
.
DefaultSearchService class.
@@ -43,8 +41,6 @@ public class DefaultSearchService implements ISearchService { /** ConstantSEARCH_STRATEGIES_PREFERENCE="searchStrategies"
*/
public static final String SEARCH_STRATEGIES_PREFERENCE = "searchStrategies";
- protected final Logger log = LoggerFactory.getLogger(this.getClass());
-
private MapSearchUtil class.
@@ -36,8 +35,8 @@ * @author bjagg * @version $Id: $Id */ +@Slf4j public class SearchUtil { - protected final Logger log = LoggerFactory.getLogger(this.getClass()); /** *updateUrls.
diff --git a/src/main/java/org/jasig/portlet/proxy/security/JasyptPBEStringEncryptionServiceImpl.java b/src/main/java/org/jasig/portlet/proxy/security/JasyptPBEStringEncryptionServiceImpl.java index 385ae6fd..deeb5357 100644 --- a/src/main/java/org/jasig/portlet/proxy/security/JasyptPBEStringEncryptionServiceImpl.java +++ b/src/main/java/org/jasig/portlet/proxy/security/JasyptPBEStringEncryptionServiceImpl.java @@ -18,11 +18,10 @@ */ package org.jasig.portlet.proxy.security; +import lombok.extern.slf4j.Slf4j; import org.jasypt.encryption.pbe.PBEStringEncryptor; import org.jasypt.exceptions.EncryptionInitializationException; import org.jasypt.exceptions.EncryptionOperationNotPossibleException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Required; import org.springframework.util.Assert; @@ -36,8 +35,8 @@ * @author Jen Bourey * @version $Id: $Id */ +@Slf4j public class JasyptPBEStringEncryptionServiceImpl implements IStringEncryptionService { - protected final Logger logger = LoggerFactory.getLogger(this.getClass()); private PBEStringEncryptor encryptor = null; @@ -56,7 +55,7 @@ public String encrypt(final String plaintext) { try { return this.encryptor.encrypt(plaintext); } catch (EncryptionInitializationException e) { - logger.warn(e.getMessage(), e); + log.warn(e.getMessage(), e); throw new StringEncryptionException("Encryption error. Verify an encryption password" + " is configured in configuration.properties", e); } @@ -67,13 +66,13 @@ private String decrypt(final String cryptotext, boolean logError) { return this.encryptor.decrypt(cryptotext); } catch (EncryptionInitializationException e) { if (logError) { - logger.warn("Decryption failed. Error message: {}", e.getMessage()); + log.warn("Decryption failed. Error message: {}", e.getMessage()); } throw new StringEncryptionException("Decryption error. Was encryption password" + " changed in the configuration.properties?", e); } catch (EncryptionOperationNotPossibleException e) { if (logError) { - logger.warn("Decryption failed. This suggests the salt key in " + log.warn("Decryption failed. This suggests the salt key in " + "configuration.properties has been changed."); } throw new StringEncryptionException("Decryption error. Was encryption password" @@ -102,7 +101,7 @@ public void afterPropertiesSet() throws Exception { Assert.isTrue(dec.equals(this.getClass().getName()), "String decryption failed to decode the encrypted text " + enc); if (usingDefaultEncryptionKey()) { - logger.error("Encryption key at default value. Change it in configuration.properties for improved security!"); + log.error("Encryption key at default value. Change it in configuration.properties for improved security!"); } } diff --git a/src/main/java/org/jasig/portlet/proxy/service/ClasspathResourceContentService.java b/src/main/java/org/jasig/portlet/proxy/service/ClasspathResourceContentService.java index a90a6ce2..d081c278 100644 --- a/src/main/java/org/jasig/portlet/proxy/service/ClasspathResourceContentService.java +++ b/src/main/java/org/jasig/portlet/proxy/service/ClasspathResourceContentService.java @@ -22,8 +22,7 @@ import javax.portlet.PortletRequest; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import lombok.extern.slf4j.Slf4j; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.stereotype.Service; @@ -36,9 +35,8 @@ * @version $Id: $Id */ @Service("classpathContentService") +@Slf4j public class ClasspathResourceContentService implements IContentServiceURLRewritingFilter class.
@@ -52,6 +51,7 @@ * @version $Id: $Id */ @Service("urlRewritingFilter") +@Slf4j public class URLRewritingFilter implements IDocumentFilter { /** ConstantREWRITTEN_URLS_KEY="rewrittenUrls"
*/
@@ -59,8 +59,6 @@ public class URLRewritingFilter implements IDocumentFilter {
/** Constant WHITELIST_REGEXES_KEY="whitelistRegexes"
*/
public final static String WHITELIST_REGEXES_KEY = "whitelistRegexes";
- protected final Logger LOG = LoggerFactory.getLogger(this.getClass());
-
private MapHttpContentRequestImpl class.
@@ -46,8 +44,6 @@ */ public class HttpContentRequestImpl extends GenericContentRequestImpl { - private static final Logger log = LoggerFactory.getLogger(HttpContentRequestImpl.class); - private MapPROXY_PORTLET_PARAM_PREFIX="proxy."
*/
public final static String PROXY_PORTLET_PARAM_PREFIX = "proxy.";
/** Constant URL_PARAM="PROXY_PORTLET_PARAM_PREFIX.concat(url)"
*/
diff --git a/src/main/java/org/jasig/portlet/proxy/service/web/MultiRequestHttpClientServiceImpl.java b/src/main/java/org/jasig/portlet/proxy/service/web/MultiRequestHttpClientServiceImpl.java
index 0743c9b0..4d559ccb 100644
--- a/src/main/java/org/jasig/portlet/proxy/service/web/MultiRequestHttpClientServiceImpl.java
+++ b/src/main/java/org/jasig/portlet/proxy/service/web/MultiRequestHttpClientServiceImpl.java
@@ -25,10 +25,8 @@
import org.apache.http.client.HttpClient;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.impl.client.HttpClientBuilder;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
-import org.springframework.web.portlet.util.PortletUtils;
+import com.liferay.portletmvc4spring.util.PortletUtils;
/**
* MultiRequestHttpClientServiceImpl associates a single HTTP client with each
@@ -40,7 +38,6 @@
*/
@Service
public class MultiRequestHttpClientServiceImpl implements IHttpClientService {
- private static final Logger LOG = LoggerFactory.getLogger(MultiRequestHttpClientServiceImpl.class);
/** Constant HTTP_CLIENT_CONNECTION_TIMEOUT="httpClientConnectionTimeout"
*/
public static final String HTTP_CLIENT_CONNECTION_TIMEOUT = "httpClientConnectionTimeout";
/** Constant HTTP_CLIENT_CONNECTION_REQUEST_TIMEOUT="httpClientConnectionRequestTimeout"
*/
diff --git a/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/AuthenticationPreInterceptor.java b/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/AuthenticationPreInterceptor.java
index c6d86a1a..1bdf5418 100644
--- a/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/AuthenticationPreInterceptor.java
+++ b/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/AuthenticationPreInterceptor.java
@@ -22,10 +22,9 @@
import javax.portlet.PortletRequest;
import javax.portlet.PortletSession;
+import lombok.extern.slf4j.Slf4j;
import org.jasig.portlet.proxy.service.web.HttpContentRequestImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.web.portlet.util.PortletUtils;
+import com.liferay.portletmvc4spring.util.PortletUtils;
/**
* AuthenticationPreInterceptor provides a base class for implementing authentication
@@ -36,10 +35,9 @@
* @author Jen Bourey
* @version $Id: $Id
*/
+@Slf4j
public abstract class AuthenticationPreInterceptor implements IPreInterceptor {
- protected final Logger log = LoggerFactory.getLogger(this.getClass());
-
/** Constant AUTHENTICATION_TIMEOUT_KEY="authenticationTimeout"
*/
public static final String AUTHENTICATION_TIMEOUT_KEY = "authenticationTimeout";
/** Constant AUTHENTICATION_TIMESTAMP_KEY="authenticationTimestamp"
*/
diff --git a/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/HeaderPassingPreInterceptor.java b/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/HeaderPassingPreInterceptor.java
index 15670283..4d86eb00 100644
--- a/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/HeaderPassingPreInterceptor.java
+++ b/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/HeaderPassingPreInterceptor.java
@@ -24,9 +24,8 @@
import javax.portlet.PortletRequest;
import javax.portlet.PortletPreferences;
+import lombok.extern.slf4j.Slf4j;
import org.jasig.portlet.proxy.service.web.HttpContentRequestImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
/**
@@ -37,10 +36,9 @@
* @version $Id: $Id
*/
@Service("headerPassingPreInterceptor")
+@Slf4j
public class HeaderPassingPreInterceptor implements IPreInterceptor {
- protected final Logger logger = LoggerFactory.getLogger(this.getClass());
-
/** Constant HEADER_PREFERENCE_NAMES="headerNames"
*/
public static final String HEADER_PREFERENCE_NAMES = "headerNames";
/** Constant HEADER_PREFERENCE_VALUES="headerValues"
*/
@@ -63,7 +61,7 @@ public void intercept(HttpContentRequestImpl proxyRequest, PortletRequest portle
}
proxyRequest.setHeaders(headerMap);
}else{
- logger.warn("Invalid data in preferences. Header name array length does not equal header value array length");
+ log.warn("Invalid data in preferences. Header name array length does not equal header value array length");
}
}
diff --git a/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/ProxyCASAuthenticationPreInterceptor.java b/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/ProxyCASAuthenticationPreInterceptor.java
index 6e9a1a42..b0bc137d 100644
--- a/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/ProxyCASAuthenticationPreInterceptor.java
+++ b/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/ProxyCASAuthenticationPreInterceptor.java
@@ -23,6 +23,7 @@
import javax.portlet.PortletRequest;
+import lombok.extern.slf4j.Slf4j;
import org.apache.http.client.utils.URIBuilder;
import org.jasig.cas.client.validation.Assertion;
import org.jasig.cas.client.validation.TicketValidationException;
@@ -43,6 +44,7 @@
* @version $Id: $Id
*/
@Service(ProxyCASAuthenticationPreInterceptor.BEAN_ID)
+@Slf4j
public class ProxyCASAuthenticationPreInterceptor extends AuthenticationPreInterceptor {
/** Constant BEAN_ID="proxyCASAuthenticationPreInterceptor"
*/
diff --git a/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/UserInfoUrlParameterizingPreInterceptor.java b/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/UserInfoUrlParameterizingPreInterceptor.java
index d6dca665..b95deb5f 100644
--- a/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/UserInfoUrlParameterizingPreInterceptor.java
+++ b/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/UserInfoUrlParameterizingPreInterceptor.java
@@ -25,10 +25,9 @@
import javax.portlet.PortletRequest;
+import lombok.extern.slf4j.Slf4j;
import org.jasig.portlet.proxy.service.IFormField;
import org.jasig.portlet.proxy.service.web.HttpContentRequestImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
/**
@@ -42,10 +41,9 @@
* @version $Id: $Id
*/
@Service("userInfoUrlParameterizingPreInterceptor")
+@Slf4j
public class UserInfoUrlParameterizingPreInterceptor implements IPreInterceptor {
-
- protected final Logger log = LoggerFactory.getLogger(this.getClass());
-
+
/** {@inheritDoc} */
@Override
public void intercept(HttpContentRequestImpl proxyRequest,
diff --git a/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/UserPreferencesPreInterceptor.java b/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/UserPreferencesPreInterceptor.java
index 492e72ea..f976f2d8 100644
--- a/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/UserPreferencesPreInterceptor.java
+++ b/src/main/java/org/jasig/portlet/proxy/service/web/interceptor/UserPreferencesPreInterceptor.java
@@ -23,12 +23,11 @@
import javax.portlet.PortletPreferences;
import javax.portlet.PortletRequest;
+import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.jasig.portlet.proxy.security.IStringEncryptionService;
import org.jasig.portlet.proxy.service.IFormField;
import org.jasig.portlet.proxy.service.web.HttpContentRequestImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -40,8 +39,8 @@
* @version $Id: $Id
*/
@Service("UserPreferencesPreInterceptor")
+@Slf4j
public class UserPreferencesPreInterceptor implements IPreInterceptor {
- protected final Logger logger = LoggerFactory.getLogger(this.getClass());
private String preferencesRegex;
@@ -76,7 +75,7 @@ public void intercept(HttpContentRequestImpl proxyRequest,
if (parameterValue.matches(preferencesRegex)) {
String preferredValue = prefs.getValue(parameterValue, parameterValue);
if (parameter.getSecured() && StringUtils.isNotBlank(preferredValue) && stringEncryptionService != null) {
- logger.debug("decrypting preferredValue '" + preferredValue + "' for parameterKey: '" + parameterKey);
+ log.debug("decrypting preferredValue '" + preferredValue + "' for parameterKey: '" + parameterKey);
preferredValue = stringEncryptionService.decrypt(preferredValue);
}
parameterValues[i] = preferredValue;
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
deleted file mode 100644
index 2e9212ef..00000000
--- a/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to Apereo under one or more contributor license
-# agreements. See the NOTICE file distributed with this work
-# for additional information regarding copyright ownership.
-# Apereo licenses this file to you under the Apache License,
-# Version 2.0 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a
-# copy of the License at the following location:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
diff --git a/src/main/webapp/WEB-INF/context/applicationContext.xml b/src/main/webapp/WEB-INF/context/applicationContext.xml
index c35fe889..a380b86a 100644
--- a/src/main/webapp/WEB-INF/context/applicationContext.xml
+++ b/src/main/webapp/WEB-INF/context/applicationContext.xml
@@ -136,8 +136,6 @@
-