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

GitHub Backend o-auth permissions set too widely #1423

Closed
ro-savage opened this issue Jun 11, 2018 · 7 comments · Fixed by #2821
Closed

GitHub Backend o-auth permissions set too widely #1423

ro-savage opened this issue Jun 11, 2018 · 7 comments · Fixed by #2821
Assignees

Comments

@ro-savage
Copy link

Currently when using Github Backend, the app requires access to pretty much everything.

image

The scope is hard coded to repo here : https://github.com/netlify/netlify-cms/blob/78e4b829d0ced72f8f38721d38c0d67ccb092aaf/src/backends/github/AuthenticationPage.js#L26

It would make more sense to have a much more limited scope or at least a way to customise it.

I'd suggest public_repo by default.

In the future, maybe deploy keys would work better, allowing only access to a single repo.

@erquhart
Copy link
Contributor

I suppose making this configurable would be fine, just might require some error handling around attempts to access restricted repos.

Proposing:

  1. Keep the current default, it's important that this "just works"
  2. Accept an auth_scope property under backend in config.yml
  3. Restrict accepted values to those that work for the CMS, currently repo and public_repo

Thoughts?

cc/ @Benaiah @talves @tech4him1

@talves
Copy link
Collaborator

talves commented Jun 12, 2018

@erquhart The screen capture implies the login has access to ALL repos within the login. Is that true or is it only the repo logging into?

@tech4him1
Copy link
Contributor

@talves It has access to every repo on your account -- the only two OAuth scopes available for repo access are repo (ALL repos) and public_repo (write access to ALL public repos).

@EasterPeanut
Copy link

The permissions are insane. I don't need Netlify to have read/write permissions over ALL repo's and I don't need Netlify to have organization access. What for does Netlify need this? Plus, the default setting is that it wants PUBLIC and PRIVATE repo access? Seriously, this is red flags all over for me and it's making me not want to use Netlify.

@erquhart
Copy link
Contributor

erquhart commented Aug 23, 2018

See the comment before yours:

the only two OAuth scopes available for repo access are repo (ALL repos) and public_repo (write access to ALL public repos).

That's GitHub's decision, not Netlify's.

@stale
Copy link

stale bot commented Oct 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status: stale label Oct 29, 2019
@stale stale bot removed the status: stale label Oct 30, 2019
@erezrokah erezrokah self-assigned this Oct 30, 2019
@erezrokah
Copy link
Contributor

I'm going to prioritize this one to better support the open authoring workflow (no need for private repository access)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants