I'm glad you solved this. Just want to address a couple of points you made in reply to my original comment.
@chraebsli:
@hughbris:
Can’t you achieve what Private Site does just using groups and the Login plugin?
Unfortunately, no, I can’t. It’s a website for a client, a small society which need a password protected page on the website for their members, so they can access it with a shared password.
I'm curious what you thought I meant. I probably didn't explain it very well but @pamtbaau seems to have got through with a better explanation.
@chraebsli:
I develop this and other websites with git, and upload the code to GitHub. Since I don’t want any passwords, keys and other secrets hard-coded, I use Doppler, a secrets manager, to manage them.
I think Git is the only sane way to manage and escalate. I use private repos but also do what I can to leave secrets out of my repos.
I employ a technique where I store as much config as possible globally and try to keep configs containing secrets to environment configs. That allows me to commit most of my configuration. I upload the environment configs containing secrets with scp, keeping a list of those. I will shortly "upgrade" that system to rsync. Would love a better system to manage that.
For example, user/config/form.yaml: (committed)
turnstile:
theme: dark
# NOTE - refer configs under env for site_key & secret_key
env/prod/config/plugins/form.yaml: (git ignores this)
turnstile:
site_key: SITE_KEY_HERE
secret_key: SECRET_KEY_HERE
I don't particularly like having secrets in the filesystem at all either, especially in plain text as most plugins do. Some plugins support environment variables but that seems like more overhead for questionable benefit. Because Docker Compose files run everything, I'd need to pass them in there and then delete the compose file. That would fall over very time the container restarts unattended.
I somewhat mitigate exposure by restricting the scope of what credentials can do, which is a little more setup. That is, avoiding reusing credentials as much as possible (across sites and environments). I could probably more actively monitor abuse too (e.g. alerts for spikes in API usage).
Every CMS and framework I have used stores secrets somewhere on the file system. It doesn't sit well with me but I can't recall an attack based on that.
I know this is solved, I just enjoy talking about it and sharing solutions 🙂