Implementation of LDAP adapter base logic together with getPerunUser
and getGroupByName
methods. Inspired by python: https://gitlab.ics.muni.cz/perun/perun-proxyidp/perun-connector/-/blob/main/perun/connector/adapters/LdapAdapter.py?ref_type=heads
LDAP can be run from id-test
. There's an example test configuration on id-test in folder:
peter/test/perun-connector-java
that can be run by the command:
sudo ./gradlew :test --tests --rerun-tasks "perun.connector.LdapTest.testGetPerunUser"
Implementation stems from Python but ultimately has to be changed in some places. Normally, an LDAP connection can be autoconfigured from the application.yaml
file. However, in a case where we need to rotate between several LDAP adapters, we have to create separate configurations and load them to the LdapContextSource for each adapter (this happens in LdapConnector). That's why the config structure differs from both Python and traditional Spring implementation.
There's also a new extension of generic reflection in AdaptersManager
in getGenericClass
to accommodate the conversion between boxed and primitive data types in reflection based on this thread on StackOverflow.
re STR-1397