Skip to content

Limit permissions #11

Closed
Closed

Description

@syropian

From @akerl on November 21, 2014 16:44

There should be an option to not give it full write access to all my public repos. I'm totally OK with losing the ability to unstar from the app; I'm not OK giving a 3rd party tool the ability to do whatever it wants to my repos.

Copied from original issue: syropian/astral-issues#2

Activity

  1. syropian commented on Mar 31, 2015

    @syropian
    MemberAuthor

    It's not possible to give a specific scope to individual users. I realize you may not want to unstar repos, but other people may want to. Until GitHub releases more refined scopes, there's nothing I can do.

  2. syropian commented on Mar 31, 2015

    @syropian
    MemberAuthor

    From @akerl on November 21, 2014 20:43

    I totally understand if you chose not to support different scopes, but it is possible. For an example of that kind of user authorization, check out Gemnasium. They allow you to select from 3 levels of permissions, depending on what you want them to do for you / what access you want to give them

  3. self-assigned this
    on Mar 31, 2015
  4. syropian commented on Mar 31, 2015

    @syropian
    MemberAuthor

    @akerl Hm, that's interesting. I'm not sure how they pulled that off, but I'll look into seeing if I can add something similar.

  5. syropian commented on Mar 31, 2015

    @syropian
    MemberAuthor

    From @akerl on November 21, 2014 22:18

    Given that the requested scopes are chosen when you do an individual auth dance, I expect that's how they're doing it. In their UI, you pick which level you want, it tosses you to GitHub's site to confirm you want them to have that access, and then you get tossed back to Gemnasium. What scopes they ask for from you are directly based on which level you pick, and don't have any connection to the scopes they requested from other people.

  6. syropian commented on Mar 31, 2015

    @syropian
    MemberAuthor

    From @radum on December 11, 2014 15:19

    👍 for what @akerl is saying, giving full permissions to the repos I think is a bit to much, for me at least it is a major security issue and I would gladly chose another level even if it won't give me the same experience.

  7. syropian commented on Mar 31, 2015

    @syropian
    MemberAuthor

    @akerl @radum This may be added but probably not for a while. As of right now, I'd have to likely swap out the entire OAuth package that I'm using, and I'm unsure if any others support this kind of scope switching. For now, please refer to the privacy policy if you are unsure what this app does or does not access.

  8. syropian commented on Mar 31, 2015

    @syropian
    MemberAuthor

    From @akerl on December 11, 2014 22:35

    The privacy policy tells me what you say you'll do. If something different happens, I get to point and shout and make a fuss, but policy does not actually prevent foul play.

    Even assuming you mean what you say in the privacy policy, and you never waver from that, if somebody compromises your systems, they are unlikely to share your convictions.

    I presume that the oauth library you're using supports requesting specific scopes, because you're doing it. Thus, requesting different scopes for each user is not a feature of the oauth library, it's a feature of your DB: set flag for user, request the right scopes based on that flag, know what things to do / not do for that user's activities on your site based on that flag.

  9. syropian commented on Mar 31, 2015

    @syropian
    MemberAuthor

    @akerl Not exactly. The OAuth package supports scopes obviously, but not at the user level. Instead it's a global config option.

    How exactly would I set the correct scope for a user, given that a user isn't authenticated in the system until they've already authenticated through GitHub?

  10. MethodGrab commented on Jun 2, 2015

    @MethodGrab

    +1 for this, full R/W access is a bit much! You don't even need to be authenticated to get a users list of starred repos, its available publicly by doing

    GET /users/:username/starred
    

    eg:

    GET https://api.github.com/users/methodgrab/starred
    

    They way I see it working would be:

    • User initiates sign up
    • Request for minimal scope, something like (no scope) or whatever the minimum is to get the username.
    • User (optionally) requests more functionality (unstarring)
    • Additional scope request for full permissions (repo)
  11. tariqbuilds commented on Nov 16, 2015

    @tariqbuilds

    👍 @MethodGrab 's concept.

  12. quantumpacket commented on Jan 11, 2016

    @quantumpacket

    @syropian Is there any update on this? I want to use the app, but was shocked to see that it requires the most expansive permissions. The above suggestion would be ideal.

  13. syropian commented on Jan 18, 2016

    @syropian
    MemberAuthor

    @quantumpacket This is something that will (hopefully) be a part of v2. If I can't get scope "upgrading" to work, I'll temporarily remove unstarring and minimize the permissions. I know it sucks, and hopefully I can figure out something.

    The current problem is, with many OAuth libs, scope is decided pre-authentication, which makes it very difficult to do on a per-user basis.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions