3
0
mirror of https://github.com/grafana/grafana.git synced 2025-02-25 18:55:37 -06:00
Commit Graph

6 Commits

Author SHA1 Message Date
Leonard Gram
5d3a60d46e
LDAP: Adds bind before searching LDAP for non-login cases. () 2019-07-10 12:25:21 +02:00
Oleg Gaidarenko
1c08e58605
LDAP: small improvements to various LDAP parts ()
* Add multildap config example

* Publicize mocks for multildap module
2019-06-19 15:46:04 +02:00
Oleg Gaidarenko
1b1d951495 LDAP: refactoring ()
* LDAP: use only one struct

* Use only models.ExternalUserInfo

* Add additional helper method :/

* Move all the helpers to one module

* LDAP: refactoring

* Rename some of the public methods and change their behaviour

* Remove outdated methods

* Simplify logic

* More tests
  There is no and never were tests for settings.go, added tests for helper
  methods (cover is now about 100% for them). Added tests for the main
  LDAP logic, but there is some stuff to add. Dial() is not tested and not
  decoupled. It might be a challenge to do it properly

* Restructure tests:
   * they wouldn't depend on external modules
   * more consistent naming
   * logical division

* More guards for erroneous paths

* Login: make login service an explicit dependency

* LDAP: remove no longer needed test helper fns

* LDAP: remove useless import

* LDAP: Use new interface in multildap module

* LDAP: corrections for the groups of multiple users

* In case there is several users their groups weren't detected correctly

* Simplify helpers module
2019-06-13 16:47:51 +02:00
Oleg Gaidarenko
2316414786
Add tests for multildap ()
That should get us to 100% coverage
2019-06-07 15:16:00 +03:00
Oleg Gaidarenko
de92c360a1
LDAP: reduce API and allow its extension ()
* Removes Add/Remove methods

* Publicise necessary fields and methods so we could extend it

* Publicise mock API

* More comments and additional simplifications

* Sync with master

Still having low coverage :/ - should be addressed in 
2019-05-27 10:36:49 +03:00
Oleg Gaidarenko
35f227de11
Feature: LDAP refactoring ()
* incapsulates multipleldap logic under one module

* abstracts users upsert and get logic

* changes some of the text error messages and import sort sequence

* heavily refactors the LDAP module – LDAP module now only deals with LDAP related behaviour

* integrates affected auth_proxy module and their tests

* refactoring of the auth_proxy logic
2019-05-17 14:57:26 +03:00