nuts-foundation / nuts-node

The reference implementation of the Nuts specification. A decentralized identity network based on the w3c ssi concepts with practical functionality for the healthcare domain.
https://nuts-foundation.gitbook.io
GNU General Public License v3.0
23 stars 15 forks source link

Wallet must protect itself against unwanted offers #2049

Closed reinkrul closed 9 months ago

reinkrul commented 1 year ago

Although this is a more involved problem in a server-to-server flow (since there's no user to accept the VC into the wallet), the least it should do is filter credential offers for credentials it wants. This should be a configurable list.

For now, it should accept NutsAuthorizationCredential by default.

It should also handle all of the offers (if applicable), instead of just one.

woutslakhorst commented 1 year ago

Accept all credentials requires no config and supports all future use cases. But this would enable credential spamming by untrusted issuers. The type of credential is not the problem here.

Any network participant could spam any other participant. There are two approaches to solve this problem: prevent or fix. Prevention focusses on not accepting offers from certain parties. Fixing focusses on blocking and deleting after the fact. Prevention is done by using an allowlist based on:

Detection:

Fix:

woutslakhorst commented 1 year ago

"Normally" Detect "disk full" (>80%) -> investigate large tables -> "select count(id) from X group by issuer having count(id) > Y" -> investigate contents -> block or "delete from X where issuer = Z"

This is a lot of effort with the current key/value storage....

proposal: convert storage to SQL first, then done....

reinkrul commented 9 months ago

Server-to-server OpenID4VCI implementation will be replaced with OAuth2 s2s/OpenID4VP-flow with policy backend, removing the need for Nuts Authorization Credentials, thus removing the need for this feature.