Skip to content
This repository was archived by the owner on Mar 6, 2020. It is now read-only.
This repository was archived by the owner on Mar 6, 2020. It is now read-only.

Login via GitHub prompts to authorize application to access private organization data and modify public organization data #11

Closed

Description

@pdurbin

Congrats on the the launch of the new site!

I read this with great interest...

We’ve also added to the “Join” button a social hack for those new to GitHub. When you hit the button, you’ll be prompted to introduce yourself in the project’s “issues” section (essentially a forum but in the project repository).

... and clicked "Join Us" and then "Sign Up via GitHub" right away. What I expected to see was the normal "Mozilla Science Lab would like to know your email address" message that you see when you log in to http://forum.mozillascience.org like this:

authorize_mozilla_science_lab_-_2015-02-14_17 46 02

Instead I saw this somewhat alarming message that says "This organization allows the application to access private organization data and modify public organization data" for each of the organizations that I'm an "owner" of:

oauth-github-mozillascience

The "Learn more about OAuth" link in the screen shot goes to https://help.github.com/articles/connecting-with-third-party-applications/ and says "Applications can request access for either public or private repositories on a user-wide level. This is one of the most expansive configurations you can permit, so accept it with caution!"

Because of this I'm concerned and haven't signed up yet. Are these permissions necessary?

