0008 - Replace the Node consent-manager with dsc-consent-manager on PostgreSQL¶
Status: Accepted
Date: 2026-11-02
Applies to: FIWARE/data-space-connector, dsc-consent-manager, consent-plugin
Supersedes: 0001, 0002, 0003, 0004, 0005
Context doc: ../CONSENT_MANAGEMENT.md
Context¶
ADRs 0001-0005 bolted OID4VP onto the Prometheus-X consent-manager (Node, MongoDB). That service authenticates its participant-side endpoints with one shared secret, the consent key, so the authority had to run an APISIX facade that validated the caller's OID4VP token and then injected the key. The key carried no caller identity, and the open gaps listed in the old design (identity lookups across participants, the bearer-equivalent user key, unauthenticated onboarding, client secrets stored on participant records) all needed changes in a codebase we do not own.
dsc-consent-manager (Java, PostgreSQL, published as the
oci://quay.io/fiware/helm-charts/dsc-consent-manager chart) is a stateless OAuth2 resource server.
It validates the JWT of a configured identity provider on every call and takes the caller's identity
and role from the token's claims. Its /v1 API scopes every read to the caller, signs consent
receipts, and derives privacy notices from the same contract-service API the consent-facade serves.
Decision¶
- The trust-anchor chart (2.0.0) deploys
dsc-consent-manageras theconsent-managersubchart alias, on the chart's ZalandomanagedPostgres(fixed user and databaseconsent_manager). The consent MongoDB, the consent key and the authority APISIX facade routes are removed. The authority gateway only publishes the host and does not authenticate. - Every caller authenticates with a JWT from the authority VCVerifier service
consent-manager(audienceconsent-manager), which the consent-manager trusts asidentityProviders.primary. The verifier copies the credential'stypearray torolesand the MembershipCredentialissuertoparticipant_id.roleMappingturnsMembershipCredentialintoPARTICIPANTandUserCredentialintoUSER. The verifier already enforces the credential type per scope and checks the issuer against the TIR, so no participant can grant itself a role. - Participants register themselves (
POST /v1/participants); the identifier is the DID in the token, never the body. Data subjects register themselves (POST /v1/users/register); their identifier is the token'ssub, the holder DID. - A plain (non-hook) setup Job in the trust-anchor chart is the single owner of the two Secrets the
service reads:
consent-manager-env(DB credentials copied from Zalando, log-pseudonym and erasure keys, SMTP credentials) andconsent-manager-signing-keys(the receipt signing JWK). It creates keys once and never rotates them. Nothing useslookup, sohelm installandhelm template | kubectl applybehave the same (ADR 0007). - The consent-facade keeps both of its roles: at the authority it is the consent-manager's
config.contractServiceUrl; at the provider it is the plugin's token service (POST /internal/tokens). The decisions of 0002 and 0003 carry over unchanged in that respect. - The provider's consent-filter plugin 1.0.0 calls the
/v1API directly with that token. It resolves the provider viaGET /v1/participants/me, requires the consumer DID to be a registered participant, and allows only a consent whose status isGRANTED, with matching provider and consumer.
Consequences¶
- No shared secret is left in the consent path, and each answer is scoped to the authenticated caller.
- Existing consent data is not migrated: MongoDB records have to be re-granted under the new service.
The trust-anchor chart takes a major bump (2.0.0) and
fails on the removed values. The DSC chart only drops the unreadconsentManagement.enabled(11.0.0). - External Postgres is not supported in trust-anchor 2.0.0: the setup Job depends on the Zalando secrets.
- The plugin and its route config must be upgraded together (1.0.0 drops
consent_api_hostand the key options). - An agreement names its parties in
provider-id/consumer-idby the participants' self-description URLs, as contract-management writes them: that is the only form the consent-facade's/verifymatches, which is the lookup the owner-resolver makes to find the governing contract. Consent-manager 0.0.3 resolves a party under either name (its ADR-0017), so privacy-notice generation accepts them too; before that pin, notice generation and the access gate could not both work off one agreement. - VCVerifier 6.27.0 does not compare a
jwt_vc_jsoncredential'svc.issuerwith the signediss, so a hand-crafted VC can still name another DID asparticipant_iduntil upstream rejects that mismatch.
Alternatives considered¶
- Keep the Node consent-manager and close its gaps upstream. Every gap needed a change in a codebase outside the project, and the shared key would remain the trust root of the facade.
- Keep an authenticating gateway in front of the new service. It would duplicate the JWT check the service already performs and reintroduce a second place for the auth configuration.
- Generate the Secrets with Helm
lookup.lookupis empty underhelm template, so keys would rotate on every render of the GitOps / CI path.