You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
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
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.
👍 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.
@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.
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.
@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?
+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)
@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.
@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.
Activity
syropian commentedon Mar 31, 2015
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.
syropian commentedon Mar 31, 2015
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
syropian commentedon Mar 31, 2015
@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.
syropian commentedon Mar 31, 2015
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.
syropian commentedon Mar 31, 2015
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.syropian commentedon Mar 31, 2015
@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.
syropian commentedon Mar 31, 2015
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.
syropian commentedon Mar 31, 2015
@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?
MethodGrab commentedon Jun 2, 2015
+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
eg:
They way I see it working would be:
(no scope)or whatever the minimum is to get the username.repo)tariqbuilds commentedon Nov 16, 2015
👍 @MethodGrab 's concept.
quantumpacket commentedon Jan 11, 2016
@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.
syropian commentedon Jan 18, 2016
@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.