Activity

  1. added a commit that references this issue on Feb 15, 2015
  2. pdurbin commented on Feb 16, 2015

    @pdurbin
    Author

    Because of this I'm concerned and haven't signed up yet. Are these permissions necessary?

    To be more concrete about this, it looks like the GitHub "scope" that is being requested by your application is public_repo which "Grants read/write access to code, commit statuses, and deployment statuses for public repositories and organizations" (emphasis mine) according to https://developer.github.com/v3/oauth/#scopes

    I'm aware that as an owner of organization on GitHub I can set up "third-party application restrictions" per https://help.github.com/articles/about-third-party-application-restrictions/ to prevent members of teams within my organization (even with read-only access!) from automatically authorizing your application from gaining read/write access to our code, and it's likely I will set up those restrictions in the near future, but not before I have well communicated the implications of setting up these restrictions since that page documents how deploy keys (and other stuff we're probably using) will be revoked.

  3. abbycabs commented on Feb 17, 2015

    @abbycabs
    Contributor

    Thanks for this @pdurbin -- we built the site around being able to fork and work with code as a core part of Collaborate. I believe the least invasive scope to do this is public_repo. We are trying to build a community around code -- access to this code would be helpful. We're planning on even more integrations with github and users' public repos in the future.

    Some people have suggested only requesting access with this scope when a user wants to use these features. This is probably the best compromise, but I'm less inclined to do this since we want to encourage users to interact with code. However, I welcome any contributions if you can update the scope without affecting functionality!

  4. pdurbin commented on Feb 18, 2015

    @pdurbin
    Author

    I'm glad you're thinking hard about the scopes but I still find the one that's been selected to be too expansive. I trust you folks but write access to my organization's code is something I can't permit.

    Based on my feedback GitHub clarified what permissions applications are requesting. Here's the new wording with additional detail:

    screenshot_2015-02-18-07-07-35

  5. abbycabs commented on Feb 18, 2015

    @abbycabs
    Contributor

    From GitHub API docs for creating a repo:
    https://developer.github.com/v3/repos/#create

    OAuth scope requirements
    When using OAuth, authorizations must include:
    
        public_repo scope or repo scope to create a public repository
    

    This functionality is core to what we want to do.

  6. pdurbin commented on Feb 21, 2015

    @pdurbin
    Author

    Ok, so you want your application to be able to create repos under people's GitHub accounts and under organizations they're part of. Even this seems fairly invasive to me and probably reason enough for me to not join. No offense! :)

    It sounds like you don't have any plans to write to existing repos, issues, pull requests, wikis, settings, deploy keys, etc. Good! But your application still could if I authorize it, which terrifies me. It reminds me of mobile apps I won't install because they ask for too many permissions.

    Some people have suggested only requesting access with this scope when a user wants to use these features.

    I think this is an excellent idea.

    p.s. Sorry about the huge mobile screenshot!

  7. katieannemills commented on Feb 21, 2015

    @katieannemills

    Hi all - so, I definitely understand both your points; @pdurbin has a non-negotiable responsibility to his collaborators to carefully manage who has write access to their repositories, and we at MSL want to encourage people to interact with code as much as possible. @acabunoc , can you clarify for us exactly what piece of functionality requires this level of access? I take it this is necessary to automatically fork a repo into a new Collaborate user's github, in which case I agree, this is hard to get around. @pdurbin, you mentioned above some 'third-party application restrictions' you could set up - to what extent will using these resolve the problem?

    Serious concerns from both ends here, but I think we can sort something out :)

  8. pdurbin commented on Feb 22, 2015

    @pdurbin
    Author

    @billmills thanks for chatting with me about this ticket. I have a much better understanding of why the scope was chosen. Personally, I don't want applications creating repos and opening tickets as me so I don't plan to sign up, but that's neither here nor there. If the system is working as designed, I guess there's no issue except that others might be similarly scared off. Maybe you could determine the percentage of people who click "authorize application" and figure out your conversion rate.

    I guess the focus of this ticket from the start has been on security around GitHub organizations which I've discussed to death in IRC, but even if wasn't the owner of any organization I don't I'd authorize the application with its current scope. So the answer your question is no, I guess, @billmills :)

    I really hope I haven't come off as overly negative. I think Mozilla Science Lab is a neat organization and I plan to continue participating through other avenues.

  9. pdurbin commented on Feb 22, 2015

    @pdurbin
    Author

    I'm aware that as an owner of organization on GitHub I can set up "third-party application restrictions"

    It's a bit of a side conversation but I wrote up some more about this at http://crimsonfu.github.io/2015/02/22/owners-of-organizations-on-github-should-carefully-set-up-third-party-application-restrictions.html

  10. abbycabs commented on Feb 23, 2015

    @abbycabs
    Contributor

    Thanks for this @pdurbin & @billmills!

    Yes, we built Collaborate around the idea of encouraging and helping users fork code. Forking code = creating a repo. To create a repo, we need the scope public_repo. I've reached out to GitHub to see if there's a better way to help users fork code.
    https://developer.github.com/v3/repos/#create

    We have roughly 20% more users with accounts on the website (public_repo scope) compared to the forum (user:email scope).

    I still think the best compromise for this would be request more invasive scopes when users want to join a Collaborate project (ie. no scope to log in, public_repo when they want to join a project). I created an issue for this so it's officially written down now (#18) ! I still have concerns with this route (see issue) and I have no development time allocated to the website coming up. But I like I said before, I welcome any contributions if you can update the scope without affecting functionality!

  11. arfon commented on Feb 23, 2015

    @arfon

    As GitHub staff (and a big fan of the Mozilla Science Lab) I just wanted to chime in here. @acabunoc - it sounds like you're asking for the correct scope here (public_repo) for what you'd like to be able to do but as @pdurbin has pointed out this is problematic for some people. A couple of points of clarification:

    @pdurbin in your post you say:

    Any member of my GitHub organization can authorize an application to access my organization's data? Even members of teams that only have read-only access?

    This isn't actually the case. As explained in https://developer.github.com/v3/oauth/#scopes:

    Scopes limit access for OAuth tokens. They do not grant any additional permission beyond that which the user already has.

    So if an org member has read-only access, the app will not have write access to that org's repo for the user.

    Also, while this isn't a solution for existing organisations, since about a week ago we have enabled third party application restrictions by default for all new organisations. (I'd expect we'll be communicating this more widely soon).

    Thanks for raising these issues @acabunoc @pdurbin and @billmills. We're always interested in hearing feedback, especially when the current functionality is causing issues.

    @acabunoc - you're suggestion in #18 seems like a good solution for now.

  12. katieannemills commented on Mar 2, 2015

    @katieannemills

    Thanks all, these are great suggestions - are we all ok to close here given that #18 has an implementation plan to address this?

  13. pdurbin commented on Mar 4, 2015

    @pdurbin
    Author

    @billmills I'm fine with someone closing this issue and I agree that #18 would be a fantastic solution. Thanks for opening it @acabunoc! Once implemented, I imagine people who currently have reservations about joining the new website would probably join, people like me and @metamattj who said the other day, "like you, I won’t be joining becuase of the over-broad permissions grant... even though in theory I’d like to participate".

    Big thanks to @arfon for the comment! I plan to link to it from my blog post so people hear from the horse's mouth, so to speak. As I said at prose/prose#816 (comment) I still find the screenshots terrifying so I don't plan to click "Authorize" until the messaging is made less scary or I've done some testing on my own. I'm glad to hear that new organizations get the more secure setting.

    To address one point by @arfon who said,

    So if an org member has read-only access, the app will not have write access to that org's repo for the user.

    I actually did test the messaging for this scenario, which is scary for an org owner. I made a @bpeisenbraun a read-only member of a team and he saw the same message that says "This organization [the one I made him a read-only member of] allows the application to access private organization data and modify public organization data". So the message is confusing and perhaps (hopefully!) inaccurate for read-only team members. I haven't tested what an authorized app can actually do. I certainly hope @arfon is right about this. It's a challenge to communicate all the nuance above the "authorize" button.

    I hope I haven't annoyed anyone by opening this issue. I understand much better that the app is trying to create repos on a user's behalf. I've said my piece and I thank everyone for listening!

  14. katieannemills commented on Mar 9, 2015

    @katieannemills

    @pdurbin not annoying at all, I really appreciate your eyes & effort here to help point out how things play to different audiences; that's a big part of the whole point of doing things in the open :) Thanks again!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions