By: Anandbabu Vijayan user 09 Oct 2017 at 2:05 a.m. CDT

4 Responses
Anandbabu Vijayan gravatar
we are using ldap backed with Gluu server, I was try to add custom attribute but it showing "Attribute type userCertificate definition not belong to the list of allowed object classes, Failed to update attribute userCertificate" No errors in the log, is there any way to add it. this attribute type is binary, but I didn't see any binary type to add. ![Adding Custom Attributes Error](https://screenshot.net/81pv0br "enter image title here")

By Anandbabu Vijayan user 10 Oct 2017 at 6:30 a.m. CDT

Anandbabu Vijayan gravatar
Fixed this issue by added attriburename "userCertificate" to the gluuPerson object class list in gluu.schema The entry will be looks as below ``` objectclass ( oxObjectClass:2 NAME 'gluuPerson' SUP ( top ) STRUCTURAL MUST ( objectclass ) MAY ( associatedClient $ c $ displayName $ givenName $ gluuManagedOrganizations $ gluuOptOuts $ gluuStatus $ gluuWhitePagesListed $ iname $ inum $ mail $ gluuSLAManager $ memberOf $ o $ oxAuthPersistentJWT $ oxCreationTimestamp $ oxExternalUid $ oxLastLogonTime $ oxTrustActive $ oxTrustAddresses $ oxTrustEmail $ oxTrustEntitlements $ oxTrustExternalId $ oxTrustImsValue $ oxTrustMetaCreated $ oxTrustMetaLastModified $ oxTrustMetaLocation $ oxTrustMetaVersion $ oxTrustNameFormatted $ oxTrustPhoneValue $ oxTrustPhotos $ oxTrustProfileURL $ oxTrustRole $ oxTrustTitle $ oxTrustUserType $ oxTrusthonorificPrefix $ oxTrusthonorificSuffix $ oxTrustx509Certificate $ oxPasswordExpirationDate $ persistentId $ middleName $ nickname $ preferredUsername $ profile $ picture $ website $ emailVerified $ gender $ birthdate $ zoneinfo $ locale $ phoneNumberVerified $ address $ updatedAt $ preferredLanguage $ role $ secretAnswer $ secretQuestion $ seeAlso $ sn $ cn $ transientId $ uid $ userPassword $ st $ street $ l $ oxCountInvalidLogin $ oxEnrollmentCode $ gluuIMAPData $ oxPPID $ userRandomKey $ userCertificate ) X-ORIGIN 'Gluu created objectclass' ) ``` Now I can add Custom Atrribute through Gluu UI and it is listed under GluuPerson list. I have selected data type as photo since the type is binary.

By Anandbabu Vijayan user 10 Oct 2017 at 6:32 a.m. CDT

Anandbabu Vijayan gravatar
Currently facing issue ** Caused by: com.unboundid.ldap.sdk.LDAPException: userCertificate;binary: value #0 invalid per syntax** Log: ==== ``` org.gluu.site.ldap.persistence.exception.EntryPersistenceException: Failed to update entry: inum=@!846A.617B.C89F.18CD!0001!4118.D484!0000!877A.DDEB,ou=people,o=@!846A.617B.C89F.18CD!0001!4118.D484,o=gluu at org.gluu.site.ldap.persistence.LdapEntryManager.merge(LdapEntryManager.java:185) ~[oxcore-ldap-3.1.0.Final.jar:?] at org.gluu.site.ldap.persistence.AbstractEntryManager.merge(AbstractEntryManager.java:277) ~[oxcore-ldap-3.1.0.Final.jar:?] at org.gluu.site.ldap.persistence.AbstractEntryManager.merge(AbstractEntryManager.java:298) ~[oxcore-ldap-3.1.0.Final.jar:?] at org.gluu.site.ldap.persistence.LdapEntryManager$Proxy$_$$_WeldClientProxy.merge(Unknown Source) ~[oxcore-ldap-3.1.0.Final.jar:?] at org.gluu.oxtrust.ldap.service.PersonService.updatePerson(PersonService.java:115) ~[classes/:?] at org.gluu.oxtrust.ldap.cache.service.CacheRefreshTimer.updateTargetEntryViaCopy(CacheRefreshTimer.java:677) [classes/:?] at org.gluu.oxtrust.ldap.cache.service.CacheRefreshTimer.updateTargetEntriesViaCopy(CacheRefreshTimer.java:569) [classes/:?] at org.gluu.oxtrust.ldap.cache.service.CacheRefreshTimer.detectChangedEntries(CacheRefreshTimer.java:392) [classes/:?] at org.gluu.oxtrust.ldap.cache.service.CacheRefreshTimer.processImpl(CacheRefreshTimer.java:283) [classes/:?] at org.gluu.oxtrust.ldap.cache.service.CacheRefreshTimer.processInt(CacheRefreshTimer.java:194) [classes/:?] at org.gluu.oxtrust.ldap.cache.service.CacheRefreshTimer$Proxy$_$$_WeldSubclass.processInt(Unknown Source) [classes/:?] at org.gluu.oxtrust.ldap.cache.service.CacheRefreshTimer.process(CacheRefreshTimer.java:177) [classes/:?] at org.gluu.oxtrust.ldap.cache.service.CacheRefreshTimer$Proxy$_$$_WeldSubclass.process$$super(Unknown Source) [classes/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_112] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112] at org.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal(TerminalAroundInvokeInvocationContext.java:51) [weld-core-impl-3.0.0.Final.jar:3.0.0.Final] at org.jboss.weld.interceptor.proxy.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:78) [weld-core-impl-3.0.0.Final.jar:3.0.0.Final] at org.xdi.service.cdi.async.AsynchronousInterceptor$1.get(AsynchronousInterceptor.java:36) [oxcore-service-3.1.0.Final.jar:?] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) [?:1.8.0_112] at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1582) [?:1.8.0_112] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_112] at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_112] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_112] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_112] Caused by: com.unboundid.ldap.sdk.LDAPException: userCertificate;binary: value #0 invalid per syntax at com.unboundid.ldap.sdk.LDAPConnection.modify(LDAPConnection.java:2754) ~[unboundid-ldapsdk-3.2.0.jar:3.2.0] at com.unboundid.ldap.sdk.AbstractConnectionPool.modify(AbstractConnectionPool.java:1304) ~[unboundid-ldapsdk-3.2.0.jar:3.2.0] at org.gluu.site.ldap.OperationsFacade.modifyEntry(OperationsFacade.java:563) ~[oxcore-ldap-3.1.0.Final.jar:?] at org.gluu.site.ldap.OperationsFacade.updateEntry(OperationsFacade.java:549) ~[oxcore-ldap-3.1.0.Final.jar:?] at org.gluu.site.ldap.persistence.LdapEntryManager.merge(LdapEntryManager.java:179) ~[oxcore-ldap-3.1.0.Final.jar:?] ... 25 more ```

By Aliaksandr Samuseu staff 13 Oct 2017 at 5:26 p.m. CDT

Aliaksandr Samuseu gravatar
Hi, Anandbabu. I'm not perfectly sure, but it seems like [this ticket](https://support.gluu.org/identity-management/4623/how-to-load-binary-data-from-openldap-to-gluu-openldap/#at26307) may be created by your colleague. It covers the very same issue you met when trying to import certificates from backend with CR. Do you think we can close this one, then?

By Anandbabu Vijayan user 15 Oct 2017 at 11:47 p.m. CDT

Anandbabu Vijayan gravatar
Hello Aliaksandr, This ticket is created for the issue "unable to add custom attribute" , we found the solution and the issue was [fixed](https://support.gluu.org/customization/4614/unable-to-add-custom-attribute/#at26056) Discussing further issues in the below ticket, [https://support.gluu.org/identity-management/4623/how-to-load-binary-data-from-openldap-to-gluu-openldap](https://support.gluu.org/identity-management/4623/how-to-load-binary-data-from-openldap-to-gluu-openldap)