diff options
43 files changed, 1803 insertions, 1164 deletions
diff --git a/ecomp-portal-BE-common/pom.xml b/ecomp-portal-BE-common/pom.xml index 82e9827c..36231095 100644 --- a/ecomp-portal-BE-common/pom.xml +++ b/ecomp-portal-BE-common/pom.xml @@ -740,8 +740,6 @@ <artifactId>jersey-servlet</artifactId> </exclusion> </exclusions> - - </dependency> <dependency> <groupId>org.projectlombok</groupId> diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/AppsController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/AppsController.java index 6a6b3a65..0655412f 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/AppsController.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/AppsController.java @@ -667,7 +667,7 @@ public class AppsController extends EPRestrictedBaseController { String appId = request.getParameter("appParam"); app = appService.getApp(Long.valueOf(appId)); if(!EcompPortalUtils.checkIfRemoteCentralAccessAllowed()) { - app.setCentralAuth(false); + app.setRolesInAAF(false); } if (user != null && (adminRolesService.isAccountAdminOfApplication(user, app) || (adminRolesService.isSuperAdmin(user) && app.getId().equals(PortalConstants.PORTAL_APP_ID)))) @@ -721,7 +721,7 @@ public class AppsController extends EPRestrictedBaseController { /** * * @param request - * HTTP servlet request + * HTTP servlet request‰ * @param response * HTTP servlet response * @param modifiedOnboardingApp @@ -734,7 +734,7 @@ public class AppsController extends EPRestrictedBaseController { @RequestBody OnboardingApp modifiedOnboardingApp, HttpServletResponse response) { FieldsValidator fieldsValidator = null; EPUser user = null; - EPApp oldEPApp = appService.getApp(modifiedOnboardingApp.id); + EPApp oldEPApp = appService.getApp(modifiedOnboardingApp.getId()); try { user = EPUserUtils.getUserSession(request); @@ -746,7 +746,7 @@ public class AppsController extends EPRestrictedBaseController { response.getStatus()); return fieldsValidator; } else { - if((oldEPApp.getCentralAuth() && modifiedOnboardingApp.isCentralAuth && !oldEPApp.getNameSpace().equalsIgnoreCase(modifiedOnboardingApp.nameSpace) && modifiedOnboardingApp.nameSpace!= null ) || (!oldEPApp.getCentralAuth() && modifiedOnboardingApp.isCentralAuth && modifiedOnboardingApp.nameSpace!= null)) + if((oldEPApp.getRolesInAAF() && modifiedOnboardingApp.getRolesInAAF() && !oldEPApp.getNameSpace().equalsIgnoreCase(modifiedOnboardingApp.getNameSpace()) && modifiedOnboardingApp.getNameSpace()!= null ) || (!oldEPApp.getRolesInAAF() && modifiedOnboardingApp.getRolesInAAF() && modifiedOnboardingApp.getNameSpace() != null)) { checkIfNameSpaceIsValid(modifiedOnboardingApp, fieldsValidator, response); } @@ -795,7 +795,7 @@ public class AppsController extends EPRestrictedBaseController { EcompPortalUtils.setBadPermissions(user, response, "postOnboardingApps"); } else { newOnboardingApp.normalize(); - if(newOnboardingApp.isCentralAuth != null && newOnboardingApp.isCentralAuth) + if(newOnboardingApp.getRolesInAAF() != null && newOnboardingApp.getRolesInAAF()) checkIfNameSpaceIsValid(newOnboardingApp, fieldsValidator, response); fieldsValidator = appService.addOnboardingApp(newOnboardingApp, user); response.setStatus(fieldsValidator.httpStatusCode.intValue()); @@ -911,7 +911,7 @@ public class AppsController extends EPRestrictedBaseController { private void checkIfNameSpaceIsValid(OnboardingApp modifiedOnboardingApp, FieldsValidator fieldsValidator, HttpServletResponse response) throws InvalidApplicationException { try { - ResponseEntity<String> res = appService.checkIfNameSpaceIsValid(modifiedOnboardingApp.nameSpace); + ResponseEntity<String> res = appService.checkIfNameSpaceIsValid(modifiedOnboardingApp.getNameSpace()); } catch (HttpClientErrorException e) { logger.error(EELFLoggerDelegate.errorLogger, "checkIfNameSpaceExists failed", e); EPLogUtil.logExternalAuthAccessAlarm(logger, e.getStatusCode()); diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/AppsControllerExternalRequest.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/AppsControllerExternalRequest.java index ce29900f..a88728a0 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/AppsControllerExternalRequest.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/AppsControllerExternalRequest.java @@ -208,7 +208,7 @@ public class AppsControllerExternalRequest implements BasicAuthenticationControl @PathVariable("appId") Long appId) { EPApp epApp = appService.getApp(appId); OnboardingApp obApp = new OnboardingApp(); - epApp.setAppPassword(EPCommonSystemProperties.APP_DISPLAY_PASSWORD); //to hide password from get request + epApp.setAppBasicAuthPassword(EPCommonSystemProperties.APP_DISPLAY_PASSWORD); //to hide password from get request appService.createOnboardingFromApp(epApp, obApp); EcompPortalUtils.logAndSerializeObject(logger, "getOnboardAppExternal", RESPONSE, obApp); return obApp; @@ -252,7 +252,7 @@ public class AppsControllerExternalRequest implements BasicAuthenticationControl return portalResponse; } // Validate fields - if (newOnboardApp.id != null) { + if (newOnboardApp.getId() != null) { portalResponse.setStatus(PortalRestStatusEnum.ERROR); portalResponse.setMessage("Unexpected field: id"); return portalResponse; @@ -266,10 +266,10 @@ public class AppsControllerExternalRequest implements BasicAuthenticationControl try { List<EPUser> userList; - userList = userService.getUserByUserId(newOnboardApp.myLoginsAppOwner); + userList = userService.getUserByUserId(newOnboardApp.getMyLoginsAppOwner()); if (userList == null || userList.size() != 1) { portalResponse.setStatus(PortalRestStatusEnum.ERROR); - portalResponse.setMessage("Failed to find user: " + newOnboardApp.myLoginsAppOwner); + portalResponse.setMessage("Failed to find user: " + newOnboardApp.getMyLoginsAppOwner()); return portalResponse; } @@ -343,7 +343,7 @@ public class AppsControllerExternalRequest implements BasicAuthenticationControl // Validate fields. - if (appId == null || !appId.equals(oldOnboardApp.id)) { + if (appId == null || !appId.equals(oldOnboardApp.getId())) { portalResponse.setStatus(PortalRestStatusEnum.ERROR); portalResponse.setMessage("Unexpected value for field: id"); return portalResponse; @@ -358,10 +358,10 @@ public class AppsControllerExternalRequest implements BasicAuthenticationControl try { List<EPUser> userList; - userList = userService.getUserByUserId(oldOnboardApp.myLoginsAppOwner); + userList = userService.getUserByUserId(oldOnboardApp.getMyLoginsAppOwner()); if (userList == null || userList.size() != 1) { portalResponse.setStatus(PortalRestStatusEnum.ERROR); - portalResponse.setMessage("Failed to find user: " + oldOnboardApp.myLoginsAppOwner); + portalResponse.setMessage("Failed to find user: " + oldOnboardApp.getMyLoginsAppOwner()); return portalResponse; } @@ -398,15 +398,15 @@ public class AppsControllerExternalRequest implements BasicAuthenticationControl } private boolean checkIfFieldsAreNull(OnboardingApp onboardingApp) { - return onboardingApp.name == null || onboardingApp.url == null || onboardingApp.restUrl == null - || onboardingApp.myLoginsAppOwner == null || onboardingApp.restrictedApp == null - || onboardingApp.isOpen == null || onboardingApp.isEnabled == null; + return onboardingApp.getAppName() == null || onboardingApp.getLandingPage() == null || onboardingApp.getRestUrl() == null + || onboardingApp.getMyLoginsAppOwner() == null || onboardingApp.getRestrictedApp() == null + || onboardingApp.getIsOpen() == null || onboardingApp.getIsEnabled() == null; } private boolean checkIfFieldsAreEmpty(OnboardingApp onboardingApp) { - return onboardingApp.name.trim().isEmpty() - || onboardingApp.url.trim().isEmpty() - || onboardingApp.restUrl.trim().isEmpty() - || onboardingApp.myLoginsAppOwner.trim().isEmpty(); + return onboardingApp.getAppName().trim().isEmpty() + || onboardingApp.getLandingPage().trim().isEmpty() + || onboardingApp.getRestUrl().trim().isEmpty() + || onboardingApp.getMyLoginsAppOwner().trim().isEmpty(); } } diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/ExternalAccessRolesController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/ExternalAccessRolesController.java index 83b5155d..67e71c50 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/ExternalAccessRolesController.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/ExternalAccessRolesController.java @@ -851,7 +851,7 @@ public class ExternalAccessRolesController implements BasicAuthenticationControl if(app.isEmpty()){ throw new Exception(INVALID_UEB_KEY); } - if(!app.isEmpty() && app.get(0).getCentralAuth()){ + if(!app.isEmpty() && app.get(0).getRolesInAAF()){ ResponseEntity<String> response = externalAccessRolesService.getNameSpaceIfExists(app.get(0)); if (response.getStatusCode().value() == HttpServletResponse.SC_NOT_FOUND) throw new Exception("Invalid NameSpace"); diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/RoleManageController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/RoleManageController.java index e308182c..4d2abb83 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/RoleManageController.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/RoleManageController.java @@ -166,7 +166,7 @@ public class RoleManageController extends EPRestrictedBaseController { EPApp requestedApp = appService.getApp(appId); if (isAuthorizedUser(user, requestedApp)) { fieldsValidation(requestedApp); - if (requestedApp.getCentralAuth()) { + if (requestedApp.getRolesInAAF()) { List<CentralV2Role> answer = null; Map<String, Object> model = new HashMap<>(); ObjectMapper mapper = new ObjectMapper(); @@ -244,7 +244,7 @@ public class RoleManageController extends EPRestrictedBaseController { requestedApp = appService.getApp(appId); if (isAuthorizedUser(user, requestedApp)) { fieldsValidation(requestedApp); - if (requestedApp.getCentralAuth()) { + if (requestedApp.getRolesInAAF()) { externalRequestFieldsValidator = externalAccessRolesService.deleteDependencyRoleRecord(roleId, requestedApp.getUebKey(), user.getOrgUserId()); boolean deleteResponse = externalRequestFieldsValidator.isResult(); @@ -307,7 +307,7 @@ public class RoleManageController extends EPRestrictedBaseController { EPApp requestedApp = appService.getApp(appId); if (isAuthorizedUser(user, requestedApp)) { fieldsValidation(requestedApp); - if (requestedApp != null && requestedApp.getCentralAuth().equals(true)) { + if (requestedApp != null && requestedApp.getRolesInAAF().equals(true)) { ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); JsonNode root = mapper.readTree(request.getReader()); @@ -450,7 +450,7 @@ public class RoleManageController extends EPRestrictedBaseController { EPApp requestedApp = appService.getApp(appId); if (isAuthorizedUser(user, requestedApp)) { fieldsValidation(requestedApp); - if (requestedApp.getCentralAuth()) { + if (requestedApp.getRolesInAAF()) { CentralV2Role answer = externalAccessRolesService.getRoleInfo(roleId, requestedApp.getUebKey()); logger.info(EELFLoggerDelegate.applicationLogger, "role_id" + roleId); Map<String, Object> model = new HashMap<>(); @@ -483,7 +483,7 @@ public class RoleManageController extends EPRestrictedBaseController { EPApp requestedApp = appService.getApp(appId); if (isAuthorizedUser(user, requestedApp)) { fieldsValidation(requestedApp); - if (requestedApp.getCentralAuth()) { + if (requestedApp.getRolesInAAF()) { List<CentralV2RoleFunction> answer = null; Map<String, Object> model = new HashMap<>(); ObjectMapper mapper = new ObjectMapper(); @@ -525,7 +525,7 @@ public class RoleManageController extends EPRestrictedBaseController { EPApp requestedApp = appService.getApp(appId); if (isAuthorizedUser(user, requestedApp)) { fieldsValidation(requestedApp); - if (requestedApp.getCentralAuth() && roleFunc!=null) { + if (requestedApp.getRolesInAAF() && roleFunc!=null) { String code = roleFunc.getType() + PIPE + roleFunc.getCode() + PIPE + roleFunc.getAction(); CentralV2RoleFunction domainRoleFunction = externalAccessRolesService.getRoleFunction(code, requestedApp.getUebKey()); @@ -624,7 +624,7 @@ public class RoleManageController extends EPRestrictedBaseController { EPApp requestedApp = appService.getApp(appId); if (isAuthorizedUser(user, requestedApp)) { fieldsValidation(requestedApp); - if (requestedApp.getCentralAuth()) { + if (requestedApp.getRolesInAAF()) { ObjectMapper mapper = new ObjectMapper(); String data = roleFunc; boolean getDelFuncResponse = false; @@ -811,7 +811,7 @@ public class RoleManageController extends EPRestrictedBaseController { throw new InvalidApplicationException("Invalid credentials"); } if (!appInfo.isEmpty() && EcompPortalUtils.checkIfRemoteCentralAccessAllowed() - && appInfo.get(0).getCentralAuth()) { + && appInfo.get(0).getRolesInAAF()) { ResponseEntity<String> response = externalAccessRolesService.getNameSpaceIfExists(appInfo.get(0)); if (response.getStatusCode().value() == HttpServletResponse.SC_NOT_FOUND) throw new InvalidApplicationException("Invalid NameSpace"); diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EPApp.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EPApp.java index 8227d9ab..61fcfaee 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EPApp.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EPApp.java @@ -52,45 +52,72 @@ import org.onap.portalsdk.core.domain.support.DomainVo; public class EPApp extends DomainVo { private static final long serialVersionUID = 1L; + @SafeHtml private String name; + @SafeHtml private String imageUrl; + @SafeHtml - private String description; + private String appDescription; + @SafeHtml - private String notes; + private String appNotes; + @SafeHtml - private String url; + private String landingPage; + @SafeHtml - private String alternateUrl; + private String alternateLandingPage; + @SafeHtml private String appRestEndpoint; + @SafeHtml private String mlAppName; + @SafeHtml private String mlAppAdminId; private Long motsId; + @SafeHtml - private String username; + private String appBasicAuthUsername; + @SafeHtml - private String appPassword; + private String appBasicAuthPassword; + @Lob private byte[] thumbnail; + private Boolean open; + private Boolean enabled; + @SafeHtml private String uebTopicName; + @SafeHtml private String uebKey; + @SafeHtml private String uebSecret; + private Integer appType; + @Valid private AppContactUs contactUs; - private Boolean centralAuth; + + private Boolean rolesInAAF; @SafeHtml - private String nameSpace; + private String nameSpace; + + @SafeHtml + private String modeOfIntegration; + + private Boolean appAck; + + private Boolean usesCadi; public EPApp() { // Attention!!! @@ -102,8 +129,8 @@ public class EPApp extends DomainVo { this.name = ""; this.mlAppName = ""; this.mlAppAdminId = ""; - this.username = ""; - this.appPassword = ""; + this.appBasicAuthUsername = ""; + this.appBasicAuthPassword = ""; this.open = new Boolean(false); this.enabled = new Boolean(true); this.uebTopicName = ""; @@ -131,8 +158,6 @@ public class EPApp extends DomainVo { this.imageUrl = imageUrl; } - - public byte[] getThumbnail() { return this.thumbnail; } @@ -141,36 +166,36 @@ public class EPApp extends DomainVo { this.thumbnail = thumbnail; } - public String getDescription() { - return description; + public String getAppDescription() { + return appDescription; } - public void setDescription(String description) { - this.description = description; + public void setAppDescription(String appDescription) { + this.appDescription = appDescription; } - public String getNotes() { - return notes; + public String getAppNotes() { + return appNotes; } - public void setNotes(String notes) { - this.notes = notes; + public void setAppNotes(String appNotes) { + this.appNotes = appNotes; } - public String getUrl() { - return url; + public String getLandingPage() { + return landingPage; } - public void setUrl(String url) { - this.url = url; + public void setLandingPage(String landingPage) { + this.landingPage = landingPage; } - public String getAlternateUrl() { - return alternateUrl; + public String getAlternateLandingPage() { + return alternateLandingPage; } - public void setAlternateUrl(String alternateUrl) { - this.alternateUrl = alternateUrl; + public void setAlternateLandingPage(String alternateLandingPage) { + this.alternateLandingPage = alternateLandingPage; } public String getAppRestEndpoint() { @@ -211,25 +236,25 @@ public class EPApp extends DomainVo { this.motsId = motsId; } - public String getUsername() { - return username; + public String getAppBasicAuthUsername() { + return appBasicAuthUsername; } - public void setUsername(String username) { - this.username = username; + public void setAppBasicAuthUsername(String appBasicAuthUsername) { + this.appBasicAuthUsername = appBasicAuthUsername; } - public String getAppPassword() { - return appPassword; + public String getAppBasicAuthPassword() { + return appBasicAuthPassword; } - public void setAppPassword(String appPassword) { - if (StringUtils.isEmpty(appPassword)) { - appPassword = ""; + public void setAppBasicAuthPassword(String appBasicAuthPassword) { + if (StringUtils.isEmpty(appBasicAuthPassword)) { + appBasicAuthPassword = ""; } - this.appPassword = appPassword; + this.appBasicAuthPassword = appBasicAuthPassword; } - + public Boolean getOpen() { return open; } @@ -252,25 +277,6 @@ public class EPApp extends DomainVo { this.enabled = enabled; } - public Integer getAppType() { - return appType; - } - - public void setAppType(Integer appType) { - if (appType == null) { - appType = new Integer(1); - } - this.appType = appType; - } - - public void setRestrictedApp(Boolean restrictedApp) { - Integer result = 1; - if (restrictedApp) { - result = 2; - } - this.appType = result; - } - public Boolean isRestrictedApp() { return (this.appType == 2 ? true : false); } @@ -308,6 +314,14 @@ public class EPApp extends DomainVo { return this.uebSecret; } + public Integer getAppType() { + return appType; + } + + public void setAppType(Integer appType) { + this.appType = appType; + } + public void setUebSecret(String uebSecret) { if (StringUtils.isEmpty(uebSecret)) { this.uebSecret = ""; @@ -322,18 +336,18 @@ public class EPApp extends DomainVo { public void setContactUs(AppContactUs contactUs) { this.contactUs = contactUs; } - - public Boolean getCentralAuth() { - return centralAuth; + + public Boolean getRolesInAAF() { + return rolesInAAF; } - public void setCentralAuth(Boolean centralAuth) { - if (centralAuth == null) { - centralAuth = new Boolean(false); + public void setRolesInAAF(Boolean rolesInAAF) { + if (rolesInAAF == null) { + rolesInAAF = new Boolean(false); } - this.centralAuth = centralAuth; + this.rolesInAAF = rolesInAAF; } - + public String getNameSpace() { return nameSpace; } @@ -345,38 +359,71 @@ public class EPApp extends DomainVo { this.nameSpace = nameSpace; } + public String getModeOfIntegration() { + return modeOfIntegration; + } + + public void setModeOfIntegration(String modeOfIntegration) { + this.modeOfIntegration = modeOfIntegration; + } + + public Boolean getAppAck() { + return appAck; + } + + public void setAppAck(Boolean appAck) { + this.appAck = appAck; + } + + public Boolean getUsesCadi() { + return usesCadi; + } + + public void setUsesCadi(Boolean usesCadi) { + this.usesCadi = usesCadi; + } + @Override public String toString() { - String str = "[" + getId() + ":" + getName() + "]"; - return str; + return "EPApp [name=" + name + ", imageUrl=" + imageUrl + ", appDescription=" + appDescription + ", appNotes=" + + appNotes + ", landingPage=" + landingPage + ", alternateLandingPage=" + alternateLandingPage + + ", appRestEndpoint=" + appRestEndpoint + ", mlAppName=" + mlAppName + ", mlAppAdminId=" + mlAppAdminId + + ", motsId=" + motsId + ", appBasicAuthUsername=" + appBasicAuthUsername + ", appBasicAuthPassword=" + + appBasicAuthPassword + ", thumbnail=" + Arrays.toString(thumbnail) + ", open=" + open + ", enabled=" + + enabled + ", uebTopicName=" + uebTopicName + ", uebKey=" + uebKey + ", uebSecret=" + uebSecret + + ", appType=" + appType + ", contactUs=" + contactUs + ", rolesInAAF=" + rolesInAAF + ", nameSpace=" + + nameSpace + ", modeOfIntegration=" + modeOfIntegration + ", appAck=" + appAck + ", usesCadi=" + + usesCadi + "]"; } @Override public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + ((alternateUrl == null) ? 0 : alternateUrl.hashCode()); - result = prime * result + ((appPassword == null) ? 0 : appPassword.hashCode()); + result = prime * result + ((alternateLandingPage == null) ? 0 : alternateLandingPage.hashCode()); + result = prime * result + ((appAck == null) ? 0 : appAck.hashCode()); + result = prime * result + ((appBasicAuthPassword == null) ? 0 : appBasicAuthPassword.hashCode()); + result = prime * result + ((appBasicAuthUsername == null) ? 0 : appBasicAuthUsername.hashCode()); + result = prime * result + ((appDescription == null) ? 0 : appDescription.hashCode()); + result = prime * result + ((appNotes == null) ? 0 : appNotes.hashCode()); result = prime * result + ((appRestEndpoint == null) ? 0 : appRestEndpoint.hashCode()); result = prime * result + ((appType == null) ? 0 : appType.hashCode()); - result = prime * result + ((centralAuth == null) ? 0 : centralAuth.hashCode()); - result = prime * result + ((contactUs == null) ? 0 : contactUs.hashCode()); - result = prime * result + ((description == null) ? 0 : description.hashCode()); result = prime * result + ((enabled == null) ? 0 : enabled.hashCode()); result = prime * result + ((imageUrl == null) ? 0 : imageUrl.hashCode()); + result = prime * result + ((landingPage == null) ? 0 : landingPage.hashCode()); result = prime * result + ((mlAppAdminId == null) ? 0 : mlAppAdminId.hashCode()); result = prime * result + ((mlAppName == null) ? 0 : mlAppName.hashCode()); + result = prime * result + ((modeOfIntegration == null) ? 0 : modeOfIntegration.hashCode()); result = prime * result + ((motsId == null) ? 0 : motsId.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((nameSpace == null) ? 0 : nameSpace.hashCode()); - result = prime * result + ((notes == null) ? 0 : notes.hashCode()); result = prime * result + ((open == null) ? 0 : open.hashCode()); + result = prime * result + ((rolesInAAF == null) ? 0 : rolesInAAF.hashCode()); result = prime * result + Arrays.hashCode(thumbnail); result = prime * result + ((uebKey == null) ? 0 : uebKey.hashCode()); result = prime * result + ((uebSecret == null) ? 0 : uebSecret.hashCode()); result = prime * result + ((uebTopicName == null) ? 0 : uebTopicName.hashCode()); - result = prime * result + ((url == null) ? 0 : url.hashCode()); - result = prime * result + ((username == null) ? 0 : username.hashCode()); + result = prime * result + ((usesCadi == null) ? 0 : usesCadi.hashCode()); return result; } @@ -384,45 +431,50 @@ public class EPApp extends DomainVo { public boolean equals(Object obj) { if (this == obj) return true; - if (obj == null) + if (!super.equals(obj)) return false; - if (getClass() != obj.getClass()) + if (!(obj instanceof EPApp)) return false; EPApp other = (EPApp) obj; - if (alternateUrl == null) { - if (other.alternateUrl != null) + if (alternateLandingPage == null) { + if (other.alternateLandingPage != null) return false; - } else if (!alternateUrl.equals(other.alternateUrl)) + } else if (!alternateLandingPage.equals(other.alternateLandingPage)) return false; - if (appPassword == null) { - if (other.appPassword != null) + if (appAck == null) { + if (other.appAck != null) return false; - } else if (!appPassword.equals(other.appPassword)) + } else if (!appAck.equals(other.appAck)) return false; - if (appRestEndpoint == null) { - if (other.appRestEndpoint != null) + if (appBasicAuthPassword == null) { + if (other.appBasicAuthPassword != null) return false; - } else if (!appRestEndpoint.equals(other.appRestEndpoint)) + } else if (!appBasicAuthPassword.equals(other.appBasicAuthPassword)) return false; - if (appType == null) { - if (other.appType != null) + if (appBasicAuthUsername == null) { + if (other.appBasicAuthUsername != null) return false; - } else if (!appType.equals(other.appType)) + } else if (!appBasicAuthUsername.equals(other.appBasicAuthUsername)) return false; - if (centralAuth == null) { - if (other.centralAuth != null) + if (appDescription == null) { + if (other.appDescription != null) return false; - } else if (!centralAuth.equals(other.centralAuth)) + } else if (!appDescription.equals(other.appDescription)) return false; - if (contactUs == null) { - if (other.contactUs != null) + if (appNotes == null) { + if (other.appNotes != null) return false; - } else if (!contactUs.equals(other.contactUs)) + } else if (!appNotes.equals(other.appNotes)) return false; - if (description == null) { - if (other.description != null) + if (appRestEndpoint == null) { + if (other.appRestEndpoint != null) return false; - } else if (!description.equals(other.description)) + } else if (!appRestEndpoint.equals(other.appRestEndpoint)) + return false; + if (appType == null) { + if (other.appType != null) + return false; + } else if (!appType.equals(other.appType)) return false; if (enabled == null) { if (other.enabled != null) @@ -434,6 +486,11 @@ public class EPApp extends DomainVo { return false; } else if (!imageUrl.equals(other.imageUrl)) return false; + if (landingPage == null) { + if (other.landingPage != null) + return false; + } else if (!landingPage.equals(other.landingPage)) + return false; if (mlAppAdminId == null) { if (other.mlAppAdminId != null) return false; @@ -444,6 +501,11 @@ public class EPApp extends DomainVo { return false; } else if (!mlAppName.equals(other.mlAppName)) return false; + if (modeOfIntegration == null) { + if (other.modeOfIntegration != null) + return false; + } else if (!modeOfIntegration.equals(other.modeOfIntegration)) + return false; if (motsId == null) { if (other.motsId != null) return false; @@ -459,16 +521,16 @@ public class EPApp extends DomainVo { return false; } else if (!nameSpace.equals(other.nameSpace)) return false; - if (notes == null) { - if (other.notes != null) - return false; - } else if (!notes.equals(other.notes)) - return false; if (open == null) { if (other.open != null) return false; } else if (!open.equals(other.open)) return false; + if (rolesInAAF == null) { + if (other.rolesInAAF != null) + return false; + } else if (!rolesInAAF.equals(other.rolesInAAF)) + return false; if (!Arrays.equals(thumbnail, other.thumbnail)) return false; if (uebKey == null) { @@ -486,16 +548,13 @@ public class EPApp extends DomainVo { return false; } else if (!uebTopicName.equals(other.uebTopicName)) return false; - if (url == null) { - if (other.url != null) - return false; - } else if (!url.equals(other.url)) - return false; - if (username == null) { - if (other.username != null) + if (usesCadi == null) { + if (other.usesCadi != null) return false; - } else if (!username.equals(other.username)) + } else if (!usesCadi.equals(other.usesCadi)) return false; return true; } + + } diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EpAppType.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EpAppType.java new file mode 100644 index 00000000..ae6d12cd --- /dev/null +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EpAppType.java @@ -0,0 +1,48 @@ +/*- + * ============LICENSE_START========================================== + * ONAP Portal + * =================================================================== + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the "License"); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * 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. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * 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. + * + * ============LICENSE_END============================================ + * + * + */ +package org.onap.portalapp.portal.domain; + +public interface EpAppType { + public static final int GUI = 1; + public static final int HYPERLINK = 2; + public static final int NONGUI = 3; + + public static final String GUI_STR = "gui"; + public static final String HYPERLINK_STR = "hyperlink"; + public static final String NONGUI_STR = "nongui"; +} diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/interceptor/PortalResourceInterceptor.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/interceptor/PortalResourceInterceptor.java index 78b40473..5a57e094 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/interceptor/PortalResourceInterceptor.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/interceptor/PortalResourceInterceptor.java @@ -253,7 +253,7 @@ public class PortalResourceInterceptor extends ResourceInterceptor { throw new Exception("Invalid credentials!"); } else { - final String appUsername = application.getUsername(); + final String appUsername = application.getAppBasicAuthUsername(); logger.debug(EELFLoggerDelegate.debugLogger, "appUsername : {}",appUsername); String[] accountNamePassword = EcompPortalUtils.getUserNamePassword(authHeader); @@ -317,8 +317,8 @@ public class PortalResourceInterceptor extends ResourceInterceptor { throw new Exception("Invalid credentials!"); } else { - final String appUsername = application.getUsername(); - final String dbDecryptedPwd = CipherUtil.decryptPKC(application.getAppPassword()); + final String appUsername = application.getAppBasicAuthUsername(); + final String dbDecryptedPwd = CipherUtil.decryptPKC(application.getAppBasicAuthPassword()); if (appUsername.equals(accountNamePassword[0]) && dbDecryptedPwd.equals(accountNamePassword[1])) { return true; } diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/AdminRolesServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/AdminRolesServiceImpl.java index 6950bdda..969ccc5f 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/AdminRolesServiceImpl.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/AdminRolesServiceImpl.java @@ -349,7 +349,7 @@ public class AdminRolesServiceImpl implements AdminRolesService { for (AppNameIdIsAdmin appNameIdIsAdmin : newAppsWhereUserIsAdmin) { EPApp app = (EPApp) localSession.get(EPApp.class, appNameIdIsAdmin.id); try { - if (app.getCentralAuth()) { + if (app.getRolesInAAF()) { String extRole = app.getNameSpace() + "." + PortalConstants.ADMIN_ROLE.replaceAll(" ", "_"); HttpEntity<String> entity = new HttpEntity<>(headers); String name = ""; diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ApplicationsRestClientServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ApplicationsRestClientServiceImpl.java index 09d78046..959e392f 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ApplicationsRestClientServiceImpl.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ApplicationsRestClientServiceImpl.java @@ -176,8 +176,8 @@ public class ApplicationsRestClientServiceImpl implements ApplicationsRestClient if (externalApp != null) { String appBaseUri = (type == SystemType.APPLICATION) ? externalApp.getAppRestEndpoint() : ""; - String username = (type == SystemType.APPLICATION) ? externalApp.getUsername(): ""; - String encriptedPwd = (type == SystemType.APPLICATION) ? externalApp.getAppPassword(): ""; + String username = (type == SystemType.APPLICATION) ? externalApp.getAppBasicAuthUsername(): ""; + String encriptedPwd = (type == SystemType.APPLICATION) ? externalApp.getAppBasicAuthPassword(): ""; String appName = (type == SystemType.APPLICATION) ? externalApp.getName(): ""; String decreptedAppPwd = StringUtils.EMPTY; @@ -202,16 +202,16 @@ public class ApplicationsRestClientServiceImpl implements ApplicationsRestClient WebClient client = createClientForPath(appBaseUri, restPath); - if(externalApp.getAppPassword().isEmpty() || externalApp.getAppPassword()==null){ + if(externalApp.getAppBasicAuthPassword().isEmpty() || externalApp.getAppBasicAuthPassword()==null){ logger.debug(EELFLoggerDelegate.debugLogger, "Entering in the externalApp get app password contains null : {}"); externalApp = appsCacheService.getApp(1L); logger.debug(EELFLoggerDelegate.debugLogger, "external App Information : {}",externalApp); - String mechidUsername=externalApp.getUsername(); + String mechidUsername=externalApp.getAppBasicAuthUsername(); logger.debug(EELFLoggerDelegate.debugLogger, "external App mechidUsername Information : {}",mechidUsername); - String password=externalApp.getAppPassword(); + String password=externalApp.getAppBasicAuthPassword(); String decreptedexternalAppPwd = StringUtils.EMPTY; try { decreptedexternalAppPwd = CipherUtil.decryptPKC(password, diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPAppCommonServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPAppCommonServiceImpl.java index 126d6276..539ada26 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPAppCommonServiceImpl.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/EPAppCommonServiceImpl.java @@ -147,17 +147,17 @@ public class EPAppCommonServiceImpl implements EPAppService { public Boolean onboardingAppFieldsValidation(OnboardingApp onboardingApp) { //FieldsValidator fieldsValidator = new FieldsValidator(); - if ((!onboardingApp.restrictedApp) &&( onboardingApp.name == null || onboardingApp.name.length() == 0 || onboardingApp.restrictedApp == null - || onboardingApp.url == null || onboardingApp.url.length() == 0 || onboardingApp.restUrl == null || onboardingApp.restUrl.length() == 0 - || onboardingApp.username == null || onboardingApp.username.length() == 0 - || onboardingApp.isOpen == null - || (onboardingApp.id != null && onboardingApp.id.equals(ECOMP_APP_ID))) + if ((!onboardingApp.getRestrictedApp()) &&( onboardingApp.getAppName() == null || onboardingApp.getAppName().length() == 0 || onboardingApp.getRestrictedApp() == null + || onboardingApp.getLandingPage() == null || onboardingApp.getLandingPage().length() == 0 || onboardingApp.getRestUrl() == null || onboardingApp.getRestUrl().length() == 0 + || onboardingApp.getAppBasicAuthUsername() == null || onboardingApp.getAppBasicAuthUsername().length() == 0 + || onboardingApp.getIsOpen() == null + || (onboardingApp.getId() != null && onboardingApp.getId().equals(ECOMP_APP_ID))) // For a normal app (appType == PortalConstants.PortalAppId), // these fields must be filled // in. // For a restricted app (appType==2), they will be empty. - || ((onboardingApp.restrictedApp) && (onboardingApp.name == null || onboardingApp.name.length() == 0 - || onboardingApp.url == null || onboardingApp.url.length() == 0 || onboardingApp.isOpen == null))) { + || ((onboardingApp.getRestrictedApp()) && (onboardingApp.getAppName() == null || onboardingApp.getAppName().length() == 0 + || onboardingApp.getLandingPage() == null || onboardingApp.getLandingPage().length() == 0 || onboardingApp.getIsOpen() == null))) { return false; } return true; @@ -165,8 +165,8 @@ public class EPAppCommonServiceImpl implements EPAppService { } private Boolean onboardingInactiveAppFieldsForValidation(OnboardingApp onboardingApp) { - if (onboardingApp.name == null || onboardingApp.name.length() == 0 - || onboardingApp.isOpen == null) { + if (onboardingApp.getAppName() == null || onboardingApp.getAppName().length() == 0 + || onboardingApp.getIsOpen() == null) { return false; } return true; @@ -174,28 +174,28 @@ public class EPAppCommonServiceImpl implements EPAppService { protected FieldsValidator onboardingAppFieldsChecker(OnboardingApp onboardingApp) { FieldsValidator fieldsValidator = new FieldsValidator(); - if (onboardingApp.isCentralAuth) { - if (!onboardingApp.isEnabled) { + if (onboardingApp.getRolesInAAF()) { + if (!onboardingApp.getIsEnabled()) { if (!onboardingInactiveAppFieldsForValidation(onboardingApp)) { fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST); } - } else if (onboardingApp.isEnabled) { - if (onboardingAppFieldsValidation(onboardingApp) == false || onboardingApp.nameSpace == null - || onboardingApp.nameSpace.length() == 0) { + } else if (onboardingApp.getIsEnabled()) { + if (onboardingAppFieldsValidation(onboardingApp) == false || onboardingApp.getNameSpace() == null + || onboardingApp.getNameSpace().length() == 0) { fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST); } } } else { - if (!onboardingApp.isEnabled) { + if (!onboardingApp.getIsEnabled()) { if (!onboardingInactiveAppFieldsForValidation(onboardingApp)) { fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST); } - } else if (onboardingApp.isEnabled) { - if(onboardingApp.restrictedApp && onboardingAppFieldsValidation(onboardingApp) == false){ + } else if (onboardingApp.getIsEnabled()) { + if(onboardingApp.getRestrictedApp() && onboardingAppFieldsValidation(onboardingApp) == false){ fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST); } - else if (!onboardingApp.restrictedApp && (onboardingAppFieldsValidation(onboardingApp) == false || onboardingApp.appPassword == null - || onboardingApp.appPassword.length() == 0)) { + else if (!onboardingApp.getRestrictedApp() && (onboardingAppFieldsValidation(onboardingApp) == false || onboardingApp.getAppBasicAuthPassword() == null + || onboardingApp.getAppBasicAuthPassword().length() == 0)) { fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST); } } @@ -268,15 +268,15 @@ public class EPAppCommonServiceImpl implements EPAppService { ecompApp.setId(app.getId()); ecompApp.setName(app.getName()); ecompApp.setImageUrl(app.getImageUrl()); - ecompApp.setDescription(app.getDescription()); - ecompApp.setNotes(app.getNotes()); - ecompApp.setUrl(app.getUrl()); - ecompApp.setAlternateUrl(app.getAlternateUrl()); + ecompApp.setDescription(app.getAppDescription()); + ecompApp.setNotes(app.getAppNotes()); + ecompApp.setUrl(app.getLandingPage()); + ecompApp.setAlternateUrl(app.getAlternateLandingPage()); ecompApp.setUebTopicName(app.getUebTopicName()); //ecompApp.setUebKey(app.getUebKey()); ecompApp.setUebSecret(app.getUebSecret()); ecompApp.setEnabled(app.getEnabled()); - ecompApp.setCentralAuth(app.getCentralAuth()); + ecompApp.setCentralAuth(app.getRolesInAAF()); ecompApp.setNameSpace(app.getNameSpace()); ecompApp.setRestrictedApp(app.isRestrictedApp()); ecompAppList.add(ecompApp); @@ -381,7 +381,7 @@ public class EPAppCommonServiceImpl implements EPAppService { if (apps.size() > 0) { EPApp app = apps.get(0); if (!EcompPortalUtils.checkIfRemoteCentralAccessAllowed()) { - app.setCentralAuth(false); + app.setRolesInAAF(false); } return app; } else{ @@ -582,14 +582,14 @@ public class EPAppCommonServiceImpl implements EPAppService { FieldsValidator fieldsValidator = new FieldsValidator(); if(onboardingApp.isCentralAuth){ if (onboardingApp.name == null || onboardingApp.name.length() == 0 || onboardingApp.url == null - || onboardingApp.url.length() == 0 || onboardingApp.restrictedApp == null - || onboardingApp.isOpen == null || onboardingApp.isEnabled == null - || (onboardingApp.id != null && ECOMP_APP_ID.equals(onboardingApp.id.toString())) + || onboardingApp.url.length() == 0 || onboardingApp.getRestrictedApp() == null + || onboardingApp.getIsOpen() == null || onboardingApp.getIsEnabled() == null + || (onboardingApp.getId() != null && ECOMP_APP_ID.equals(onboardingApp.getId().toString())) // For a normal app (appType == PortalConstants.PortalAppId), // these fields must be filled // in. // For a restricted app (appType==2), they will be empty. - || ((!onboardingApp.restrictedApp) && (onboardingApp.myLoginsAppName == null + || ((!onboardingApp.getRestrictedApp()) && (onboardingApp.myLoginsAppName == null || onboardingApp.myLoginsAppName.length() == 0 || onboardingApp.myLoginsAppOwner == null || onboardingApp.myLoginsAppOwner.length() == 0 || onboardingApp.username == null || onboardingApp.username.length() == 0 ))) { @@ -598,14 +598,14 @@ public class EPAppCommonServiceImpl implements EPAppService { }else{ if (onboardingApp.name == null || onboardingApp.name.length() == 0 || onboardingApp.url == null - || onboardingApp.url.length() == 0 || onboardingApp.restrictedApp == null - || onboardingApp.isOpen == null || onboardingApp.isEnabled == null - || (onboardingApp.id != null && ECOMP_APP_ID.equals(onboardingApp.id.toString())) + || onboardingApp.url.length() == 0 || onboardingApp.getRestrictedApp() == null + || onboardingApp.getIsOpen() == null || onboardingApp.getIsEnabled() == null + || (onboardingApp.getId() != null && ECOMP_APP_ID.equals(onboardingApp.getId().toString())) // For a normal app (appType == PortalConstants.PortalAppId), // these fields must be filled // in. // For a restricted app (appType==2), they will be empty. - || ((!onboardingApp.restrictedApp) && (onboardingApp.myLoginsAppName == null + || ((!onboardingApp.getRestrictedApp()) && (onboardingApp.myLoginsAppName == null || onboardingApp.myLoginsAppName.length() == 0 || onboardingApp.myLoginsAppOwner == null || onboardingApp.myLoginsAppOwner.length() == 0 || onboardingApp.username == null || onboardingApp.username.length() == 0 || onboardingApp.appPassword == null @@ -815,7 +815,7 @@ public class EPAppCommonServiceImpl implements EPAppService { } return finalsortedAppsByManual; } - + @Override public List<OnboardingApp> getOnboardingApps() { @SuppressWarnings("unchecked") @@ -823,7 +823,7 @@ public class EPAppCommonServiceImpl implements EPAppService { List<OnboardingApp> onboardingAppsList = new ArrayList<OnboardingApp>(); for (EPApp app : apps) { OnboardingApp onboardingApp = new OnboardingApp(); - app.setAppPassword(EPCommonSystemProperties.APP_DISPLAY_PASSWORD);//to hide password from get request + app.setAppBasicAuthPassword(EPCommonSystemProperties.APP_DISPLAY_PASSWORD);//to hide password from get request createOnboardingFromApp(app, onboardingApp); onboardingAppsList.add(onboardingApp); } @@ -846,7 +846,7 @@ public class EPAppCommonServiceImpl implements EPAppService { onboardingAppsList = getOnboardingApps(); final List<Integer> userAdminApps1 = userAdminApps; - List<OnboardingApp> userApplicationAdmins = onboardingAppsList.stream().filter(x -> userAdminApps1.contains((int) (long)x.id)).collect(Collectors.toList()); + List<OnboardingApp> userApplicationAdmins = onboardingAppsList.stream().filter(x -> userAdminApps1.contains((int) (long)x.getId())).collect(Collectors.toList()); return userApplicationAdmins; } @@ -870,13 +870,13 @@ public class EPAppCommonServiceImpl implements EPAppService { boolean duplicatedNameSpace = false; boolean duplicatedName = false; List<EPApp> apps; - if (onboardingApp.id == null) { + if (onboardingApp.getId() == null) { List<Criterion> restrictionsList = new ArrayList<Criterion>(); - Criterion nameCrit = Restrictions.eq("name",onboardingApp.name); + Criterion nameCrit = Restrictions.eq("name",onboardingApp.getAppName()); Criterion nameSpaceCrit = null; Criterion orCrit = null; - if (onboardingApp.isCentralAuth) { - nameSpaceCrit = Restrictions.eq("nameSpace", onboardingApp.nameSpace); + if (onboardingApp.getRolesInAAF()) { + nameSpaceCrit = Restrictions.eq("nameSpace", onboardingApp.getNameSpace()); orCrit = Restrictions.or(nameCrit, nameSpaceCrit); } else orCrit = Restrictions.or(nameCrit); @@ -884,12 +884,12 @@ public class EPAppCommonServiceImpl implements EPAppService { apps = (List<EPApp>) dataAccessService.getList(EPApp.class, null, restrictionsList, null); } else { List<Criterion> restrictionsList = new ArrayList<Criterion>(); - Criterion idCrit =Restrictions.eq("id", onboardingApp.id); - Criterion nameCrit = Restrictions.eq("name",onboardingApp.name); + Criterion idCrit =Restrictions.eq("id", onboardingApp.getId()); + Criterion nameCrit = Restrictions.eq("name",onboardingApp.getAppName()); Criterion nameSpaceCrit = null; Criterion orCrit= null; - if (onboardingApp.isCentralAuth) { - nameSpaceCrit = Restrictions.eq("nameSpace",onboardingApp.nameSpace); + if (onboardingApp.getRolesInAAF()) { + nameSpaceCrit = Restrictions.eq("nameSpace",onboardingApp.getNameSpace()); orCrit = Restrictions.or(idCrit, nameSpaceCrit, nameCrit); } else @@ -900,16 +900,16 @@ public class EPAppCommonServiceImpl implements EPAppService { } for (EPApp app : apps) { - if (onboardingApp.id != null && onboardingApp.id.equals(app.getId())) { + if (onboardingApp.getId() != null && onboardingApp.getId().equals(app.getId())) { continue; } - if (!duplicatedName && app.getName().equalsIgnoreCase(onboardingApp.name)) { + if (!duplicatedName && app.getName().equalsIgnoreCase(onboardingApp.getAppName())) { duplicatedName = true; if (duplicatedName) { break; } } - if (!duplicatedNameSpace && app.getNameSpace().equalsIgnoreCase(onboardingApp.nameSpace)) { + if (!duplicatedNameSpace && app.getNameSpace().equalsIgnoreCase(onboardingApp.getNameSpace())) { duplicatedNameSpace = true; if (duplicatedNameSpace) { break; @@ -937,8 +937,8 @@ public class EPAppCommonServiceImpl implements EPAppService { validateOnboardingApp(modifiedOnboardingApp, fieldsValidator); } if (fieldsValidator.httpStatusCode.intValue() == HttpServletResponse.SC_OK) { - if (modifiedOnboardingApp.id != null) { - updateApp(modifiedOnboardingApp.id, modifiedOnboardingApp, fieldsValidator, user); + if (modifiedOnboardingApp.getId() != null) { + updateApp(modifiedOnboardingApp.getId(), modifiedOnboardingApp, fieldsValidator, user); } else { fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST); } @@ -953,7 +953,7 @@ public class EPAppCommonServiceImpl implements EPAppService { validateOnboardingApp(newOnboardingApp, fieldsValidator); } if (fieldsValidator.httpStatusCode.intValue() == HttpServletResponse.SC_OK) { - if (newOnboardingApp.id == null) { + if (newOnboardingApp.getId() == null) { updateApp(null, newOnboardingApp, fieldsValidator, user); } else { fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST); @@ -1211,7 +1211,7 @@ public class EPAppCommonServiceImpl implements EPAppService { logger.debug(EELFLoggerDelegate.debugLogger, "LR: entering updateApp"); // Separate out the code for a restricted app, since it doesn't need any // of the UEB code. - if (onboardingApp.restrictedApp) { + if (Boolean.TRUE.equals(onboardingApp.getRestrictedApp())) { boolean result = false; Session localSession = null; Transaction transaction = null; @@ -1234,7 +1234,7 @@ public class EPAppCommonServiceImpl implements EPAppService { createAppFromOnboarding(app, onboardingApp, localSession); localSession.saveOrUpdate(app); // Enable or disable all menu items associated with this app - setFunctionalMenuItemsEnabled(localSession, onboardingApp.isEnabled, appId); + setFunctionalMenuItemsEnabled(localSession, onboardingApp.getIsEnabled(), appId); transaction.commit(); result = true; } catch (Exception e) { @@ -1300,7 +1300,7 @@ public class EPAppCommonServiceImpl implements EPAppService { logger.debug(EELFLoggerDelegate.debugLogger, "updateRestrictedApp: finished calling localSession.saveOrUpdate"); // Enable or disable all menu items associated with this app - setFunctionalMenuItemsEnabled(localSession, onboardingApp.isEnabled, appId); + setFunctionalMenuItemsEnabled(localSession, onboardingApp.getIsEnabled(), appId); logger.debug(EELFLoggerDelegate.debugLogger, "updateRestrictedApp: finished calling setFunctionalMenuItemsEnabled"); transaction.commit(); @@ -1405,10 +1405,10 @@ public class EPAppCommonServiceImpl implements EPAppService { topicManager.createTopic( PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY), PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_SECRET), - appMailboxName, "ECOMP outbox for app" + onboardingApp.name); + appMailboxName, "ECOMP outbox for app" + onboardingApp.getAppName()); successfullyCreatedMailbox = true; logger.debug(EELFLoggerDelegate.debugLogger, - "Successfully created " + appMailboxName + " for App " + onboardingApp.name); + "Successfully created " + appMailboxName + " for App " + onboardingApp.getAppName()); logger.debug(EELFLoggerDelegate.debugLogger, " Key = " + appKey + " Secret = " + appSecret + " generated using = " + user.getEmail()); break; @@ -1487,7 +1487,7 @@ public class EPAppCommonServiceImpl implements EPAppService { logger.debug(EELFLoggerDelegate.debugLogger, "LR: updateApp: finished calling localSession.saveOrUpdate"); // Enable or disable all menu items associated with this app - setFunctionalMenuItemsEnabled(localSession, onboardingApp.isEnabled, appId); + setFunctionalMenuItemsEnabled(localSession, onboardingApp.getIsEnabled(), appId); logger.debug(EELFLoggerDelegate.debugLogger, "LR: updateApp: finished calling setFunctionalMenuItemsEnabled"); transaction.commit(); @@ -1528,27 +1528,35 @@ public class EPAppCommonServiceImpl implements EPAppService { */ @Override public void createOnboardingFromApp(EPApp app, OnboardingApp onboardingApp) { - onboardingApp.id = app.getId(); - onboardingApp.name = app.getName(); - onboardingApp.imageUrl = app.getImageUrl(); - onboardingApp.description = app.getDescription(); - onboardingApp.notes = app.getNotes(); - onboardingApp.url = app.getUrl(); - onboardingApp.alternateUrl = app.getAlternateUrl(); - onboardingApp.restUrl = app.getAppRestEndpoint(); - onboardingApp.isOpen = app.getOpen(); - onboardingApp.isEnabled = app.getEnabled(); - onboardingApp.username = app.getUsername(); - onboardingApp.appPassword = (app.getAppPassword().equals(EPCommonSystemProperties.APP_DISPLAY_PASSWORD)) ? EPCommonSystemProperties.APP_DISPLAY_PASSWORD :decryptedPassword(app.getAppPassword(), app); - onboardingApp.uebTopicName = app.getUebTopicName(); - onboardingApp.uebKey = app.getUebKey(); - onboardingApp.uebSecret = app.getUebSecret(); - onboardingApp.isCentralAuth = app.getCentralAuth(); - onboardingApp.nameSpace = app.getNameSpace(); + onboardingApp.setId(app.getId()); + onboardingApp.setAppName(app.getName()); + onboardingApp.setImageUrl(app.getImageUrl()); + onboardingApp.setAppDescription(app.getAppDescription()); + onboardingApp.setAppNotes(app.getAppNotes()); + onboardingApp.setLandingPage(app.getLandingPage()); + onboardingApp.setAlternateLandingPage(app.getAlternateLandingPage()); + onboardingApp.setRestUrl(app.getAppRestEndpoint()); + onboardingApp.setIsOpen(app.getOpen()); + onboardingApp.setIsEnabled(app.getEnabled()); + onboardingApp.setAppBasicAuthUsername(app.getAppBasicAuthUsername()); + + String effectivePwd = null; + if (app.getAppBasicAuthPassword().equals(EPCommonSystemProperties.APP_DISPLAY_PASSWORD)) + effectivePwd = EPCommonSystemProperties.APP_DISPLAY_PASSWORD; + else + effectivePwd = decryptedPassword(app.getAppBasicAuthPassword(), app); + + onboardingApp.setAppBasicAuthPassword(effectivePwd); + onboardingApp.setUebTopicName(app.getUebTopicName()); + onboardingApp.setUebKey(app.getUebKey()); + onboardingApp.setUebSecret(app.getUebSecret()); + onboardingApp.setRolesInAAF(app.getRolesInAAF()); + onboardingApp.setNameSpace(app.getNameSpace()); onboardingApp.setRestrictedApp(app.isRestrictedApp()); - // if (app.getThumbnail() != null) - // onboardingApp.thumbnail = new - // String(Base64.getEncoder().encode(app.getThumbnail())); + onboardingApp.setModeOfIntegration(app.getModeOfIntegration()); + onboardingApp.setAppAck(app.getAppAck()); + onboardingApp.setUsesCadi(app.getUsesCadi()); + onboardingApp.setApplicationType(app.getAppType().toString()); } /** @@ -1561,26 +1569,31 @@ public class EPAppCommonServiceImpl implements EPAppService { * @return The first argument. */ protected EPApp createAppFromOnboarding(EPApp app, OnboardingApp onboardingApp, Session localSession) { - app.setName(onboardingApp.name); - app.setDescription(onboardingApp.description); - app.setNotes(onboardingApp.notes); - app.setUrl(onboardingApp.url); - app.setAlternateUrl(onboardingApp.alternateUrl); - app.setAppRestEndpoint(onboardingApp.restUrl); - app.setOpen(onboardingApp.isOpen); - app.setEnabled(onboardingApp.isEnabled); - app.setUsername(onboardingApp.username); - if(!onboardingApp.appPassword.equals(EPCommonSystemProperties.APP_DISPLAY_PASSWORD)) - app.setAppPassword(this.encryptedPassword(onboardingApp.appPassword, app)); + app.setName(onboardingApp.getAppName()); + app.setAppDescription(onboardingApp.getAppDescription()); + app.setAppNotes(onboardingApp.getAppNotes()); + app.setLandingPage(onboardingApp.getLandingPage()); + app.setAlternateLandingPage(onboardingApp.getAlternateLandingPage()); + app.setAppRestEndpoint(onboardingApp.getRestUrl()); + app.setOpen(onboardingApp.getIsOpen()); + app.setEnabled(onboardingApp.getIsEnabled()); + app.setAppBasicAuthUsername(onboardingApp.getAppBasicAuthUsername()); + if(!onboardingApp.getAppBasicAuthPassword().equals(EPCommonSystemProperties.APP_DISPLAY_PASSWORD)) + app.setAppBasicAuthPassword(this.encryptedPassword(onboardingApp.getAppBasicAuthPassword(), app)); //app.setUebTopicName(onboardingApp.uebTopicName); - app.setUebKey(onboardingApp.uebKey); - app.setUebSecret(onboardingApp.uebSecret); - app.setCentralAuth(onboardingApp.isCentralAuth); - app.setNameSpace(onboardingApp.nameSpace); - app.setRestrictedApp(onboardingApp.restrictedApp); - if (!StringUtils.isEmpty(onboardingApp.thumbnail)) { + app.setUebKey(onboardingApp.getUebKey()); + app.setUebSecret(onboardingApp.getUebSecret()); + app.setRolesInAAF(onboardingApp.getRolesInAAF()); + app.setNameSpace(onboardingApp.getNameSpace()); + app.setAppType(new Integer(onboardingApp.getApplicationType())); + app.setModeOfIntegration(onboardingApp.getModeOfIntegration()); + app.setAppAck(onboardingApp.getAppAck()); + app.setUsesCadi(onboardingApp.getUsesCadi()); + + + if (!StringUtils.isEmpty(onboardingApp.getThumbnail())) { logger.debug(EELFLoggerDelegate.debugLogger, "createAppFromOnboarding: onboarding thumbnail is NOT empty"); - String[] splitBase64Thumbnail = onboardingApp.thumbnail.split("base64,"); + String[] splitBase64Thumbnail = onboardingApp.getThumbnail().split("base64,"); logger.debug(EELFLoggerDelegate.debugLogger, "createAppFromOnboarding: length of splitBase64Thumbnail: " + splitBase64Thumbnail.length); if (splitBase64Thumbnail.length > 1) { @@ -1592,7 +1605,7 @@ public class EPAppCommonServiceImpl implements EPAppService { app.setImageUrl(constructImageName(onboardingApp)); app.setThumbnail(decodedImage); } - } else if (app.getThumbnail() != null && onboardingApp.imageLink == null) { + } else if (app.getThumbnail() != null && onboardingApp.getImageLink() == null) { // The thumbnail that came in from the json is empty; the previous // thumbnail is NOT empty. Must delete it. logger.debug(EELFLoggerDelegate.debugLogger, @@ -1607,7 +1620,7 @@ public class EPAppCommonServiceImpl implements EPAppService { } protected String constructImageName(OnboardingApp onboardingApp) { - return "portal_" + String.valueOf(onboardingApp.url.hashCode() + "_" + (int) (Math.random() * 100000.0)) + return "portal_" + String.valueOf(onboardingApp.getLandingPage().hashCode() + "_" + (int) (Math.random() * 100000.0)) + ".png"; } @@ -1929,9 +1942,11 @@ public class EPAppCommonServiceImpl implements EPAppService { logger.debug(EELFLoggerDelegate.debugLogger, "checkIfNameSpaceExists: Connecting to External Auth system for : "+namespace); ResponseEntity<String> response = null; try { - response = template - .exchange(SystemProperties.getProperty(EPCommonSystemProperties.EXTERNAL_CENTRAL_ACCESS_URL) - + "nss/" + namespace, HttpMethod.GET, entity, String.class); + + String namespaceUrl = SystemProperties. + getProperty(EPCommonSystemProperties.EXTERNAL_CENTRAL_ACCESS_URL) + "nss/" + namespace; + + response = template.exchange(namespaceUrl, HttpMethod.GET, entity, String.class); logger.debug(EELFLoggerDelegate.debugLogger, "checkIfNameSpaceExists for"+ namespace , response.getStatusCode().value()); if (response.getStatusCode().value() == 200) { diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImpl.java index 241468c3..ad06dd96 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImpl.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImpl.java @@ -1183,13 +1183,13 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic .setModified(epApp.getModified()).setCreatedId(epApp.getCreatedId()) .setModifiedId(epApp.getModifiedId()).setRowNum(epApp.getRowNum()) .setName(epApp.getName()).setImageUrl(epApp.getImageUrl()) - .setDescription(epApp.getDescription()).setNotes(epApp.getNotes()) - .setUrl(epApp.getUrl()).setAlternateUrl(epApp.getAlternateUrl()) + .setDescription(epApp.getAppDescription()).setNotes(epApp.getAppNotes()) + .setUrl(epApp.getLandingPage()).setAlternateUrl(epApp.getLandingPage()) .setRestEndpoint(epApp.getAppRestEndpoint()).setMlAppName(epApp.getMlAppName()) .setMlAppAdminId(epApp.getMlAppAdminId()).setMotsId(String.valueOf(epApp.getMotsId())) - .setAppPassword(epApp.getAppPassword()).setOpen(String.valueOf(epApp.getOpen())) + .setAppPassword(epApp.getAppBasicAuthPassword()).setOpen(String.valueOf(epApp.getOpen())) .setEnabled(String.valueOf(epApp.getEnabled())).setThumbnail(epApp.getThumbnail()) - .setUsername(epApp.getUsername()).setUebKey(epApp.getUebKey()) + .setUsername(epApp.getAppBasicAuthUsername()).setUebKey(epApp.getUebKey()) .setUebSecret(epApp.getUebSecret()).setUebTopicName(epApp.getUebTopicName()) .createCentralApp(); cenApp.setAppPassword(EPCommonSystemProperties.APP_DISPLAY_PASSWORD); @@ -3005,7 +3005,7 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic params.put("uebKey", app.getUebKey()); List<BulkUploadUserRoles> userRolesList = null; Integer userRolesAdded = 0; - if (app.getCentralAuth()) { + if (app.getRolesInAAF()) { userRolesList = dataAccessService.executeNamedQuery("getBulkUserRoles", params, null); for (BulkUploadUserRoles userRolesUpload : userRolesList) { if (!userRolesUpload.getOrgUserId().equals("su1234")) { @@ -3602,7 +3602,7 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic params.put("roleId", String.valueOf(roleId)); List<BulkUploadUserRoles> userRolesList = null; Integer userRolesAdded = 0; - if (app.getCentralAuth()) { + if (app.getRolesInAAF()) { userRolesList = dataAccessService.executeNamedQuery("getBulkUsersForSingleRole", params, null); for (BulkUploadUserRoles userRolesUpload : userRolesList) { userRolesUpload.setRoleName(modifiedRoleName); diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java index 4924e654..db860057 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java @@ -376,7 +376,7 @@ public class UserRolesCommonServiceImpl { .setParameter("appId",appId) .list(); for (EPRole role : roles) { - if (!extRequestValue && app.getCentralAuth()) { + if (!extRequestValue && app.getRolesInAAF()) { rolesMap.put(role.getId(), role); } else { rolesMap.put(role.getAppRoleId(), role); @@ -1091,7 +1091,7 @@ public class UserRolesCommonServiceImpl { Boolean systemUser = (newAppRolesForUser.getIsSystemUser() != null ? newAppRolesForUser.getIsSystemUser() : false); - if ((app.getCentralAuth() || app.getId().equals(PortalConstants.PORTAL_APP_ID)) && systemUser) { + if ((app.getRolesInAAF() || app.getId().equals(PortalConstants.PORTAL_APP_ID)) && systemUser) { Set<EcompRole> userRolesInLocalApp = postUsersRolesToLocalApp(roleInAppForUserList, mapper, applicationsRestClientService, appId, userId); @@ -1108,12 +1108,12 @@ public class UserRolesCommonServiceImpl { result = applyChangesInUserRolesForAppToEcompDB(rolesInAppForUser, epRequestValue, "Portal", systemUser,rolesGotDeletedByApprover,false); - }else if (!app.getCentralAuth() && systemUser) + }else if (!app.getRolesInAAF() && systemUser) { throw new Exception("For non-centralized application we cannot add systemUser"); } else{ // if centralized app - if (app.getCentralAuth()) { + if (app.getRolesInAAF()) { if (!app.getId().equals(PortalConstants.PORTAL_APP_ID)) { pushRemoteUser(roleInAppForUserList, userId, app, mapper, searchService, applicationsRestClientService,false); @@ -1133,7 +1133,7 @@ public class UserRolesCommonServiceImpl { result = applyChangesInUserRolesForAppToEcompDB(rolesInAppForUser, epRequestValue, "Portal", systemUser,rolesGotDeletedFromApprover,checkIfUserisOnlyRoleAdmin); } // In case if portal is not centralized then follow existing approach - else if(!app.getCentralAuth() && app.getId().equals(PortalConstants.PORTAL_APP_ID)){ + else if(!app.getRolesInAAF() && app.getId().equals(PortalConstants.PORTAL_APP_ID)){ Set<EcompRole> userRolesInLocalApp = postUsersRolesToLocalApp(roleInAppForUserList, mapper, applicationsRestClientService, appId, userId); RolesInAppForUser rolesInAppForUser = constructRolesInAppForUserUpdate(userId, appId, @@ -1142,7 +1142,7 @@ public class UserRolesCommonServiceImpl { result = applyChangesInUserRolesForAppToEcompDB(rolesInAppForUser, epRequestValue, "Portal",false,rolesGotDeletedByApprover,false); } else{// remote app EPUser remoteAppUser = null; - if(!app.getCentralAuth() && !app.getId().equals(PortalConstants.PORTAL_APP_ID)){ + if(!app.getRolesInAAF() && !app.getId().equals(PortalConstants.PORTAL_APP_ID)){ remoteAppUser = checkIfRemoteUserExits(userId, app, applicationsRestClientService); @@ -1620,7 +1620,7 @@ public class UserRolesCommonServiceImpl { } //If Non-Centralized app make sure you sync app roles before assigning to user - if (!app.getId().equals(PortalConstants.PORTAL_APP_ID) && !app.getCentralAuth()) { + if (!app.getId().equals(PortalConstants.PORTAL_APP_ID) && !app.getRolesInAAF()) { logger.debug(EELFLoggerDelegate.debugLogger, "setExternalRequestUserAppRole: Starting GET roles for app {}",app.getId()); EcompRole[] appRoles = applicationsRestClientService.get(EcompRole[].class, app.getId(), "/roles"); logger.debug(EELFLoggerDelegate.debugLogger, "setExternalRequestUserAppRole: Finshed GET roles for app {} and payload {}",app.getId(), appRoles); @@ -1647,7 +1647,7 @@ public class UserRolesCommonServiceImpl { .anyMatch(roleList -> roleList.getRoleId().equals(PortalConstants.ACCOUNT_ADMIN_ROLE_ID)); } // if Centralized app - if (app.getCentralAuth()) { + if (app.getRolesInAAF()) { // We should add If user does not exist in remote application try { // If adding just account admin role dont make remote application user call or @@ -1686,7 +1686,7 @@ public class UserRolesCommonServiceImpl { result = applyChangesInUserRolesForAppToEcompDB(rolesInAppForUser, externalSystemRequest, reqType,false,rolesGotDeletedByApprover,false); } // If local application is not centralized - else if(!app.getCentralAuth() && app.getId().equals(PortalConstants.PORTAL_APP_ID)){ + else if(!app.getRolesInAAF() && app.getId().equals(PortalConstants.PORTAL_APP_ID)){ Set<EcompRole> userRolesInLocalApp = postUsersRolesToLocalApp(roleInAppForUserList, mapper, applicationsRestClientService, app.getId(), orgUserId); RolesInAppForUser rolesInAppForUser = constructRolesInAppForUserUpdate(orgUserId, app.getId(), @@ -1896,7 +1896,7 @@ public class UserRolesCommonServiceImpl { // for onap portal app, no need to make a remote call List<Role> roleList = new ArrayList<>(); if (appId == PortalConstants.PORTAL_APP_ID) { - if(app.getCentralAuth()){ + if(app.getRolesInAAF()){ List<CentralV2Role> cenRoleList = externalAccessRolesService.getRolesForApp(app.getUebKey()); for(CentralV2Role cenRole : cenRoleList){ Role role = new Role(); @@ -1935,7 +1935,7 @@ public class UserRolesCommonServiceImpl { EcompRole[] appRoles = null; boolean checkIfUserisApplicationAccAdmin = false; List<EcompRole> roles = new ArrayList<>(); - if (app.getCentralAuth()) { + if (app.getRolesInAAF()) { final Map<String, Long> appParams = new HashMap<>(); appParams.put("appId", app.getId()); List<EPRole> applicationRoles = dataAccessService.executeNamedQuery("getActiveRolesOfApplication", @@ -2038,14 +2038,14 @@ public class UserRolesCommonServiceImpl { // If there is an exception in the rest client api, then null will // be returned. if (appRoles != null) { - if(!app.getCentralAuth()) { + if(!app.getRolesInAAF()) { syncAppRoles(sessionFactory, appId, appRoles); } EcompRole[] userAppRoles = null; try { try { - if(app.getCentralAuth()){ + if(app.getRolesInAAF()){ final Map<String, String> params = new HashMap<>(); final Map<String, Long> userParams = new HashMap<>(); params.put("orgUserIdValue", userId); @@ -2315,7 +2315,7 @@ public class UserRolesCommonServiceImpl { EPApp app = appsService.getApp(appId); //If local or centralized application - if (appId == PortalConstants.PORTAL_APP_ID || app.getCentralAuth()) { + if (appId == PortalConstants.PORTAL_APP_ID || app.getRolesInAAF()) { Map<String, Object> params = new HashMap<>(); params.put("id", app.getId()); params.put("active", true); diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/OnboardingApp.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/OnboardingApp.java index 37ad5add..d1b2a568 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/OnboardingApp.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/transport/OnboardingApp.java @@ -38,6 +38,7 @@ package org.onap.portalapp.portal.transport; import org.hibernate.validator.constraints.SafeHtml; +import org.onap.portalapp.portal.domain.EpAppType; /** * Model of rows in the fn_app table; serialized as a message add or update an @@ -45,81 +46,301 @@ import org.hibernate.validator.constraints.SafeHtml; */ public class OnboardingApp { - public Long id; + private Long id; @SafeHtml - public String name; + private String appName; @SafeHtml - public String imageUrl; + private String imageUrl; @SafeHtml - public String imageLink; + private String imageLink; @SafeHtml - public String description; + private String appDescription; @SafeHtml - public String notes; + private String appNotes; @SafeHtml - public String url; + private String landingPage; @SafeHtml - public String alternateUrl; + private String alternateLandingPage; @SafeHtml - public String restUrl; + private String restUrl; - public Boolean isOpen; + @SafeHtml + private String applicationType; + + private Boolean isOpen; - public Boolean isEnabled; + private Boolean isEnabled; - public Long motsId; + private Long motsId; @SafeHtml - public String myLoginsAppName; + private String myLoginsAppName; @SafeHtml - public String myLoginsAppOwner; + private String myLoginsAppOwner; @SafeHtml - public String username; + private String appBasicAuthUsername; @SafeHtml - public String appPassword; + private String appBasicAuthPassword; @SafeHtml - public String thumbnail; + private String thumbnail; @SafeHtml - public String uebTopicName; + private String uebTopicName; @SafeHtml - public String uebKey; + private String uebKey; @SafeHtml - public String uebSecret; + private String uebSecret; - public Boolean restrictedApp; + private Boolean restrictedApp; - public Boolean isCentralAuth; + private Boolean rolesInAAF; + @SafeHtml + private String nameSpace; + @SafeHtml - public String nameSpace; + private String modeOfIntegration; + private Boolean appAck; + + private Boolean usesCadi; + /** * Sets the name, myLoginsAppName, myLoginsAppOwner, username and * appPassword fields to the empty string OR trims leading/trailing space, * as appropriate. */ public void normalize() { - this.name = (this.name == null) ? "" : this.name.trim(); + this.appName = (this.appName == null) ? "" : this.appName.trim(); this.myLoginsAppName = (this.myLoginsAppName == null) ? "" : this.myLoginsAppName.trim(); this.myLoginsAppOwner = (this.myLoginsAppOwner == null) ? "" : this.myLoginsAppOwner.trim(); - this.username = (this.username == null) ? "" : this.username.trim(); - this.appPassword = (this.appPassword == null) ? "" : this.appPassword.trim(); + this.appBasicAuthUsername = (this.appBasicAuthUsername == null) ? "" : this.appBasicAuthUsername.trim(); + this.appBasicAuthPassword = (this.appBasicAuthPassword == null) ? "" : this.appBasicAuthPassword.trim(); + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getAppName() { + return appName; + } + + public void setAppName(String appName) { + this.appName = appName; + } + + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + } + + public String getImageLink() { + return imageLink; + } + + public void setImageLink(String imageLink) { + this.imageLink = imageLink; + } + + public String getAppDescription() { + return appDescription; + } + + public void setAppDescription(String appDescription) { + this.appDescription = appDescription; + } + + public String getAppNotes() { + return appNotes; + } + + public void setAppNotes(String appNotes) { + this.appNotes = appNotes; + } + + public String getLandingPage() { + return landingPage; + } + + public void setLandingPage(String landingPage) { + this.landingPage = landingPage; } - public void setUebTopicName(String topicName) { - this.uebTopicName = topicName; + public String getAlternateLandingPage() { + return alternateLandingPage; } - public void setUebKey(String key) { - this.uebKey = key; + public void setAlternateLandingPage(String alternateLandingPage) { + this.alternateLandingPage = alternateLandingPage; } - public void setUebSecret(String secret) { - this.uebSecret = secret; + public String getRestUrl() { + return restUrl; } - // Hide the implementation of restricted and normal app from the front end. - // The json sent and received will include restrictedApp but not appType. + public void setRestUrl(String restUrl) { + this.restUrl = restUrl; + } + + public Boolean getIsOpen() { + return isOpen; + } + + public void setIsOpen(Boolean isOpen) { + this.isOpen = isOpen; + } + + public Boolean getIsEnabled() { + return isEnabled; + } + + public void setIsEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + } + + public Long getMotsId() { + return motsId; + } + + public void setMotsId(Long motsId) { + this.motsId = motsId; + } + + public String getMyLoginsAppName() { + return myLoginsAppName; + } + + public void setMyLoginsAppName(String myLoginsAppName) { + this.myLoginsAppName = myLoginsAppName; + } + + public String getMyLoginsAppOwner() { + return myLoginsAppOwner; + } + + public void setMyLoginsAppOwner(String myLoginsAppOwner) { + this.myLoginsAppOwner = myLoginsAppOwner; + } + + public String getAppBasicAuthUsername() { + return appBasicAuthUsername; + } + + public void setAppBasicAuthUsername(String appBasicAuthUsername) { + this.appBasicAuthUsername = appBasicAuthUsername; + } + + public String getAppBasicAuthPassword() { + return appBasicAuthPassword; + } + + public void setAppBasicAuthPassword(String appBasicAuthPassword) { + this.appBasicAuthPassword = appBasicAuthPassword; + } + + public String getThumbnail() { + return thumbnail; + } + + public void setThumbnail(String thumbnail) { + this.thumbnail = thumbnail; + } + + public String getUebTopicName() { + return uebTopicName; + } + + public void setUebTopicName(String uebTopicName) { + this.uebTopicName = uebTopicName; + } + + public String getUebKey() { + return uebKey; + } + + public void setUebKey(String uebKey) { + this.uebKey = uebKey; + } + + public String getUebSecret() { + return uebSecret; + } + + public void setUebSecret(String uebSecret) { + this.uebSecret = uebSecret; + } + + public Boolean getRestrictedApp() { + return restrictedApp; + } public void setRestrictedApp(Boolean restrictedApp) { this.restrictedApp = restrictedApp; } + + public Boolean getRolesInAAF() { + return rolesInAAF; + } + + public void setRolesInAAF(Boolean rolesInAAF) { + this.rolesInAAF = rolesInAAF; + } + + public String getNameSpace() { + return nameSpace; + } + + public void setNameSpace(String nameSpace) { + this.nameSpace = nameSpace; + } + + public String getModeOfIntegration() { + return modeOfIntegration; + } + + public void setModeOfIntegration(String modeOfIntegration) { + this.modeOfIntegration = modeOfIntegration; + } + + public Boolean getAppAck() { + return appAck; + } + + public void setAppAck(Boolean appAck) { + this.appAck = appAck; + } + + public Boolean getUsesCadi() { + return usesCadi; + } + + public void setUsesCadi(Boolean usesCadi) { + this.usesCadi = usesCadi; + } + + public String getApplicationType() { + return applicationType; + } + + public void setApplicationType(String applicationType) { + this.applicationType = applicationType; + } + + public Integer appTypePersistedValue() { + switch (this.getApplicationType()) { + case EpAppType.GUI_STR: + return EpAppType.GUI; + case EpAppType.HYPERLINK_STR: + return EpAppType.HYPERLINK; + case EpAppType.NONGUI_STR: + return EpAppType.NONGUI; + default: + return 0; + } + } } diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/service/sessionmgt/SessionCommunication.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/service/sessionmgt/SessionCommunication.java index 14616b31..441e99a7 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/service/sessionmgt/SessionCommunication.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/service/sessionmgt/SessionCommunication.java @@ -85,12 +85,12 @@ public class SessionCommunication { String appResponse = ""; String appName = ""; int responseCode = 0; - if (app != null && app.name != null && app.name != "") { + if (app != null && app.getAppName() != null && app.getAppName() != "") { try { - appName = app.name; - String url = app.restUrl + "/sessionTimeOuts"; - String encriptedPwdDB = app.appPassword; - String appUserName = app.username; + appName = app.getAppName(); + String url = app.getRestUrl() + "/sessionTimeOuts"; + String encriptedPwdDB = app.getAppBasicAuthPassword(); + String appUserName = app.getAppBasicAuthUsername(); setLocalMDCContext(app, "/sessionTimeOuts", url); @@ -157,12 +157,12 @@ public class SessionCommunication { try { if (app == null) throw new Exception("SessionCommunication.pingSession: app is null"); - if (app != null && app.name != null && app.name != "") { - appName = app.name; + if (app != null && app.getAppName() != null && app.getAppName() != "") { + appName = app.getAppName(); } - String url = app.restUrl + "/updateSessionTimeOuts"; - String encriptedPwdDB = app.appPassword; - String appUserName = app.username; + String url = app.getRestUrl() + "/updateSessionTimeOuts"; + String encriptedPwdDB = app.getAppBasicAuthPassword(); + String appUserName = app.getAppBasicAuthUsername(); setLocalMDCContext(app, "/updateSessionTimeOuts", url); @@ -218,13 +218,13 @@ public class SessionCommunication { public Boolean timeoutSession(OnboardingApp app, String portalJSessionId) throws Exception { String appName = "Unknwon"; int responseCode = 0; - if (app != null && app.name != null && app.name != "") { + if (app != null && app.getAppName() != null && app.getAppName() != "") { try { - appName = app.name; - String url = app.restUrl + "/timeoutSession" + "?portalJSessionId=" + portalJSessionId; + appName = app.getAppName(); + String url = app.getRestUrl() + "/timeoutSession" + "?portalJSessionId=" + portalJSessionId; - String encriptedPwdDB = app.appPassword; - String appUserName = app.username; + String encriptedPwdDB = app.getAppBasicAuthPassword(); + String appUserName = app.getAppBasicAuthUsername(); // String decreptedPwd = CipherUtil.decrypt(encriptedPwdDB, // SystemProperties.getProperty(SystemProperties.Decryption_Key)); @@ -287,7 +287,7 @@ public class SessionCommunication { MDC.put(EPCommonSystemProperties.PROTOCOL, EPCommonSystemProperties.HTTPS); } MDC.put(EPCommonSystemProperties.FULL_URL, url); - MDC.put(EPCommonSystemProperties.TARGET_ENTITY, app.myLoginsAppName); + MDC.put(EPCommonSystemProperties.TARGET_ENTITY, app.getMyLoginsAppName()); MDC.put(EPCommonSystemProperties.TARGET_SERVICE_NAME, restPath); } @@ -332,15 +332,15 @@ public class SessionCommunication { Map<String,String> headersMap = new HashMap<>(); EPApp externalApp = null; - if(app.appPassword.isEmpty() || app.appPassword==null){ + if(app.getAppBasicAuthPassword().isEmpty() || app.getAppBasicAuthPassword()==null){ logger.debug(EELFLoggerDelegate.debugLogger, "Entering in the externalApp get app password contains null : {}"); externalApp = appsCacheService.getApp(1L); logger.debug(EELFLoggerDelegate.debugLogger, "external App Information : {}",externalApp); - String mechidUsername=externalApp.getUsername(); + String mechidUsername=externalApp.getAppBasicAuthUsername(); logger.debug(EELFLoggerDelegate.debugLogger, "external App mechidUsername Information : {}",mechidUsername); - String password=externalApp.getAppPassword(); + String password=externalApp.getAppBasicAuthPassword(); String decreptedexternalAppPwd = StringUtils.EMPTY; try { decreptedexternalAppPwd = CipherUtil.decryptPKC(password, @@ -353,8 +353,8 @@ public class SessionCommunication { encriptedPwdDB = decreptedexternalAppPwd; }else{ - appUserName = app.username; - encriptedPwdDB = app.appPassword; + appUserName = app.getAppBasicAuthUsername(); + encriptedPwdDB = app.getAppBasicAuthPassword(); } headersMap.put("username", appUserName); diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/service/sessionmgt/TimeoutHandler.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/service/sessionmgt/TimeoutHandler.java index a60266cf..2b8d6d43 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/service/sessionmgt/TimeoutHandler.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/service/sessionmgt/TimeoutHandler.java @@ -132,19 +132,19 @@ public class TimeoutHandler extends QuartzJobBean { Map<Long, Map<String, TimeoutVO>> appSessionTimeOutMap = new Hashtable<Long, Map<String, TimeoutVO>>(); // determine the Max TimeOut Time for each of the managed sessions for (OnboardingApp app : appList) { - if (app.restUrl == null) { - logger.info(EELFLoggerDelegate.debugLogger, "Session Management: null restUrl, not fetching from app " + app.name); + if (app.getRestUrl() == null) { + logger.info(EELFLoggerDelegate.debugLogger, "Session Management: null restUrl, not fetching from app " + app.getAppName()); continue; } - logger.info(EELFLoggerDelegate.debugLogger, "Session Management: Calling App " + app.name + " at URL " + app.restUrl); + logger.info(EELFLoggerDelegate.debugLogger, "Session Management: Calling App " + app.getAppName() + " at URL " + app.getRestUrl()); String jsonSessionStr = fetchAppSessions(app); - logger.info(EELFLoggerDelegate.debugLogger, "Session Management: App " + app.name + " returned " + jsonSessionStr); + logger.info(EELFLoggerDelegate.debugLogger, "Session Management: App " + app.getAppName() + " returned " + jsonSessionStr); if (jsonSessionStr == null || jsonSessionStr.isEmpty()) continue; try { Map<String, TimeoutVO> sessionTimeoutMap = mapper.readValue(jsonSessionStr, typeRef); - appSessionTimeOutMap.put(app.id, sessionTimeoutMap); + appSessionTimeOutMap.put(app.getId(), sessionTimeoutMap); for (String portalJSessionId : sessionTimeoutMap.keySet()) { final TimeoutVO maxTimeoutVO = portalSessionTimeoutMap.get(portalJSessionId); final TimeoutVO compareTimeoutVO = sessionTimeoutMap.get(portalJSessionId); @@ -168,12 +168,12 @@ public class TimeoutHandler extends QuartzJobBean { // post the updated session timeouts back to the Apps for (OnboardingApp app : appList) { - if (app.restUrl == null) { - logger.warn(EELFLoggerDelegate.errorLogger, "Session Management: null restUrl, not posting back to app " + app.name); + if (app.getRestUrl() == null) { + logger.warn(EELFLoggerDelegate.errorLogger, "Session Management: null restUrl, not posting back to app " + app.getAppName()); continue; } - Map<String, TimeoutVO> sessionTimeoutMap = appSessionTimeOutMap.get(app.id); + Map<String, TimeoutVO> sessionTimeoutMap = appSessionTimeOutMap.get(app.getId()); if (sessionTimeoutMap == null || sessionTimeoutMap.isEmpty()) continue; @@ -184,7 +184,7 @@ public class TimeoutHandler extends QuartzJobBean { if (maxTimeoutVO == null || setTimeoutVO == null) { String message = String.format( "Session Management: Failed to update the session timeouts for the app: %s and the sessionId: %s.", - app.name, portalJSessionId); + app.getAppName(), portalJSessionId); logger.warn(EELFLoggerDelegate.errorLogger, message); continue; } @@ -194,7 +194,7 @@ public class TimeoutHandler extends QuartzJobBean { continue; } } - logger.info(EELFLoggerDelegate.debugLogger, "Session Management: Updating App " + app.restUrl); + logger.info(EELFLoggerDelegate.debugLogger, "Session Management: Updating App " + app.getRestUrl()); String sessionTimeoutMapStr = ""; try { sessionTimeoutMapStr = mapper.writeValueAsString(sessionTimeoutMap); diff --git a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml index 961006cc..5401ee95 100644 --- a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml +++ b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml @@ -328,10 +328,10 @@ <column name="app_name" not-null="true" default="?"></column> </property> <property name="imageUrl" column="app_image_url" /> - <property name="description" column="app_description" /> - <property name="notes" column="app_notes" /> - <property name="url" column="app_url" /> - <property name="alternateUrl" column="app_alternate_url" /> + <property name="appDescription" column="app_description" /> + <property name="appNotes" column="app_notes" /> + <property name="landingPage" column="app_url" /> + <property name="alternateLandingPage" column="app_alternate_url" /> <property name="appRestEndpoint" column="app_rest_endpoint" /> <property name="mlAppName" type="string"> <column name="ml_app_name" not-null="true" default="?"></column> @@ -340,11 +340,11 @@ <column name="ml_app_admin_id" not-null="true" default="?"></column> </property> <property name="motsId" column="mots_id" /> - <property name="appPassword" type="string"> + <property name="appBasicAuthPassword" type="string"> <column name="app_password" not-null="true" default="?"></column> </property> <property name="thumbnail" column="thumbnail" /> - <property name="username" type="string"> + <property name="appBasicAuthUsername" type="string"> <column name="app_username" not-null="true" default="?"></column> </property> <property name="open" type="yes_no"> @@ -365,12 +365,22 @@ <property name="appType" type="integer"> <column name="app_type"></column> </property> - <property name="centralAuth" type="yes_no"> + <property name="rolesInAAF" type="yes_no"> <column name="auth_central"></column> </property> <property name="nameSpace" type="string"> <column name="auth_namespace"></column> </property> + <property name="modeOfIntegration" type="string"> + <column name="mode_of_integration"></column> + </property> + <property name="appAck" type="yes_no"> + <column name="ack_app"></column> + </property> + <property name="usesCadi" type="yes_no"> + <column name="uses_cadi"></column> + </property> + <one-to-one name="contactUs" class="AppContactUs" cascade="save-update"></one-to-one> </class> diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppCatalogControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppCatalogControllerTest.java index 1c1d7bc0..8b1fc82d 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppCatalogControllerTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppCatalogControllerTest.java @@ -59,6 +59,7 @@ import org.onap.portalapp.portal.controller.AppCatalogController; import org.onap.portalapp.portal.core.MockEPUser; import org.onap.portalapp.portal.domain.EPApp; import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.domain.EpAppType; import org.onap.portalapp.portal.ecomp.model.AppCatalogItem; import org.onap.portalapp.portal.framework.MockitoTestSuite; import org.onap.portalapp.portal.service.AdminRolesService; @@ -245,23 +246,23 @@ public class AppCatalogControllerTest extends MockitoTestSuite { app.setName("Test"); app.setImageUrl("test"); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 1); app.setAppRestEndpoint("test"); - app.setAlternateUrl("test"); + app.setAlternateLandingPage("test"); app.setName("test"); app.setMlAppName("test"); app.setMlAppAdminId("test"); - app.setUsername("test"); - app.setAppPassword("test"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("test"); app.setOpen(false); app.setEnabled(false); app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.setAppType(1); + app.setAppType(EpAppType.GUI); Mockito.when(appService.getApp(persRequest.getAppId())).thenReturn(app); @@ -302,23 +303,23 @@ public class AppCatalogControllerTest extends MockitoTestSuite { app.setName("Test"); app.setImageUrl("test"); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 1); app.setAppRestEndpoint("test"); - app.setAlternateUrl("test"); + app.setAlternateLandingPage("test"); app.setName("test"); app.setMlAppName("test"); app.setMlAppAdminId("test"); - app.setUsername("test"); - app.setAppPassword("test"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("test"); app.setOpen(false); app.setEnabled(false); app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.setAppType(1); + app.setAppType(EpAppType.GUI); Mockito.when(appService.getApp(persRequest.getAppId())).thenReturn(app); diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppsControllerExternalRequestTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppsControllerExternalRequestTest.java index 4535cf17..6e32846c 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppsControllerExternalRequestTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppsControllerExternalRequestTest.java @@ -268,7 +268,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR); OnboardingApp expectedOnboardingApp = new OnboardingApp(); - expectedOnboardingApp.id = (long) 1; + expectedOnboardingApp.setId(1l); PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest .postOnboardAppExternal(mockedRequest, mockedResponse, expectedOnboardingApp); @@ -285,13 +285,29 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR); OnboardingApp expectedOnboardingApp = new OnboardingApp(); - expectedOnboardingApp.id = null; + expectedOnboardingApp.setId(null); + PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest .postOnboardAppExternal(mockedRequest, mockedResponse, expectedOnboardingApp); assertEquals(actualPortalRestResponse, expectedportalRestResponse); } + + private OnboardingApp createExpectedApp() { + + OnboardingApp expectedOnboardingApp = new OnboardingApp();; + expectedOnboardingApp.setAppName("test"); + expectedOnboardingApp.setLandingPage("test.com"); + expectedOnboardingApp.setRestUrl("<script>alert(/XSS”)</script>"); + expectedOnboardingApp.setMyLoginsAppOwner("testUser"); + expectedOnboardingApp.setRestrictedApp(false); + expectedOnboardingApp.setIsOpen(true); + expectedOnboardingApp.setIsEnabled(true); + return expectedOnboardingApp; + + } + @Test public void postOnboardAppExternalXSSTest() { @@ -302,14 +318,8 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { PortalRestStatusEnum portalRestStatusEnum = null; expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR); - OnboardingApp expectedOnboardingApp = new OnboardingApp();; - expectedOnboardingApp.name = "test"; - expectedOnboardingApp.url="test.com"; - expectedOnboardingApp.restUrl="<script>alert(/XSS”)</script>"; - expectedOnboardingApp.myLoginsAppOwner="testUser"; - expectedOnboardingApp.restrictedApp=false; - expectedOnboardingApp.isOpen=true; - expectedOnboardingApp.isEnabled=true; + OnboardingApp expectedOnboardingApp = createExpectedApp(); + EPUser user = mockUser.mockEPUser(); user.setEmail("guestT@test.portal.onap.org"); user.setLoginPwd("pwd"); @@ -332,8 +342,9 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR); Long appId = null; OnboardingApp expectedOnboardingApp = new OnboardingApp(); - expectedOnboardingApp.id = null; - + + expectedOnboardingApp.setId(null); + PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest .putOnboardAppExternal(mockedRequest, mockedResponse, appId, expectedOnboardingApp); assertEquals(actualPortalRestResponse, expectedportalRestResponse); @@ -348,14 +359,8 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { PortalRestStatusEnum portalRestStatusEnum = null; expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR); - OnboardingApp expectedOnboardingApp = new OnboardingApp();; - expectedOnboardingApp.name = "test"; - expectedOnboardingApp.url="test.com"; - expectedOnboardingApp.restUrl="<script>alert(/XSS”)</script>"; - expectedOnboardingApp.myLoginsAppOwner="testUser"; - expectedOnboardingApp.restrictedApp=false; - expectedOnboardingApp.isOpen=true; - expectedOnboardingApp.isEnabled=true; + OnboardingApp expectedOnboardingApp = createExpectedApp(); + EPUser user = mockUser.mockEPUser(); user.setEmail("guestT@test.portal.onap.org"); user.setLoginPwd("pwd"); @@ -381,7 +386,9 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR); Long appId = (long) 1; OnboardingApp expectedOnboardingApp = new OnboardingApp(); - expectedOnboardingApp.id = (long) 1; + + expectedOnboardingApp.setId(1l); + PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest .putOnboardAppExternal(mockedRequest, mockedResponse, appId, expectedOnboardingApp); assertEquals(actualPortalRestResponse, expectedportalRestResponse); @@ -390,21 +397,14 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { @Test public void putOnboardAppExternalIfOnboardingAppDetailsTest() { PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>(); - expectedportalRestResponse.setMessage("Failed to find user: testUser"); + expectedportalRestResponse.setMessage("Failed to find user: 12"); expectedportalRestResponse.setResponse(null); PortalRestStatusEnum portalRestStatusEnum = null; expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR); Long appId = (long) 1; - OnboardingApp expectedOnboardingApp = new OnboardingApp(); - expectedOnboardingApp.id = (long) 1; - expectedOnboardingApp.name = "test"; - expectedOnboardingApp.url="test.com"; - expectedOnboardingApp.restUrl="test1.com"; - expectedOnboardingApp.myLoginsAppOwner="testUser"; - expectedOnboardingApp.restrictedApp=false; - expectedOnboardingApp.isOpen=true; - expectedOnboardingApp.isEnabled=true; + OnboardingApp expectedOnboardingApp = createOldOnapApp(1l); + EPUser user = mockUser.mockEPUser(); user.setEmail("guestT@test.portal.onap.org"); user.setLoginPwd("pwd"); @@ -422,6 +422,27 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { assertEquals(actualPortalRestResponse, expectedportalRestResponse); } + private OnboardingApp createOldOnapApp(Long id) { + + OnboardingApp oldOnboardApp = new OnboardingApp(); + oldOnboardApp.setId(id); + oldOnboardApp.setAppName("test"); + oldOnboardApp.setLandingPage("test.com"); + oldOnboardApp.setRestUrl("test1.com"); + oldOnboardApp.setMyLoginsAppOwner("12"); + oldOnboardApp.setRestrictedApp(false); + oldOnboardApp.setIsOpen(true); + oldOnboardApp.setIsEnabled(true); + oldOnboardApp.setModeOfIntegration("test"); + oldOnboardApp.setAppAck(false); + oldOnboardApp.setUsesCadi(false); + oldOnboardApp.setModeOfIntegration("test"); + oldOnboardApp.setAppAck(false); + oldOnboardApp.setUsesCadi(false); + + return oldOnboardApp; + } + @Test public void putOnboardAppExternalIfOnboardingAppDetailsTest2() throws Exception { @@ -433,15 +454,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { Long appId = (long) 1; - OnboardingApp oldOnboardApp = new OnboardingApp(); - oldOnboardApp.id = (long) 1; - oldOnboardApp.name = "test"; - oldOnboardApp.url="test.com"; - oldOnboardApp.restUrl="test1.com"; - oldOnboardApp.myLoginsAppOwner="12"; - oldOnboardApp.restrictedApp=false; - oldOnboardApp.isOpen=true; - oldOnboardApp.isEnabled=true; + OnboardingApp oldOnboardApp = createOldOnapApp(1l); EPUser user = mockUser.mockEPUser(); @@ -451,7 +464,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { List<EPUser> expectedList = new ArrayList<EPUser>(); expectedList.add(user); Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user); - Mockito.when(userService.getUserByUserId(oldOnboardApp.myLoginsAppOwner)).thenReturn(expectedList); + Mockito.when(userService.getUserByUserId(oldOnboardApp.getMyLoginsAppOwner())).thenReturn(expectedList); //Mockito.when(userService.saveNewUser(user, "Yes")).thenReturn(null); Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true); @@ -479,15 +492,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { Long appId = (long) 1; - OnboardingApp oldOnboardApp = new OnboardingApp(); - oldOnboardApp.id = (long) 1; - oldOnboardApp.name = "test"; - oldOnboardApp.url="test.com"; - oldOnboardApp.restUrl="test1.com"; - oldOnboardApp.myLoginsAppOwner="12"; - oldOnboardApp.restrictedApp=false; - oldOnboardApp.isOpen=true; - oldOnboardApp.isEnabled=true; + OnboardingApp oldOnboardApp = createOldOnapApp(1l); EPUser user = mockUser.mockEPUser(); @@ -497,7 +502,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { List<EPUser> expectedList = new ArrayList<EPUser>(); expectedList.add(user); Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user); - Mockito.when(userService.getUserByUserId(oldOnboardApp.myLoginsAppOwner)).thenReturn(expectedList); + Mockito.when(userService.getUserByUserId(oldOnboardApp.getMyLoginsAppOwner())).thenReturn(expectedList); //Mockito.when(userService.saveNewUser(user, "Yes")).thenReturn(null); Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true); @@ -524,16 +529,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { Long appId = (long) 1; - OnboardingApp oldOnboardApp = new OnboardingApp(); - oldOnboardApp.id = (long) 1; - oldOnboardApp.name = "test"; - oldOnboardApp.url="test.com"; - oldOnboardApp.restUrl="test1.com"; - oldOnboardApp.myLoginsAppOwner="12"; - oldOnboardApp.restrictedApp=false; - oldOnboardApp.isOpen=true; - oldOnboardApp.isEnabled=true; - + OnboardingApp oldOnboardApp = createOldOnapApp(1l); EPUser user = mockUser.mockEPUser(); user.setEmail("guestT@test.portal.onap.org"); @@ -542,7 +538,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { List<EPUser> expectedList = new ArrayList<EPUser>(); expectedList.add(user); Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user); - Mockito.when(userService.getUserByUserId(oldOnboardApp.myLoginsAppOwner)).thenReturn(expectedList); + Mockito.when(userService.getUserByUserId(oldOnboardApp.getMyLoginsAppOwner())).thenReturn(expectedList); //Mockito.when(userService.saveNewUser(user, "Yes")).thenReturn(null); Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false); @@ -569,17 +565,10 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { user.setLoginId("Test"); Long appId = (long) 1; - OnboardingApp oldOnboardApp = new OnboardingApp(); - oldOnboardApp.id = (long) 1; - oldOnboardApp.name = "test"; - oldOnboardApp.url="test.com"; - oldOnboardApp.restUrl="test1.com"; - oldOnboardApp.myLoginsAppOwner="12"; - oldOnboardApp.restrictedApp=false; - oldOnboardApp.isOpen=true; - oldOnboardApp.isEnabled=true; + OnboardingApp oldOnboardApp = createOldOnapApp(1l); + Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user); - Mockito.when(userService.getUserByUserId(oldOnboardApp.myLoginsAppOwner)).thenThrow(nullPointerException); + Mockito.when(userService.getUserByUserId(oldOnboardApp.getMyLoginsAppOwner())).thenThrow(nullPointerException); PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest .putOnboardAppExternal(mockedRequest, mockedResponse, appId,oldOnboardApp); assertEquals(actualPortalRestResponse, expectedportalRestResponse); @@ -596,18 +585,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { Long appId = (long) 1; - - - OnboardingApp newOnboardApp = new OnboardingApp(); - //newOnboardApp.id = (long) 1; - newOnboardApp.name = "test"; - newOnboardApp.url="test.com"; - newOnboardApp.restUrl="test1.com"; - newOnboardApp.myLoginsAppOwner="12"; - newOnboardApp.restrictedApp=false; - newOnboardApp.isOpen=true; - newOnboardApp.isEnabled=true; - + OnboardingApp newOnboardApp = createOldOnapApp(null); EPUser user = mockUser.mockEPUser(); user.setEmail("guestT@test.portal.onap.org"); @@ -616,7 +594,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { List<EPUser> expectedList = new ArrayList<EPUser>(); expectedList.add(user); Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user); - Mockito.when(userService.getUserByUserId(newOnboardApp.myLoginsAppOwner)).thenReturn(expectedList); + Mockito.when(userService.getUserByUserId(newOnboardApp.getMyLoginsAppOwner())).thenReturn(expectedList); //Mockito.when(userService.saveNewUser(user, "Yes")).thenReturn(null); Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false); @@ -634,25 +612,14 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { public void postOnboardAppExternalIsNotSuperAdminTest() throws Exception { PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>(); - expectedportalRestResponse.setMessage("java.lang.NullPointerException"); + expectedportalRestResponse.setMessage("Unexpected field: id"); expectedportalRestResponse.setResponse(null); PortalRestStatusEnum portalRestStatusEnum = null; expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR); Long appId = (long) 1; - - - OnboardingApp newOnboardApp = new OnboardingApp(); - //newOnboardApp.id = (long) 1; - newOnboardApp.name = "test"; - newOnboardApp.url="test.com"; - newOnboardApp.restUrl="test1.com"; - newOnboardApp.myLoginsAppOwner="12"; - newOnboardApp.restrictedApp=false; - newOnboardApp.isOpen=true; - newOnboardApp.isEnabled=true; - + OnboardingApp newOnboardApp = createOldOnapApp(1l); EPUser user = mockUser.mockEPUser(); user.setEmail("guestT@test.portal.onap.org"); @@ -661,7 +628,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { List<EPUser> expectedList = new ArrayList<EPUser>(); expectedList.add(user); Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user); - Mockito.when(userService.getUserByUserId(newOnboardApp.myLoginsAppOwner)).thenReturn(expectedList); + Mockito.when(userService.getUserByUserId(newOnboardApp.getMyLoginsAppOwner())).thenReturn(expectedList); //Mockito.when(userService.saveNewUser(user, "Yes")).thenReturn(null); Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true); @@ -686,18 +653,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { Long appId = (long) 1; - - - OnboardingApp newOnboardApp = new OnboardingApp(); - //newOnboardApp.id = (long) 1; - newOnboardApp.name = "test"; - newOnboardApp.url="test.com"; - newOnboardApp.restUrl="test1.com"; - newOnboardApp.myLoginsAppOwner="12"; - newOnboardApp.restrictedApp=false; - newOnboardApp.isOpen=true; - newOnboardApp.isEnabled=true; - + OnboardingApp newOnboardApp = createOldOnapApp(null); EPUser user = mockUser.mockEPUser(); user.setEmail("guestT@test.portal.onap.org"); @@ -706,7 +662,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite { List<EPUser> expectedList = new ArrayList<EPUser>(); expectedList.add(user); Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user); - Mockito.when(userService.getUserByUserId(newOnboardApp.myLoginsAppOwner)).thenReturn(expectedList); + Mockito.when(userService.getUserByUserId(newOnboardApp.getMyLoginsAppOwner())).thenReturn(expectedList); //Mockito.when(userService.saveNewUser(user, "Yes")).thenReturn(null); Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true); diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppsControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppsControllerTest.java index f622faca..bd824e45 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppsControllerTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/AppsControllerTest.java @@ -65,6 +65,7 @@ import org.onap.portalapp.portal.domain.AppsResponse; import org.onap.portalapp.portal.domain.EPApp; import org.onap.portalapp.portal.domain.EPUser; import org.onap.portalapp.portal.domain.EcompApp; +import org.onap.portalapp.portal.domain.EpAppType; import org.onap.portalapp.portal.domain.UserRole; import org.onap.portalapp.portal.domain.UserRoles; import org.onap.portalapp.portal.framework.MockitoTestSuite; @@ -214,23 +215,23 @@ public class AppsControllerTest extends MockitoTestSuite{ app.setName("Test"); app.setImageUrl("test"); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 1); app.setAppRestEndpoint("test"); - app.setAlternateUrl("test"); + app.setAlternateLandingPage("test"); app.setName("test"); app.setMlAppName("test"); app.setMlAppAdminId("test"); - app.setUsername("test"); - app.setAppPassword("test"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("test"); app.setOpen(false); app.setEnabled(false); app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.setAppType(1); + app.setAppType(EpAppType.GUI); expectedApps.add(app); @@ -263,23 +264,23 @@ public class AppsControllerTest extends MockitoTestSuite{ app.setName("Test"); app.setImageUrl("test"); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 1); app.setAppRestEndpoint("test"); - app.setAlternateUrl("test"); + app.setAlternateLandingPage("test"); app.setName("test"); app.setMlAppName("test"); app.setMlAppAdminId("test"); - app.setUsername("test"); - app.setAppPassword("test"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("test"); app.setOpen(false); app.setEnabled(false); app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.setAppType(1); + app.setAppType(EpAppType.GUI); expectedApps.add(app); @@ -824,14 +825,14 @@ public class AppsControllerTest extends MockitoTestSuite{ EPUser user = mockUser.mockEPUser(); Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user); OnboardingApp OnboardingApp = new OnboardingApp(); - OnboardingApp.isCentralAuth = true; - OnboardingApp.nameSpace = "test1"; + OnboardingApp.setRolesInAAF(true); + OnboardingApp.setNameSpace("test1"); FieldsValidator expectedFieldValidator = new FieldsValidator(); expectedFieldValidator.setHttpStatusCode((long) 200); expectedFieldValidator.setFields(null); expectedFieldValidator.setErrorCode(null); EPApp OnboardingApp1 = new EPApp(); - OnboardingApp1.setCentralAuth(false); + OnboardingApp1.setRolesInAAF(false); OnboardingApp1.setNameSpace("test"); Mockito.when(appService.getApp(Matchers.anyLong())).thenReturn(OnboardingApp1); Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true); @@ -849,8 +850,8 @@ public class AppsControllerTest extends MockitoTestSuite{ EPUser user = mockUser.mockEPUser(); Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user); OnboardingApp onboardingApp = new OnboardingApp(); - onboardingApp.isCentralAuth = true; - onboardingApp.nameSpace = "com.test1"; + onboardingApp.setRolesInAAF(true); + onboardingApp.setNameSpace("com.test1"); EPApp app = new EPApp(); app.setNameSpace("com.test "); FieldsValidator expectedFieldValidator = new FieldsValidator(); @@ -876,10 +877,10 @@ public class AppsControllerTest extends MockitoTestSuite{ EPUser user = mockUser.mockEPUser(); Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user); OnboardingApp onboardingApp = new OnboardingApp(); - onboardingApp.isCentralAuth = false; - onboardingApp.nameSpace = "com.test1"; + onboardingApp.setRolesInAAF(false); + onboardingApp.setNameSpace("com.test1"); EPApp app = new EPApp(); - app.setCentralAuth(false); + app.setRolesInAAF(false); app.setNameSpace("com.test "); FieldsValidator expectedFieldValidator = new FieldsValidator(); expectedFieldValidator.setHttpStatusCode((long) 404); @@ -902,8 +903,8 @@ public class AppsControllerTest extends MockitoTestSuite{ EPUser user = mockUser.mockEPUser(); Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user); OnboardingApp onboardingApp = new OnboardingApp(); - onboardingApp.isCentralAuth = true; - onboardingApp.nameSpace = "com.test1"; + onboardingApp.setRolesInAAF(true); + onboardingApp.setNameSpace("com.test1"); EPApp app = new EPApp(); app.setNameSpace("com.test "); FieldsValidator expectedFieldValidator = new FieldsValidator(); @@ -1074,11 +1075,11 @@ public class AppsControllerTest extends MockitoTestSuite{ EPApp app = new EPApp(); app.setName("Test"); app.setImageUrl("test"); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 1); - app.setAppType(1); + app.setAppType(EpAppType.GUI); app.setImageUrl("www.ecomp.com"); app.setThumbnail(new byte[] {1, 6, 3}); Mockito.when(appService.getApp((long) 1)).thenReturn(app); @@ -1093,11 +1094,11 @@ public class AppsControllerTest extends MockitoTestSuite{ EPApp app = new EPApp(); app.setName("Test"); app.setImageUrl("test"); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 1); - app.setAppType(1); + app.setAppType(EpAppType.GUI); app.setImageUrl("www.ecomp.png"); app.setThumbnail(new byte[] {1, 6, 3}); Mockito.when(appService.getApp((long) 1)).thenReturn(app); diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAccessRolesControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAccessRolesControllerTest.java index 6b06ee22..0253afd0 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAccessRolesControllerTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAccessRolesControllerTest.java @@ -63,6 +63,7 @@ import org.onap.portalapp.portal.core.MockEPUser; import org.onap.portalapp.portal.domain.CentralV2RoleFunction; import org.onap.portalapp.portal.domain.EPApp; import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.domain.EpAppType; import org.onap.portalapp.portal.ecomp.model.PortalRestResponse; import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum; import org.onap.portalapp.portal.framework.MockitoTestSuite; @@ -125,23 +126,23 @@ public class ExternalAccessRolesControllerTest { EPApp app = new EPApp(); app.setName("Test"); app.setImageUrl("test"); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 1); app.setAppRestEndpoint("test"); - app.setAlternateUrl("test"); + app.setAlternateLandingPage("test"); app.setName("test"); app.setMlAppName("test"); app.setMlAppAdminId("test"); - app.setUsername("test"); - app.setAppPassword("test"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("test"); app.setOpen(false); app.setEnabled(false); app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.setAppType(1); + app.setAppType(EpAppType.GUI); return app; } @@ -166,7 +167,7 @@ public class ExternalAccessRolesControllerTest { PrintWriter writer = new PrintWriter(sw); Mockito.when(mockedResponse.getWriter()).thenReturn(writer); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); List<EPApp> appList = new ArrayList<>(); appList.add(app); Mockito.when(mockedRequest.getHeader("uebkey")).thenReturn(uebKey); @@ -207,7 +208,7 @@ public class ExternalAccessRolesControllerTest { String expectedCentralUser = "test"; String loginId = "test"; EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); List<EPApp> appList = new ArrayList<>(); appList.add(app); Mockito.when(mockedRequest.getHeader("uebkey")).thenReturn(uebKey); @@ -225,7 +226,7 @@ public class ExternalAccessRolesControllerTest { String expectedCentralUser = null; String loginId = "test"; EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); List<EPApp> appList = new ArrayList<>(); appList.add(app); Mockito.when(mockedRequest.getHeader("uebkey")).thenReturn(uebKey); @@ -245,7 +246,7 @@ public class ExternalAccessRolesControllerTest { List<CentralV2Role> centralV2RoleList = new ArrayList<>(); List<CentralRole> centralRoleList = new ArrayList<>(); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.FOUND); Mockito.when(externalAccessRolesService.getNameSpaceIfExists(applicationList.get(0))).thenReturn(response); @@ -267,7 +268,7 @@ public class ExternalAccessRolesControllerTest { List<CentralV2Role> centralV2RoleList = new ArrayList<>(); List<CentralRole> centralRoleList = new ArrayList<>(); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); ResponseEntity<String> response = null; Mockito.when(externalAccessRolesService.getNameSpaceIfExists(applicationList.get(0))).thenReturn(response); @@ -289,7 +290,7 @@ public class ExternalAccessRolesControllerTest { List<EPApp> applicationList = new ArrayList<>(); List<CentralV2Role> centralV2Role = new ArrayList<>(); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.FOUND); Mockito.when(externalAccessRolesService.getNameSpaceIfExists(applicationList.get(0))).thenReturn(response); @@ -309,7 +310,7 @@ public class ExternalAccessRolesControllerTest { List<EPApp> applicationList = new ArrayList<>(); List<CentralV2Role> centralV2Role = new ArrayList<>(); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); ResponseEntity<String> response = null; Mockito.when(externalAccessRolesService.getNameSpaceIfExists(applicationList.get(0))).thenReturn(response); @@ -354,7 +355,7 @@ public class ExternalAccessRolesControllerTest { List<EPApp> applicationList = new ArrayList<>(); List<CentralV2RoleFunction> centralV2RoleFunction = new ArrayList<>(); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.FOUND); Mockito.when(externalAccessRolesService.getNameSpaceIfExists(applicationList.get(0))).thenReturn(response); @@ -387,7 +388,7 @@ public class ExternalAccessRolesControllerTest { List<EPApp> applicationList = new ArrayList<>(); List<CentralV2RoleFunction> centralV2RoleFunction = new ArrayList<>(); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.FOUND); Mockito.when(externalAccessRolesService.getNameSpaceIfExists(applicationList.get(0))).thenReturn(response); @@ -419,7 +420,7 @@ public class ExternalAccessRolesControllerTest { long roleId = 1; CentralV2Role centralV2Role = new CentralV2Role.CentralV2RoleBuilder().createCentralV2Role(); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); Mockito.when(mockedRequest.getHeader("uebkey")).thenReturn(uebKey); ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.FOUND); @@ -467,7 +468,7 @@ public class ExternalAccessRolesControllerTest { long roleId = 1; CentralV2Role centralV2Role = new CentralV2Role.CentralV2RoleBuilder().createCentralV2Role(); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); Mockito.when(mockedRequest.getHeader("uebkey")).thenReturn(uebKey); ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.FOUND); @@ -516,7 +517,7 @@ public class ExternalAccessRolesControllerTest { CentralV2RoleFunction centralV2RoleFunction = new CentralV2RoleFunction(); centralV2RoleFunction.setCode("test"); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); Mockito.when(mockedRequest.getHeader("uebkey")).thenReturn(uebKey); ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.FOUND); @@ -537,7 +538,7 @@ public class ExternalAccessRolesControllerTest { String code = "test"; CentralV2RoleFunction centralV2RoleFunction = null; EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); Mockito.when(mockedRequest.getHeader("uebkey")).thenReturn(uebKey); ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.FOUND); @@ -565,7 +566,7 @@ public class ExternalAccessRolesControllerTest { @Test public void getRoleFunctionTest() throws Exception { EPApp mockApp = mockApp(); - mockApp.setCentralAuth(true); + mockApp.setRolesInAAF(true); List<EPApp> mockAppList = new ArrayList<>(); mockAppList.add(mockApp); StringWriter sw = new StringWriter(); @@ -607,7 +608,7 @@ public class ExternalAccessRolesControllerTest { public void getRoleFunctionXSSTest() throws Exception { String expected = getXSSKeyJson(); EPApp mockApp = mockApp(); - mockApp.setCentralAuth(true); + mockApp.setRolesInAAF(true); List<EPApp> mockAppList = new ArrayList<>(); mockAppList.add(mockApp); StringWriter sw = new StringWriter(); @@ -656,7 +657,7 @@ public class ExternalAccessRolesControllerTest { public void saveRoleFunctionExceptionTest() throws Exception { List<EPApp> applicationList = new ArrayList<>(); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList); PortalRestResponse<String> portalRestResponse = null; @@ -679,7 +680,7 @@ public class ExternalAccessRolesControllerTest { List<EPUser> userList = new ArrayList<>(); userList.add(user); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); JSONObject roleFunc = new JSONObject(); roleFunc.put("type", "test_type"); @@ -720,7 +721,7 @@ public class ExternalAccessRolesControllerTest { List<EPUser> userList = new ArrayList<>(); userList.add(user); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); JSONObject roleFunc = new JSONObject(); roleFunc.put("type", "<script>alert(“XSS”)</script> "); @@ -768,7 +769,7 @@ public class ExternalAccessRolesControllerTest { List<EPUser> userList = new ArrayList<>(); userList.add(user); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); List<EPApp> appList = new ArrayList<>(); appList.add(app); expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK); @@ -799,7 +800,7 @@ public class ExternalAccessRolesControllerTest { List<EPUser> userList = new ArrayList<>(); userList.add(user); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); List<EPApp> appList = new ArrayList<>(); appList.add(app); String code = "<script>alert(‘XSS’)</script>"; @@ -831,7 +832,7 @@ public class ExternalAccessRolesControllerTest { public void getActiveRolesValidationTest() throws Exception { List<CentralRole> expectedRolesList = null; EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); List<EPApp> appList = new ArrayList<>(); appList.add(app); List<CentralV2Role> cenRoles = new ArrayList<>(); @@ -1112,7 +1113,7 @@ public class ExternalAccessRolesControllerTest { Mockito.when(mockedResponse.getWriter()).thenReturn(writer); List<EPApp> applicationList = new ArrayList<>(); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList); Mockito.when(externalAccessRolesService.getAllAppUsers(mockedRequest.getHeader(uebKey))).thenReturn(users); @@ -1209,7 +1210,7 @@ public class ExternalAccessRolesControllerTest { List<EPApp> applicationList = new ArrayList<>(); EPApp app = mockApp(); app.setUebKey("uebKey"); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList); ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.OK); @@ -1222,7 +1223,7 @@ public class ExternalAccessRolesControllerTest { List<EPApp> applicationList = new ArrayList<>(); EPApp app = mockApp(); app.setUebKey("uebKey"); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList); ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.OK); @@ -1241,7 +1242,7 @@ public class ExternalAccessRolesControllerTest { public void getEpUserExceptionTest() throws Exception { List<EPApp> applicationList = new ArrayList<>(); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList); StringWriter sw = new StringWriter(); PrintWriter writer = new PrintWriter(sw); @@ -1254,7 +1255,7 @@ public class ExternalAccessRolesControllerTest { List<EPApp> applicationList = new ArrayList<>(); EPApp app = mockApp(); app.setUebKey("uebKey"); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList); ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.OK); @@ -1279,7 +1280,7 @@ public class ExternalAccessRolesControllerTest { List<EPApp> applicationList = new ArrayList<>(); EPApp app = mockApp(); app.setUebKey("uebKey"); - app.setCentralAuth(true); + app.setRolesInAAF(true); applicationList.add(app); Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList); ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.OK); @@ -1297,7 +1298,7 @@ public class ExternalAccessRolesControllerTest { public void getEPRolesOfApplicationExceptionTest() throws Exception { List<EPApp> applicationList = new ArrayList<>(); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList); StringWriter sw = new StringWriter(); PrintWriter writer = new PrintWriter(sw); @@ -1319,7 +1320,7 @@ public class ExternalAccessRolesControllerTest { List<EPUser> userList = new ArrayList<>(); userList.add(user); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); List<EPApp> appList = new ArrayList<>(); appList.add(app); expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK); @@ -1351,7 +1352,7 @@ public class ExternalAccessRolesControllerTest { List<EPUser> userList = new ArrayList<>(); userList.add(user); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); List<EPApp> appList = new ArrayList<>(); appList.add(app); expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR); @@ -1383,7 +1384,7 @@ public class ExternalAccessRolesControllerTest { List<EPUser> userList = new ArrayList<>(); userList.add(user); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); List<EPApp> appList = new ArrayList<>(); appList.add(app); expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR); @@ -1435,7 +1436,7 @@ public class ExternalAccessRolesControllerTest { List<EPUser> userList = new ArrayList<>(); userList.add(user); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); List<EPApp> appList = new ArrayList<>(); appList.add(app); expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK); @@ -1467,7 +1468,7 @@ public class ExternalAccessRolesControllerTest { List<EPUser> userList = new ArrayList<>(); userList.add(user); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); List<EPApp> appList = new ArrayList<>(); appList.add(app); String code = "<img src=xss onerror=alert(1)>"; @@ -1497,7 +1498,7 @@ public class ExternalAccessRolesControllerTest { List<EPUser> userList = new ArrayList<>(); userList.add(user); EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); List<EPApp> appList = new ArrayList<>(); appList.add(app); expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR); diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAppsRestfulControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAppsRestfulControllerTest.java index d6cb42a6..890319dc 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAppsRestfulControllerTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAppsRestfulControllerTest.java @@ -66,6 +66,7 @@ import org.onap.portalapp.portal.core.MockEPUser; import org.onap.portalapp.portal.domain.EPApp; import org.onap.portalapp.portal.domain.EPRole; import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.domain.EpAppType; import org.onap.portalapp.portal.framework.MockitoTestSuite; import org.onap.portalapp.portal.service.AdminRolesService; import org.onap.portalapp.portal.service.AdminRolesServiceImpl; @@ -135,24 +136,24 @@ public class ExternalAppsRestfulControllerTest { app.setName("Test"); app.setImageUrl("test"); app.setNameSpace("com.test.app"); - app.setCentralAuth(true); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setRolesInAAF(true); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 10); app.setAppRestEndpoint("test"); - app.setAlternateUrl("test"); + app.setAlternateLandingPage("test"); app.setName("test"); app.setMlAppName("test"); app.setMlAppAdminId("test"); - app.setUsername("test"); - app.setAppPassword("test"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("test"); app.setOpen(false); app.setEnabled(true); app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.setAppType(1); + app.setAppType(EpAppType.GUI); return app; } diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/RoleManageControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/RoleManageControllerTest.java index b004a4a1..bbc842a6 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/RoleManageControllerTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/RoleManageControllerTest.java @@ -73,6 +73,7 @@ import org.onap.portalapp.portal.domain.CentralV2RoleFunction; import org.onap.portalapp.portal.domain.CentralizedApp; import org.onap.portalapp.portal.domain.EPApp; import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.domain.EpAppType; import org.onap.portalapp.portal.ecomp.model.PortalRestResponse; import org.onap.portalapp.portal.ecomp.model.PortalRestStatusEnum; import org.onap.portalapp.portal.ecomp.model.UploadRoleFunctionExtSystem; @@ -170,16 +171,18 @@ public class RoleManageControllerTest { @Test public void getRoleIfRoleIdNullTest() throws Exception { + EPApp app = mockApp(); + app.setRolesInAAF(true); PowerMockito.mockStatic(EPUserUtils.class); PowerMockito.mockStatic(EcompPortalUtils.class); EPUser user = mockUser.mockEPUser(); Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user); Mockito.when(EcompPortalUtils.checkIfRemoteCentralAccessAllowed()).thenReturn(true); - Mockito.when(appService.getApp((long) 1)).thenReturn(CentralApp()); - Mockito.when(adminRolesService.isAccountAdminOfApplication(user, CentralApp())).thenReturn(true); + Mockito.when(appService.getApp((long) 1)).thenReturn(app); + Mockito.when(adminRolesService.isAccountAdminOfApplication(user, app)).thenReturn(true); List<EPApp> apps = new ArrayList<>(); - apps.add(CentralApp()); - Mockito.when(externalAccessRolesService.getApp(CentralApp().getUebKey())).thenReturn(apps); + apps.add(app); + Mockito.when(externalAccessRolesService.getApp(app.getUebKey())).thenReturn(apps); ResponseEntity<String> result = new ResponseEntity<>(HttpStatus.OK); Mockito.when(externalAccessRolesService.getNameSpaceIfExists(apps.get(0))).thenReturn(result); CentralV2Role answer = new CentralV2Role.CentralV2RoleBuilder().createCentralV2Role(); @@ -191,7 +194,7 @@ public class RoleManageControllerTest { PrintWriter writer = new PrintWriter(sw); Mockito.when(mockedResponse.getWriter()).thenReturn(writer); List<EPApp> appList = new ArrayList<>(); - appList.add(CentralApp()); + appList.add(app); ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.OK); Mockito.when(externalAccessRolesService.getNameSpaceIfExists(Matchers.anyObject())).thenReturn(response); Mockito.when(externalAccessRolesService.getApp(Matchers.anyString())).thenReturn(appList); @@ -241,23 +244,26 @@ public class RoleManageControllerTest { app.setName("Test"); app.setImageUrl("test"); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 1); app.setAppRestEndpoint("test"); - app.setAlternateUrl("test"); + app.setAlternateLandingPage("test"); app.setName("test"); app.setMlAppName("test"); app.setMlAppAdminId("test"); - app.setUsername("test"); - app.setAppPassword("test"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("test"); app.setOpen(false); app.setEnabled(false); app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.setAppType(1); + app.setAppType(EpAppType.GUI); + app.setModeOfIntegration("test"); + app.setAppAck(false); + app.setUsesCadi(false); return app; } @@ -265,7 +271,7 @@ public class RoleManageControllerTest { @Test public void getRolesTest() throws Exception { EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); PowerMockito.mockStatic(EPUserUtils.class); PowerMockito.mockStatic(EcompPortalUtils.class); EPUser user = mockUser.mockEPUser(); @@ -298,13 +304,16 @@ public class RoleManageControllerTest { @Test public void getRoleFunctionListTest() throws Exception { + EPApp app = mockApp(); + app.setRolesInAAF(true); PowerMockito.mockStatic(EPUserUtils.class); PowerMockito.mockStatic(EcompPortalUtils.class); EPUser user = mockUser.mockEPUser(); Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user); Mockito.when(EcompPortalUtils.checkIfRemoteCentralAccessAllowed()).thenReturn(true); - Mockito.when(adminRolesService.isAccountAdminOfApplication(user, CentralApp())).thenReturn(true); - Mockito.when(appService.getApp((long) 1)).thenReturn(CentralApp()); + Mockito.when(adminRolesService.isAccountAdminOfApplication(user, app)).thenReturn(true); + + Mockito.when(appService.getApp((long) 1)).thenReturn(app); List<CentralV2RoleFunction> answer = new ArrayList<>(); Mockito.when(externalAccessRolesService.getRoleFuncList("test")).thenReturn(answer); StringWriter sw = new StringWriter(); @@ -326,13 +335,15 @@ public class RoleManageControllerTest { @Test public void saveRoleFunctionTest() throws Exception { + EPApp app = mockApp(); + app.setRolesInAAF(true); PowerMockito.mockStatic(EPUserUtils.class); PowerMockito.mockStatic(EcompPortalUtils.class); EPUser user = mockUser.mockEPUser(); Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user); Mockito.when(EcompPortalUtils.checkIfRemoteCentralAccessAllowed()).thenReturn(true); - Mockito.when(adminRolesService.isAccountAdminOfApplication(user, CentralApp())).thenReturn(true); - Mockito.when(appService.getApp((long) 1)).thenReturn(CentralApp()); + Mockito.when(adminRolesService.isAccountAdminOfApplication(user, app)).thenReturn(true); + Mockito.when(appService.getApp((long) 1)).thenReturn(app); Mockito.doNothing().when(roleFunctionListController).saveRoleFunction(mockedRequest, mockedResponse, "test"); CentralV2RoleFunction addNewFunc = new CentralV2RoleFunction(); addNewFunc.setCode("Test"); @@ -351,7 +362,7 @@ public class RoleManageControllerTest { List<EPUser> userList = new ArrayList<>(); userList.add(user); List<EPApp> appList = new ArrayList<>(); - appList.add(CentralApp()); + appList.add(app); Mockito.when(externalAccessRolesService.getUser("guestT")).thenReturn(userList); StringWriter sw = new StringWriter(); PrintWriter writer = new PrintWriter(sw); @@ -430,14 +441,16 @@ public class RoleManageControllerTest { @Test public void removeRoleFunctionTest() throws Exception { + EPApp app = mockApp(); + app.setRolesInAAF(true); PowerMockito.mockStatic(EPUserUtils.class); PowerMockito.mockStatic(EcompPortalUtils.class); EPUser user = mockUser.mockEPUser(); Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user); Mockito.when(EcompPortalUtils.checkIfRemoteCentralAccessAllowed()).thenReturn(true); - Mockito.when(adminRolesService.isAccountAdminOfApplication(user, CentralApp())).thenReturn(true); + Mockito.when(adminRolesService.isAccountAdminOfApplication(user, app)).thenReturn(true); Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user); - Mockito.when(appService.getApp((long) 1)).thenReturn(CentralApp()); + Mockito.when(appService.getApp((long) 1)).thenReturn(app); String roleFun = "{\"name\":\"Test\",\"type\":\"Test\",\"action\":\"Test\", \"code\":\"Test\"}"; CentralV2RoleFunction roleFunction = mockCentralRoleFunction(); Mockito.when(externalAccessRolesService.getRoleFunction("Test|Test|Test", "test")).thenReturn(roleFunction); @@ -447,7 +460,7 @@ public class RoleManageControllerTest { Mockito.when(externalAccessRolesService.deleteCentralRoleFunction(Matchers.anyString(), Matchers.anyObject())) .thenReturn(true); List<EPApp> appList = new ArrayList<>(); - appList.add(CentralApp()); + appList.add(app); ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.OK); Mockito.when(externalAccessRolesService.getNameSpaceIfExists(Matchers.anyObject())).thenReturn(response); Mockito.when(externalAccessRolesService.getApp(Matchers.anyString())).thenReturn(appList); @@ -512,7 +525,7 @@ public class RoleManageControllerTest { @Test public void removeRoleFunctionIfAppNotCentralizedTest() throws Exception { EPApp app = mockApp(); - app.setCentralAuth(false); + app.setRolesInAAF(false); Mockito.when(appService.getApp((long) 1)).thenReturn(app); String roleFun = "{\"name\":\"Test\",\"code\":\"Test\"}"; roleManageController.removeRoleFunction(mockedRequest, mockedResponse, roleFun, (long) 1); @@ -1021,14 +1034,14 @@ public class RoleManageControllerTest { public EPApp CentralApp() { EPApp app = mockApp(); - app.setCentralAuth(true); + app.setRolesInAAF(true); app.setNameSpace("com.test"); return app; } public EPApp NonCentralApp() { EPApp app = mockApp(); - app.setCentralAuth(false); + app.setRolesInAAF(false); return app; } diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPAppTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPAppTest.java index 56f0e5ca..640411ef 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPAppTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPAppTest.java @@ -50,29 +50,25 @@ public class EPAppTest { private static final String TEST="test"; public EPApp mockEPApp(EPApp epApp){ - epApp.setId(1l); epApp.setName(TEST); epApp.setImageUrl(TEST); - epApp.setDescription(TEST); - epApp.setNotes(TEST); - epApp.setUrl(TEST); - epApp.setAlternateUrl(TEST); + epApp.setAppDescription(TEST); + epApp.setAppNotes(TEST); + epApp.setLandingPage(TEST); + epApp.setAlternateLandingPage(TEST); epApp.setAppRestEndpoint(TEST); epApp.setMlAppName(TEST); epApp.setMlAppAdminId(TEST); epApp.setMotsId((long)1); - epApp.setUsername(TEST); - epApp.setAppPassword(TEST); + epApp.setAppBasicAuthUsername(TEST); + epApp.setAppBasicAuthPassword(TEST); epApp.setOpen(false); epApp.setEnabled(false); epApp.setUebTopicName(TEST); epApp.setUebSecret(TEST); - epApp.setAppType(1); - epApp.setCentralAuth(false); + epApp.setAppType(EpAppType.GUI); + epApp.setRolesInAAF(false); epApp.setNameSpace(TEST); - epApp.setRestrictedApp(true); - epApp.setRestrictedApp(false); - epApp.setAppType(null); epApp.setOpen(null); epApp.setThumbnail(TEST.getBytes()); epApp.setUebKey(TEST); @@ -86,116 +82,62 @@ public class EPAppTest { epApp1 = mockEPApp(epApp1); EPApp epApp=new EPApp(); - epApp.setId(epApp1.getId()); epApp.setName(epApp1.getName()); epApp.setImageUrl(epApp1.getImageUrl()); - epApp.setDescription(epApp1.getDescription()); - epApp.setNotes(epApp1.getNotes()); - epApp.setUrl(epApp1.getUrl()); - epApp.setAlternateUrl(epApp1.getAlternateUrl()); + epApp.setAppDescription(epApp1.getAppDescription()); + epApp.setAppNotes(epApp1.getAppNotes()); + epApp.setLandingPage(epApp1.getLandingPage()); + epApp.setAlternateLandingPage(epApp1.getAlternateLandingPage()); epApp.setAppRestEndpoint(epApp1.getAppRestEndpoint()); epApp.setMlAppName(epApp1.getMlAppName()); epApp.setMlAppAdminId(epApp1.getMlAppAdminId()); epApp.setMotsId(epApp1.getMotsId()); - epApp.setUsername(epApp1.getUsername()); - epApp.setAppPassword(epApp1.getAppPassword()); + epApp.setAppBasicAuthUsername(epApp1.getAppBasicAuthUsername()); + epApp.setAppBasicAuthPassword(epApp1.getAppBasicAuthPassword()); epApp.setOpen(epApp1.getOpen()); epApp.setEnabled(epApp1.getEnabled()); epApp.setUebTopicName(epApp1.getUebTopicName()); epApp.setUebSecret(epApp1.getUebSecret()); epApp.setAppType(epApp1.getAppType()); - epApp.setCentralAuth(epApp1.getCentralAuth()); + epApp.setRolesInAAF(epApp1.getRolesInAAF()); epApp.setNameSpace(epApp1.getNameSpace()); - epApp.setRestrictedApp(epApp1.isRestrictedApp()); epApp.setAppType(epApp1.getAppType()); epApp.setThumbnail(epApp1.getThumbnail()); epApp.setUebKey(epApp1.getUebKey()); - epApp.compareTo(epApp1); assertEquals(epApp.hashCode(), epApp1.hashCode()); - assertTrue(epApp.equals(epApp1)); assertFalse(epApp.equals(null)); assertEquals(epApp.getName(), TEST); - assertEquals(epApp.getId(), Long.valueOf(1l)); assertEquals(epApp.getImageUrl(), TEST); - assertEquals(epApp.getDescription(), TEST); - assertEquals(epApp.getNotes(), TEST); - assertEquals(epApp.getUrl(), TEST); - assertEquals(epApp.getAlternateUrl(), TEST); + assertEquals(epApp.getAppDescription(), TEST); + assertEquals(epApp.getAppNotes(), TEST); + assertEquals(epApp.getLandingPage(), TEST); + assertEquals(epApp.getAlternateLandingPage(), TEST); assertEquals(epApp.getAppRestEndpoint(), TEST); assertEquals(epApp.getMlAppName(), TEST); assertEquals(epApp.getMlAppAdminId(), TEST); assertEquals(epApp.getMotsId(), new Long(1)); - assertEquals(epApp.getUsername(), TEST); - assertEquals(epApp.getAppPassword(), TEST); + assertEquals(epApp.getAppBasicAuthUsername(), TEST); + assertEquals(epApp.getAppBasicAuthPassword(), TEST); assertEquals(epApp.getOpen(), false); assertEquals(epApp.getEnabled(), false); assertEquals(epApp.getUebTopicName(), TEST); assertEquals(epApp.getUebSecret(), TEST); assertEquals(epApp.getAppType(), Integer.valueOf(1)); - assertEquals(epApp.getCentralAuth(), false); + assertEquals(epApp.getRolesInAAF(), false); assertEquals(epApp.getNameSpace(), TEST); assertEquals(epApp.getUebKey(), TEST); assertEquals(epApp.getOpen(), false); assertEquals(epApp.isRestrictedApp(), false); assertEquals(epApp.hashCode(), epApp1.hashCode()); - assertTrue(epApp.equals(epApp1)); - //epApp.compareTo(epApp1); assertNotNull(epApp.toString()); epApp.setContactUs(new AppContactUs()); assertNotNull(epApp.getContactUs()); - - epApp.setUsername(null); - assertFalse(epApp.equals(epApp1)); - epApp.setUrl(null); - assertFalse(epApp.equals(epApp1)); - epApp.setUebTopicName(null); - assertFalse(epApp.equals(epApp1)); - - epApp.setUebSecret(null); - assertFalse(epApp.equals(epApp1)); - epApp.setUebKey(null); - assertFalse(epApp.equals(epApp1)); - epApp.setOpen(null); - assertFalse(epApp.equals(epApp1)); - epApp.setNotes(null); - assertFalse(epApp.equals(epApp1)); - epApp.setNameSpace(null); - assertFalse(epApp.equals(epApp1)); - - epApp.setName(null); - assertFalse(epApp.equals(epApp1)); - epApp.setMotsId(null); - assertFalse(epApp.equals(epApp1)); - epApp.setMlAppName(null); - assertFalse(epApp.equals(epApp1)); - epApp.setMlAppAdminId(null); - assertFalse(epApp.equals(epApp1)); - epApp.setImageUrl(null); - assertFalse(epApp.equals(epApp1)); - epApp.setEnabled(null); - assertFalse(epApp.equals(epApp1)); - epApp.setDescription(null); - assertFalse(epApp.equals(epApp1)); - epApp.setContactUs(null); - assertFalse(epApp.equals(epApp1)); - - epApp.setCentralAuth(null); - assertFalse(epApp.equals(epApp1)); - - epApp.setAppType(null); - assertFalse(epApp.equals(epApp1)); - epApp.setAppRestEndpoint(null); - assertFalse(epApp.equals(epApp1)); - epApp.setAppPassword(null); - assertFalse(epApp.equals(epApp1)); - - epApp.setAlternateUrl(null); - assertFalse(epApp.equals(epApp1)); + } } diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppTest.java index 0923d033..eddbe418 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/domain/EPUserAppTest.java @@ -53,16 +53,16 @@ public class EPUserAppTest { EPApp epApp = new EPApp(); epApp.setName("test"); epApp.setImageUrl("test"); - epApp.setDescription("test"); - epApp.setNotes("test"); - epApp.setUrl("test"); - epApp.setAlternateUrl("test"); + epApp.setAppDescription("test"); + epApp.setAppNotes("test"); + epApp.setLandingPage("test"); + epApp.setAlternateLandingPage("test"); epApp.setAppRestEndpoint("test"); epApp.setMlAppName("test"); epApp.setMlAppAdminId("test"); epApp.setMotsId((long)1); - epApp.setUsername("test"); - epApp.setAppPassword("test"); + epApp.setAppBasicAuthUsername("test"); + epApp.setAppBasicAuthPassword("test"); //Role @@ -90,16 +90,16 @@ public class EPUserAppTest { EPApp epApp = new EPApp(); epApp.setName("test"); epApp.setImageUrl("test"); - epApp.setDescription("test"); - epApp.setNotes("test"); - epApp.setUrl("test"); - epApp.setAlternateUrl("test"); + epApp.setAppDescription("test"); + epApp.setAppNotes("test"); + epApp.setLandingPage("test"); + epApp.setAlternateLandingPage("test"); epApp.setAppRestEndpoint("test"); epApp.setMlAppName("test"); epApp.setMlAppAdminId("test"); epApp.setMotsId((long)1); - epApp.setUsername("test"); - epApp.setAppPassword("test"); + epApp.setAppBasicAuthUsername("test"); + epApp.setAppBasicAuthPassword("test"); user.setApp(epApp); //Role @@ -152,16 +152,16 @@ public class EPUserAppTest { epApp.setId((long) 12345); epApp.setName("test"); epApp.setImageUrl("test"); - epApp.setDescription("test"); - epApp.setNotes("test"); - epApp.setUrl("test"); - epApp.setAlternateUrl("test"); + epApp.setAppDescription("test"); + epApp.setAppNotes("test"); + epApp.setLandingPage("test"); + epApp.setAlternateLandingPage("test"); epApp.setAppRestEndpoint("test"); epApp.setMlAppName("test"); epApp.setMlAppAdminId("test"); epApp.setMotsId((long)1); - epApp.setUsername("test"); - epApp.setAppPassword("test"); + epApp.setAppBasicAuthUsername("test"); + epApp.setAppBasicAuthPassword("test"); return epApp; } diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/interceptor/PortalResourceInterceptorTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/interceptor/PortalResourceInterceptorTest.java index 81b4e64d..94d46506 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/interceptor/PortalResourceInterceptorTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/interceptor/PortalResourceInterceptorTest.java @@ -152,7 +152,7 @@ public class PortalResourceInterceptorTest { data.add("test/test"); List<EPApp> apps=new ArrayList<>(); EPApp app=new EPApp(); - app.setUsername("test"); + app.setAppBasicAuthUsername("test"); apps.add(app); when(request.getRequestURI()).thenReturn("test/portalApi/test/test"); diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/AdminRolesServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/AdminRolesServiceImplTest.java index f14d3fd9..7f34583c 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/AdminRolesServiceImplTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/AdminRolesServiceImplTest.java @@ -69,6 +69,7 @@ import org.onap.portalapp.portal.domain.EPApp; import org.onap.portalapp.portal.domain.EPRole; import org.onap.portalapp.portal.domain.EPUser; import org.onap.portalapp.portal.domain.EPUserApp; +import org.onap.portalapp.portal.domain.EpAppType; import org.onap.portalapp.portal.domain.UserRole; import org.onap.portalapp.portal.transport.AppNameIdIsAdmin; import org.onap.portalapp.portal.transport.AppsListWithAdminRole; @@ -140,24 +141,24 @@ public class AdminRolesServiceImplTest { app.setName("Test"); app.setImageUrl("test"); app.setNameSpace("com.test.app"); - app.setCentralAuth(true); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setRolesInAAF(true); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 1); app.setAppRestEndpoint("test"); - app.setAlternateUrl("test"); + app.setAlternateLandingPage("test"); app.setName("test"); app.setMlAppName("test"); app.setMlAppAdminId("test"); - app.setUsername("test"); - app.setAppPassword("test"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("test"); app.setOpen(false); app.setEnabled(true); app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.setAppType(1); + app.setAppType(EpAppType.GUI); return app; } diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/AppContactUsServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/AppContactUsServiceImplTest.java index acc25ac8..e5b7431e 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/AppContactUsServiceImplTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/AppContactUsServiceImplTest.java @@ -55,6 +55,7 @@ import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.onap.portalapp.portal.domain.AppContactUs; import org.onap.portalapp.portal.domain.EPApp; +import org.onap.portalapp.portal.domain.EpAppType; import org.onap.portalapp.portal.ecomp.model.AppCategoryFunctionsItem; import org.onap.portalapp.portal.ecomp.model.AppContactUsItem; import org.onap.portalapp.portal.framework.MockitoTestSuite; @@ -92,23 +93,23 @@ public class AppContactUsServiceImplTest { EPApp app = new EPApp(); app.setName("Test"); app.setImageUrl("test"); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 1); app.setAppRestEndpoint("test"); - app.setAlternateUrl("test"); + app.setAlternateLandingPage("test"); app.setName("test"); app.setMlAppName("test"); app.setMlAppAdminId("test"); - app.setUsername("test"); - app.setAppPassword("test"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("test"); app.setOpen(true); app.setEnabled(false); app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.setAppType(1); + app.setAppType(EpAppType.GUI); return app; } @Test diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ApplicationsRestClientServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ApplicationsRestClientServiceImplTest.java index a9747335..df73316b 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ApplicationsRestClientServiceImplTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ApplicationsRestClientServiceImplTest.java @@ -91,7 +91,7 @@ public class ApplicationsRestClientServiceImplTest { public void unt_get_failure() throws HTTPException{ EPApp appTest=new EPApp(); appTest.setAppRestEndpoint("https"); - appTest.setAppPassword("testPassword"); + appTest.setAppBasicAuthPassword("testPassword"); Mockito.when(appsCacheService.getApp(Matchers.anyLong())).thenReturn(appTest); ApplicationsRestClientServiceImpl appservice=serviceImpl.get(ApplicationsRestClientServiceImpl.class, 12L,"/path" ); Assert.assertNull(appservice); @@ -109,7 +109,7 @@ public class ApplicationsRestClientServiceImplTest { Mockito.when(response.getStatus()).thenReturn(HttpStatus.SC_OK); EPApp appTest=new EPApp(); appTest.setAppRestEndpoint("https"); - appTest.setAppPassword("testPassword"); + appTest.setAppBasicAuthPassword("testPassword"); Mockito.when(appsCacheService.getApp(Matchers.anyLong())).thenReturn(appTest); ApplicationsRestClientServiceImpl appservice=serviceImpl.get(ApplicationsRestClientServiceImpl.class, 12L,"/path" ); Assert.assertNull(appservice); @@ -127,7 +127,7 @@ public class ApplicationsRestClientServiceImplTest { Mockito.when(response.getStatus()).thenReturn(1); EPApp appTest=new EPApp(); appTest.setAppRestEndpoint("https"); - appTest.setAppPassword("testPassword"); + appTest.setAppBasicAuthPassword("testPassword"); Mockito.when(appsCacheService.getApp(Matchers.anyLong())).thenReturn(appTest); ApplicationsRestClientServiceImpl appservice=serviceImpl.get(ApplicationsRestClientServiceImpl.class, 12L,"/path" ); Assert.assertNull(appservice); @@ -139,7 +139,7 @@ public class ApplicationsRestClientServiceImplTest { PowerMockito.mockStatic(Object.class); EPApp appTest=new EPApp(); appTest.setAppRestEndpoint("https"); - appTest.setAppPassword("testPassword"); + appTest.setAppBasicAuthPassword("testPassword"); Mockito.when(appsCacheService.getApp(Matchers.anyLong())).thenReturn(appTest); ApplicationsRestClientServiceImpl appservice=serviceImpl.post(ApplicationsRestClientServiceImpl.class, 12L, Matchers.any() , "/path",Matchers.any()); Assert.assertNull(appservice); @@ -163,7 +163,7 @@ public class ApplicationsRestClientServiceImplTest { Mockito.when(response.getStatus()).thenReturn(HttpStatus.SC_OK); EPApp appTest=new EPApp(); appTest.setAppRestEndpoint("https"); - appTest.setAppPassword("testPassword"); + appTest.setAppBasicAuthPassword("testPassword"); Mockito.when(appsCacheService.getApp(Matchers.anyLong())).thenReturn(appTest); ApplicationsRestClientServiceImpl appservice=serviceImpl.post(ApplicationsRestClientServiceImpl.class, 12L,payload,"/path",SystemType.APPLICATION); Assert.assertNull(appservice); @@ -188,7 +188,7 @@ public class ApplicationsRestClientServiceImplTest { Mockito.when(response.getStatus()).thenReturn(HttpStatus.SC_OK); EPApp appTest=new EPApp(); appTest.setAppRestEndpoint("https"); - appTest.setAppPassword("testPassword"); + appTest.setAppBasicAuthPassword("testPassword"); Mockito.when(appsCacheService.getApp(Matchers.anyLong())).thenReturn(appTest); ApplicationsRestClientServiceImpl appservice=serviceImpl.post(ApplicationsRestClientServiceImpl.class, 12L,payload,"/path",SystemType.APPLICATION); Assert.assertNull(appservice); @@ -213,7 +213,7 @@ public class ApplicationsRestClientServiceImplTest { Mockito.when(response.getStatus()).thenReturn(1); EPApp appTest=new EPApp(); appTest.setAppRestEndpoint("https"); - appTest.setAppPassword("testPassword"); + appTest.setAppBasicAuthPassword("testPassword"); Mockito.when(appsCacheService.getApp(Matchers.anyLong())).thenReturn(appTest); ApplicationsRestClientServiceImpl appservice=serviceImpl.post(ApplicationsRestClientServiceImpl.class, 12L,payload,"/path",SystemType.APPLICATION); Assert.assertNull(appservice); @@ -232,7 +232,7 @@ public class ApplicationsRestClientServiceImplTest { Mockito.when(response.getStatus()).thenReturn(1); EPApp appTest=new EPApp(); appTest.setAppRestEndpoint("https"); - appTest.setAppPassword("testPassword"); + appTest.setAppBasicAuthPassword("testPassword"); Mockito.when(appsCacheService.getApp(Matchers.anyLong())).thenReturn(appTest); ApplicationsRestClientServiceImpl appservice=serviceImpl.get(ApplicationsRestClientServiceImpl.class, 12L,"/path" , Matchers.anyBoolean()); Assert.assertNull(appservice); diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPAppCommonServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPAppCommonServiceImplTest.java index 1451693d..d00dc211 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPAppCommonServiceImplTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPAppCommonServiceImplTest.java @@ -74,6 +74,7 @@ import org.onap.portalapp.portal.domain.EPUserAppsManualSortPreference; import org.onap.portalapp.portal.domain.EPUserAppsSortPreference; import org.onap.portalapp.portal.domain.EPWidgetsManualSortPreference; import org.onap.portalapp.portal.domain.EcompApp; +import org.onap.portalapp.portal.domain.EpAppType; import org.onap.portalapp.portal.domain.UserRole; import org.onap.portalapp.portal.domain.UserRoles; import org.onap.portalapp.portal.ecomp.model.AppCatalogItem; @@ -157,24 +158,24 @@ public class EPAppCommonServiceImplTest { EPApp app = new EPApp(); app.setName("Test"); app.setImageUrl("test"); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 1); app.setAppRestEndpoint("test"); - app.setAlternateUrl("test"); + app.setAlternateLandingPage("test"); app.setName("test"); app.setMlAppName("test"); app.setMlAppAdminId("test"); - app.setUsername("test"); - app.setAppPassword("test"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("test"); app.setOpen(false); app.setEnabled(false); - app.setCentralAuth(true); + app.setRolesInAAF(true); app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.setAppType(1); + app.setAppType(EpAppType.GUI); return app; } @@ -439,7 +440,7 @@ public class EPAppCommonServiceImplTest { public void getRestrictedAppRolesTest() { EPUser user = mockUser.mockEPUser(); EPApp mockApp = mockApp(); - mockApp.setRestrictedApp(true); + mockApp.setAppType(EpAppType.HYPERLINK); user.setLoginId("guestT"); List<LocalRole> expected = new ArrayList<>(); LocalRole localRole = new LocalRole(); @@ -458,7 +459,7 @@ public class EPAppCommonServiceImplTest { public void getPoralAppRolesTest() { EPUser user = mockUser.mockEPUser(); EPApp mockApp = mockApp(); - mockApp.setRestrictedApp(false); + mockApp.setAppType(EpAppType.GUI); mockApp.setId(1l); user.setLoginId("guestT"); List<LocalRole> expected = new ArrayList<>(); @@ -477,7 +478,7 @@ public class EPAppCommonServiceImplTest { public void getNonPortalAndNonRestrictedAppRolesTest() { EPUser user = mockUser.mockEPUser(); EPApp mockApp = mockApp(); - mockApp.setRestrictedApp(false); + mockApp.setAppType(EpAppType.GUI); mockApp.setId(2l); user.setLoginId("guestT"); List<LocalRole> expected = new ArrayList<>(); @@ -539,15 +540,15 @@ public class EPAppCommonServiceImplTest { List<EPApp> mockAppList = new ArrayList<>(); OnboardingApp onboardApp = new OnboardingApp(); onboardApp.setRestrictedApp(false); - onboardApp.name = "test1"; - onboardApp.url = "http://test.com"; - onboardApp.isOpen = false; - onboardApp.isEnabled = true; - onboardApp.username = "test123"; - onboardApp.appPassword = "test123"; + onboardApp.setAppName("test1"); + onboardApp.setLandingPage("http://test.com"); + onboardApp.setIsOpen(false); + onboardApp.setIsEnabled(true); + onboardApp.setAppBasicAuthUsername("test123"); + onboardApp.setAppBasicAuthPassword("test123"); List<Criterion> restrictionsList = new ArrayList<Criterion>(); - Criterion urlCrit = Restrictions.eq("url", onboardApp.url); - Criterion nameCrit = Restrictions.eq("name", onboardApp.name); + Criterion urlCrit = Restrictions.eq("url", onboardApp.getLandingPage()); + Criterion nameCrit = Restrictions.eq("name", onboardApp.getAppName()); Criterion orCrit = Restrictions.or(urlCrit, nameCrit); restrictionsList.add(orCrit); List<String> uebList = new ArrayList<>(); @@ -573,42 +574,46 @@ public class EPAppCommonServiceImplTest { EPApp mockApp = mockApp(); mockApp.setName("test1"); mockApp.setId(2l); - mockApp.setUrl("http://test.com"); - mockApp.setUsername("test123"); - mockApp.setAppPassword("test123"); - mockApp.setRestrictedApp(false); + mockApp.setLandingPage("http://test.com"); + mockApp.setAppBasicAuthUsername("test123"); + mockApp.setAppBasicAuthPassword("*******"); + mockApp.setAppType(EpAppType.GUI); mockApp.setEnabled(true); mockApp.setOpen(false); List<EPApp> mockAppList = new ArrayList<>(); mockAppList.add(mockApp); OnboardingApp onboardApp = new OnboardingApp(); onboardApp.setRestrictedApp(false); - onboardApp.name = "test1"; - onboardApp.id = 2l; - onboardApp.url = "http://test.com"; - onboardApp.restUrl = "http://test.com"; - onboardApp.isOpen = false; - onboardApp.isEnabled = true; - onboardApp.thumbnail = "test123imgthumbnail"; - onboardApp.username = "test123"; - onboardApp.appPassword = "test123"; - onboardApp.isCentralAuth=true; - onboardApp.myLoginsAppName="test123"; - onboardApp.myLoginsAppOwner="test123"; - onboardApp.nameSpace="com.test"; + onboardApp.setAppName("test1"); + onboardApp.setId(2l); + onboardApp.setLandingPage("http://test.com"); + onboardApp.setRestUrl("http://test.com"); + onboardApp.setIsOpen(false); + onboardApp.setIsEnabled (true); + onboardApp.setThumbnail("test123imgthumbnail"); + onboardApp.setAppBasicAuthUsername("test123"); + onboardApp.setAppBasicAuthPassword("*******"); + onboardApp.setRolesInAAF(true); + onboardApp.setMyLoginsAppName("test123"); + onboardApp.setMyLoginsAppOwner("test123"); + onboardApp.setNameSpace("com.test"); + onboardApp.setModeOfIntegration("sdk"); + onboardApp.setAppAck(true); + onboardApp.setUsesCadi(false); + onboardApp.setApplicationType("1"); List<Criterion> restrictionsList1 = new ArrayList<Criterion>(); - Criterion idCrit = Restrictions.eq("id", onboardApp.id); - Criterion urlCrit = Restrictions.eq("url", onboardApp.url); - Criterion nameCrit = Restrictions.eq("name", onboardApp.name); + Criterion idCrit = Restrictions.eq("id", onboardApp.getId()); + Criterion urlCrit = Restrictions.eq("url", onboardApp.getLandingPage()); + Criterion nameCrit = Restrictions.eq("name", onboardApp.getAppName()); Criterion orCrit = Restrictions.or(idCrit, urlCrit, nameCrit); restrictionsList1.add(orCrit); Mockito.when((List<EPApp>) dataAccessService.getList(EPApp.class, null, restrictionsList1, null)) .thenReturn(mockAppList); - Mockito.when((EPApp) session.get(EPApp.class, onboardApp.id)).thenReturn(mockApp); + Mockito.when((EPApp) session.get(EPApp.class, onboardApp.getId())).thenReturn(mockApp); String sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn " + "FROM fn_menu_functional m, fn_menu_functional_roles r " + "WHERE m.menu_id = r.menu_id " - + " AND r.app_id = '" + onboardApp.id + "' "; + + " AND r.app_id = '" + onboardApp.getId() + "' "; List<Integer> roles = new ArrayList<>(); roles.add(1); roles.add(2); @@ -1268,8 +1273,8 @@ public class EPAppCommonServiceImplTest { OnboardingApp onboardingApp = new OnboardingApp(); onboardingApp.setRestrictedApp(true); - onboardingApp.isCentralAuth=false; - onboardingApp.isEnabled= true; + onboardingApp.setRolesInAAF(false); + onboardingApp.setIsEnabled(true); FieldsValidator actual = epAppCommonServiceImpl.addOnboardingApp(onboardingApp, epUser); assertEquals(expected.getHttpStatusCode(), actual.getHttpStatusCode()); } diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPLdapServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPLdapServiceImplTest.java index bacd2a9e..3b1c2d2d 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPLdapServiceImplTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPLdapServiceImplTest.java @@ -62,6 +62,7 @@ import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.onap.portalapp.portal.domain.EPApp; import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.domain.EpAppType; import org.onap.portalapp.portal.utils.EPCommonSystemProperties; import org.onap.portalsdk.core.command.support.SearchResult; import org.onap.portalsdk.core.service.support.ServiceLocator; @@ -109,24 +110,24 @@ public class EPLdapServiceImplTest { EPApp app = new EPApp(); app.setName("Test"); app.setImageUrl("test"); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 1); app.setAppRestEndpoint("test"); - app.setAlternateUrl("test"); + app.setAlternateLandingPage("test"); app.setName("test"); app.setMlAppName("test"); app.setMlAppAdminId("test"); - app.setUsername("test"); - app.setAppPassword("test"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("test"); app.setOpen(false); app.setEnabled(false); - app.setCentralAuth(true); + app.setRolesInAAF(true); app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.setAppType(1); + app.setAppType(EpAppType.GUI); return app; } diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPLoginServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPLoginServiceImplTest.java index efc23ac3..31973416 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPLoginServiceImplTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/EPLoginServiceImplTest.java @@ -57,6 +57,7 @@ import org.onap.portalapp.command.EPLoginBean; import org.onap.portalapp.portal.core.MockEPUser; import org.onap.portalapp.portal.domain.EPApp; import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.domain.EpAppType; import org.onap.portalapp.portal.utils.EPCommonSystemProperties; import org.onap.portalapp.portal.utils.EcompPortalUtils; import org.onap.portalapp.util.EPUserUtils; @@ -100,24 +101,24 @@ public class EPLoginServiceImplTest { app.setName("Test"); app.setImageUrl("test"); app.setNameSpace("com.test.app"); - app.setCentralAuth(true); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setRolesInAAF(true); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 1); app.setAppRestEndpoint("test"); - app.setAlternateUrl("test"); + app.setAlternateLandingPage("test"); app.setName("test"); app.setMlAppName("test"); app.setMlAppAdminId("test"); - app.setUsername("test"); - app.setAppPassword("test"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("test"); app.setOpen(false); app.setEnabled(true); app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.setAppType(1); + app.setAppType(EpAppType.GUI); return app; } diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java index 0331633c..3b1df407 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java @@ -78,6 +78,7 @@ import org.onap.portalapp.portal.domain.EPAppRoleFunction; import org.onap.portalapp.portal.domain.EPRole; import org.onap.portalapp.portal.domain.EPUser; import org.onap.portalapp.portal.domain.EPUserApp; +import org.onap.portalapp.portal.domain.EpAppType; import org.onap.portalapp.portal.ecomp.model.UploadRoleFunctionExtSystem; import org.onap.portalapp.portal.exceptions.InactiveApplicationException; import org.onap.portalapp.portal.exceptions.InvalidUserException; @@ -177,24 +178,24 @@ public class ExternalAccessRolesServiceImplTest { app.setName("Test"); app.setImageUrl("test"); app.setNameSpace("com.test.app"); - app.setCentralAuth(true); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setRolesInAAF(true); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 10); app.setAppRestEndpoint("test"); - app.setAlternateUrl("test"); + app.setAlternateLandingPage("test"); app.setName("test"); app.setMlAppName("test"); app.setMlAppAdminId("test"); - app.setUsername("test"); - app.setAppPassword("test"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("test"); app.setOpen(false); app.setEnabled(true); app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.setAppType(1); + app.setAppType(EpAppType.GUI); return app; } @@ -325,23 +326,23 @@ public class ExternalAccessRolesServiceImplTest { EPApp app = new EPApp(); app.setName("Test"); app.setImageUrl("test"); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 1); app.setAppRestEndpoint("test"); - app.setAlternateUrl("test"); + app.setAlternateLandingPage("test"); app.setName("test"); app.setMlAppName("test"); app.setMlAppAdminId("test"); - app.setUsername("test"); - app.setAppPassword("test"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("test"); app.setOpen(true); app.setEnabled(false); app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.setAppType(1); + app.setAppType(EpAppType.GUI); return app; } diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/PersUserAppServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/PersUserAppServiceImplTest.java index e763d6f8..904c7b82 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/PersUserAppServiceImplTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/PersUserAppServiceImplTest.java @@ -53,6 +53,7 @@ import org.onap.portalapp.portal.core.MockEPUser; import org.onap.portalapp.portal.domain.EPApp; import org.onap.portalapp.portal.domain.EPUser; import org.onap.portalapp.portal.domain.EPUserApp; +import org.onap.portalapp.portal.domain.EpAppType; import org.onap.portalapp.portal.domain.PersUserAppSelection; import org.onap.portalapp.portal.framework.MockitoTestSuite; import org.onap.portalapp.portal.service.AdminRolesService; @@ -88,23 +89,23 @@ public class PersUserAppServiceImplTest { EPApp app = new EPApp(); app.setName("Test"); app.setImageUrl("test"); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 1); app.setAppRestEndpoint("test"); - app.setAlternateUrl("test"); + app.setAlternateLandingPage("test"); app.setName("test"); app.setMlAppName("test"); app.setMlAppAdminId("test"); - app.setUsername("test"); - app.setAppPassword("test"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("test"); app.setOpen(true); app.setEnabled(false); app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.setAppType(1); + app.setAppType(EpAppType.GUI); return app; } diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/PortalAdminServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/PortalAdminServiceImplTest.java index eeaf29da..a89f87f5 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/PortalAdminServiceImplTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/PortalAdminServiceImplTest.java @@ -64,6 +64,7 @@ import org.mockito.MockitoAnnotations; import org.onap.portalapp.portal.core.MockEPUser; import org.onap.portalapp.portal.domain.EPApp; import org.onap.portalapp.portal.domain.EPUser; +import org.onap.portalapp.portal.domain.EpAppType; import org.onap.portalapp.portal.transport.FieldsValidator; import org.onap.portalapp.portal.transport.PortalAdmin; import org.onap.portalapp.portal.utils.EPCommonSystemProperties; @@ -127,24 +128,24 @@ public class PortalAdminServiceImplTest { app.setName("Test"); app.setImageUrl("test"); app.setNameSpace("com.test.app"); - app.setCentralAuth(true); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setRolesInAAF(true); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 1); app.setAppRestEndpoint("test"); - app.setAlternateUrl("test"); + app.setAlternateLandingPage("test"); app.setName("test"); app.setMlAppName("test"); app.setMlAppAdminId("test"); - app.setUsername("test"); - app.setAppPassword("test"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("test"); app.setOpen(false); app.setEnabled(true); app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.setAppType(1); + app.setAppType(EpAppType.GUI); return app; } diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImplTest.java index 736f8341..5846fa9f 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImplTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImplTest.java @@ -81,6 +81,7 @@ import org.onap.portalapp.portal.domain.EPUserAppCatalogRoles; import org.onap.portalapp.portal.domain.EPUserAppRoles; import org.onap.portalapp.portal.domain.EPUserAppRolesRequest; import org.onap.portalapp.portal.domain.EPUserAppRolesRequestDetail; +import org.onap.portalapp.portal.domain.EpAppType; import org.onap.portalapp.portal.domain.ExternalSystemAccess; import org.onap.portalapp.portal.transport.*; import org.onap.portalapp.portal.utils.EPCommonSystemProperties; @@ -168,24 +169,24 @@ public class UserRolesCommonServiceImplTest { EPApp app = new EPApp(); app.setName("Test"); app.setImageUrl("test"); - app.setDescription("test"); - app.setNotes("test"); - app.setUrl("test"); + app.setAppDescription("test"); + app.setAppNotes("test"); + app.setLandingPage("test"); app.setId((long) 1); app.setAppRestEndpoint("test"); - app.setAlternateUrl("test"); + app.setAlternateLandingPage("test"); app.setName("test"); app.setMlAppName("test"); app.setMlAppAdminId("test"); - app.setUsername("test"); - app.setAppPassword("test"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("test"); app.setOpen(false); app.setEnabled(false); - app.setCentralAuth(true); + app.setRolesInAAF(true); app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.setAppType(1); + app.setAppType(EpAppType.GUI); return app; } @@ -261,7 +262,7 @@ public class UserRolesCommonServiceImplTest { EPUser user = mockUser.mockEPUser(); user.setId(1l); EPApp mockApp = mockApp(); - mockApp.setCentralAuth(false); + mockApp.setRolesInAAF(false); EPRole mockEPRole = new EPRole(); mockEPRole.setId(1l); mockEPRole.setName("test1"); @@ -356,7 +357,7 @@ public class UserRolesCommonServiceImplTest { mockEpUserList.add(user); EPApp mockApp = mockApp(); mockApp.setId(2l); - mockApp.setCentralAuth(false); + mockApp.setRolesInAAF(false); Mockito.when(epAppCommonServiceImpl.getApp(mockApp.getId())).thenReturn(mockApp); List<RoleInAppForUser> mockRoleInAppForUserList = new ArrayList<>(); RoleInAppForUser mockRoleInAppForUser = new RoleInAppForUser(); @@ -524,7 +525,7 @@ public class UserRolesCommonServiceImplTest { EPApp mockApp = mockApp(); mockApp.setNameSpace("com.test.com"); mockApp.setId(1l); - mockApp.setCentralAuth(true); + mockApp.setRolesInAAF(true); Mockito.when(epAppCommonServiceImpl.getApp(mockApp.getId())).thenReturn(mockApp); Mockito.when(EcompPortalUtils.checkIfRemoteCentralAccessAllowed()).thenReturn(true); AppWithRolesForUser mockWithRolesForUser = new AppWithRolesForUser(); @@ -698,7 +699,7 @@ public class UserRolesCommonServiceImplTest { EPApp mockApp = mockApp(); mockApp.setNameSpace("com.test.com"); mockApp.setId(2l); - mockApp.setCentralAuth(false); + mockApp.setRolesInAAF(false); Mockito.when(epAppCommonServiceImpl.getApp(mockApp.getId())).thenReturn(mockApp); Mockito.when(EcompPortalUtils.checkIfRemoteCentralAccessAllowed()).thenReturn(true); AppWithRolesForUser mockWithRolesForUser = new AppWithRolesForUser(); @@ -831,7 +832,7 @@ public class UserRolesCommonServiceImplTest { EPApp mockApp = mockApp(); mockApp.setNameSpace("com.test.com"); mockApp.setId(1l); - mockApp.setCentralAuth(true); + mockApp.setRolesInAAF(true); Mockito.when(EcompPortalUtils.checkIfRemoteCentralAccessAllowed()).thenReturn(true); ExternalSystemUser externalSystemUser = new ExternalSystemUser(); List<ExternalSystemRoleApproval> mockExternalSystemRoleApprovalList = new ArrayList<>(); @@ -999,7 +1000,7 @@ public class UserRolesCommonServiceImplTest { EPApp mockApp = mockApp(); mockApp.setId(2l); mockApp.setEnabled(true); - mockApp.setCentralAuth(false); + mockApp.setRolesInAAF(false); ExternalSystemUser externalSystemUser = new ExternalSystemUser(); List<ExternalSystemRoleApproval> mockExternalSystemRoleApprovalList = new ArrayList<>(); ExternalSystemRoleApproval mockExternalSystemRoleApproval = new ExternalSystemRoleApproval(); @@ -1187,7 +1188,7 @@ public class UserRolesCommonServiceImplTest { EPApp mockApp = mockApp(); mockApp.setId(1l); mockApp.setEnabled(true); - mockApp.setCentralAuth(true); + mockApp.setRolesInAAF(true); EPUser user = mockUser.mockEPUser(); EPUser user2 = mockUser.mockEPUser(); user2.setActive(true); @@ -1263,7 +1264,7 @@ public class UserRolesCommonServiceImplTest { EPApp mockApp = mockApp(); mockApp.setId(2l); mockApp.setEnabled(true); - mockApp.setCentralAuth(false); + mockApp.setRolesInAAF(false); Mockito.when(epAppCommonServiceImpl.getApp(mockApp.getId())).thenReturn(mockApp); List<UserApplicationRoles> mockUserApplicationRolesNonCentralizedList = new ArrayList<>(); UserApplicationRoles mockUserApplicationRoles = new UserApplicationRoles(); @@ -1318,7 +1319,7 @@ public class UserRolesCommonServiceImplTest { EPApp mockApp = mockApp(); mockApp.setId(2l); mockApp.setEnabled(true); - mockApp.setCentralAuth(false); + mockApp.setRolesInAAF(false); EPUser user = mockUser.mockEPUser(); AppWithRolesForUser appWithRolesForUser = new AppWithRolesForUser(); List<RoleInAppForUser> mockRoleInAppForUserList = new ArrayList<>(); @@ -1371,7 +1372,7 @@ public class UserRolesCommonServiceImplTest { EPApp mockApp = mockApp(); mockApp.setId(2l); mockApp.setEnabled(true); - mockApp.setCentralAuth(false); + mockApp.setRolesInAAF(false); List<EPRole> expected = new ArrayList<>(); EPRole epRole = new EPRole(); epRole.setAppId(mockApp.getId()); @@ -1400,7 +1401,7 @@ public class UserRolesCommonServiceImplTest { EPApp mockApp = mockApp(); mockApp.setId(2l); mockApp.setEnabled(true); - mockApp.setCentralAuth(false); + mockApp.setRolesInAAF(false); EPUser user = mockUser.mockEPUser(); List<EPUserApp> expected = new ArrayList<>(); EPUserApp epUserApp = new EPUserApp(); @@ -1426,7 +1427,7 @@ public class UserRolesCommonServiceImplTest { EPApp mockApp = mockApp(); mockApp.setId(2l); mockApp.setEnabled(true); - mockApp.setCentralAuth(false); + mockApp.setRolesInAAF(false); EPUser user = mockUser.mockEPUser(); List<EPUserAppCatalogRoles> expected = new ArrayList<>(); EPUserAppCatalogRoles epUserAppCatalogRoles = new EPUserAppCatalogRoles(); @@ -1458,7 +1459,7 @@ public class UserRolesCommonServiceImplTest { EPApp mockApp = mockApp(); mockApp.setId(2l); mockApp.setEnabled(true); - mockApp.setCentralAuth(false); + mockApp.setRolesInAAF(false); EPUser user = mockUser.mockEPUser(); List<EPUserApp> expected = new ArrayList<>(); EPUserApp epUserApp = new EPUserApp(); @@ -1488,7 +1489,7 @@ public class UserRolesCommonServiceImplTest { EPApp mockApp2 = mockApp(); mockApp.setId(2l); mockApp.setEnabled(true); - mockApp.setCentralAuth(false); + mockApp.setRolesInAAF(false); EPUser user = mockUser.mockEPUser(); List<EPApp> mockEpAppList = new ArrayList<>(); mockEpAppList.add(mockApp); diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/service/sessionmgt/SessionCommunicationTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/service/sessionmgt/SessionCommunicationTest.java index 708f446a..5cb61b26 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/service/sessionmgt/SessionCommunicationTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/service/sessionmgt/SessionCommunicationTest.java @@ -82,13 +82,13 @@ public class SessionCommunicationTest { app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.isCentralAuth = true; - app.isEnabled = true; - app.isOpen =false; - app.name = "test"; - app.restUrl ="http://localhost:1234"; - app.username = "test"; - app.appPassword = "xyz"; + app.setRolesInAAF(true); + app.setIsEnabled(true); + app.setIsOpen(false); + app.setAppName("test"); + app.setRestUrl("http://localhost:1234"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("xyz"); URL u = PowerMockito.mock(URL.class); HttpURLConnection huc = PowerMockito.mock(HttpURLConnection.class); String url = "http://localhost:1234/sessionTimeOuts"; @@ -106,16 +106,16 @@ public class SessionCommunicationTest { app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.isCentralAuth = true; - app.isEnabled = true; - app.isOpen =false; - app.name = "test"; - app.restUrl ="http://localhost:1234"; - app.username = "test"; - app.appPassword = ""; + app.setRolesInAAF(true); + app.setIsEnabled(true); + app.setIsOpen(false); + app.setAppName("test"); + app.setRestUrl("http://localhost:1234"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword(""); EPApp epApp = new EPApp(); - epApp.setUsername("test"); - epApp.setAppPassword("xyz1234"); + epApp.setAppBasicAuthUsername("test"); + epApp.setAppBasicAuthPassword("xyz1234"); PowerMockito.mockStatic(CipherUtil.class); PowerMockito.when(CipherUtil.decryptPKC(Matchers.anyString(),Matchers.anyString())).thenReturn("test"); Mockito.when(appsCacheService.getApp(1L)).thenReturn(epApp); @@ -136,13 +136,13 @@ public class SessionCommunicationTest { app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.isCentralAuth = true; - app.isEnabled = true; - app.isOpen =false; - app.name = "test"; - app.restUrl ="http://localhost:1234"; - app.username = "test"; - app.appPassword = "xyz"; + app.setRolesInAAF(true); + app.setIsEnabled(true); + app.setIsOpen(false); + app.setAppName("test"); + app.setRestUrl("http://localhost:1234"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("xyz"); URL u = PowerMockito.mock(URL.class); HttpURLConnection huc = PowerMockito.mock(HttpURLConnection.class); String url = "http://localhost:1234/sessionTimeOuts"; @@ -161,13 +161,13 @@ public class SessionCommunicationTest { app.setUebKey("test"); app.setUebSecret("test"); app.setUebTopicName("test"); - app.isCentralAuth = true; - app.isEnabled = true; - app.isOpen =false; - app.name = "test"; - app.restUrl ="http://localhost:1234"; - app.username = "test"; - app.appPassword = "xyz"; + app.setRolesInAAF(true); + app.setIsEnabled(true); + app.setIsOpen(false); + app.setAppName("test"); + app.setRestUrl("http://localhost:1234"); + app.setAppBasicAuthUsername("test"); + app.setAppBasicAuthPassword("xyz"); URL u = PowerMockito.mock(URL.class); HttpURLConnection huc = PowerMockito.mock(HttpURLConnection.class); String url = "http://localhost:1234/sessionTimeOuts"; diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java index a24a6b4c..8b92b58c 100644 --- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java @@ -69,8 +69,8 @@ public class RemoteWebServiceCallServiceImpl extends WebServiceCallServiceImpl i return false; } - String encryptedPwdDB = appRecord.getAppPassword(); - String appUserName = appRecord.getUsername(); + String encryptedPwdDB = appRecord.getAppBasicAuthPassword(); + String appUserName = appRecord.getAppBasicAuthUsername(); String decryptedPwd = CipherUtil.decryptPKC(encryptedPwdDB, secretKey == null ? SystemProperties.getProperty(SystemProperties.Decryption_Key) : secretKey); if (decryptedPwd.equals(requestPassword) && appUserName.equals(requestAppName)) diff --git a/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java b/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java index 88ccf5d1..5b7f7d45 100644 --- a/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java +++ b/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java @@ -97,7 +97,7 @@ public class RemoteWebServiceCallServiceImplTest { String criteria= " where ueb_key = 'requestUebKey'"; List<EPApp> appList = new ArrayList<>(); EPApp app = new EPApp(); - app.setAppPassword("password"); + app.setAppBasicAuthPassword("password"); appList.add(app); Mockito.when(dataAccessService.getList(EPApp.class, criteria.toString(), null, null)).thenReturn(appList); String secretKey = null; @@ -115,8 +115,8 @@ public class RemoteWebServiceCallServiceImplTest { String criteria= " where ueb_key = 'requestUebKey'"; List<EPApp> appList = new ArrayList<>(); EPApp app = new EPApp(); - app.setAppPassword("password"); - app.setUsername("requestAppName"); + app.setAppBasicAuthPassword("password"); + app.setAppBasicAuthUsername("requestAppName"); appList.add(app); Mockito.when(dataAccessService.getList(EPApp.class, criteria.toString(), null, null)).thenReturn(appList); String secretKey = null; @@ -134,8 +134,8 @@ public class RemoteWebServiceCallServiceImplTest { String criteria= " where ueb_key = 'requestUebKey'"; List<EPApp> appList = new ArrayList<>(); EPApp app = new EPApp(); - app.setAppPassword("password"); - app.setUsername("requestAppName"); + app.setAppBasicAuthPassword("password"); + app.setAppBasicAuthUsername("requestAppName"); appList.add(app); Mockito.when(dataAccessService.getList(EPApp.class, criteria.toString(), null, null)).thenReturn(null); String secretKey = null; @@ -160,8 +160,8 @@ public class RemoteWebServiceCallServiceImplTest { // String criteria= " where ueb_key = 'requestUebKey'"; List<EPApp> appList = new ArrayList<>(); EPApp app = new EPApp(); - app.setAppPassword("password"); - app.setUsername("requestAppName"); + app.setAppBasicAuthPassword("password"); + app.setAppBasicAuthUsername("requestAppName"); appList.add(app); Mockito.when(dataAccessService.getList(EPApp.class, criteria.toString(), null, null)).thenReturn(null); assertFalse(remoteWebServiceCallServiceImpl.verifyAppKeyCredential("test")); @@ -175,8 +175,8 @@ public class RemoteWebServiceCallServiceImplTest { String criteria= " where ueb_key = 'test'"; List<EPApp> appList = new ArrayList<>(); EPApp app = new EPApp(); - app.setAppPassword("password"); - app.setUsername("requestAppName"); + app.setAppBasicAuthPassword("password"); + app.setAppBasicAuthUsername("requestAppName"); appList.add(app); Mockito.when(dataAccessService.getList(EPApp.class, criteria.toString(), null, null)).thenReturn(appList); assertTrue(remoteWebServiceCallServiceImpl.verifyAppKeyCredential("test")); diff --git a/portal-FE-common/src/app/shared/model/applications-onboarding/applications.ts b/portal-FE-common/src/app/shared/model/applications-onboarding/applications.ts index a0a93a22..bc0ce423 100644 --- a/portal-FE-common/src/app/shared/model/applications-onboarding/applications.ts +++ b/portal-FE-common/src/app/shared/model/applications-onboarding/applications.ts @@ -57,7 +57,14 @@ export interface IApplications { uebTopicName ?: any; uebKey ?: any; uebSecret ?: any; + // ---- start ----to be removed restrictedApp ?: any; isCentralAuth ?: any; - nameSpace ?: any + // ---- end ----to be removed + applicationType ?: any; + rolesInAAF ?: any; + nameSpace ?: any; + usesCadi ?: any; + modeOfIntegration ?: any; + appAck ?: any; }
\ No newline at end of file diff --git a/portal-FE-os/package-lock.json b/portal-FE-os/package-lock.json index 4e3f349d..80d1d289 100644 --- a/portal-FE-os/package-lock.json +++ b/portal-FE-os/package-lock.json @@ -398,9 +398,9 @@ "dev": true }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "os-locale": { @@ -1063,9 +1063,9 @@ } }, "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", "dev": true }, "acorn-dynamic-import": { @@ -1318,6 +1318,14 @@ "bn.js": "^4.0.0", "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } } }, "assert": { @@ -1360,10 +1368,13 @@ "dev": true }, "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } }, "async-each": { "version": "1.0.3", @@ -1625,9 +1636,9 @@ "dev": true }, "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", "dev": true }, "base64id": { @@ -1698,9 +1709,9 @@ }, "dependencies": { "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true } } @@ -1712,9 +1723,9 @@ "dev": true }, "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.1.tgz", + "integrity": "sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA==", "dev": true }, "body-parser": { @@ -1853,21 +1864,43 @@ "requires": { "bn.js": "^4.1.0", "randombytes": "^2.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } } }, "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.1.0.tgz", + "integrity": "sha512-VYxo7cDCeYUoBZ0ZCy4UyEUCP3smyBd4DRQM5nrFS1jJjPJjX7rP3oLRpPoWfkhQfyJ0I9ZbHbKafrFD/SGlrg==", + "dev": true, + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.2", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } } }, "browserify-zlib": { @@ -1880,14 +1913,15 @@ } }, "browserslist": { - "version": "4.6.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.6.6.tgz", - "integrity": "sha512-D2Nk3W9JL9Fp/gIcWei8LrERCS+eXu9AM5cfXA8WEZ84lFks+ARnZ0q/R69m2SV3Wjma83QDDPxsNKXUwdIsyA==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.0.tgz", + "integrity": "sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000984", - "electron-to-chromium": "^1.3.191", - "node-releases": "^1.1.25" + "caniuse-lite": "^1.0.30001043", + "electron-to-chromium": "^1.3.413", + "node-releases": "^1.1.53", + "pkg-up": "^2.0.0" } }, "browserstack": { @@ -1900,9 +1934,9 @@ } }, "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", "dev": true, "requires": { "base64-js": "^1.0.2", @@ -2067,9 +2101,9 @@ } }, "caniuse-lite": { - "version": "1.0.30000984", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000984.tgz", - "integrity": "sha512-n5tKOjMaZ1fksIpQbjERuqCyfgec/m9pferkFQbLmWtqLUdmt12hNhjSwsmPdqeiG2NkITOQhr1VYIwWSAceiA==", + "version": "1.0.30001055", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001055.tgz", + "integrity": "sha512-MbwsBmKrBSKIWldfdIagO5OJWZclpJtS4h0Jrk/4HFrXJxTdVdH23Fd+xCiHriVGvYcWyW8mR/CPsYajlH8Iuw==", "dev": true }, "canonical-path": { @@ -2123,9 +2157,9 @@ } }, "chownr": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.2.tgz", - "integrity": "sha512-GkfeAQh+QNy3wquu9oIZr6SS5x7wGdSgNQvD10X3r+AZr1Oys22HW8kAmDMvNg2+Dm0TeGaEuO8gFwdBXxwO8A==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "dev": true }, "chrome-trace-event": { @@ -2374,12 +2408,20 @@ "dev": true }, "compressible": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.17.tgz", - "integrity": "sha512-BGHeLCK1GV7j1bSmQQAi26X+GgWcTjLr/0tzSvMCl3LH1w1IJ4PFSPoV5316b30cneTziC+B1a+3OjoSUcQYmw==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "dev": true, "requires": { - "mime-db": ">= 1.40.0 < 2" + "mime-db": ">= 1.43.0 < 2" + }, + "dependencies": { + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", + "dev": true + } } }, "compression": { @@ -2434,13 +2476,10 @@ "dev": true }, "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true }, "console-control-strings": { "version": "1.1.0", @@ -2569,6 +2608,14 @@ "requires": { "bn.js": "^4.1.0", "elliptic": "^6.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } } }, "create-hash": { @@ -2684,9 +2731,9 @@ "dev": true }, "cyclist": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz", - "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", + "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", "dev": true }, "dashdash": { @@ -2704,12 +2751,6 @@ "integrity": "sha1-YV6CjiM90aubua4JUODOzPpuytg=", "dev": true }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -2732,10 +2773,18 @@ "dev": true }, "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dev": true, + "requires": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + } }, "deep-is": { "version": "0.1.3", @@ -2770,6 +2819,15 @@ } } }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", @@ -2845,6 +2903,12 @@ "dev": true } } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true } } }, @@ -2873,9 +2937,9 @@ "dev": true }, "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", "dev": true, "requires": { "inherits": "^2.0.1", @@ -2924,6 +2988,14 @@ "bn.js": "^4.1.0", "miller-rabin": "^4.0.0", "randombytes": "^2.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } } }, "dir-glob": { @@ -3007,15 +3079,15 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.194", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.194.tgz", - "integrity": "sha512-w0LHR2YD9Ex1o+Sz4IN2hYzCB8vaFtMNW+yJcBf6SZlVqgFahkne/4rGVJdk4fPF98Gch9snY7PiabOh+vqHNg==", + "version": "1.3.434", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.434.tgz", + "integrity": "sha512-WjzGrE6appXvMyc2kH9Ide7OxsgTuRzag9sjQ5AcbOnbS9ut7P1HzOeEbJFLhr81IR7n2Hlr6qTTSGTXLIX5Pg==", "dev": true }, "elliptic": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.0.tgz", - "integrity": "sha512-eFOJTMyCYb7xtE/caJ6JJu+bhi67WCYNbkGSknu20pmM8Ke/bqOfdnZWxyoGN26JgfxTbXrsCkEw4KheCT/KGg==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", + "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", "dev": true, "requires": { "bn.js": "^4.4.0", @@ -3025,6 +3097,14 @@ "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0", "minimalistic-crypto-utils": "^1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } } }, "emojis-list": { @@ -3040,9 +3120,9 @@ "dev": true }, "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, "requires": { "once": "^1.4.0" @@ -3163,6 +3243,36 @@ "is-arrayish": "^0.2.1" } }, + "es-abstract": { + "version": "1.17.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", + "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, "es6-promise": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", @@ -3226,9 +3336,9 @@ }, "dependencies": { "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true } } @@ -3249,9 +3359,9 @@ }, "dependencies": { "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true } } @@ -3281,9 +3391,9 @@ "dev": true }, "events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", - "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.1.0.tgz", + "integrity": "sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg==", "dev": true }, "eventsource": { @@ -3710,9 +3820,9 @@ } }, "figgy-pudding": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", - "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", "dev": true }, "figures": { @@ -3797,6 +3907,23 @@ "commondir": "^1.0.1", "make-dir": "^1.0.0", "pkg-dir": "^2.0.0" + }, + "dependencies": { + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "find-up": { @@ -3970,7 +4097,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -4385,7 +4513,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -4441,6 +4570,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -4484,12 +4614,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -4505,6 +4637,12 @@ "rimraf": "2" } }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, "gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", @@ -4653,17 +4791,25 @@ "ignore": "^3.3.5", "pify": "^3.0.0", "slash": "^1.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "globule": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", - "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.1.tgz", + "integrity": "sha512-OVyWOHgw29yosRHCHo7NncwR1hW5ew0W/UrvtwvjefVJeQ26q4/8r8FmPsSF1hJ93IgWkyv16pCTz6WblMzm/g==", "dev": true, "optional": true, "requires": { "glob": "~7.1.1", - "lodash": "~4.17.10", + "lodash": "~4.17.12", "minimatch": "~3.0.2" } }, @@ -4685,17 +4831,24 @@ "dev": true }, "handlebars": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", - "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", + "version": "4.7.6", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", + "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", "dev": true, "requires": { + "minimist": "^1.2.5", "neo-async": "^2.6.0", - "optimist": "^0.6.1", "source-map": "^0.6.1", - "uglify-js": "^3.1.4" + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" }, "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -4734,6 +4887,15 @@ } } }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -4772,6 +4934,12 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, "has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", @@ -4811,13 +4979,33 @@ } }, "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } } }, "hash.js": { @@ -4870,9 +5058,9 @@ } }, "html-entities": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.3.1.tgz", + "integrity": "sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA==", "dev": true }, "http-deceiver": { @@ -4949,9 +5137,9 @@ "dev": true }, "https-proxy-agent": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.2.tgz", - "integrity": "sha512-c8Ndjc9Bkpfx/vCJueCPy0jlP4ccCCSNDp8xwCZzPjKJUm+B+u9WX2x98Qx4n1PiMNTWo3D7KK5ifNV/yJyRzg==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", + "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", "dev": true, "requires": { "agent-base": "^4.3.0", @@ -5073,9 +5261,9 @@ } }, "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -5114,9 +5302,9 @@ "dev": true }, "in-publish": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", - "integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.1.tgz", + "integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==", "dev": true, "optional": true }, @@ -5261,9 +5449,9 @@ "dev": true }, "ipaddr.js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", - "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "dev": true }, "is-accessor-descriptor": { @@ -5286,6 +5474,12 @@ } } }, + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", + "dev": true + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -5307,6 +5501,12 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, "is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", @@ -5327,6 +5527,12 @@ } } }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -5380,13 +5586,10 @@ "dev": true }, "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "dev": true }, "is-fullwidth-code-point": { "version": "1.0.0", @@ -5477,12 +5680,30 @@ "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", "dev": true }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -5562,6 +5783,12 @@ "wordwrap": "^1.0.0" }, "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, "glob": { "version": "5.0.15", "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", @@ -5593,9 +5820,9 @@ } }, "istanbul-api": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.1.6.tgz", - "integrity": "sha512-x0Eicp6KsShG1k1rMgBAi/1GgY7kFGEBwQpw3PXGEmu+rBcBNhqU8g2DgY9mlepAsLPzrzrbqSgCGANnki4POA==", + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.1.7.tgz", + "integrity": "sha512-LYTOa2UrYFyJ/aSczZi/6lBykVMjCCvUmT64gOe+jPZFy4w6FYfPGqFT2IiQ2BxVHHDOvCD7qrIXb0EOh4uGWw==", "dev": true, "requires": { "async": "^2.6.2", @@ -5606,22 +5833,13 @@ "istanbul-lib-instrument": "^3.3.0", "istanbul-lib-report": "^2.0.8", "istanbul-lib-source-maps": "^3.0.6", - "istanbul-reports": "^2.2.4", + "istanbul-reports": "^2.2.5", "js-yaml": "^3.13.1", "make-dir": "^2.1.0", "minimatch": "^3.0.4", "once": "^1.4.0" }, "dependencies": { - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, "istanbul-lib-coverage": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", @@ -5643,34 +5861,10 @@ "semver": "^6.0.0" } }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - }, - "dependencies": { - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - } - } - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, "semver": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", - "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true } } @@ -5929,9 +6123,9 @@ "integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==" }, "js-base64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz", - "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.2.tgz", + "integrity": "sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ==", "dev": true, "optional": true }, @@ -6156,9 +6350,9 @@ "dev": true }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, "klaw": { @@ -6214,6 +6408,14 @@ "clone": "^2.1.1", "loader-utils": "^1.1.0", "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "levn": { @@ -6361,9 +6563,9 @@ } }, "loglevel": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.3.tgz", - "integrity": "sha512-LoEDv5pgpvWgPF4kNYuIp0qqSJVWak/dML0RY74xlzMZiT9w77teNAwKYKWBTYjlokMirg+o3jBwp+vlLrcfAA==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.8.tgz", + "integrity": "sha512-bsU7+gc9AJ2SqpzxwU3+1fedl8zAntbtC5XYlt3s2j1hJcn2PsXSmgN8TaLG/J1/2mod4+cE/3vNL70/c1RNCA==", "dev": true }, "loose-envify": { @@ -6405,12 +6607,21 @@ } }, "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "dev": true, "requires": { - "pify": "^3.0.0" + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, "make-error": { @@ -6524,9 +6735,9 @@ }, "dependencies": { "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true, "optional": true } @@ -6573,6 +6784,14 @@ "requires": { "bn.js": "^4.0.0", "brorand": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } } }, "mime": { @@ -6698,12 +6917,20 @@ } }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "dev": true, "requires": { - "minimist": "0.0.8" + "minimist": "^1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + } } }, "move-concurrently": { @@ -6803,9 +7030,9 @@ "dev": true }, "node-forge": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", - "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz", + "integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==", "dev": true }, "node-gyp": { @@ -6878,13 +7105,10 @@ } }, "node-releases": { - "version": "1.1.25", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.25.tgz", - "integrity": "sha512-fI5BXuk83lKEoZDdH3gRhtsNgh05/wZacuXkgbiYkceE7+QIMXOg98n9ZV7mz27B+kFHnqHcUpscZZlGRSmTpQ==", - "dev": true, - "requires": { - "semver": "^5.3.0" - } + "version": "1.1.55", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.55.tgz", + "integrity": "sha512-H3R3YR/8TjT5WPin/wOoHOUPHgvj8leuU/Keta/rwelEQN9pA/S2Dx8/se4pZ2LBxSd0nAGzsNzhqwa77v7F1w==", + "dev": true }, "node-sass": { "version": "4.9.3", @@ -7202,6 +7426,28 @@ } } }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "object-is": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.2.tgz", + "integrity": "sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -7211,6 +7457,18 @@ "isobject": "^3.0.0" } }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, "object.omit": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", @@ -7316,17 +7574,17 @@ } }, "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, "requires": { "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", + "fast-levenshtein": "~2.0.6", "levn": "~0.3.0", "prelude-ls": "~1.1.2", "type-check": "~0.3.2", - "wordwrap": "~1.0.0" + "word-wrap": "~1.2.3" } }, "original": { @@ -7431,20 +7689,20 @@ "dev": true }, "parallel-transform": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz", - "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", + "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", "dev": true, "requires": { - "cyclist": "~0.2.2", + "cyclist": "^1.0.1", "inherits": "^2.0.3", "readable-stream": "^2.1.5" } }, "parse-asn1": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", - "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", + "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", "dev": true, "requires": { "asn1.js": "^4.0.0", @@ -7584,6 +7842,14 @@ "dev": true, "requires": { "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "pbkdf2": { @@ -7629,9 +7895,9 @@ } }, "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true }, "pinkie": { @@ -7658,6 +7924,15 @@ "find-up": "^2.1.0" } }, + "pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + }, "portfinder": { "version": "1.0.17", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.17.tgz", @@ -7667,6 +7942,14 @@ "async": "^1.5.2", "debug": "^2.2.0", "mkdirp": "0.5.x" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + } } }, "posix-character-classes": { @@ -7852,9 +8135,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "pify": { @@ -7906,13 +8189,13 @@ } }, "proxy-addr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", - "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", "dev": true, "requires": { "forwarded": "~0.1.2", - "ipaddr.js": "1.9.0" + "ipaddr.js": "1.9.1" } }, "proxy-from-env": { @@ -7951,6 +8234,14 @@ "parse-asn1": "^5.0.0", "randombytes": "^2.0.1", "safe-buffer": "^5.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } } }, "pump": { @@ -8334,6 +8625,16 @@ "safe-regex": "^1.1.0" } }, + "regexp.prototype.flags": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", + "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, "regexpu-core": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", @@ -8577,9 +8878,9 @@ "dev": true }, "sass-graph": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", - "integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.6.tgz", + "integrity": "sha512-MKuEYXFSGuRSi8FZ3A7imN1CeVn9Gpw0/SFJKdL1ejXJneI9a5rwlEZrKejhEFAA3O6yr3eIyl/WuvASvlT36g==", "dev": true, "optional": true, "requires": { @@ -8601,6 +8902,14 @@ "neo-async": "^2.5.0", "pify": "^3.0.0", "semver": "^5.5.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "saucelabs": { @@ -8682,12 +8991,12 @@ } }, "selfsigned": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.4.tgz", - "integrity": "sha512-9AukTiDmHXGXWtWjembZ5NDmVvP2695EtpgbCsxCa68w3c88B+alqbmZ4O3hZ4VWGXeGWzEVdvqgAJD8DQPCDw==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.7.tgz", + "integrity": "sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA==", "dev": true, "requires": { - "node-forge": "0.7.5" + "node-forge": "0.9.0" } }, "semver": { @@ -8744,9 +9053,9 @@ } }, "serialize-javascript": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.7.0.tgz", - "integrity": "sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz", + "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==", "dev": true }, "serve-index": { @@ -9200,17 +9509,6 @@ "requires": { "async": "^2.5.0", "loader-utils": "^1.1.0" - }, - "dependencies": { - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - } } }, "source-map-resolve": { @@ -9318,9 +9616,9 @@ } }, "speed-measure-webpack-plugin": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/speed-measure-webpack-plugin/-/speed-measure-webpack-plugin-1.3.1.tgz", - "integrity": "sha512-qVIkJvbtS9j/UeZumbdfz0vg+QfG/zxonAjzefZrqzkr7xOncLVXkeGbTpzd1gjCBM4PmVNkWlkeTVhgskAGSQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/speed-measure-webpack-plugin/-/speed-measure-webpack-plugin-1.3.3.tgz", + "integrity": "sha512-2ljD4Ch/rz2zG3HsLsnPfp23osuPBS0qPuz9sGpkNXTN1Ic4M+W9xB8l8rS8ob2cO4b1L+WTJw/0AJwWYVgcxQ==", "dev": true, "requires": { "chalk": "^2.0.1" @@ -9447,9 +9745,9 @@ } }, "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", "dev": true }, "streamroller": { @@ -9492,6 +9790,48 @@ "strip-ansi": "^3.0.0" } }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string.prototype.trimleft": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", + "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimstart": "^1.0.0" + } + }, + "string.prototype.trimright": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", + "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimend": "^1.0.0" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -9663,9 +10003,9 @@ "dev": true }, "source-map-support": { - "version": "0.5.12", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", - "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -9733,9 +10073,9 @@ } }, "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -9765,16 +10105,6 @@ "yallist": "^3.0.2" } }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, "mississippi": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", @@ -9794,9 +10124,9 @@ } }, "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -9817,12 +10147,6 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, "pkg-dir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", @@ -9842,12 +10166,6 @@ "once": "^1.3.1" } }, - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -9864,9 +10182,9 @@ } }, "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true } } @@ -9894,15 +10212,15 @@ } }, "thunky": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.3.tgz", - "integrity": "sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "dev": true }, "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", + "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", "dev": true, "requires": { "setimmediate": "^1.0.4" @@ -10047,9 +10365,9 @@ }, "dependencies": { "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true } } @@ -10458,9 +10776,9 @@ } }, "vm-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz", - "integrity": "sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", "dev": true }, "void-elements": { @@ -10470,14 +10788,42 @@ "dev": true }, "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.1.tgz", + "integrity": "sha512-+IF9hfUFOrYOOaKyfaI7h7dquUIOgyEMoQMLA7OP5FxegKA2+XdXThAZ9TU2kucfhDH7rfMHs1oPYziVGWRnZA==", "dev": true, "requires": { - "chokidar": "^2.0.2", + "chokidar": "^2.1.8", "graceful-fs": "^4.1.2", "neo-async": "^2.5.0" + }, + "dependencies": { + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + } } }, "wbuf": { @@ -10590,9 +10936,9 @@ }, "dependencies": { "mime": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", - "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.5.tgz", + "integrity": "sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w==", "dev": true } } @@ -10763,9 +11109,9 @@ } }, "mime": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", - "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.5.tgz", + "integrity": "sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w==", "dev": true }, "ms": { @@ -10786,9 +11132,9 @@ } }, "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -10986,6 +11332,12 @@ "string-width": "^1.0.2 || 2" } }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", diff --git a/portal-FE-os/package.json b/portal-FE-os/package.json index 4371bc4d..5baf36ba 100644 --- a/portal-FE-os/package.json +++ b/portal-FE-os/package.json @@ -50,7 +50,7 @@ "zone.js": "~0.8.26" }, "devDependencies": { - "@angular-devkit/build-angular": "^0.10.0", + "@angular-devkit/build-angular": "^0.10.7", "@angular/cli": "~7.0.6", "@angular/compiler-cli": "~7.0.0", "@angular/language-service": "~7.0.0", diff --git a/portal-FE-os/pom.xml b/portal-FE-os/pom.xml index af265d06..a74e837c 100644 --- a/portal-FE-os/pom.xml +++ b/portal-FE-os/pom.xml @@ -70,7 +70,7 @@ </executions> </plugin> - + <plugin> <groupId>com.github.eirslett</groupId> <artifactId>frontend-maven-plugin</artifactId> @@ -135,6 +135,7 @@ </executions> </plugin> + </plugins> </build> </project> |