git-http-backend icon indicating copy to clipboard operation
git-http-backend copied to clipboard

AuthUserEnvVar and AuthPassEnvVar are used in different contexts

Open dayflower opened this issue 1 year ago • 1 comments

AuthUserEnvVar and AuthPassEnvVar were originally introduced for delegating auth user and password to ssh process environment. (#6, 5f54a8f)

e.g.

$ git-http-backend -auth_user_env_var=AUTH_USERNAME -auth_pass_env_var=AUTH_PASSWORD

and when a user accesses with user:foo, password:bar, then

AUTH_USERNAME=foo AUTH_PASSWORD=bar git ...

However, #17 introduced Basic Auth mechanism and utilize AuthUserEnvVar and AuthPassEnvVar for accepting user name and password.

If an operator starts with:

$ git-http-backend -auth_user_env_var=foo -auth_pass_env_var=bar -require_auth

then, only the user whose name is 'foo' and whose password is 'bar' is accepted, that's fine.

But this setting also enables "delegating auth info" feature above, then from the perspective of the git process, following environments are passed.

foo=foo bar=bar git ...

It's quite meaningless.

How about making different parameter for these two contexts?

dayflower avatar Sep 04 '24 04:09 dayflower

did #19 solve ur problem?

navetacandra avatar Sep 05 '24 04:09 navetacandra