Allow configuring of username_as_common_name
Full parameterise the LDAP config
Add tests for the LDAP config