eclipse / openvsx

An open-source registry for VS Code extensions
https://open-vsx.org/
Eclipse Public License 2.0
1.25k stars 137 forks source link

Revoking Publisher Contributions Fails #409

Open brianking opened 2 years ago

brianking commented 2 years ago

As an admin on open-vsx.org, I can not revoke publisher contributions from the Admin Dashboard (Publishers section).

The error is "Authorization by Eclipse Required", and this is the function: https://github.com/eclipse/openvsx/blob/2003c43e9b7cca9e23b64c8b86f59bde94f15998/server/src/main/java/org/eclipse/openvsx/eclipse/EclipseService.java#L480

Screenshot 2022-01-27 at 19 54 49
SharonCorbett commented 2 years ago

Same goes for me.

cc @SharonCorbett

spoenemann commented 2 years ago

Have you logged in to Eclipse via https://open-vsx.org/user-settings/profile ?

brianking commented 2 years ago

Have you logged in to Eclipse via https://open-vsx.org/user-settings/profile ?

Yes. The dashboard would be inaccessible otherwise.

I wonder if it has something to do with changes @amvanbaren made that makes tokens out of date for some activities. Other functionality is available to us in the dashboard however, such as granting namespace ownership and removing extensions.

amvanbaren commented 2 years ago

changes @amvanbaren made that makes tokens out of date for some activities.

I haven't touched this part of the codebase.

It looks like Eclipse tokens are only renewed if the refresh token hasn't expired: https://github.com/eclipse/openvsx/blob/9e261e01ab3398f0405c81e5882309ef6e18bf13/server/src/main/java/org/eclipse/openvsx/security/TokenService.java#L126-L141

I guess retry logging in to Eclipse via https://open-vsx.org/user-settings/profile ?

SharonCorbett commented 2 years ago

Retried again and even generated a new token for myself. Same error message.

amvanbaren commented 2 years ago

@SharonCorbett at what time (UTC) did you get the same error? @mbarbero Can you check the server logs for exceptions around that time?

SharonCorbett commented 2 years ago

I'm on Eastern time...It was just moments before I updated the bug HTH