mxcube / mxcubecore

Backend used by MXCuBE
http://mxcube.github.io/mxcube/
GNU Lesser General Public License v3.0
11 stars 51 forks source link

Created AbstractAuthenticator and made necessary updates to LdapLogin #822

Closed marcus-oscarsson closed 7 months ago

marcus-oscarsson commented 7 months ago

Greetings from the MXCuBE meeting :)

Introduced AbstractAuthenticator and made necessary updates to LdapLogin

This also means that we should move the authenticate call from ISPyBclient to the the authenticate/login logic.

All *LdapLogin classes have been updated so that they care now call *Authenticator

github-actions[bot] commented 7 months ago

Coverage

Coverage Report •
FileStmtsMissCoverMissing
mxcubecore/HardwareObjects
   Beamline.py30710267%145–159, 271, 293, 337, 348, 370, 426, 438, 449, 460, 482, 493, 506, 517, 528, 539, 550, 561, 572, 583, 594, 606, 621, 632, 645, 656, 671, 682, 693, 709, 725, 742–828, 835–845, 848, 851–862
   LdapAuthenticator.py1021020%7–185
mxcubecore/HardwareObjects/abstract
   AbstractAuthenticator.py13130%22–50
mxcubecore/HardwareObjects/mockup
   ISPyBClientMockup.py2082080%5–725
   LdapAuthenticatorMockup.py13130%1–30
TOTAL59311548208% 

Tests Skipped Failures Errors Time
1925 0 :zzz: 0 :x: 0 :fire: 1m 34s :stopwatch:
marcus-oscarsson commented 7 months ago

@rhfogh, @MartinSavko: Do you see an issue with this on the Qt client side ?

rhfogh commented 7 months ago

I am a little confused. I do not see AbstractAuthenticator or the relevant mockup anywhere in either code or config files, in the PR or the pre-existing code. Should they not be there?

marcus-oscarsson commented 7 months ago

@rhfogh :) thanks, I forgot to add those files, done now

fabcor-maxiv commented 7 months ago

Does this pull request imply some changes that a facility should make in their facility-specific code? Or is that intended to be "backwards compatible" so to say?

And this pull request from the web part https://github.com/mxcube/mxcubeweb/pull/1140 is required, is that right? Or are the 2 pull requests independent?

marcus-oscarsson commented 7 months ago

This PR and https://github.com/mxcube/mxcubeweb/pull/1140 are independent. It makes it possible to decouple the authentication bit from the ISPyB client (for instance in your case ISPyBrestClient) from the rest.

EDIT The actual decoupling of ISPyB and authentication is for a future PR