Skip to content

Repository that contains all proxy for external endpoints used by Selfcare. Furthermore, it exposes IPA indexes (Institution, AOO and UO) which are loaded at startup on service.

Notifications You must be signed in to change notification settings

pagopa/selfcare-ms-party-registry-proxy

Repository files navigation

selfcare-ms-party-registry-proxy

Description

This Spring Boot-based microservice is designed to handle several key functionalities in onboarding operations domain. It includes business logic for proxy data sources used in SelfCare, such as:

  • IPA data for PA, AOO and UO
  • ANAC
  • IVASS
  • INFOCAMERE
  • PDND_INFOCAMERE
  • ADE

Prerequisites

Before running the microservice, ensure you have installed:

  • Java JDK 17 or higher
  • Maven 3.6 or higher
  • Connection to VPN selc-d-vnet

Configuration

Look at app/src/main/resources/application.yml file to set up environment-specific settings, such as database details.

Installation and Local Startup

To run the microservice locally, follow these steps:

  1. Clone the Repository
git clone https://github.com/pagopa/selfcare-ms-party-registry-proxy.git
cd selfcare-ms-party-registry-proxy
  1. Build the Project
mvn clean install
  1. Start the Application
mvn spring-boot:run -pl app

Usage

After starting, the microservice will be available at http://localhost:8080/.

To use the API, refer to the Swagger UI documentation (if available) at http://localhost:8080/swagger-ui.html.

DAPR

Configure

Before run DAPR add: .dapr/components/eventhub-pubsub.yaml

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: eventhub-pubsub
spec:
  type: pubsub.azure.eventhubs
  version: v1
  metadata:
    - name: brokers
      value: "selc-ENV-eventhub-ns.servicebus.windows.net:9093"
    - name: authType
      value: "password"
    - name: saslUsername
      value: "$ConnectionString"
    - name: saslPassword
      value: "Endpoint=sb://selc-ENV-eventhub-ns.servicebus.windows.net/;SharedAccessKeyName=selc-proxy;SharedAccessKey=SHARED_ACCESS_KEY=;EntityPath=sc-contracts"
    - name: consumerGroup
      value: "party-proxy"

.dapr/config/config.yaml

apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
  name: dapr-config
  namespace: default
spec:
  tracing:
    samplingRate: "1"
    zipkin:
      endpointAddress: "http://localhost:9411/api/v2/spans"
  logging:
    apiLogging:
      enabled: true
  httpPipeline:
    handlers:
      - name: cors
        type: middleware.http.cors
        spec:
          allowedOrigins: ["*"]
          allowedMethods: ["GET", "POST", "PUT", "DELETE"]
          allowedHeaders: ["*"]

Run

dapr init
dapr run --app-id dapr-consumer --app-port 8080 --dapr-http-port 3500 --components-path ./.dapr/components

Logs

az containerapp logs show --name ca-dapr-consumer-dev --resource-group rg-dapr-consumer --container daprd

About

Repository that contains all proxy for external endpoints used by Selfcare. Furthermore, it exposes IPA indexes (Institution, AOO and UO) which are loaded at startup on service.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors 16

Languages