A web application that offers GUI for self-service operation for Difi's ID-porten customers. Self-service is done against the ID-porten's external administration API provided by Difi.
By default, the application uses the 'dev' profile, so you don't need to configure anything.
You can launch the Java Server with Maven. The project is configured with a Maven wrapper, so you don't need to install Maven. This is a guarantee that all project collaborators have the same Maven version.
We have created a script that builds all the modules, and then run the main application in local (dev profile).
From the project's root, run:
./build.sh && ./run.sh
Or, using your own local Maven installation. From the project's root, run:
mvn clean install
Then
cd management-ui
mvnw (on MacOS/Linux) or mvnw (on Windows)
(This will run our default Maven task, spring-boot:run)
Running Webpack is the default task in the package.json file, so you just need to run the above command from the main application folder (management-ui):
npm start
(You need to start the server (backend) in a separate terminal tab before starting the webpack dev server)
To optimize the application for production, run:
[TODO]
The application comes with a set of tests:
Integration tests are done with the Spring Test Context framework, and are located in the src/test/java folder. These tests can be run directly from the IDE, by right-click on each test class, or by running (in project's root folder):
./mvnw clean test
For UI tests, only unit tests with Jest are provided. These tests are located in the management-ui/src/test/javascript/spec folder. These tests will mock up the access to the application's REST endpoints, so we can test the UI layer without having to start the java backend. UI tests can be run using (inside management-ui folder)
npm start test
If the tests can't run because of linting issues, run the following command to fix linting issues, before running the tests:
npm run lint:fix
Running UI tests from the project's root folder:
./ui-test.sh
In runtime, the application captures some of the user's action and persists the information in ELF (Extended Log Format) formatted log file. Only sensitive user actions are captured. This includes, updating and deleting integration resources. The log files are located in the folder /auditlogs and organized by date.
Only manager are supposed to have access to the audit logs. A manager is seen here as person with shell access to the application server.
During the development, Kubernetes engine (GKE) is used as the infrastructure to run the application for acceptance testing and validation. To access the audit logs in this environment, one needs cluster access with permissions to run interactive shell commands on kubernetes pods where the application is running.
Figure out which pod (in test environment) our application is running on:
kubectl get pods -n test
After the pod is identified, run this one command to interactively open the audit log file. Assuming [management-ui-56697bdf75-wwllx] is the pod where the application is running:
kubectl exec -it management-ui-56697bdf75-wwllx -n test -- vi auditlogs/elf-audit.log
You can use docker to improve your development experience.
[TODO]
Content type
Image
Digest
Size
119.1 MB
Last updated
almost 7 years ago
docker pull difi/sp-selfservice-web