Read-only mirror of https://github.com/swiyu-admin-ch/swiyu-trust-management-scs — Bundesamt für Justiz. Issues & pull requests at the source.
  • Java 75%
  • TypeScript 21.3%
  • HTML 3%
  • Shell 0.3%
  • SCSS 0.2%
  • Other 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-12-04 04:05:12 +00:00
.git-hooks Snapshot import from 2026-06-25T05:22:01Z 2026-06-25 05:22:01 +00:00
.github/workflows Snapshot import from 2026-10-01T10:20:35Z 2026-10-01 10:20:35 +00:00
.mvn Snapshot import from 2026-11-25T04:06:10Z 2026-11-25 04:06:10 +00:00
.run Snapshot import from 2026-09-01T04:09:27Z 2026-09-01 04:09:27 +00:00
.skills Snapshot import from 2026-08-11T04:29:42Z 2026-08-11 04:29:42 +00:00
client-api-specs Snapshot import from 2026-11-03T04:05:59Z 2026-11-03 04:06:00 +00:00
docs Snapshot import from 2026-11-23T04:06:45Z 2026-11-23 04:06:45 +00:00
scripts Snapshot import from 2026-11-17T04:05:50Z 2026-11-17 04:05:50 +00:00
swiyu-trust-management-service Snapshot import from 2026-12-04T04:05:12Z 2026-12-04 04:05:12 +00:00
swiyu-trust-management-ui Snapshot import from 2026-12-04T04:05:12Z 2026-12-04 04:05:12 +00:00
utils/key-generator Snapshot import from 2026-11-25T04:06:10Z 2026-11-25 04:06:10 +00:00
.gitignore Snapshot import from 2026-10-01T10:20:35Z 2026-10-01 10:20:35 +00:00
.snyk Snapshot import from 2026-11-30T04:07:03Z 2026-11-30 04:07:03 +00:00
.trivyignore Snapshot import from 2026-06-25T05:22:01Z 2026-06-25 05:22:01 +00:00
CHANGELOG.md Snapshot import from 2026-12-04T04:05:12Z 2026-12-04 04:05:12 +00:00
docker-compose.yml Snapshot import from 2026-06-25T05:22:01Z 2026-06-25 05:22:01 +00:00
Dockerfile Snapshot import from 2026-11-17T04:05:50Z 2026-11-17 04:05:50 +00:00
kafka_server_jaas.conf Snapshot import from 2026-06-25T05:22:01Z 2026-06-25 05:22:01 +00:00
mvnw Snapshot import from 2026-06-25T05:22:01Z 2026-06-25 05:22:01 +00:00
pom.xml Snapshot import from 2026-12-04T04:05:12Z 2026-12-04 04:05:12 +00:00
README.md Snapshot import from 2026-10-30T04:06:53Z 2026-10-30 04:06:53 +00:00
renovate.json Snapshot import from 2026-06-25T05:22:01Z 2026-06-25 05:22:01 +00:00
setVersions.sh Snapshot import from 2026-07-22T05:04:05Z 2026-07-22 05:04:05 +00:00

SWIYU Trust Management SCS

The service contains the business logic to do the onboardings to the trust registry.

Getting Started

Before using the service make sure the following services are running:

For local development, the service can be started with the following command:

Backend with bundled UI

mvn spring-boot:run -Dspring-boot.run.profiles=local

Backend with extra served UI

mvn spring-boot:run -Dspring-boot.run.profiles=local,local-ui

Backend with extra served UI and local shared services

./mvnw spring-boot:run -Dspring-boot.run.profiles=local,shared

Backend with extra served UI and shared services from DEV

./mvnw spring-boot:run -Dspring-boot.run.profiles=local,shared,shared-dev

Configuration

The following environment variables must be set

