1 .. ===============LICENSE_START=======================================================
4 .. Copyright (C) 2019 AT&T Intellectual Property and Nokia
6 .. Licensed under the Apache License, Version 2.0 (the "License");
7 .. you may not use this file except in compliance with the License.
8 .. You may obtain a copy of the License at
10 .. http://www.apache.org/licenses/LICENSE-2.0
12 .. Unless required by applicable law or agreed to in writing, software
13 .. distributed under the License is distributed on an "AS IS" BASIS,
14 .. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 .. See the License for the specific language governing permissions and
16 .. limitations under the License.
17 .. ===============LICENSE_END=========================================================
19 RIC Dashboard Developer Guide
20 =============================
22 This document provides a quickstart for developers of the O-RAN SC RIC Dashboard web application.
27 1. Java development kit (JDK), version 11 or later
28 2. Maven dependency-management tool, version 3.4 or later
30 Other tools including the Node Package Manager (npm) are fetched dynamically.
32 Angular Front-End Application
33 -----------------------------
35 The Angular 8 application files are in subdirectory ``webapp-frontend``.
36 Build the front-end application via ``mvn package``. For development and debugging,
37 build the application, then launch an ng development server using this command::
39 ./ng serve --proxy-config proxy.conf.json
41 The app will automatically reload in the browser if you change any of the source files.
42 The ng server listens for requests at this URL:
47 Spring-Boot Back-End Application
48 --------------------------------
50 A development (not production) server uses local configuration and serves mock data
51 that simulates the behavior of remote endpoints. The back-end server listens for
56 The directory ``src/test/resources`` contains usable versions of the required property
57 files. These steps are required to launch:
59 1. Set an environment variable via JVM argument: ``-Dorg.oransc.ric.portal.dashboard=mock``
60 2. Run the JUnit test case ``DashboardServerTest`` which is not exactly a "test" because it never finishes.
62 Both steps can be done with this command-line invocation::
64 mvn -Dorg.oransc.ric.portal.dashboard=mock -Dtest=DashboardTestServer test
66 Development user authentication
67 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
69 The development server requires basic HTTP user authentication for all requests. Like
70 the production server, it requires HTTP headers with authentication for Portal API
71 requests. The username and password are stored in constants in this Java class in
72 the ``src/test/java`` folder::
74 org.oransc.ric.portal.dashboard.config.WebSecurityMockConfiguration
76 Like the production server, the development server also performs role-based
77 authentication on requests. The user name-role name associations are also defined
78 in the class shown above.
80 Production user authentication
81 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
83 The server uses the ONAP Portal's "EPSDK-FW" library to support a
84 single-sign-on (SSO) feature, which requires users to authenticate
85 at the ONAP Portal UI. The RIC Dashboard can be on-boarded as an
86 application on the ONAP Portal using its application on-boarding UI.
88 The server authenticates requests using cookies that are set
94 The EPService value is not checked. The UserId value is decrypted
95 using a secret key shared with the ONAP Portal to yield a user ID.
96 That ID must match a user's loginId defined in the user manager.
98 The regular server checks requests for the following granted
99 authorities (role names), as defined in the java class ``DashboardConstants``.
100 A standard user can invoke all "GET" methods but not make changes.
101 A system administrator can invoke all methods ("GET", "POST", "PUT",
102 "DELETE") to make arbitrary changes::
107 Use the following structure in a JSON file to publish a user for the
115 "middleInitial":null,
122 "orgManagerUserId":null,
129 "name":"Standard_User",