Release new SDK Version 85/22385/3
authorst782s <statta@research.att.com>
Mon, 6 Nov 2017 21:05:26 +0000 (16:05 -0500)
committerst782s <statta@research.att.com>
Tue, 7 Nov 2017 19:03:14 +0000 (14:03 -0500)
Issue: PORTAL-19, PORTAL-135
Includes SDK 2.1 release updates deprecating certain methods to address
vulnerabilities

Change-Id: Ibf105a0cf3c7d7e89eb05862c54aadfacf575d97
Signed-off-by: st782s <statta@research.att.com>
19 files changed:
ecomp-sdk/epsdk-analytics/pom.xml
ecomp-sdk/epsdk-app-common/pom.xml
ecomp-sdk/epsdk-app-common/src/main/java/org/onap/portalapp/controller/core/LogoutController.java
ecomp-sdk/epsdk-app-os/pom.xml
ecomp-sdk/epsdk-app-os/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/self_profile.html
ecomp-sdk/epsdk-app-overlay/pom.xml
ecomp-sdk/epsdk-core/README.md
ecomp-sdk/epsdk-core/pom.xml
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAspect.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/AuditServiceImpl.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/DataAccessService.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/DataAccessServiceImpl.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LdapServiceImpl.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/LoginServiceImpl.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/ProfileServiceImpl.java
ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/RoleServiceImpl.java
ecomp-sdk/epsdk-fw/pom.xml
ecomp-sdk/epsdk-workflow/pom.xml
ecomp-sdk/pom.xml

index 3ef1ddb..9d43336 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>1.4.0-SNAPSHOT</version>
+               <version>2.1.0-SNAPSHOT</version>
        </parent>
        
        <!-- GroupId is inherited from parent -->
index ebb7c26..cb14aec 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>1.4.0-SNAPSHOT</version>
+               <version>2.1.0-SNAPSHOT</version>
        </parent>
 
        <!-- GroupId is inherited from parent -->
index 548ad98..ba490d5 100644 (file)
@@ -51,6 +51,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.context.request.RequestContextHolder;
 import org.springframework.web.context.request.ServletRequestAttributes;
 import org.springframework.web.servlet.ModelAndView;
+import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 
 @Controller
 @RequestMapping("/")
@@ -106,6 +107,7 @@ public class LogoutController extends UnRestrictedBaseController {
                return modelView;
        }
 
+       @MetricsLog
        public void chatRoomLogout(HttpServletRequest request) {
                request = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest();
                setUser(UserUtils.getUserSession(request));
index 469cf37..dc8e9d9 100644 (file)
@@ -8,7 +8,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>1.4.0-SNAPSHOT</version>
+               <version>2.1.0-SNAPSHOT</version>
        </parent>
 
         <!-- GroupId is inherited from parent -->
index 845681e..ca31761 100644 (file)
                                </div>
                        </div>
                        
-                       <div>
+                       <div class="form-row">
                                <button class="btn btn-alt btn-small" type="button" ng-click="saveProfile()" ng-show="(isAppCentralized=='false')">Save</button>
                        </div>
                        <br>
index 6d4f95d..ebc9ccb 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>1.4.0-SNAPSHOT</version>
+               <version>2.1.0-SNAPSHOT</version>
        </parent>
 
        <!-- GroupId is inherited from parent -->
index 2d65f17..fbc2bf2 100644 (file)
@@ -13,6 +13,9 @@ ECOMP SDK web application.
 
 ### ONAP Distributions
 
+Version 2.1.0
+- PORTAL-19 Rename Java package base to org.onap
+
 Version 1.4.0
 - PORTAL-19 Rename Java package base to org.onap
 - PORTAL-42 Use OParent as parent POM
index d999311..49b8f90 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>1.4.0-SNAPSHOT</version>
+               <version>2.1.0-SNAPSHOT</version>
        </parent>
 
        <!-- GroupId is inherited from parent -->
index 3ffd089..0e23a36 100644 (file)
@@ -43,6 +43,7 @@ import org.aspectj.lang.annotation.Aspect;
 import org.aspectj.lang.annotation.Pointcut;
 import org.onap.portalsdk.core.util.SystemProperties.SecurityEventTypeEnum;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 
 @Aspect
 @org.springframework.context.annotation.Configuration
@@ -108,4 +109,18 @@ public class EELFLoggerAspect {
 
                return result;
        }
+       
+       //Metrics Logging
+               @Pointcut("execution(* *(..))")
+           public void performMetricsLogging() {}
+               
+               @Around("performMetricsLogging() && @within(MetricsLog)")
+               public Object metricsLoggingAroundClass(ProceedingJoinPoint joinPoint, MetricsLog MetricsLog) throws Throwable {
+                       return this.logAroundMethod(joinPoint, null);
+               }
+               
+               @Around("performMetricsLogging() && @annotation(MetricsLog)")
+               public Object metricsLoggingAroundMethod(ProceedingJoinPoint joinPoint, MetricsLog MetricsLog) throws Throwable {
+                       return this.logAroundMethod(joinPoint, null);
+               }
 }