Variable Name Description Default Value
AUTH_RESOURCE_ID The resource ID for the OAuth2 resource server. BJ-swiyu-tms
AUTH_ISSUER_URI The issuer URI for the OAuth2 authorization server.
AUTH_JWK_SET_URI The JWK set URI for the OAuth2 authorization server.
AUTH_SWIYU_KEYCLOAK_REALM_ECOSYSTEM_ISSUER_URI The issuer URI of the Keycloak ecosystem realm (used for OAuth2 client token retrieval).
AUTH_SWIYU_KEYCLOAK_REALM_ECOSYSTEM_JWK_SET_URI The JWK set URI of the Keycloak ecosystem realm (used for OAuth2 client token retrieval).
AUTH_CORE_BUSINESS_SERVICE_CLIENT_SECRET The OAuth2 client secret used to obtain tokens for the core-business-service REST client.
PROMETHEUS_USER The username for accessing /actuator/prometheus endpoint.
PROMETHEUS_PASSWORD The password for accessing /actuator/prometheus endpoint.
IS_INIT_CONTAINER_EXECUTION Indicates if the application is running in an init container. false
REGISTRY_BASE_READ_URL The URL for base registry for reading entries.
ISSUER_STATUS_LIST_URI The URI of the status list which should be used for onboardings.
ISSUER_MANAGEMENT_URL The URL for the issuer management API endpoint.
ISSUER_OID4VCI_URL The URL for the issuer oid4vci API endpoint.
JWT_SIGNING_KEY The pem formatted private key with which requests to gov issuer/trust registry are signed
JWT_SIGNING_KEY_ID The identifier (kid) to be used when signing the JWT
TRUST_REGISTRY_DB_URL The JDBC url to the trust registry database.
TRUST_REGISTRY_DB_USERNAME The username to connect to the trust registry database.
TRUST_REGISTRY_DB_PASSWORD The password to connect to the trust registry database.
TRUST_REGISTRY_DATA_URL The public endpoint to the trust data registry.
TRUST_REGISTRY_VC_SCHEMA_ENDPOINT The path to the VC schema endpoint on the trust registry. /api/v1/vc-schema
CORE_BUSINESS_SERVICE_BASE_URL The base URL of the core business service REST API.
ENVIRONMENT The environment name exposed to the frontend (e.g. dev, ref, prod).
FUNCTIONALITY_AUTOMATIC_APPROVAL_ENABLED Functionality flag to enable or disable automatic approval of onboarding submissions.
OFFBOARDING_HARD_DELETE_DELAY Waiting period between requesting and scheduling an irreversible deletion. 2d

OFFBOARDING_HARD_DELETE_DELAY accepts any duration unit; a value without one is read as days, so 2 means two days and 5m five minutes. The same duration is displayed in the confirmation dialog and used to calculate the task's persistent deletion deadline. Automatic execution is provided by the separate hard-delete job.

Functionality flags and feature toggles

The service separates the two the same way swiyu-core-business-service and swiyu-ecosystem-portal-scs do:

  • Functionality flags (app.functionality.*, env FUNCTIONALITY_*) are part of the product. They are named after what they do and stay.
  • Feature toggles (features.*, env FEATURES_*) are named after their Jira issue, gate work in progress, and are removed again once the story is rolled out. Every toggle must be listed on Feature Flags.
Variable Description Default
FEATURES_EIDARTFE_1571_COMPLETE_BP_OFFBOARDING Gates the complete business partner offboarding, i.e. the deletion requests. false

Secrets config

Due to the necessity of local secrets for development there might be profiles used in the run configurations which are not part of this repository. Those profiles are generated outside of this repository and provided to the application als application-*.yaml files in the root /config directory or directly via environment variables.

Generating Keys in order to access Gov Trust Issuer and Trust Registry API

When accessing the APIs of gov trust issuer, the request must be signed with a private key. The private key must be configured for the trust management scs and the public key must be configured on the gov trust issuer.

** For a detailed setup guide see https://confluence.bit.admin.ch/x/_Cw_N (for FOITT internal usage only)**

To generate a new private and public key for a new stage, the following scripts can be executed:

mvn -f utils/key-generator/pom.xml compile exec:java

This will create 2 files in a .keys directory, with those files you can now configure

  1. Trust management scs
  • in vault put the content of JWT_SIGNING_KEY.pem into a variable JWT_SIGNING_KEY
  • in vault put the kid value from JWT_PUBLIC_KEY.json into the JWT_SIGNING_KEY_ID
  1. Gov Trust Issuer (Register the public key)
  • add json of the public key JWT_PUBLIC_KEY.json into the JWKS_ALLOWLIST env variable (gitops or vault)