I want to control what users can access the verdaccio npm registry I am going to host.
Is there a best-practice on how to prevent people from doing npm adduser themselves. I want to restrict the npm adduser command to only be accessible to administrators.
You can set max_user: -1 to disable registration.
https://github.com/verdaccio/verdaccio/blob/master/conf/full.yaml#L31
Currently we don't have permission control or user group, so all user is administrator.
Duplicate #76
I don't think this is a nice solution really.
I want users, but I want to create them via another app that manages user accounts and not allow people to create the npm registry accounts directly since I myself will provide them with the credentials.
The proposed solution can be used as a workaround, but it's definitely not very nice.
I'll have a look if we can intercept npm adduser command and only allow the command to have effect if the username and password matches certain values. Would this be easy to implement? Any suggestions are welcomed
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I don't think this is a nice solution really.
I want users, but I want to create them via another app that manages user accounts and not allow people to create the npm registry accounts directly since I myself will provide them with the credentials.
The proposed solution can be used as a workaround, but it's definitely not very nice.
I'll have a look if we can intercept
npm addusercommand and only allow the command to have effect if the username and password matches certain values. Would this be easy to implement? Any suggestions are welcomed