Configure optional basic auth support
alexellis opened this issue · comments
Description
Configure optional basic auth support using an environment variable bool "basic_auth". No need for a config struct at this stage, but it may be added later.
This should be off by default, so that existing guides continue to work and on when used through faasd which recently had a PR merged to enable basic-auth.
This struct should help:
https://github.com/openfaas/faas-provider/blob/master/auth/credentials.go#L31
cc @Waterdrips
Happy for either of you to take this, it should be relatively straight-forward, but feel free to ask me questions here or on #faas-provider.
@alexellis I know you said we can "skip the config" struct at this stage, but can't we just use the FaasConfig
from https://github.com/openfaas/faas-provider/blob/8f7c35975e1b2bf8286c2f90ee51633eec427491/types/read_config.go#L77 it already has the basic-auth parsing and defaults to false