I’ve tried a few things without success. Are there any basic guidelines on how to do this?
Background: I’ve setup BrewBlox on a Synology NAS with DSM 6.2. I’m using the nginx reverse proxy on the NAS to provide TLS access. I have no problems getting this to work. But then it’s exposed with no authentication.
I’ve tried the following:
When I add basic auth with a .htpasswd file for the nginx reverse proxy, I get the access challenge, but then the spark service I setup is not accessible. In the API logs, I get messages like this:
{
"message": "Create object",
"moduleId": "services",
"time": "Thu Jan 16 2020 21:46:40 GMT-0600 (Central Standard Time)",
"content": "{\"id\":\"myspark\",\"title\":\"Basement Fermentation Controller\",\"order\":1,\"config\":{\"groupNames\":[],\"expandedBlocks\":{},\"sorting\":\"unsorted\",\"pageMode\":\"List\"},\"type\":\"Spark\"}",
"error": "Name or password is incorrect."
}
I assume this may be because there are some local requests that get challeneged and don’t supply the password? If that’s the case, I supposed I could look into configuring nginx to let local requests go unchallenged?
As a next step I removed basic auth from nginx and moved on to trying to secure traefik.
I tried both of these configurations in the docker-compose.shared.yml file and in neither case do I get challenged when accessing the brewblox UI
ui:
image: brewblox/brewblox-ui:${BREWBLOX_RELEASE}
restart: unless-stopped
labels:
- "traefik.port=80"
- "traefik.frontend.rule=Path:/, /ui, /ui/{sub:(.*)?}"
- "traefik.frontend.auth.basic.users=User:HashedPasswordWithEscaped$"
ui:
image: brewblox/brewblox-ui:${BREWBLOX_RELEASE}
restart: unless-stopped
labels:
- "traefik.port=80"
- "traefik.frontend.rule=Path:/, /ui, /ui/{sub:(.*)?}"
- "traefik.http.middlewares.test-auth.basicauth.users=User:HashedPasswordWithEscaped$"
Has anything like this been done before?