Skip to content

feat: Add GDPR endpoint to openvsx admin API - #1982

Merged
netomi merged 11 commits into
eclipse-openvsx:mainfrom
autumnfound:malowe/main/ovsxorg-8200
Aug 19, 2026
Merged

netomi merged 11 commits into
eclipse-openvsx:mainfrom
autumnfound:malowe/main/ovsxorg-8200

Conversation

@autumnfound

Copy link
Copy Markdown
Contributor

Adds a GDPR endpoint to the OpenVSX API that allows for admin level tokens to request for users to be forgotten. Rather than deleting users, this request will scrub all PII from the existing user records to erase any potential leak of private information. This is done to best retain things like reviews and other user actions within the system while abiding by GDPR requirements.

These deletion requests do not remove or modify any of the internal logging that already exists as there is a business need to retain that type of data, which will have it's own retention policy that will eventually purge those records.

Assisted-by: Claude Sonnet 4.6

@autumnfound

Copy link
Copy Markdown
Contributor Author

Related to the request: EclipseFdn/open-vsx.org#8200

@autumnfound
autumnfound requested review from cstamas and netomi July 21, 2026 18:06
@autumnfound
autumnfound force-pushed the malowe/main/ovsxorg-8200 branch from 7e2099c to 9ac5923 Compare July 21, 2026 18:38
@netomi

netomi commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

The PR needs to be rebased on the lasted main branch with the changes to version immutability.

Also the decision to remove or keep extension versions on an criteria of namespace membership is flawed.
The central point of Open VSX is who published an extension version and if a publisher agreement is active.

If you are member of a namespace, other people might have published the extensions (that are not member anymore), so deleting these extensions is just wrong if they have not been published by the user to forget.

Also, the PR implies that the publisher agreement shall be revoked, if that is the case, all extensions the user published also have to be deactivated / deleted to keep the invariant of the registry (only extensions with active publisher agreement are accessible)

@autumnfound

Copy link
Copy Markdown
Contributor Author

Change has been rebased and logic for the extension version removal has been updated. It now checks for active + inactive extension versions by the user and does the delete functionality on them.

Still outstanding from feedback:

  • Admin delete via UI endpoint, we need to decide if we will keep or not (I think there's value, and I can easily add a button for it in the UI if needed)
  • Publisher revoke step has been retained. I think for the direction we're going w/ the project, keeping this step in is the right way to do it. External systems may or may not know about the PA in the future, and we shouldn't assume it can remove them.

@autumnfound

Copy link
Copy Markdown
Contributor Author

Removed the PA revoke step as right now it is not feasible. We'll need to revisit it in the future, but we can make it a side effect upstream to clear the documents since it's EF controlled atm

Adds a GDPR endpoint to the OpenVSX API that allows for admin level
tokens to request for users to be forgotten. Rather than deleting users,
this request will scrub all PII from the existing user records to erase
any potential leak of private information. This is done to best retain
things like reviews and other user actions within the system while
abiding by GDPR requirements.

These deletion requests do not remove or modify any of the internal
logging that already exists as there is a business need to retain that
type of data, which will have it's own retention policy that will
eventually purge those records.

Assisted-by: Claude Sonnet 4.6
Based on feedback from Thomas N, the behaviour to deactivate extension versions in owned namespaces switched to instead delete versions published by the removed user. This is more inline with legal requirements as the removal of the Open VSX PA would revoke our right to publish the versions by the user.
@netomi
netomi force-pushed the malowe/main/ovsxorg-8200 branch from be13952 to 0cf3fb8 Compare August 19, 2026 15:10
netomi added 7 commits August 19, 2026 17:21
Rebase conflict resolution in AdminService.java and AdminAPITest.java
restored an import order/style that doesn't match the repo's enforced
jbang import-sort/formatter (server/scripts/format.sh), which caused
the analyse CI check to fail. Ran the actual formatter to fix.
Annotation-argument indentation had drifted from the current Eclipse
formatter config; jbang-fmt normalizes it. Verified with prek run
--from-ref against main: all hooks pass now.
forgetUser previously always anonymized the UserData row in place, even
when nothing in the database still referred to it (e.g. a user who never
published, reviewed, or acted as an admin). Now it checks for remaining
references - reviews, removed-by markers on extension versions, admin
scan/file decisions, audit log entries, and retained (scrubbed) access
tokens - and deletes the row outright when none remain, falling back to
anonymization otherwise.

Adds countByUser/countByDecidedBy/countByRemovedBy repository queries
and RepositoryService wrappers to check for each.
generateTokenValue() checks hasAccessToken(value) across all tokens,
active or not, to avoid ever reissuing a value already handed out.
Nulling the value on scrub would let that check miss a token's old
value and let it be handed out again.
…e test

RepositoryServiceSmokeTest asserts every public RepositoryService method
gets invoked, to catch query/schema mismatches. It was failing after the
last commit added countReviews/countVersionsRemovedBy/
countAdminScanDecisions(UserData)/countFileDecisions(UserData)/
countPersistedLogs without exercising them here.
@netomi

netomi commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

I updated the PR slightly:

  • do not scrub the token value when deleting a user to avoid that the same token value would be generated
  • remove the provider from a deleted user to prevent logins at all
  • completely delete the user if no reference is available anymore
  • add a button in the admin dashboard for forgetting a user

@netomi
netomi merged commit 0a3555e into eclipse-openvsx:main Aug 19, 2026
5 checks passed
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.

2 participants