Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't require write access to Google Sheets / Drive for project creation #2

Open
tfmorris opened this issue Nov 25, 2023 · 2 comments

Comments

@tfmorris
Copy link
Member

OpenRefine currently uses Google authentication for two different purposes: 1) creating projects from Google Drive or Google Sheets documents and 2) uploading data to Google Sheets / Drive. For the first, only read access is required and it's an unnecessary security risk to be asking for full read/write access as we currently do.

To Reproduce

Steps to reproduce the behavior:

  1. Create project from Google Data
  2. Login to Google
  3. Note that the scopes listed in the OAuth authentication dialog include full access, not read only access

Current Results

Full read/write scopes are requested

Expected Behavior

drive.readonly and spreadsheets.readonly are requested instead of the full drive and spreadsheets versions.

@wetneb
Copy link
Member

wetneb commented Nov 25, 2023

This would likely mean also having a workflow to request the additional permissions when exporting to Google Drive, if the user was already logged in with read-only permissions.

@tfmorris
Copy link
Member Author

Currently I think the login flow is triggered by the absence of a cookie, but I think the preferred/recommended way is to use an access failure to trigger it, which I think would deal with both cases. Otherwise, you need to get into the business of introspecting the cookie contents to see what scopes it contains (and it still might not represent a valid token).

@wetneb wetneb transferred this issue from OpenRefine/OpenRefine Nov 18, 2024
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

No branches or pull requests

2 participants