Skip to content

Comments

Feature/bg consent issue#2708

Open
hongwei1 wants to merge 3 commits intoOpenBankProject:developfrom
hongwei1:feature/BgConsentIssue
Open

Feature/bg consent issue#2708
hongwei1 wants to merge 3 commits intoOpenBankProject:developfrom
hongwei1:feature/BgConsentIssue

Conversation

@hongwei1
Copy link
Contributor

No description provided.

…nd improve error messages

1. Fix Consumer-Key support for Berlin Group Consent-ID requests
   - APIUtil.scala: Use consumerByConsumerKey when consumer_validation_method_for_consent=CONSUMER_KEY_VALUE
   - Previously only used consumerByCertificate, ignoring Consumer-Key header
   - Now correctly selects consumer based on validation method configuration

2. Add early consent validation with detailed error messages
   - AccountInformationServiceAISApi.scala: Add early validation in getBalances endpoint
   - Show both consumer_id and consumer_key in error messages for debugging
   - Error format: "Consumer mismatch: consent has consumer_id='X' (consumer_key='Y'), but current request has consumer_id='Z' (consumer_key='W')"

Impact:
- Enables Consumer-Key based consent validation for Berlin Group endpoints
- Provides clear debugging information when consumer mismatch occurs
- Helps identify whether certificate or consumer key should be used

Related Issue: TTK production Consent-ID validation failure
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant