Custom LDAP mapper deployed but not showing

TLDR: new ldap-mapper is deployed, but not showing up
Situation:
I get Users from LDAP, where the username contains information that should be in an attribute,
Example : Doe,John ( Developer )
Here, developer should end up in an attribute “profession”.

So i implemented a ldap-mapper to achieve this:

    1. NameStorageMapper extending AbstractLDAPStorageMapper
    1. NameStorageMapperFactory extending AbstractLDAPStorageMapperFactory

They are registered with
/META-INF/services/
org.keycloak.storage.ldap.mappers.AbstractLDAPStorageMapper
and …/org.keycloak.storage.ldap.mappers.AbstractLDAPStorageMapperFactory
pointing to the created classes.
Keycloak log tells me the jar is deployed sucessfully, when debugging, the new mapper is not loaded in loadFactories.

I have tried copying an existent mapper, but to no avail.
Does someone know a mistake i made?
Do i need to Implement a specific interface oder extend another class?

I’m open for advice and comments, thank you in advance!

I also have this issue I see
[org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0027: Starting deployment of "mapper-jar-with-dependencies.jar" (runtime-name: "mapper-jar-with-dependencies.jar")
and
[org.keycloak.subsystem.server.extension.KeycloakProviderDeploymentProcessor] (MSC service thread 1-2) Deploying Keycloak provider: mapper-jar-with-dependencies.jar

but my mapper is not shown in the UI

1 Like

Provider Factory Loading behavior is changed in the current release in comparison to the old ones.

You need to provide a different ID for your custom implementation NameStorageMapperFactory instead of the same from the default implementation.

Hope it helps!

Since I stumbled upon this discussion with the same issue and nothing in here solved my problem, I want to point out that you should register your service with the Interface, not the AbstractClass. So your META-INF folder should contain a file named org.keycloak.storage.ldap.mappers.LDAPStorageMapperFactory pointing to your implementation of AbstractLDAPStorageMapperFactory.

Did you resolve this issue? I am getting the “not a subtype” error. Any suggestions?
Thanks!