Page MenuHomePhabricator

Allow to hide authentication methods from login page
Closed, WontfixPublic

Description

I want to use the PhabricatorLDAPAuthProvider as a backend to fetch user information in another part of the code. Thus I need the provider, but do not want it to show up on the login page (that would be confusing, because there would be two ways to login for our users – the convenient way and LDAP).

I wrote a patch that simply hides the LDAP login form from the login page (depending on a config checkbox), but maybe you want to take a different approach?

Event Timeline

devurandom raised the priority of this task from to Needs Triage.
devurandom updated the task description. (Show Details)
devurandom added a project: Auth.
devurandom updated the task description. (Show Details)
devurandom added a subscriber: devurandom.

We would need to have a clearer understanding of how many and why installs want to do this. For now patching your local install sounds like the correct approach.

My exact usecase:

  • I use authentication via libphremoteuser (REMOTE_USER envvar)
  • For registration, I want to display the proper real-name and email address
  • I need to fetch that from LDAP
  • I can conveniently do that (with a small patch) using the PhabricatorLDAPAuthProvider

I can show you patches for both the hide-loginform part, as well as the LDAPAuth* patch and the one to libphremoteuser, if that helps you.

epriestley claimed this task.
epriestley added a subscriber: epriestley.

Gluing two providers together in this way is not a use case we're interested in supporting in the upstream.

You can implement a single provider which understands both REMOTE_USER and LDAP, which will resolve this issue, or you can maintain a small local patch to cover up the hack of using two providers instead of a single provider.