Replies: 2 comments 1 reply
-
We are calling out to the package without any arguments so it uses whatever defaults they have configured. They say the defaults are "according to the security recommendations by the team that develops Argon2" and you can see them here: https://github.com/ranisalt/node-argon2/wiki/Options.
It might be a good idea to add a way to have code-server take your password and spit out the hash (similar to I wonder though if you really need to use the hashed password and could use a plain text one instead? If an attacker gains access to the password file, they already have access to the container, and if the passwords are unique they have no further utility. There could be an angle I am not seeing though.
No, the rate limiting is purely in memory. |
Beta Was this translation helpful? Give feedback.
-
Their will be a LOT of users each running a container with code-server and an apache webserver. Previously we were creating the container and assigning a random password that we give to the authenticated user, for them to copy-n-paste so as to login to code-server. That system has been in use for more than 5 years, in a docker environment. Now we are migrating to a kuberneties system, and want to simply pick up the already generated password (from the code-server config file) set the session cookie, and direct them to code-server. No more copy-n-pasting. They just go to their environemnt, Users never actually need to know their code-server password! They just login to our systems as normal (if not already), and they have access to their code-server (and no one elses). The weird thing is that while code-server accepts the hash we create from the password most of the time. (It verifies against the password). But when it doesn't, though, it jumps back to the '/login' sub-path which creates a new hash of their password and sends them back to code-server top-level. What is happening is that sometimes the hash created just does not work. All new hashes of the password in the code-server config also do does not work! Endless browser re-direction look. At first I thought the cookie was being reset and lost. But it is still present when the users browser is redirected back to our auth system, so its not being lost. Then I thought it was the argon2 params being checked, and found to not be good enough. (Thus this request) Now I got the feeling that the code-server internally has a different password to what it had written in its config file. Basically the hashed password I set the cookie to, is either accepted first time, And yes The system would be a LOT simpler if the session cookie was simply the code-server generated password |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In a kuberneties environment where I will be running multiple code-server containers (one per user)
I have created a ingress 'overlay' for the code-server "/login" which (after confirming the users identification against our OAuth2 server) grabs the password for the user's code-server, hashing it, and sets it has the users code-server-session cookie, before returning the to code-server proper. This IS working and means we can set ANY authentication system we like (SSO in our case, so users often are already authenticated!)
This has works very well, though I find that code-server has some very specific 'requirements' for the argon2 has it requires.
Too low a iteration, parallelism, or memory and it just rejects it provided hash cookie, redirecting back to the "/login" web overlay, so as to try again. (and getting into a redirect loop, until browser breaks it!)
Unfortunate the "Go" language argon hash is woefully bad, in that it has no clean error handling and just CRASHES the program if it can't get the resources to hash the users password! This sets upper bounds on the argon2 hashing parameters we can use.
THE QUESTION: What exactly is the requirements code-server has for an acceptable argon2 hash?
Alternative (and this is not as good, as the hash become static until environment is restarted)
Is their a way to get code-server to provide an acceptable hash instead of having the hash or some other session cookie?
is the password repeat failure limits saved to disk? If so where?
Beta Was this translation helpful? Give feedback.
All reactions