index 1bc81d9..68cbe11 100644 (file)
@@ -43,9 +43,11 @@ import org.onap.portalsdk.core.domain.AuditLog;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 
 @Service("auditService")
 @Transactional
+@MetricsLog
 public class AuditServiceImpl implements AuditService {
 
        @Autowired
index 8eacefa..f2863e0 100644 (file)
@@ -60,10 +60,31 @@ public interface DataAccessService {
        void saveDomainObject(DomainVo domainObject, Map additionalParams);
 
        // generic get list method(s)
+       /**
+          * @deprecated
+          * This method may be vulnerable to SQL Injection attacks depending on the usage and is being deprecated. Please use
+          * getList(Class<?> domainClass, ProjectionList projectionsList, List<Criterion> restrictionsList,
+                       List<Order> orderByList) method instead
+        */
+       @Deprecated
        List getList(Class domainClass, Map additionalParams);
 
+       /**
+          * @deprecated
+          * This method may be vulnerable to SQL Injection attacks depending on the usage and is being deprecated. Please use
+          * getList(Class<?> domainClass, ProjectionList projectionsList, List<Criterion> restrictionsList,
+                       List<Order> orderByList) method instead
+        */
+       @Deprecated
        List getList(Class domainClass, String filter, String orderBy, Map additionalParams);
 
+       /**
+          * @deprecated
+          * This method may be vulnerable to SQL Injection attacks depending on the usage and is being deprecated. Please use
+          * getList(Class<?> domainClass, ProjectionList projectionsList, List<Criterion> restrictionsList,
+                       List<Order> orderByList) method instead
+        */
+       @Deprecated
        List getList(Class domainClass, String filter, int fromIndex, int toIndex, String orderBy,
                        Map additionalParams);
 
index f34610c..8fce7e8 100644 (file)
@@ -157,6 +157,11 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe
        /**
         * generic get list method
         * 
+         * @deprecated
+         * This method may be vulnerable to SQL Injection attacks depending on the usage and is being deprecated. Please use
+         * getList(Class<?> domainClass, ProjectionList projectionsList, List<Criterion> restrictionsList,
+                       List<Order> orderByList) method instead
+        * 
         * @param domainClass
         * @param filterClause
         * @param fromIndex
@@ -164,6 +169,7 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe
         * @param orderBy
         * @return
         */
+       @Deprecated
        private List getListCommon(Class domainClass, String filterClause, Integer fromIndex, Integer toIndex,
                        String orderBy) {
                String className = domainClass.getName();
@@ -186,17 +192,38 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe
                return list;
        }
 
+       /**
+          * @deprecated
+          * This method may be vulnerable to SQL Injection attacks depending on the usage and is being deprecated. Please use
+          * getList(Class<?> domainClass, ProjectionList projectionsList, List<Criterion> restrictionsList,
+                       List<Order> orderByList) method instead
+        */
        @Override
+       @Deprecated
        public List getList(Class domainClass, Map additionalParams) {
                return getListCommon(domainClass, null, null, null, null);
        }
 
+        /**
+     * @deprecated
+     * This method may be vulnerable to SQL Injection attacks depending on the usage and is being deprecated. Please use
+     * getList(Class<?> domainClass, ProjectionList projectionsList, List<Criterion> restrictionsList,
+                       List<Order> orderByList) method instead
+     */
        @Override
+       @Deprecated
        public List getList(Class domainClass, String filter, String orderBy, Map additionalParams) {
                return getListCommon(domainClass, filter, null, null, orderBy);
        }
-
+       
+       /**
+     * @deprecated
+     * This method may be vulnerable to SQL Injection attacks depending on the usage and is being deprecated. Please use
+     * getList(Class<?> domainClass, ProjectionList projectionsList, List<Criterion> restrictionsList,
+                       List<Order> orderByList) method instead
+     */
        @Override
+       @Deprecated
        public List getList(Class domainClass, String filter, int fromIndex, int toIndex, String orderBy,
                        Map additionalParams) {
                return getListCommon(domainClass, filter, new Integer(fromIndex), new Integer(toIndex), orderBy);
@@ -401,8 +428,10 @@ public class DataAccessServiceImpl extends FusionService implements DataAccessSe
 
        @Override
        public int executeNamedUpdateQuery(String queryName, Map params, Map additionalParams) {
-               logger.error(EELFLoggerDelegate.errorLogger, "Not implemented");
-               throw new UnsupportedOperationException();
+               Session session = sessionFactory.getCurrentSession();
+           Query query = session.getNamedQuery(queryName);    
+           bindQueryParameters(query,params);
+           return query.executeUpdate();
        }
 
        @Override
index 6470ca6..9f07840 100644 (file)
@@ -58,6 +58,7 @@ import org.onap.portalsdk.core.util.SystemProperties;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 
 @Service("ldapService")
 @Transactional
@@ -144,6 +145,7 @@ public class LdapServiceImpl extends FusionService implements LdapService {
        }
 
        @SuppressWarnings({ "rawtypes", "unchecked" })
+       @MetricsLog
        private ArrayList processResults(NamingEnumeration e) throws NamingException {
                ArrayList results = new ArrayList();
                int count = 0;
@@ -163,6 +165,7 @@ public class LdapServiceImpl extends FusionService implements LdapService {
        }
 
        @SuppressWarnings("rawtypes")
+       @MetricsLog
        private DomainVo processAttributes(Attributes resultAttributes) {
                User user = new User();
                try {
index d16a86d..840c606 100644 (file)
@@ -56,8 +56,10 @@ import org.onap.portalsdk.core.web.support.AppUtils;
 import org.onap.portalsdk.core.web.support.UserUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
+import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 
 @Transactional
+@MetricsLog
 public class LoginServiceImpl extends FusionService implements LoginService {
 
        private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LoginServiceImpl.class);
index 20b14eb..f91cf2e 100644 (file)
@@ -44,8 +44,10 @@ import org.onap.portalsdk.core.domain.Profile;
 import org.onap.portalsdk.core.domain.User;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
+import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 
 @Transactional
+@MetricsLog
 public class ProfileServiceImpl implements ProfileService {
 
        @Autowired
index e0e2d2e..cfb1c34 100644 (file)
@@ -52,8 +52,10 @@ import org.onap.portalsdk.core.domain.RoleFunction;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
+import org.onap.portalsdk.core.logging.aspect.MetricsLog;
 
 @Transactional
+@MetricsLog
 public class RoleServiceImpl implements RoleService {
 
        private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RoleServiceImpl.class);
index cb431a1..de185f4 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>1.4.0-SNAPSHOT</version>
+               <version>2.1.0-SNAPSHOT</version>
        </parent>
 
        <!-- GroupId is inherited from parent -->
index 09b1eb3..077aa32 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.portal.sdk</groupId>
                <artifactId>epsdk-project</artifactId>
-               <version>1.4.0-SNAPSHOT</version>
+               <version>2.1.0-SNAPSHOT</version>
        </parent>
        
        <!-- GroupId is inherited from parent -->
index 8cae0a5..788f63e 100644 (file)
@@ -14,7 +14,7 @@
        <!-- Portal SDK Maven parent project -->
        <groupId>org.onap.portal.sdk</groupId>
        <artifactId>epsdk-project</artifactId>
-       <version>1.4.0-SNAPSHOT</version>
+       <version>2.1.0-SNAPSHOT</version>
        <packaging>pom</packaging>
        <name>portal-sdk</name>
        <url>https://wiki.onap.org/display/DW/Portal</url>