Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page discusses how to on-board Java-based web application to the ONAP Portal using (epsdk-fw-x.x.x.jar) library that is developed by the ONAP Portal development team (under repo - https://gerrit.onap.org/r/admin/repos/portal/sdk). 

Table of Contents

Get the dependency jar File

The following link will let you browse "final release versions" in the nexus repository: https://nexus.onap.org/content/repositories/releases/org/onap/portal/sdk/epsdk-fw/

...

Code Block
<dependency>
			<groupId>org.onap.portal.sdk</groupId>
			<artifactId>epsdk-fw</artifactId>
			<version>2.6.0</version>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
				<exclusion>
					<groupId>log4j</groupId>
					<artifactId>log4j</artifactId>
				</exclusion>
				<exclusion>
					<groupId>log4j</groupId>
					<artifactId>apache-log4j-extras</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-log4j12</artifactId>
				</exclusion>
				<exclusion>
					<groupId>junit</groupId>
					<artifactId>junit</artifactId>
				</exclusion>
				<exclusion>
					<groupId>commons-fileupload</groupId>
					<artifactId>commons-fileupload</artifactId>
				</exclusion>
				<exclusion>
					<groupId>commons-beanutils</groupId>
					<artifactId>commons-beanutils</artifactId>
				</exclusion>
				<!-- EELF omits "test" scope on this dependency -->
				<exclusion>
					<groupId>org.powermock</groupId>
					<artifactId>powermock-module-junit4</artifactId>
				</exclusion>
				<!-- EELF omits "test" scope on this dependency -->
				<exclusion>
					<groupId>org.powermock</groupId>
					<artifactId>powermock-api-mockito</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

Configure the properties files

All applications that on-board to the ONAP Portal and use either the FW or SDK libraries must provide a configuration file called portal.properties. These properties configure the application for required network resources, including the Common Security Platform's Global Log On page, and the ONAP Portal's REST APIs. This file must be available on the Java classpath of a running application where it is found by the ONAP Framework (FW) library. 

...

Sample configuration

portal.properties

Configuration Key

Expected Value

ecomp_rest_url

Portal REST URL that is reachable by the application back-end.

This is a value like https://portal.api.simpledemo.onap.org:30225/ONAPPORTAL/auxapi

portal.api.impl.class

Java class name. No default value.

Value must be like org.oransc.ric.portal.dashboard.portalapi.PortalRestCentralServiceImpl

ecomp_redirect_url

Portal URL that is reachable by a user’s browser.

This is a value like https://portal.api.simpledemo.onap.org:30225/ONAPPORTAL/login.htm

role_access_centralizedSelector for role access. No default value. Value must be remote.
ueb_app_key

Unique key assigned by ONAP Portal to the

RIC Dashboard

onboarded application. No default value.

key.properties

The file key.properties must be provided on the Java classpath for the Spring-Boot application, as required by the EPSDK-FW library. The Helm chart for the application should mount this file appropriately. 

The file must contain the following entries.

cipher.enc.key - Encryption key used by the EPSDK-FW library. No default value.

Implement the Users Management API

The application developers must provide a Java class that implements the interface org.onap.portalsdk.core.onboarding.crossapi.IPortalRestCentralService as documented below. The implementation should throw a PortalAPIException if anything fails; e.g., an unknown role or user.

...

Onboard and test

Application Onboarding using UI in ONAP Portal.

When on-boarding the application to the ONAP Portal the administrator must supply the following information about the deployed instance:

  • App URL that is reachable by a user’s browser. The domain of this host name must match the Portal URL that is similarly reachable by a user’s browser for cookie-based authentication to function as expected. This should be a value like http://yourapp.simpledemo.onap.org:8080
  • App REST URL that is reachable by the Portal back-end server. This can be a host name or an IP address, because it does not use cookie-based authentication. This must be a URL with suffix “/api/v3” for example http://yourapp.simpledemo.onap.org:8080/api/v3