1 .. ===============LICENSE_START=======================================================
4 .. Copyright (C) 2019 AT&T Intellectual Property
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
28 1. Java development kit (JDK), version 11 or later
29 2. Maven dependency-management tool, version 3.4 or later
31 Other required tools including the Node Package Manager (npm) are fetched dynamically.
33 Clone and Update Submodules
34 ---------------------------
36 After cloning the repository, initialize and update all git submodules like this::
41 Check the submodule status at any time like this::
46 Angular Front-End Application
47 -----------------------------
49 The Angular 8 application files are in subdirectory ``webapp-frontend``.
50 Build the front-end application via ``mvn package``. For development and debugging,
51 build the application, then launch an ng development server using this command::
53 ./ng serve --proxy-config proxy.conf.json
55 The app will automatically reload in the browser if you change any of the source files.
56 The ng server listens for requests at this URL:
61 Spring-Boot Back-End Application
62 --------------------------------
64 A development (not production) server uses local configuration and serves mock data
65 that simulates the behavior of remote endpoints. The back-end server listens for
70 The directory ``src/test/resources`` contains usable versions of the required property
71 files. These steps are required to launch:
73 1. Set an environment variable via JVM argument: ``-Dorg.oransc.ric.portal.dashboard=mock``
74 2. Run the JUnit test case ``DashboardServerTest`` which is not exactly a "test" because it never finishes.
76 Both steps can be done with this command-line invocation::
78 mvn -Dorg.oransc.ric.portal.dashboard=mock -Dtest=DashboardTestServer test
80 Development user authentication
81 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
83 The development server requires basic HTTP user authentication for all requests. Like
84 the production server, it requires HTTP headers with authentication for Portal API
85 requests. The username and password are stored in constants in this Java class in
86 the ``src/test/java`` folder::
88 org.oransc.ric.portal.dashboard.config.WebSecurityMockConfiguration
90 Like the production server, the development server also performs role-based
91 authentication on requests. The user name-role name associations are also defined
92 in the class shown above.
94 Production user authentication
95 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97 The server uses the ONAP Portal's "EPSDK-FW" library to support a
98 single-sign-on (SSO) feature, which requires users to authenticate
99 at the ONAP Portal UI. The RIC Dashboard can be on-boarded as an
100 application on the ONAP Portal using its application on-boarding UI.
102 The server authenticates requests using cookies that are set
108 The EPService value is not checked. The UserId value is decrypted
109 using a secret key shared with the ONAP Portal to yield a user ID.
110 That ID must match a user's loginId defined in the user manager.
112 The regular server checks requests for the following granted
113 authorities (role names), as defined in the java class ``DashboardConstants``.
114 A standard user can invoke all "GET" methods but not make changes.
115 A system administrator can invoke all methods ("GET", "POST", "PUT",
116 "DELETE") to make arbitrary changes::
121 Use the following structure in a JSON file to publish a user for the
129 "middleInitial":null,
136 "orgManagerUserId":null,
143 "name":"Standard_User",