Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OB3] Consents with duplicate attribute values doesn't expire #318

Open
imesh94 opened this issue Feb 7, 2025 · 0 comments
Open

[OB3] Consents with duplicate attribute values doesn't expire #318

imesh94 opened this issue Feb 7, 2025 · 0 comments
Labels
Product/OB-3.0.0 Open Banking Version 3.0.0

Comments

@imesh94
Copy link
Contributor

imesh94 commented Feb 7, 2025

When there are more than one consent attributes with the same value for a consent, that consent is not expired when the consent expiration job is run. (This issue might cause failures in other flows as well where consent search is used).

How to reproduce:

  1. Create a consent with short expiration time. Par/authorize request should contain multiple claims with the same value:
"claims": {
    "id_token": {},
    "userinfo": {}
  }
  1. Wait for the consent expiration job to run.

  2. Note that the consent is not expired.

Root cause:

Solutions:

  1. Introduce a new method to get consents eligible for expiration.

    This can be done since we only use consentIDs to get the eligible consents for expiration. A complex query like consent search is not required for this scenario.

  2. Remove 'distinct' keyword from the search query.

    This seems safe because duplicates values caused by the query are anyway handled when adding consent attributes to the consentAttributesMap. But we have to check all the usages of the query.

  3. Modify the consent search query to avoid duplicating consent attributes.

    Might consume more time to implement than other solutions, and we have to check all the usages of the query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product/OB-3.0.0 Open Banking Version 3.0.0
Projects
None yet
Development

No branches or pull requests

1 participant