Disable Authentication #1297
Replies: 7 comments 2 replies
-
What is your usecase for this? |
Beta Was this translation helpful? Give feedback.
-
Thank you for the super quick response! I have authentik as SSO for all my services and npm is currently the only one which does not provide any possibility to disable the GUI authentication. There is an hack provided by an user but I could not really figure out how to make it work For me it would really be enough to just disable it or allow passing basic authentication from the outside |
Beta Was this translation helpful? Give feedback.
-
can you give me a link to this patch (or "hack") you mentioned? Currently, you could just copy the Bearer token out of your browsers developer tools to make it work, but the token will is not valid very long. (1 day: NPMplus/backend/internal/token.js Line 22 in 844ab28 But for things like authentic, I could add an env option to disable authentication, but I'm personally against using SSO, since you will have one password everywhere and since NPMplus is security relevant I don't think that this is a good idea |
Beta Was this translation helpful? Give feedback.
-
Is it only required to pass it as Authorization header to each request? I will give it a try, I can generate tokens on authentik The hack is something similar for npm I will give it a try, thanks a lot |
Beta Was this translation helpful? Give feedback.
-
Yes you only need to send the token (at least I think that this will work), the token can be creating by sending mail+password to the api, see this line as an example: it is an api request adding a host and requesting the token: NPMplus/rootfs/usr/local/bin/aio.sh Line 5 in 844ab28 But still not recommended by me, but should work, if authentic can make this api request to get the token and then pass the token with your request |
Beta Was this translation helpful? Give feedback.
-
I will convert this to a discussion, if you get it working, please leave a guide here if someone wants to achieve the same, but again not recommended by me. If you have other questions just ask |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your hints, this is more complicate as expected, if one day there will be the possibility to just disable the authentication or implement a "trusted proxies" mechanism, I will be super happy :) Should I create some ticket for this specific request? |
Beta Was this translation helpful? Give feedback.
-
Is there the possibility to disable the authentication? I have always found a limitation of npm to not use an authentication system
Beta Was this translation helpful? Give feedback.
All reactions