Skip to content

Region Connector for Finland (Fingrid)

This README will guide you through the process of configuring a region connector for Finland.

Prerequisites

  • Register a user with Fingrid here.
  • Download the certificate from Fingrid.
  • Create a Java Keystore containing the certificate. To create a Java Keystore see this tutorial.

Configuration of the Region Connector

The region connector needs a set of configuration values to be able to function correctly, how you provide these values depends on the way you deploy the region connector.

Configuration valuesDescription
region-connector.fi.fingrid.organisation-userIdentifier of the organisation that was created.
region-connector.fi.fingrid.organisation-nameName of the organisation, only used to inform final customers about the organisation.
region-connector.fi.fingrid.api-urlAPI URL of the Fingrid API
region-connector.fi.fingrid.pollingSchedules when data should be polled for ongoing permission requests. Uses spring cron syntax, Default is 0 0 17 * * *.
spring.ssl.bundle.jks.fi.keystore.locationPath to the keystore, which contains the private key needed to sign requests. It is recommended to create a keystore for each key to simplify key rotation and updates.
spring.ssl.bundle.jks.fi.keystore.passwordPassword to access the keystore.
spring.ssl.bundle.jks.fi.key.aliasThe alias under which the key is saved in the keystore.
spring.ssl.bundle.jks.fi.key.passwordPassword to access the key in the keystore
spring.ssl.bundle.jks.fi.keystore.typeThe keystore type. Should always be set to JKS

The region connector can be configured using Spring properties or environment variables. When using environment variables, the configuration values need to be converted in the following way:

  • Replace all non-alphanumeric characters with an underscore (_)
  • Optionally convert all letters to upper case
properties
region-connector.fi.fingrid.organisation-user=0000000000000.THP
region-connector.fi.fingrid.organisation-name=Organisation Name
region-connector.fi.fingrid.api-url=https://dh-fingrid-cert01-b2b.azurewebsites.net/rest/FGR/
region-connector.fi.fingrid.polling=0 0 17 * * *
spring.ssl.bundle.jks.fingrid.keystore.location=/path/to/keystore.jks
spring.ssl.bundle.jks.fingrid.keystore.password=password
spring.ssl.bundle.jks.fingrid.keystore.type=JKS
spring.ssl.bundle.jks.fingrid.key.alias=fingrid
spring.ssl.bundle.jks.fingrid.key.password=password
yaml
region-connector:
  fi:
    fingrid:
      organisation-user: 0000000000000.THP
      organisation-name: Organisation Name
      api-url: https://dh-fingrid-cert01-b2b.azurewebsites.net/rest/FGR/
      polling: 0 0 17 * * *
spring:
  ssl:
    bundle:
      jks:
        fingrid:
          keystore:
            location: /path/to/keystore.jks
            password: password
            type: JKS
          key:
            alias: fingrid
            password: password
dotenv
REGION_CONNECTOR_FI_FINGRID_ORGANISATION_USER=0000000000000.THP
REGION_CONNECTOR_FI_FINGRID_ORGANISATION_NAME=Organisation Name
REGION_CONNECTOR_FI_FINGRID_API_URL=https://dh-fingrid-cert01-b2b.azurewebsites.net/rest/FGR/
REGION_CONNECTOR_FI_FINGRID_POLLING=0 0 17 * * *
SPRING_SSL_BUNDLE_JKS_FINGRID_KEYSTORE_LOCATION=/path/to/keystore.jks
SPRING_SSL_BUNDLE_JKS_FINGRID_KEYSTORE_PASSWORD=password
SPRING_SSL_BUNDLE_JKS_FINGRID_KEYSTORE_TYPE=JKS
SPRING_SSL_BUNDLE_JKS_FINGRID_KEY_ALIAS=fingrid
SPRING_SSL_BUNDLE_JKS_FINGRID_KEY_PASSWORD=password

Running the Region Connector via EDDIE

If you are using EDDIE, the region connector should appear in the list of available region connectors if it has been configured correctly.