๐ก๏ธ ttp-idm
December 22, 2025 ยท View on GitHub
TTP Identity Management service
This service provides identity and pseudonym management with the Trusted third party (TTP) tools E-PIX and gPAS.
API
An OpenApi spec is generated when building the service which can be obtained from /api-docs/openapi.json at runtime
or via the SwaggerUI (/swagger-ui) endpoint.
A copy of the current API doc is located at /api-docs/openapi.json. Inspect the API at swagger.io.
POST /api/pseudonyms (create pseudonyms for participant)
Adds participant to E-PIX and generate pseudonyms and ids for the provided trial.
The lab property determines the number of pseudonyms to be created for each individual laboratory by name.
Note
Property keys for these are dynamic.
Body
content-type data type required application/jsonIdRequesttrue
Responses
http code content-type response 200Okapplication/jsonIdResponse409Conflictapplication/jsonPromptResponse404Not Foundapplication/jsonLink.id does not match with provided idat 500Internal Server Errortext/plain;charset=UTF-8Error message
Example
Request
{
"idat": {
"first_name": "Erika",
"last_name": "Mustermann",
"birth_name": "Musterfrau",
"birth_date": "1975-08-22",
"birth_place": "Musterstadt",
"postal_code": "35037",
"city": "Marburg"
},
"trial": "Studie",
"lab": {
"Labor 1": 2,
"Labor 2": 4
}
}
Response
{
"participant": "VYMGJ9TUMDHFPL14",
"lab": {
"Labor 2": [
"0LTKNJNZC5ZEWHG0",
"CXPEA1CP85JUKCVJ",
"MFXLKP5Y4PPTKUZV",
"3XPYZ932JCYAZ8TW"
],
"Labor 1": [
"CCRPJTW1R8WU6W3P",
"1NFTHGWYNVYQEAPY"
]
}
}
GET /api/pseudonyms/{trial}/{psn} (get pseudonyms for participant and trial)
Get all pseudonyms for a participant by trial and psn.
Responses
http code content-type response 200Okapplication/jsonIdResponse404Not Foundapplication/jsonNo pseudonyms found for trial and psn
Example
Request
url: /api/pseudonyms/Studie/VYMGJ9TUMDHFPL14
Response
{
"participant": "VYMGJ9TUMDHFPL14",
"lab": {
"Labor 2": [
"0LTKNJNZC5ZEWHG0",
"CXPEA1CP85JUKCVJ",
"MFXLKP5Y4PPTKUZV",
"3XPYZ932JCYAZ8TW"
],
"Labor 1": [
"CCRPJTW1R8WU6W3P",
"1NFTHGWYNVYQEAPY"
]
}
}
Authorization
OAuth2 Client credentials flow can be configured in order to authorize trusted clients by providing a valid access token from the issuer (Authorization server).
Configuration properties
Application properties are read from a properties file (app.yaml) with default values.
| Name | Default | Description | Required |
|---|---|---|---|
log_level | info | Log level (error,warn,info,debug,trace) | |
auth.oidc.issuer_url | OAuth2 Client credentials issuer | ||
auth.oidc.client_id | OAuth2 Client credentials: client id | ||
auth.oidc.client_secret | OAuth2 Client credentials: client secret | ||
ttp.epix.base_url | E-PIX base url | โ | |
ttp.epix.domain.name | test | E-PIX MPI domain | |
ttp.epix.domain.description | Test domain | E-PIX MPI domain description | |
ttp.epix.identifier_domain | MPI | E-PIX MPI identifier domain | |
ttp.epix.data_source | dummy_safe_source | E-PIX id safe source | |
ttp.gpas.base_url | gPAS base url | โ | |
ttp.timeout | 120 | Retry timeout |
Environment variables
Override configuration properties by providing environment variables with their respective property names. Replace .
with double underscore (__).
Example deployment
Docker compose:
query:
image: ghcr.io/diz-unimr/ttp-idm:latest
environment:
LOG_LEVEL: debug
TTP__EPIX__BASE_URL: http://localhost:8080
TTP__EPIX__DOMAIN__NAME: trial
TTP__GPAS__BASE_URL: http://localhost:8081
TTP__TIMEOUT: 60