-
Notifications
You must be signed in to change notification settings - Fork 8
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
Understanding GitHub permissions #5
Comments
So the actual permissions granted are specified by the admin when they create the app itself. Step 1 grants permissions to the app to act on the repos, while step 2 grants permission for the app to act on behalf of the user on those particular repos - if they users don't have access to the repo they still can't push. So the effective permission requires that:
I hope this helps! Should also be more clearly documented |
Thanks @yuvipanda I think you summarized it as comprehensible as something this complex can be summarized! Hmmm, so there is like two separate distinctions:
I don't yet understand this as clearly as I hope to, but I do understand it better thanks to your help @yuvipanda! I think what I look to understand more clearly are the security implications in various scenarios, for example if a GitHub app developer is malicious, and what steps then are needed for that malicious GitHub app developer needs to get done to do harm - and how great that harm will be - and such questions. |
@consideRatio oooh, great question. I think the developer of the app could possibly write to the repos even without user authentication :| https://github.com/yuvipanda/git-credential-helpers relies on that to work with nbgitpuller on private repositories. We should make that clear. |
Ah now i understand that project: Okay, so the app has permissions by itself. Hmmmm, but in this case (github-app-user-auth) a user knowing the client-id (public) can use the app to generate credentials which is the intersection of the app credentials and the user credentials, and with github-app-user-auth, those stay with the end user rather than to be used by some server doing automation etc? |
@consideRatio yeah, so if you just know the client id, you can use it only in conjugation with user credentials to get access to repos with intersection of these permissions. You need access to the GitHub app's private key (not used in this repo) to get access without user authorization. So the presence of the github app ID acts purely as a constraint on what scopes the user's permissions are reduced to. |
No key is created here - only the (public) client ID is used. |
There are two times that the end user via a GitHub website, and I don't yet understand what roles they have etc. To understand that is quite relevant for anyone being an admin of a hub that provides this if the admin gets questions from users.
I don't clearly understand the parts here. I've typically been very afraid of whenever I've accepted "act on behalf of you". But, I guess perhaps it's just "act on behalf of me" with restricted permissions based on how the application is installed for various repos.
Task to complete
Overview of procedure to understand better
Step 1 - An end-user installs the github application
This can be triggered by visiting https://github.com/apps/hub-jupytearth-org-github-integ.
Step 2 - An end-user authorize the application as initiated by
github-app-auth-user
CLIThis can be triggered by running
github-app-auth-user
, getting a device code, and opening https://github.com/login/deviceThe text was updated successfully, but these errors were encountered: