Skip to content

Commit 79bec09

Browse files
committed
Deploy gir docs: d703e046f0ca05d4539d89b2b33cfa3c4a16a71f
1 parent 40f9047 commit 79bec09

2 files changed

Lines changed: 313 additions & 186 deletions

File tree

gir/datastekker-installateur-flow.md

Lines changed: 98 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> **⚠️ Design document — not ready for implementation**
44
>
5-
> This document describes the intended flow for the Datastekker use case. Several open questions remain unresolved (see [Open Questions](#open-questions)). Policy field values, data-element sets, and license conditions have not been finalised. Do not use this document as the basis for implementation until it has been marked as approved.
5+
> This document describes the intended flow for the Datastekker use case. Several open questions remain unresolved (see [Open Questions](#open-questions)), in particular componentId-to-installationId resolution and license conditions.
66
77
Datastekker (developed by 2BA) retrieves performance data from installation manufacturers and translates it into uniform performance data using the Heatpump Common Ontology. To access this data, an installer needs explicit consent from the building owner. GIR manages that authorization.
88

@@ -26,33 +26,40 @@ This guide describes how an installer requests access through a form on the Tech
2626

2727
The flow has two phases: a one-time approval flow and a recurring operational data access pattern.
2828

29-
```mermaid
30-
sequenceDiagram
31-
participant Form as TechniekNederland Form
32-
participant Keyper as Keyper API
33-
participant Owner as Building Owner
34-
participant GIR as GIR API
35-
participant DS as Datastekker (2BA)
36-
participant Inst as Installer
37-
38-
rect rgb(240, 248, 255)
39-
Note over Form,GIR: Approval flow (one-time per installer / building)
40-
Form->>Keyper: Create access request for vboId
41-
Keyper->>Owner: Approval link by email
42-
Owner->>Keyper: Authenticates and approves
43-
Keyper->>GIR: Register policy (installer ↔ vboId)
44-
end
45-
46-
rect rgb(255, 248, 240)
47-
Note over Inst,GIR: Operational data access (bilateral, recurring)
48-
Inst->>DS: Data request with installationId or componentId
49-
opt Optional: Resolve componentId to installationId
50-
Note over DS,GIR: Endpoint not yet available
51-
end
52-
DS->>GIR: POST /delegation — is policy valid for installer + vboId?
53-
GIR-->>DS: Delegation evidence
54-
DS-->>Inst: Authorised performance data
55-
end
29+
```likec4
30+
// view: datastekker_overview
31+
specification {
32+
element actor
33+
element system
34+
}
35+
36+
model {
37+
form = system 'TechniekNederland Form'
38+
keyper = system 'Keyper'
39+
owner = actor 'Building Owner'
40+
gir = system 'GIR'
41+
ds = system 'Datastekker (2BA)'
42+
inst = actor 'Installer'
43+
}
44+
45+
views {
46+
dynamic view datastekker_overview {
47+
title 'Datastekker – Installer Access Flow'
48+
variant sequence
49+
50+
form -> keyper 'Create access request for vboId'
51+
keyper -> owner 'Approval link by email'
52+
owner -> keyper 'Authenticate and approve'
53+
keyper -> gir 'Register policy (installer ↔ vboId)'
54+
55+
inst -> ds 'Data request with componentId'
56+
ds -> gir 'Resolve componentId → installationId + manufacturer info [TBD]'
57+
gir -> ds 'GIRBasisdataMessage (installationId + manufacturer info)'
58+
ds -> gir 'Verify delegation for installer + installationId'
59+
gir -> ds 'Delegation evidence (Permit)'
60+
ds -> inst 'Authorised performance data'
61+
}
62+
}
5663
```
5764

5865
### Steps
@@ -66,10 +73,11 @@ sequenceDiagram
6673

6774
**Operational data access (bilateral, recurring)**
6875

69-
5. The installer sends a data request with an installationId or componentId to Datastekker.
70-
6. *(Optional)* Datastekker queries GIR to resolve a componentId to an installationId.
71-
7. Datastekker checks the GIR delegation endpoint to verify the active policy.
72-
8. Datastekker returns authorised performance data to the installer.
76+
5. The installer sends a data request with a componentId to Datastekker.
77+
6. Datastekker obtains a DSGO bearer token from GIR
78+
7. Datastekker queries GIR to resolve the componentId to installationId and manufacturer info [TBD — see Open Questions].
79+
8. Datastekker checks the GIR delegation endpoint to obtain delegationEvidence
80+
9. Datastekker returns authorised performance data and manufacturer info to the installer.
7381

7482
## Before the Approval Flow
7583

@@ -130,13 +138,13 @@ Content-Type: application/json
130138
"reference": "<UNIQUE REFERENCE>",
131139
"addPolicyTransactions": [
132140
{
133-
"type": "[TBD — instance-specific]",
134-
"action": "[TBD — instance-specific, e.g. read]",
135-
"license": "[TBD — see open questions]",
136-
"useCase": "[TBD — instance-specific]",
141+
"type": "<DICO:GIR-DATASTEKKER>",
142+
"action": "read",
143+
"license": "[PLACEHOLDER]",
144+
"useCase": "dsgo.gir-datastekker@v1",
137145
"issuedAt": "<UNIX TIMESTAMP>",
138146
"issuerId": "did:ishare:EU.NL.NTRNL-<BUILDING OWNER KVK>",
139-
"attribute": "[TBD — dataset or data-element identifier (hierarchical)]",
147+
"attribute": "*",
140148
"notBefore": "<UNIX TIMESTAMP>",
141149
"subjectId": "did:ishare:EU.NL.NTRNL-<INSTALLER KVK>",
142150
"expiration": "<UNIX TIMESTAMP matching validity period>",
@@ -145,12 +153,12 @@ Content-Type: application/json
145153
}
146154
],
147155
"orchestration": {
148-
"flow": "dsgo.[TBD — instance-specific]@v1"
156+
"flow": "dsgo.gir-datastekker@v1"
149157
}
150158
}
151159
```
152160

153-
The fields `type`, `license`, `useCase`, `attribute`, and `orchestration.flow` are instance-specific and will be determined during technical configuration of the Datastekker integration. See the [Keyper API reference ➚](https://keyper-preview.poort8.nl/scalar/v1) for full field documentation.
161+
See the [Keyper API reference ➚](https://keyper-preview.poort8.nl/scalar/v1) for full field documentation.
154162

155163
### Step 2: Keyper Sends Approval Link to Building Owner *(Poort8)*
156164

@@ -174,23 +182,44 @@ On approval, Keyper automatically registers the policy in the GIR Authorization
174182

175183
### Step 5: Installer Sends Data Request to Datastekker *(external)*
176184

177-
The data exchange between the installer and Datastekker is bilateral and does not flow through GIR. The installer calls the Datastekker API directly, using an installationId or componentId as the identifier.
185+
The data exchange between the installer and Datastekker is bilateral and does not flow through GIR. The installer calls the Datastekker API directly, using a **componentId** (such as an SGTIN or serial number) as the identifier.
178186

179187
> ℹ️ The Datastekker API endpoints are outside the scope of this document. Contact 2BA for the technical specifications.
180188
181-
### Step 6 (optional): Datastekker Resolves componentId to installationId *(Poort8)*
189+
### Step 6: Datastekker Obtains a DSGO Bearer Token *(Poort8)*
182190

183-
If the installer provides a `componentId` rather than an `installationId`, Datastekker needs to resolve it to an installationId before it can check the delegation policy.
191+
Before querying GIR, Datastekker obtains a DSGO bearer token. See [Obtaining a DSGO Bearer Token](connect-token.md) for the full procedure:
184192

185-
> ℹ️ A GIR endpoint for resolving a componentId to an installationId is not yet available. This step is a placeholder pending that capability.
193+
```http
194+
POST https://gir-preview.poort8.nl/connect/token
195+
Content-Type: application/x-www-form-urlencoded
196+
197+
grant_type=client_credentials&scope=iSHARE&client_id=did:ishare:EU.NL.NTRNL-<2BA KVK>&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&client_assertion=<SIGNED_JWT>
198+
```
186199

187-
### Step 7: Datastekker Checks Delegation in GIR *(Poort8)*
200+
### Step 7: Datastekker Resolves componentId to installationId and Retrieves Manufacturer Info *(Poort8)*
188201

189-
Datastekker calls the GIR delegation endpoint to verify that an active and valid policy exists for the installer:
202+
Before checking the delegation policy, Datastekker must resolve the componentId to an installationId. This step also retrieves the `GIRBasisdataMessage`, which contains manufacturer information for the installation.
203+
204+
> **⚠️ Open point**: GIR does not currently provide a filter parameter for componentId. The mechanism for resolving a componentId to an installationId has not yet been specified. See [Open Questions](#open-questions).
205+
206+
Once the installationId is known, Datastekker queries GIR for the full `GIRBasisdataMessage` using the bearer token from step 6:
207+
208+
```http
209+
GET https://gir-preview.poort8.nl/v1/api/GIRBasisdataMessage?installationIDValue=<INSTALLATION_ID>
210+
Authorization: Bearer <DSGO_ACCESS_TOKEN>
211+
Accept: application/json
212+
```
213+
214+
The response includes `component[].productInformation.manufacturerName` and related fields, which Datastekker uses to include manufacturer details in its response to the installer.
215+
216+
### Step 8: Datastekker Checks Delegation in GIR *(Poort8)*
217+
218+
Using the DSGO bearer token obtained in step 6, Datastekker calls the GIR delegation endpoint to verify that an active and valid policy exists for the installer:
190219

191220
```http
192221
POST https://gir-preview.poort8.nl/delegation
193-
Authorization: Bearer <ACCESS_TOKEN>
222+
Authorization: Bearer <DSGO_ACCESS_TOKEN>
194223
Content-Type: application/json
195224
```
196225

@@ -207,11 +236,11 @@ Content-Type: application/json
207236
{
208237
"target": {
209238
"resource": {
210-
"type": "[TBD — instance-specific]",
211-
"identifiers": ["<VBOID>"],
212-
"attributes": ["[TBD — dataset or data-element identifier (hierarchical)]"]
239+
"type": "<DICO:GIR-DATASTEKKER>",
240+
"identifiers": ["<INSTALLATION_ID>"],
241+
"attributes": ["*"]
213242
},
214-
"actions": ["[TBD — instance-specific, e.g. read]"],
243+
"actions": ["read"],
215244
"environment": {
216245
"serviceProviders": ["did:ishare:EU.NL.NTRNL-<2BA KVK>"]
217246
}
@@ -224,7 +253,6 @@ Content-Type: application/json
224253
}
225254
```
226255

227-
### Step 8: Datastekker Returns Authorised Data *(Poort8)*
228256

229257
GIR responds with a `delegationEvidence` object. Datastekker inspects this to confirm the policy covers the requested data elements and has not expired:
230258

@@ -242,18 +270,18 @@ GIR responds with a `delegationEvidence` object. Datastekker inspects this to co
242270
"maxDelegationDepth": 0,
243271
"target": {
244272
"environment": {
245-
"licenses": ["[TBD — license identifier]"]
273+
"licenses": ["[PLACEHOLDER]"]
246274
}
247275
},
248276
"policies": [
249277
{
250278
"target": {
251279
"resource": {
252-
"type": "[TBD — instance-specific]",
253-
"identifiers": ["<VBOID>"],
254-
"attributes": ["[TBD — dataset or data-element identifier (hierarchical)]"]
280+
"type": "<DICO:GIR-DATASTEKKER>",
281+
"identifiers": ["<INSTALLATION_ID>"],
282+
"attributes": ["*"]
255283
},
256-
"actions": ["[TBD — instance-specific, e.g. read]"],
284+
"actions": ["read"],
257285
"environment": {
258286
"serviceProviders": ["did:ishare:EU.NL.NTRNL-<2BA KVK>"]
259287
}
@@ -271,6 +299,10 @@ GIR responds with a `delegationEvidence` object. Datastekker inspects this to co
271299

272300
If no matching policy exists or the policy has expired, GIR returns a response without a `Permit` rule. Datastekker treats any non-permit result as an authorization failure and returns an error to the installer.
273301

302+
### Step 9: Datastekker Returns Authorised Data *(2BA)*
303+
304+
If authorization succeeds, Datastekker returns the authorised performance data together with the manufacturer information retrieved from the `GIRBasisdataMessage` in step 7.
305+
274306
## Policy Parameters
275307

276308
| Parameter | Where used | Description | Status |
@@ -280,12 +312,12 @@ If no matching policy exists or the policy has expired, GIR returns a response w
280312
| `serviceProvider` | Keyper request, delegation request | DID of Datastekker / 2BA (the data service provider) | Required |
281313
| `resourceId` / `identifiers` | Keyper request, delegation request | Hierarchical resource identifier — a vboId (building) covers all its installations; an installationId scopes to a single installation. Consent may be granted at building level and enforced at installation level. | Required |
282314
| `notBefore` / `expiration` | Keyper request, delegation evidence | Validity period: start and end of the granted access | Required |
283-
| `attribute` | Keyper request, delegation request | Hierarchical data-scope identifier — a predefined dataset covers multiple data elements. Consent is granted at dataset level; enforcement can evaluate access at the level of individual data elements. | [TBD — see open questions] |
284-
| `type` | Keyper request, delegation request | Resource type identifier used in policy matching | [TBD — instance-specific] |
285-
| `action` | Keyper request, delegation request | Permitted action on the resource (e.g. `read`) | [TBD — instance-specific] |
286-
| `useCase` | Keyper request | Use case identifier for policy scoping | [TBD — instance-specific] |
287-
| `license` / `licenses` | Keyper request, delegation evidence | License identifier expressing the terms of use for the data | [TBD — see open questions] |
288-
| `componentId` | Datastekker internal | Component identifier provided by the installer; must be resolved to an installationId before delegation check | Endpoint not yet available |
315+
| `attribute` | Keyper request, delegation request | `*` (wildcard); use a predefined dataset identifier to restrict scope. See open questions #4 and #6 for the future attribute hierarchy. | `*` |
316+
| `type` | Keyper request, delegation request | Resource type identifier used in policy matching | `<DICO:GIR-DATASTEKKER>` |
317+
| `action` | Keyper request, delegation request | Permitted action on the resource | `read` |
318+
| `useCase` | Keyper request | Use case identifier for policy scoping | `dsgo.gir-datastekker@v1` |
319+
| `license` / `licenses` | Keyper request, delegation evidence | License identifier expressing the terms of use for the data | `[PLACEHOLDER]` |
320+
| `componentId` | Datastekker internal | Component identifier provided by the installer; must be resolved to an installationId before the GIR query and delegation check | Open point — see Open Questions |
289321

290322
## Open Questions
291323

@@ -331,6 +363,10 @@ Open points:
331363
- How are the predefined sets mapped to ontology terms in the Heatpump Common Ontology / SAREF?
332364
- What is the governance process for adding or updating sets (versioning, backwards compatibility)?
333365

366+
**7. ComponentId-to-installationId resolution**
367+
368+
The installer provides a componentId (such as an SGTIN or serial number). GIR does not currently support filtering `GET /v1/api/GIRBasisdataMessage` by componentId. The mechanism for resolving a componentId to an installationId — for example via a new GIR endpoint, an external registry, or a mapping table maintained by 2BA — has not yet been specified.
369+
334370
---
335371

336372
## Further Reading

0 commit comments

Comments
 (0)