nuts-foundation / nuts-foundation/nuts-node

VCR: Enable searching for credential types

Open
#2,076 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
28
Forks
23
Avg merge
1d 10h
Merged PRs (30d)
76

Description

When searching for credentials (SearchVCs()) the type field is used for determining which fields are to be included in the search, but they're not filtered on. This might make sense from JSON-LD point of view, since the query could be;

Give me credentials issued to `<DID>` with `organization.name=<name>` and `organization.city=<city>`

But the functionality is not used as such; it is used to find credentials of specific types, e.g. NutsOrganizationCredential for your own customer administration, addressbook functionality or NutsAuthorizationCredential for finding which credential(s) can be used to get access to remote data. It's also a potential vulnerability, since other credential types could unknowingly be seen as another credential.

Thus, we should also filter on credential types.

Note: that would disable a use case like "give me any credential with X=Y", but I'm not sure it's used that way atm, workaround would be multiple queries.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the SearchVCs() entry point and trace how the type field currently contributes to credential searches. Review the issue discussion, then verify that results are filtered by the requested credential types and that the behavior for searches without a type is explicitly resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend-api-design, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.