Re:Docker Hub Hacked – 190k accounts, GitHub tokens revoked,...
by andy_ppp on Saturday April 27, 2019 @04:30AM
(#19764517)
You can implement OAuth per repo if github wanted though, or alternatively can you grant access to a specific organisation? Not sure. The default should be per repo auth IMO.
Re:Docker Hub Hacked – 190k accounts, GitHub tokens revoked,...
by matthewaveryusa on Saturday April 27, 2019 @07:38AM
(#19765031)
I just looked at github OAuth scopes ( https://developer.github.com/apps/building-oauth-apps/unders... )
honest question, what's the point of using OAuth when the Authz is so coarse? Why not augment to have scopes per repo? Is it considered bad practice to have have a variable (repo name) as a scope?
Re:Docker Hub Hacked – 190k accounts, GitHub tokens revoked,...
by nickgros on Saturday April 27, 2019 @09:00AM
(#19765288)
IIRC the OAuth2-interfacing application needs to (or at least should) know beforehand exactly what to request access to, so if that's read/write access to all of the user's content, it's trivial. For the external application to know something specific like a particular resource is more complicated to deal with (especially with private/hidden content), so most OAuth providers don't provide that level of granularity. It can be done, it just requires more engineering than most (all?) off-the-shelf OAuth solutions provide, and it's more control than most users actually need.
It seems like Docker Hub is implemented as an OAuth app [2], where these granular options are not available and you have to grant access to all your repositories.
[1] https://developer.github.com/apps/differences-between-apps/
[2] https://docs.docker.com/docker-hub/builds/link-source/