question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] Dockerfile verdaccio 4.2.2 with verdaccio-ldap example

See original GitHub issue

Congratulation everyone who tested, contributed to Verdaccio 🎉 v4 ! 🎈

I am creating this ticket to help others, its aims to provide information to people whiling to use Verdaccio v4.2.2 and verdaccio-ldap with 🐳 Docker.

Dockerfile

FROM verdaccio/verdaccio:4.2.2
USER root
RUN npm i && npm i verdaccio-ldap
USER verdaccio

Note: you need to switch to root user in order to use npm.

Testing

Status: in progress

Authentication

plugin

  • it should work with verdaccio-htaccess when verdaccio-ldap is not installed. ✔️
  • it should work with verdaccio-htaccess when auth.ldap is disabled and verdaccio-ldap is installed. ✔️
  • it should work with one verdaccio-ldap. ✔️
  • it should work with verdaccio-htaccess and fallback to verdaccio-ldap through web. ✔️
  • it should work with verdaccio-htaccess and fallback to verdaccio-ldap through npm. ❌ Either use verdaccio-htaccess or verdaccio-ldap, it is useless to use both, even if the web work with the two, the npm --add-user command will fail.

npm

  • npm --adduser should work with different users. ✔️
  • npm --adduser should fail with wrong user/password. ✔️
  • it should auth with JWT and the verdaccio-ldap plugin. ✔️
  • it should auth with legacy and the verdaccio-ldap plugin. ✔️
  • npm i in CI that download from the registry should spam the LDAP with authentication requests with legaxy. ✔️
  • npm i in CI that download from the registry should not spam the LDAP with authentication requests with JWT. ✔️

Web

The new design with material-UI is super nice btw.

  • it should authenticate with different users. ✔️
  • it should fail to authenticate with different users and wrong password. ✔️
  • it should show packages to users with access permissions. ✔️
  • it should hide packages to users without access permissions. ✔️

Packages permissions

  • access should work with a user with perms. ✔️
  • access should fail with a user without perms… ✔️
  • access should work with a user in ldap group with perms. ✔️
  • access should fail with a user not in ldap group with perms. ✔️
  • publish should work with a user with perms. ✔️
  • publish should work with a user in ldap group with perms. ✔️ For this, I add to configure the environment VERDACCIO_USER_UID to be as my host account (within docker you can’t chown/chmod), and from my host I had to give chmod -R 777 to the storage directory, otherwise I was having 404 with http <-- 404, user: dka(127.0.0.1), req: 'PUT /@scope%2fdocx2latex', error: no such package available
  • publish should fail with a user not in ldap group without perms. ✔️
  • unpublish should work with a user with perms. ✔️
  • unpublish should fail with a user without perms. ✔️
  • unpublish should work with a ldap group with perms. ✔️ For this one:I’d like to know if users with permissions can unpublish a package that is one year’s old, or there is a limit of time like in npm registry to unpublish @juanpicado?
  • unpublish should fail with a user not in ldap group with perms. ✔️

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kopaxcommented, Sep 29, 2019

Here one example: verdaccio/website#188 we don’t use Medium or dev.to platforms anymore.

Thanks, I will do my best to write something soon while it is still fresh in my head.

1reaction
juanpicadocommented, Sep 28, 2019

hi @kopax, thanks for the kind words. Since I see you are in action again, I’d recommend the following:

For me, a ticket means either an issue or a feature request. I still allow questions due the low traffic, but, the better is pick one of options above rather pollute this ticket.

LDAP is out of my scope, since is not part our organization I cannot help, that’s the plugin author responsibility, about, the web.logo issue you are reporting, if is a bug, then, the better is create a ticket with full information on it and put it in the queue, eventually will be fixed.

This format seems not fully fine, sometimes you will need to deal with permissions and compilers. Never-mind, I did not read it correctly.

FROM verdaccio/verdaccio:4.2.2
USER root
RUN npm i --prod && npm i verdaccio-ldap
USER verdaccio

Docker permissions was a common issue, there are plenty of references in our database, se an example https://github.com/verdaccio/docker-examples/blob/master/amazon-s3-docker-example/v4/s3Plugin/Dockerfile

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrade from v3.x to verdaccio 4.x with LDAP and Docker
A running LDAP database (such as OpenLDAP). Docker installed. Goal​. Update Verdaccio from v3.x to v4.x. Configure LDAP.
Read more >
docker-compose Verdaccio LDAP - npm - Stack Overflow
First of all, it depends how you are deploying Verdaccio, but, I'll assume you are using Docker. There there is a full example...
Read more >
verdaccio-ldap - npm
A detailed example of the verdaccio-ldap plugin + OpenLDAP server packed in Docker for v3 is available here and for v4 here.
Read more >
ZDMP: Zero Defects Manufacturing Platform WP1: Management
4.2.2. Planned Activities . ... The features provided by WP6 components represent the basic elements to create a ... for calling ZDMP APIs...
Read more >
unRaid App List - GitHub Pages
It's inspired by SUI and has all the same features as SUI, such as simple customization ... Verdaccio comes out of the box...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found