Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion openspec/specs/digikoppeling-adapter/spec.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# digikoppeling-adapter Specification

## Purpose
TBD - created by archiving change digikoppeling-adapter. Update Purpose after archive.
Integriq talks to government services over Digikoppeling, the Dutch standard for exchanging messages between public bodies. The adapter is one catalogue entry that covers the WUS synchronous profile, ebMS2 reliable messaging and Grote Berichten for large payloads, signs and encrypts SOAP messages with WS-Security, and takes its PKIoverheid keys from the credential broker instead of storing them in plain text.

## Requirements

### Requirement: Digikoppeling adapter is a catalogue entry, not a menu (REQ-DK-001)

The Digikoppeling adapter MUST be delivered as a catalogue entry in the
Expand Down Expand Up @@ -128,3 +130,16 @@ config error and MUST NOT fall back to a plaintext key on disk.
- **AND** no plaintext-key-on-disk fallback SHALL be used
- @e2e exclude backend credential brokering — covered by PHPUnit

### Requirement: A SOAP source encrypts its body and decrypts the answer (REQ-WSE-001)

A SOAP source MUST be able to switch on WS-Security encryption. When it is on, integriq MUST encrypt the SOAP body with XML Encryption for the partner's certificate held on the source, after signing it, and MUST decrypt an encrypted answer with the organisation's private key from the credential broker before it verifies the signature. An answer that cannot be decrypted MUST fail the call with the reason, and MUST NOT be passed on as an empty body.

#### Scenario: a partner that demands encryption receives an encrypted body
- GIVEN a SOAP source with encryption on and the partner's certificate set
- WHEN integriq calls it
- THEN the SOAP body on the wire is an `EncryptedData` element and the signature still verifies after decryption

#### Scenario: an answer that cannot be decrypted fails the call
- GIVEN an encrypted answer for a different key
- WHEN integriq receives it
- THEN the call fails naming the decryption error and nothing is mapped
14 changes: 14 additions & 0 deletions openspec/specs/endpoint-runtime/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,20 @@ When an endpoint is created, changed or deleted, integriq MUST clear its endpoin
- THEN the next request to `/cases` reaches it, and `/zaken` answers 404
- @e2e exclude cache invalidation; covered by PHPUnit on the invalidation listener

### Requirement: An A2A agent's card points at the gateway (REQ-A2A-001)

Integriq MUST offer an endpoint `targetType` of `a2a` that proxies to a source holding an A2A agent. When a caller fetches the agent card through the endpoint, integriq MUST replace every address in it that points at the agent with the endpoint's public address. Every call to the agent through the endpoint MUST pass the endpoint's consumer authentication, rate limit and call logging.

#### Scenario: another agent reads the card and stays behind the gateway
- GIVEN an agent published through an `a2a` endpoint
- WHEN another agent fetches `/.well-known/agent-card.json` through the endpoint
- THEN the card's `url` is the endpoint's address, not the agent's own

#### Scenario: a call without a key is refused
- GIVEN an `a2a` endpoint with an API key rule
- WHEN an agent calls it without a key
- THEN the call is refused with 401 and never reaches the agent

## Non-Functional Requirements

- **Performance:** the self-URL/HAL output helper adds negligible per-response overhead (URL construction only, no extra storage round-trip).
Expand Down
48 changes: 48 additions & 0 deletions openspec/specs/tenant-scoping/spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# tenant-scoping Specification

## Purpose
One installation can host several organisations, and integriq keeps their API setups apart: a user only ever sees and acts on their own organisation's sources, endpoints, mappings, jobs, synchronisations and logs. Row `integriq:acc-tenants`.

## Requirements

### Requirement: A user only reaches their own organisation's integriq objects (REQ-TEN-001)

Integriq MUST leave OpenRegister's organisation filter on for every read, list, run, change or delete a user requests on a source, endpoint, mapping, job, synchronisation, synchronisation contract, dead letter, event or log. An object of another organisation MUST answer as not found and MUST NOT appear in any list, count or export.

#### Scenario: a user of organisation A cannot read organisation B's source
- GIVEN a source owned by organisation B
- WHEN a user whose active organisation is A requests that source, tests it, or trips or resets its circuit breaker
- THEN integriq answers 404 and does not call the source
- @e2e exclude covered by PHPUnit per controller

#### Scenario: a user of organisation A cannot run or change organisation B's synchronisation
- GIVEN a synchronisation and a job owned by organisation B
- WHEN a user of organisation A reruns the synchronisation, resets its cursor, deletes its logs, replays its dead letters, or runs the job
- THEN integriq answers 404 and nothing runs or changes
- @e2e exclude covered by PHPUnit per controller

#### Scenario: logs and events stay within the organisation
- GIVEN call logs, synchronisation logs and events of organisations A and B
- WHEN a user of organisation A lists or opens them
- THEN only organisation A's entries are listed, and opening one of B's answers 404
- @e2e exclude covered by PHPUnit per controller

### Requirement: Admins see across organisations only as OpenRegister defines (REQ-TEN-002)

Integriq MUST NOT widen an admin's view beyond what OpenRegister grants. An admin MUST see other organisations' integriq objects only when OpenRegister's admin override is on.

#### Scenario: an admin without the override stays in their organisation
- GIVEN OpenRegister's admin override is off and an admin whose active organisation is A
- WHEN the admin opens the Sources page
- THEN only organisation A's sources are listed
- @e2e exclude covered by OpenRegister's multitenancy tests; integriq passes the default flags

### Requirement: System paths run unscoped only with a stated reason (REQ-TEN-003)

A path that runs without a user, or that resolves an object after a request was already authorised and scoped, MAY switch the organisation filter off. Each such call MUST carry a one-line comment saying why it runs unscoped.

#### Scenario: the hourly health job still probes every source
- GIVEN sources of organisations A and B and no user session
- WHEN the connection health job runs
- THEN it probes both sources, and the call site says it runs as the system
- @e2e exclude background job, covered by PHPUnit
Loading