BUG: Captcha HTML File shows a missing, but is working (crowdsec_manager discussion #25)

:speech_balloon: GitHub discussion crowdsec_manager #25 in General, started by arjunrbery on GitHub

Steps to recreated:

  1. Follow steps in Custom Captcha Page section CrowdSec | Pangolin Docs using hCaptcha
  2. Validate captcha page works with docker exec crowdsec cscli decisions add --ip <YOUR IP> -d 1m --type captcha
  3. Visit Crowdsec Manager to receive error message

External Image


:speech_balloon: Join in here or on GitHub.

hhftechnology commented on GitHub:

@​arjunrbery it will show missing because its custom and path is different, not a bug

BeastleeUK commented on GitHub:

I think part of the problem is that the installation guides and the compose don’t match what the app is looking for. For example the path to the dynamic_config.yml is expected to be in /etc/traefik in Crowsdsec-Manager but the compose never mounts anything to that path, it goes to /app/config instead.

I’ve struggled as I have made adjustments to add a conf.d folder for the dynamic config, it’s my standard practice for managing security, which also broke the middleware manager. I prefer to have separate files for certain things and it can’t accommodate that. I may start again with the main install and see if I can live with the all-in-one nature of how Pangolin is built.

Love the work you’re doing BTW,

OnekO commented on GitHub:

At least this is confusing, I come here thinking on a bug also.

hhftechnology replied in a thread on GitHub to OnekO:

If your dynamic config file is different location then you will have to adjust the mounts

https://crowdsec-manager.hhf.technology/docs/configuration/environment

I hope this helps

hhftechnology replied in a thread on GitHub to BeastleeUK:

If your dynamic config file is different location then you will have to adjust the mounts

https://crowdsec-manager.hhf.technology/docs/configuration/environment

I hope this helps

BeastleeUK replied in a thread on GitHub to BeastleeUK:

In my case it’s not one file. I take full advantage of the conf.d and multiple yml files. I built my setup before I learned about Middleware Manager, which I stopped using as I had other issues with this too, and CrowdSec Manager apps being available.

External Image

I noticed that the manager has put in a new conf folder in the config folder, where the html pages sit, however I’ve used a pages folder for this. It doesn’t seem to read the path in the CrowsSec config. Could you add more variables to allow more paths to be defined, please? I have the same issue with CrowdSec as I use the aquis.d folder and don’t have an aquis.yml file.

I want to utilise your apps so I’ll look at rebuilding it whilst I’m on Christmas leave but it would be great if there was more flexibility to support conf.d works, I suspect the problem here will be which file to update if there are more than one. I’ll look at putting in a feature request for all this too.

Thanks again.

BeastleeUK replied in a thread on GitHub to BeastleeUK:

@​hhftechnology I’ve completely rebuilt my Pangolin install with a more singular build. For the most part things are working slightly better but this still fails unless I have the exact suggested structure in your Captcha page.

I personally think a subfolder called conf in config is confusing but I understand what you’re trying to achieve. I think this folder would make more sense to be called assets. I’d also like to reiterate that the option to add an environmental variable, that allows the user to set the path along with the other Traefik ones, i.e. TRAEFIK_ASSETS_PATH or something similar, would be the simplest option. With a description to explain it’s a folder where things like the captcha.html and ban.html files would go to help. You could reference this on the Captcha page.

I’ll modify my structure again for now.

hhftechnology replied in a thread on GitHub to BeastleeUK:

I am working on more flexible variables but this is a complex organism. Thank you very much for your feedback. Can you hop on my discord , need to chat on how we can tackle this in a user friendly way