Skip to content

INESCTEC/dataspace-app-store-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


version status Java Version Gradle Version

Requirements:

NOTE: This project requires 2 external components, namely a Postgresql database engine and a Keycloak instance to provide AAA (Authentication, Authorization, Accounting) services. Both should be deployed, up and running before proceeding with this setup.

NOTE: An optional email account is considered. Ensure a usable mail server URL with a configured account using SMTPS to send mail.

We currently consider the following versions:

  1. Postgresql v14: Postgresql should be configured such that the instance is able to receive requests from the address where this project is available. For further instructions, please refer to Postgresql documentation
  2. Keycloak v22.0.4 Keycloak should be configured with an admin account. For this setup two realms are considered: a default Master realm and second realm named 'enershare'. For further instructions, please refer to Keycloak documentation. A client named 'app-store-backend' should be created under the energy realm.

Change application.properties file

The following properties in the application.properties file should be changed, so that they target the Postgresql and Keycloak instances deployed.

spring.datasource.url=jdbc:postgresql://<Postgresql_instance_IP>:<Postgresql_instance_port: defaults to 5432>/ids_app_store?currentSchema=public
spring.datasource.username=<postgresql_username>
spring.datasource.password=<postgresql_password>

spring.security.oauth2.resourceserver.jwt.issuer-uri=http://<Keycloak_instance_IP>:<Keycloak_instance_port>/auth/realms/enershare
spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://<Keycloak_instance_IP>:<Keycloak_instance_port>/auth/realms/enershare/protocol/openid-connect/certs

keycloak.auth-server-url=http://<Keycloak_instance_IP>:<Keycloak_instance_port>/auth
keycloak.username=<keycloak_admin_user>
keycloak.password=<keycloak_admin_password>
keycloak.master-realm=master
keycloak.energy-realm=energy-app
keycloak.admin-client=<keycloak_admin_user>
keycloak.recommender-client=energy-app-recommender
keycloak.backend-client=app-store-backend
keycloak.backend-secret=<Keycloak energy-app-recommender secret>
keycloak.user-role=user

spring.mail.host=<mail server url>
spring.mail.port=<mail service stmps port>
spring.mail.username=<mail server account username>
spring.mail.password=<mail server account password>

Build application (war):

NOTE: This project is currently configured to run in an application server (e.g., Apache Tomcat). The commands will render a war file and assume the use of Gradle to compile and assemble the package.

NOTE: The commands below assume that you are running them from the root directory of the project (energy-app-backend/)

To compile the code:

gradle build

To create the package war file:

gradle war

Contacts:

If you have any questions regarding this project, please contact the following people:

Developers (SW source code / methodology questions):

Contributors / Reviewers (methodology questions):

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •