Skip to content

test(uk-open-banking): assert real 403 for the 3 checkUKConsent-gated v4.0.1 endpoints#2872

Closed
hongwei1 wants to merge 2 commits into
OpenBankProject:developfrom
hongwei1:feature/uk401-consent-403-assertions
Closed

test(uk-open-banking): assert real 403 for the 3 checkUKConsent-gated v4.0.1 endpoints#2872
hongwei1 wants to merge 2 commits into
OpenBankProject:developfrom
hongwei1:feature/uk401-consent-403-assertions

Conversation

@hongwei1

Copy link
Copy Markdown
Contributor

Summary

  • develop's Hydra removal (Removing Hydra in favour of OBP-OIDC for UK standard. #2866) rewrote ConsentUtil.checkUKConsent to read the consent_id claim directly off the Bearer access token instead of calling an external Hydra introspection endpoint.
  • That was the only blocker keeping getAccounts / getAccountsAccountIdBalances / getAccountsAccountIdTransactions (in UKOpenBankingV401AccountInfoTests) on a weak "authenticated -> not 401" assertion, mirroring the same limitation in UKOpenBankingV310AisTests for the equivalent v3.1 endpoints.
  • OAuth1-signed test requests carry no Bearer JWT, so the consent_id claim lookup now fails deterministically with 403 ConsentIdClaimMissing — asserted directly (status code + error message) instead of the previous placeholder.

Test plan

  • UKOpenBankingV401AccountInfoTests — 63/63 passed
  • UKOpenBankingV310AisTests — 56/56 passed (no regression)

… v4.0.1 endpoints

develop's Hydra removal (PR OpenBankProject#2866) rewrote ConsentUtil.checkUKConsent to read the
consent_id claim directly off the Bearer access token instead of calling an
external Hydra introspection endpoint. That was the only blocker keeping
getAccounts/getAccountsAccountIdBalances/getAccountsAccountIdTransactions on a
weak "authenticated -> not 401" assertion (mirroring the same limitation in
UKOpenBankingV310AisTests for the equivalent v3.1 endpoints).

The OAuth1-signed test requests carry no Bearer JWT, so the consent_id claim
lookup now fails deterministically with 403 ConsentIdClaimMissing — asserted
directly (status code + error message) instead of the previous placeholder.
@hongwei1 hongwei1 closed this Jul 15, 2026
…ent-403-assertions

# Conflicts:
#	obp-api/src/test/scala/code/api/UKOpenBanking/v4_0_1/UKOpenBankingV401AccountInfoTests.scala
@hongwei1 hongwei1 reopened this Jul 15, 2026
@sonarqubecloud

Copy link
Copy Markdown

@hongwei1 hongwei1 closed this Jul 15, 2026
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