Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Basic auth on a single service? #229

Open
wizonesolutions opened this issue Oct 11, 2017 · 2 comments
Open

Basic auth on a single service? #229

wizonesolutions opened this issue Oct 11, 2017 · 2 comments

Comments

@wizonesolutions
Copy link

The HTTP_BASIC_AUTH variable only applies at the global level. Is it possible to require authentication for just a specific service without setting it globally and excluding every other service?

@roks0n
Copy link

roks0n commented Nov 2, 2017

I haven't tested but looking at their docs it says:

Global and default settings of HAProxy
HTTP_BASIC_AUTH -> a comma-separated list of credentials(:) for HTTP basic auth, which applies to all the backend routes. To escape comma, use ,. Attention: DO NOT rely on this for authentication in production

Settings in linked application services
EXCLUDE_BASIC_AUTH -> if set(any value) and HTTP_BASIC_AUTH global setting is set, no basic auth will be applied to this service.

Given that information I assume you apply HTTP_BASIC_AUTH on all services, but you explicitly remove authentication using EXCLUDE_BASIC_AUTH on each of your service.

@jontro
Copy link

jontro commented Feb 21, 2018

The way @roks0n suggests works perfectly fine, I am using it this way currently. I think this issue can be closed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants