Closed tl-Bruno-Braga closed 3 years ago
I only tried it with username/password but your config settings seems to look good to me. I guess it is the hash itself, can you try to run n8n locally seting the hash and debug the application or ask the n8n team
https://github.com/n8n-io/n8n/issues/1835
Tried locally and same issue. Asked above.
Hello @Vad1mo i was wrong actually. I tested locally and it seems that it was working. The hash i provided was incomplete. Once i plugged that same hash on my helm setup i keep getting unauthorized. I noticed that N8N_BASIC_AUTH_HASH is not being set on env variables or so it seems.
There is definitively some issue here. Can i ask you to try it yourself and see if you can login?
Thanks
the helm chart is writing the config file that n8n is using, I tried to avoid using ENV Vars as in that case I need to support each one individually. can you please take a look in your configMap, this one should contain the entry, if there is no entry then this is a problem with this helm chart.
This is the configmap:
{
"listen_address": "0.0.0.0",
"port": 5678,
"protocol": "http",
"security": {
"basicAuth": {
"active": true,
"hash": true
}
}
}
Looking at config inside container:
/data # cat /n8n-config/config.json
{
"listen_address": "0.0.0.0",
"port": 5678,
"protocol": "http",
"security": {
"basicAuth": {
"active": true,
"hash": true
}
}
}
However, i would like to ask you to try and see if you can reproduce the issue on your side.
where is the password
entry in the config file?
can you quote your hash in the yaml file?
We are integrating with vault so we source on a file with exports. The hash is therefore an exporter variable. Password works fine but hash does not. However, it seems that when i try the export route with a local docker compose it works fine. With helm chart it does not. Perhaps there is something overriding this on the chart.
Just thought it would be useful to bring this up since the functionality is lacking. I am now using password instead since i could not get the hash to work.
I strongly think it's something on your side, maybe vault. This Helm chart just creates the config file that n8n used.
try to hardcode the password bypassing vault and see if that works
Hello
I am trying to setup basic auth with n8n. I am using the hashed option which looking at the source code seems to indicate that a bcrypt hash should be set as N8N_BASIC_AUTH_PASSWORD.
When i enable hash:
the basic auth on my browser keeps saying that the password is wrong. I have generated the bcrypt password using the following code:
Any reason why this is not working? Seems to work when i set hash to false and use normal password authentication.
Thanks