12

Magento 2's composer repository, http://repo.magento.com, appears to be a session-ed composer repository. That is, different users have access to different packages based on the HTTP Auth credentials.

Does anyone know of an off the shelf project that lets you host similar repositories? More specifically, does anyone know if Magento used off the shelf software to implement this, or if its a custom application?

  • Hi Alan, did you ever get round to finding out how Magento have done this. I'm also very interested in how it works as I am looking to do a similar thing. Thanks – Tom Burman Jul 5 '16 at 20:19
  • @TomBurman Nothing definitive. Pretty sure its a custom app from the Magento core team. Some folks have said Toran Proxy has similar features (google.com/…). I'm working on a (not even an alpha yet) Go based webserver that would enable this (github.com/astorm/go-static-user-stateful-webserver) – Alan Storm Jul 5 '16 at 21:06
  • Thanks for the info. Yeah I use toran proxy a fair bit, and it's what I'm trying to use for this application also. I think it will be fairly easy to show repositories based on basic Auth with it, I'm just trying to wrap my head around how the user won't be able to access all repositories. I'll take a look at your Go app, and if I get any further I'll let you know. Thanks – Tom Burman Jul 6 '16 at 6:37
1

I'll look a little deeper into this. However, this application looks similiar and I've used in the past. https://getcomposer.org/doc/

Go down to 'Authentication' I belive this is what your looking.

https://getcomposer.org/doc/articles/handling-private-packages-with-satis.md

Here is the link for the Proxy. https://toranproxy.com/

Looking to it a little deeper it looks like Packagist is open source as well. https://packagist.org/ https://github.com/composer/packagist

However I'm not seeing what you are looking for 'out of the box' in this direction.

  • I don't understand this answer. You've used composer to host a user sessioned composer repository? – Alan Storm May 17 '16 at 2:37
  • Edit the answer. I'm going to start build this currently as I like the idea as well. – Anthony Cicchelli May 17 '16 at 15:22
  • 1
    Ah, got it. Yes, none of those programs offer the key feature of repo.magento.com -- which is stateful repositories based on auth credentials – Alan Storm May 17 '16 at 16:16
0

This is Git.

  • You can set up own git using GitLab CE.
  • Setup users authentication.
  • Make private repositories and restrict access level. (You can use LDAP).
  • Host projects there and add the git uri in composer.json

And you got it. :)

  • Are you sure it's git? It seems to be an HTTP/HTTPS server serving different files based on HTTP basic authentication. Is that what GitLab offers? Or do they achieve a similar thing by different means? – Alan Storm Jun 24 '16 at 17:10
  • I'm not sure what they are using behind the wall but this way you can fulfill same kind of requirement. – Aman Srivastava Jun 24 '16 at 17:12
  • This solution is Open Source. I'm not sure if the Magento is using open source tool for the same. – Aman Srivastava Jun 24 '16 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.