Skip to content

Onify Blueprint: Get SSBTGU data from Bolagsverket

License

Notifications You must be signed in to change notification settings

onify/blueprint-bolagsverket-get-ssbtgu

Repository files navigation

Onify Blueprints

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. Test suite

Onify Blueprint: Get SSBTGU data Bolagsverket

Bolagsverket's SSBT (Sammansatt bastjänst) service was created with the aim to streamline companies reporting to the government and reducing their administrative burden. SSBT delivers consolidated company information based on source data from Bolagsverket, Skatteverket, and SCB.

Note: SSBT is an information service only for public actors based in Sweden, that is to say, authorities, municipalities, and regions.

This blueprint primarily demonstrates how to retrieve company details for a specified company via SSBTGU ("grundläggande uppgifter").

Note: This has only been tested against SSBTGU testversion using Bolagsverket fixed test scenarios, see connection guide (swedish) and checklist (swedish) for more information.

Onify Blueprint: Get SSBTGU data Bolagsverket

Requirements

These are the technical requirements.

Setup

Bolagsverket

As mentioned in the requirements, you need a certificate from TeliaSonera. Here is how you prepare the certificate for use against test service (SSBTGU TEST).

Download and prepare certificate for Onify

Go to https://repository.trust.teliasonera.com/teliasonerarootcav1.cer and download the certificate.

Now when you have downloaded (replace <path_to_teliasonerarootcav1.cer> below) the certificate you need to convert it to base64 format so it can be used as a setting in Onify. Here is how you do it with powershell:

$cerContent = Get-Content -Path "path_to_teliasonerarootcav1.cer" -AsByteStream
$base64Content = [System.Convert]::ToBase64String($cerContent)

$pemContent = "-----BEGIN CERTIFICATE-----`n"
$pemContent += ($base64Content -split '(.{64})' | Where-Object { $_ }) -join "`n"
$pemContent += "`n-----END CERTIFICATE-----"

$certObject = [PSCustomObject]@{
    certificate = $pemContent
}

$jsonContent = $certObject | ConvertTo-Json
$jsonContent

Note: Keep the json for for later...

Onify

Add the following settings in Onify:

Key Value Type Tag Role
bolagsverket_ssbt_certificate_authority {certificate": "-----BEGIN CERTIFICATE-----\nMIIFODCCAyC.....} (the json output from the powershell snippet above) object ssbt, bolagsverket admin
bolagsverket_ssbtgu_url https://ssbtgu-accept2.bolagsverket.se/ssbtgu-dft-web-2/SsbtServicePorts/Test/SsbtTestService?wsdl - URL to SSBTGU service string ssbt, bolagsverket admin

Note: Create settings via admin interface and add a leading _ in key. This is required for flow to work.

Test

  1. Open the BPMN diagram in Camunda Modeler.
  2. Deploy the BPMN diagram (click Deploy current diagram and follow the steps).
  3. Run it (click Start current diagram).

Support

License

This project is licensed under the MIT License - see the LICENSE file for details.