orbiter icon indicating copy to clipboard operation
orbiter copied to clipboard

Add http basic auth based on env vars

Open gianarb opened this issue 7 years ago • 3 comments

gianarb avatar Aug 08 '17 19:08 gianarb

@mbovo this is good. I am thinking about how to make it optional. I mean if we don't inject the env vars we are still requiring an empty auth

gianarb avatar Aug 08 '17 19:08 gianarb

@gianarb I've added a flag to enable (default disabled) authentication, with default user/pass (orbiter/orbiter) just in case. I'm using kelseyhightower/envconfig here to read custom configuration from env, seems a good lib. As improvement in https://github.com/mbovo/orbiter/commit/59758b2c062b1b47ccd8ca4770b2f83798aa1754 i've added a map for multiple user/pass.

I think configuration like this should be placed in global conf and propagated, instead of using repeated code. I will open another proposal/pr for this last point.

mbovo avatar Aug 22 '17 09:08 mbovo

I like the mapping idea. I dont think we need library to read some envvar. I think the os package is enough

gianarb avatar Aug 23 '17 17:08 gianarb