3.4.3 Avatar + Active Directory = No go

In the past I’ve used a plugin to get avatars with my AD, but with the most recent version of Openfire, they claimed you can now add avatars with your AD. Unfortunately, I get the same read-only error message I’ve always gotten. Is this something that’s going to be fixed, or should I just use the plugin again?

Edit your openfire.xml file. Remove the tag for full name . This fixed the error for me.

I am having the same issue.

I had been using the ldapvcardavatar.jar plugin to support avatars in openfire and was glad to read they were natively supported now while using Activedirectory. However I removed the plugin and also could not set an avatar anymore. It tells me “Server does not support Vcards. Unable to save your Vcard.”. Is there something you have to do to enable this new feature?

Thanks.

Unfortunately this did not fix my problem. I did exactly what you said and restarted openfire to find I’m still hitting the same problem. Thanks for your tip though!

I’m assuming the plugin is the only way to approach this problem for now.

I am going to try my second server with AD tonight. If I get it to work I will post the vCard mappings that work.

Could you guys open an XML console debugger window on your client and paste here the XML that you got when asking your vCard and the one your client is sending to the server? We found another way of comparing things on the server but if the client is in fact sending something different even if you have not modified the field (e.g. FN) then our new logic will also fail. If your servers are public and we could do some tests then it would be even better.

Thanks,

– Gato

With the new ldap avatar support there is two ways to set it:

  1. Have it read the jpegPhoto attribute from ldap for the user. A big emphasis needs to be made on the word “read” as openfire only has READ-ONLY access to ldap (always been that way), which means that the user cant set their avatar using a client connected to the openfire server. You’d have to use a different process to load in jpeg pics of users to the jpegPhoto attribute, wihch is currently out of openfire’s scope. This is probably what’s returning the read only message and that result should be expected.

  2. Turn on the option in openfire to have it allow users to store the avatar in the db while using ldap for everything else. I believe this was just added in 3.4.3.

It sounds like you will want to use option 2. Option 1 is the default.

Ok my upgrade went reall smooth. I had to make the same adjustments to my openfire.xml (posted below).

<vcard-mapping><![CDATA[

<vCard xmlns=“vcard-temp”>

<N><FAMILY></FAMILY><GIVEN></GIVEN><MIDDLE><MIDDLE/></N>

<EMAIL>

<INTERNET/>

<USERID></USERID>

</EMAIL>

<ADR>

<HOME/>

<STREET></STREET>

<PCODE></PCODE>

<CTRY></CTRY>
</ADR> <ADR>
<WORK/> <STREET></STREET> <LOCALITY></LOCALITY> <REGION></REGION> <PCODE></PCODE> <CTRY></CTRY>

</ADR>

<TEL>

<HOME/>

<VOICE/>

<NUMBER></NUMBER>

</TEL>

<TEL>

<HOME/>

<CELL/>

<NUMBER></NUMBER>
</TEL> <TEL>
<WORK/> <VOICE/> <NUMBER></NUMBER>
</TEL> <TEL>
<WORK/> <CELL/> <NUMBER></NUMBER>

</TEL>

<TEL>

<WORK/>

<FAX/>

<NUMBER></NUMBER>

</TEL>

<TEL>

<WORK/>

<PAGER/>

<NUMBER></NUMBER>

</TEL>

<TITLE></TITLE>

<ORG>

<ORGNAME></ORGNAME>

<ORGUNIT></ORGUNIT>

</ORG>

<URL></URL>

</vCard>]]></vcard-mapping>

It appears as though I fell into a trap. The Avatar is being saved but that is due to improper mappings. I discovered this because the system is now letting me change any vCard attribute with no error. It is storing all changes in the openfire database.

Exactly as I understood it, and with the new version it behaves like it always did. With version 3.4.3 it at least sounded like it supported storing the avatars in the database like the plugin let you do before. So you mention option 2, but I haven’t seen how exactly you change it to that behavior. How do you turn on storing avatars in the DB in version 3.4.3.

Thanks!

Add this to system properties:

ldap.override.avatar = true

Ok so I have it working to a degree. You can change your avatar with no error. You can not change anthing else without generating an error. The problem is if you change something else first you will also get an error when you try to change the avatar, and your Roster in spark will only show first names. First you need to enable the feature. This is done by checking the box on the second screen of the LDAP config or by adding ldap.override.avatar = true to system properties. Then you need to edit your openfire.xml. Remove the <FN></FN> tag completely and change the <N></N> tag to this:

<N>

<FAMILY></FAMILY>*
<GIVEN></GIVEN>
</N> This is my whole vCard mapping that is kind of working for AD: <vcard-mapping> <![CDATA[
<vCard xmlns=“vcard-temp”>
<N>
*<FAMILY></FAMILY>

<GIVEN></GIVEN>

</N>

<EMAIL>

<INTERNET/>

<USERID></USERID>

</EMAIL>

<ADR>

<HOME/>

<STREET></STREET>

<PCODE></PCODE>

<CTRY></CTRY>*
</ADR> <ADR>
<WORK/> <STREET></STREET> <LOCALITY></LOCALITY> <REGION></REGION> <PCODE></PCODE> *<CTRY></CTRY>

</ADR>

<TEL>

<HOME/>

<VOICE/>

<NUMBER></NUMBER>

</TEL>

<TEL>

<HOME/>

<CELL/>

<NUMBER></NUMBER>*
</TEL> <TEL>
<WORK/> <VOICE/> <NUMBER></NUMBER>
</TEL> <TEL>
<WORK/> <CELL/> *<NUMBER></NUMBER>

</TEL>

<TEL>

<WORK/>

<FAX/>

<NUMBER></NUMBER>

</TEL>

<TEL>

<WORK/>

<PAGER/>

<NUMBER></NUMBER>

</TEL>

<TITLE></TITLE>

</vCard>]]></vcard-mapping>

I messed with it a little more using your mapping, but it reset my server back to the defaults. I quickly restored my previous settings, installed the ldap avatar plugin and called it a day.

Why fix something that isn’t broken with the plugin?

Simply creating the properties entry (ldap.override.avatar) and setting it to true did not work for me.

I had to rerun the LDAP setup and check the box (Step 2, Store avatar in database if not provided by LDAP).