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
25 stars 16 forks source link

Deleted Subject keeps publishing to discovery service #3404

Closed stevenvegt closed 1 month ago

stevenvegt commented 1 month ago

After deleting (deactivating the DID documents) a subject, the discovery publisher keeps trying to publish the subject. Resulting in a spammy log:

nuts-node1-1  | time="2024-09-20T12:57:56Z" level=error msg="Failed to refresh own Verifiable Presentations on Discovery Service" error="failed to refresh Verifiable Presentation (service=hackathon_v2024, subject=7e346e2d-9415-4a8b-a20f-a2dbe3b5a3b0): registration of Verifiable Presentation on remote Discovery Service failed: failed registration for service=hackathon_v2024, subject=7e346e2d-9415-4a8b-a20f-a2dbe3b5a3b0: missing credentials" module=Discovery

Perhaps its possible to remove the subject from the Discovery publisher list?

woutslakhorst commented 1 month ago

also see #3408

gerardsn commented 1 month ago

@woutslakhorst was this fixed as part of the other issue?

woutslakhorst commented 1 month ago

@woutslakhorst was this fixed as part of the other issue?

missing credentials will not cause it to stop refreshing. ErrDeactivated is not a clause in client.go#refresh to stop refreshing. Also in client.go#activate there's no check. ListDIDs from the SqlManager also just lists the DIDs and doesn't look at the status.

Proposal would be to check for deactivation in refresh and remove refresh record when deactivated.