<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Thanks for reporting this. Feel free to
create JIRA and assign it to me.<br>
<br>
Thanks,<br>
Marek<br>
<br>
On 14.7.2015 20:24, Marcelo Arthur Sampaio wrote:<br>
</div>
<blockquote
cite="mid:1c62c2e1be061ab1023743657e28243b28a4426d@serpro.gov.br"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title></title>
<style type="text/css">.expressomail-body-blockquote {margin: 5px 10px 0 3px;padding-left: 10px;border-left: 2px solid #000088;} </style>Hi,<br>
<br>
I get this error when the value of "UUID LDAP attribute" is the
same of the "Username LDAP attribute": Ex. "uid"<br>
<br>
Caused by: java.lang.NullPointerException<br>
at
org.keycloak.models.cache.DefaultCacheUserProvider.getUserByUsername(DefaultCacheUserProvider.java:149)
[keycloak-invalidation-cache-model-1.3.1.Final.jar:1.3.1.Final]<br>
at
org.keycloak.federation.ldap.LDAPFederationProvider.importLDAPUsers(LDAPFederationProvider.java:391)<br>
<br>
The method
org.keycloak.federation.ldap.LDAPUtils.getUsername(LDAPObject,
LDAPConfig)<br>
dont return the username, because the attribute is not in the map.<br>
<br>
This occours because the uid is not added into the map of
attributes.<br>
<br>
I looked at
org.keycloak.federation.ldap.idm.store.ldap.LDAPIdentityStore.populateAttributedType(SearchResult,
Collection<String>) line 402:<br>
<br>
if
(ldapAttributeName.equalsIgnoreCase(getConfig().getUuidLDAPAttributeName()))
{<br>
Object uuidValue = ldapAttribute.get();<br>
ldapObject.setUuid(this.operationManager.decodeEntryUUID(uuidValue));<br>
} else {<br>
Set<String> attrValues = new
TreeSet<>();<br>
NamingEnumeration<?> enumm =
ldapAttribute.getAll();<br>
while (enumm.hasMoreElements()) {<br>
String attrVal = enumm.next().toString();<br>
attrValues.add(attrVal);<br>
} ...<br>
<br>
<br>
<div>
-<br>
<br>
<br>
"Esta mensagem do SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS
(SERPRO), empresa pública federal regida pelo disposto na Lei
Federal nº 5.615, é enviada exclusivamente a seu destinatário e
pode conter informações confidenciais, protegidas por sigilo
profissional. Sua utilização desautorizada é ilegal e sujeita o
infrator às penas da lei. Se você a recebeu indevidamente,
queira, por gentileza, reenviá-la ao emitente, esclarecendo o
equívoco."<br>
<br>
"This message from SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS
(SERPRO) -- a government company established under Brazilian law
(5.615/70) -- is directed exclusively to its addressee and may
contain confidential data, protected under professional secrecy
rules. Its unauthorized use is illegal and may subject the
transgressor to the law's penalties. If you're not the
addressee, please send it back, elucidating the failure."<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
keycloak-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/keycloak-dev">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a></pre>
</blockquote>
<br>
</body>
</html>