Go to file
Konstantinos Triantafyllou 009ab187b3 Update monitor service 2024-11-14 12:47:51 +02:00
scripts Update organization.js file with new RPOs. 2024-06-27 18:12:04 +03:00
src/main Make year dynamic for stats tool publicationsOA and publicationsPR 2024-10-31 10:26:10 +02:00
.gitignore [master | WIP | ADDED] First implementation of irish-monitor-service using uoa-monitor-service as library (library classifier). 2023-12-01 10:33:31 +02:00
LICENSE 1. Add info in ReadMe. 2. Add maven nexus repository in pom.xml. 2024-06-05 11:37:33 +03:00
README.md Update to spring boot 3 and java 17 2024-10-16 23:55:37 +03:00
pom.xml Update monitor service 2024-11-14 12:47:51 +02:00

README.md

Irish Monitor Service

Irish Monitor Service is a service that integrates both OpenAIRE Login API and OpenAIRE Monitor API and provide all functionalities for National Open Access Monitor, Ireland.

Maven

Java Version: 1.8, Sprint boot Version: 1.5.8.RELEASE

This service has dependencies downloaded from D4Science Nexus repository, so there is a definition of this repository inside pom.xml.

Install

mvn clean install -DskipTests -Dmaven.javadoc.skip=true;
  1. Create a new system service and enable in order to start up at boot.

    cd /etc/systemd/system
    sudo vim service-name.service
    
  2. Add the following content by replacing and accordingly.

    [Unit]
    Description=irish-monitor-service
    After=syslog.target
    
    [Service]
    User=root
    Environment="PORT=<port>"
    Environment="SERVICE_NAME=irish-monitor-service"
    Environment="PROPERTIES_FOLDER=<folder-name>"
    ExecStart=/bin/sh -c "java -jar /srv/spring-boot/${PORT}/${SERVICE_NAME}.war --server.port=${PORT} --server.servlet.context-path=/${SERVICE_NAME} --spring.config.location=file:///srv/spring-boot/${PROPERTIES_FOLDER}/dnet-override.properties"
    SuccessExitStatus=143
    
    [Install]
    WantedBy=multi-user.target
    
  3. Configure the service.

    sudo systemctl daemon-reload
    sudo systemctl enable service-name
    
  4. Handle service.

    sudo systemctl start service-name
    sudo systemctl stop service-name
    sudo systemctl restart service-name
    sudo systemctl status service-name
    

Container (eg Tomcat)

  1. Add the war in the webapps folder.
  2. Create application.properties file in lib folder.

Configuration

In order to configure this service you have to set the following properties:

stats-tool.host=<stats-tool-url>                           # Stats tool URL with json param e.g https://stats.madgik.di.uoa.gr/stats-api/raw?json=

Authentication / Authorization

This dependency provides the Authentication and Authorization functionality. In order to configure it you have to set the following properties:

authorization.security.redis.host=<redis-ip>               # Default localhost
authorization.security.redis.port=<redis-port>             # Default 6379
authorization.security.redis.password=<redis-password>     # Default ""
authorization.security.domain=<domain-suffix>              # e.g openaire.eu Default: di.uoa.gr
authorization.security.session=<session-cookie-name>       # Default openAIRESession

authentication.client.name=         # Required - Name of the provider - default value: openaire
authentication.client.issuer=       # Required - Issuer url - default value: https://aai.openaire.eu/auth/realms/openaire
authentication.client.scope=        # Required - scope properties of the provider - default value: openid,profile,email,eduperson_entitlement
authentication.client.id=           # Required - Client id - default value: -
authentication.client.secret=       # Required - Client secret - default value: -
authentication.client.redirect=     # Required - Redirect endpoint of the service: {baseURL}/login-service/redirect
authentication.client.logout=       # Optional - If custom logout endpoint is needed. (Needs a redirect param at the end)
authentication.redirect=            # Required - Set the default redirect URL after a successful login / logout
authentication.accessToken=         # Optional - Name of access token cookie, default value: AccessToken
authentication.authorities-mapper=  # Optional - Add the field of User Info provider endpoint that containes authorities. e.g. eduperson_entitlement (Don't forget to include it scope)

Monitor Service

This dependency provides the main service functionality in order to create/edit/delete monitor profiles and their content. In order to configure it you have to set the following properties:

monitor-service.mongodb.host          # Required - Host of mongo server - Default: localhost
monitor-service.mongodb.database      # Required - Database name
monitor-service.mongodb.username      # Optional - Username if needed
monitor-service.mongodb.password      # Optional - Password if needed
monitor-service.mongodb.port          # Required - Mongo server port - Default: 27017

Admin Tools Library (integrated in Monitor Service)

This dependency provides utilities to store dynamic HTML content, send Email and verify Google recaptcha. In order to configure it you have to set the following properties:

admintoolslibrary.google.secret=       # Required - Google secret of recaptcha client
admintoolslibrary.mail.host            # Required - Mail host name
admintoolslibrary.mail.port            # Required - Mail port
admintoolslibrary.mail.from            # Required - From email address
admintoolslibrary.mail.protocol        # Required - Mail protocol
admintoolslibrary.mail.defaultEncoding # Required - Default Encoding - default value: UTF-8
admintoolslibrary.mail.sslProtocols    # Optional - If ssl Protocols are needed (comma separated)
admintoolslibrary.mail.auth            # Required (boolean) - If authentication is required for mail account - default value: false
admintoolslibrary.mail.username        # Required (if auth = true) - Username of mail account
admintoolslibrary.mail.password        # Required (if auth = true) - Password of mail account