By: Burak Tuncel user 26 Mar 2019 at 6:17 a.m. CDT

4 Responses
Burak Tuncel gravatar
Hello, I tried to add custom attribute to Gluu server 3.1.4 and i followed below: 1- I configured the file " /opt/opendj/config/schema/77-customAttributes.ldif" 2- 77-customAttributes.ldif is like below : `dn: cn=schema objectClass: top objectClass: ldapSubentry objectClass: subschema cn: schema attributeTypes: ( 1.3.6.1.4.1.48710.1.3.1400 NAME 'customTest' DESC 'Custom Attribute' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Gluu custom attribute' ) objectClasses: ( 1.3.6.1.4.1.48710.1.4.101 NAME 'gluuCustomPerson' SUP ( top ) AUXILIARY MAY ( customTest $ telephoneNumber $ mobile $ carLicense $ facsimileTelephoneNumber $ departmentNumber $ employeeType $ cn $ st $ manager $ street $ postOfficeBox $ employeeNumber $ preferredDeliveryMethod $ roomNumber $ secretary $ homePostalAddress $ l $ postalCode $ description $ title )` 3- I restarted service with: `service opendj restart` 4- but i cant add attribute from : Configuration > Attributes > Register Attribute. 5 - It fails and gives error message : "Attribute Type 'customTest' not belong to list of Allowed object classes" what am i doing wrong?

By Jose Gonzalez staff 26 Mar 2019 at 9:07 a.m. CDT

Jose Gonzalez gravatar
Hi there, You are supposed to add `customTest` to `gluuCustomPerson` object class. This way: ``` ... $ title $ customTest) ```

By Burak Tuncel user 27 Mar 2019 at 3:55 a.m. CDT

Burak Tuncel gravatar
There is still same error. When i look log file : ./gluu/jetty/identity/logs/2019_03_27.jetty.log:2019-03-27 08:23:48,230 ERROR [qtp804611486-17] [org.xdi.service.SchemaService] (SchemaService.java:376) - Failed to parse LDAP object class definition: 'LDAPException(resultCode=84 (decoding error), errorMessage='Unable to parse string '( 1.3.6.1.4.1.48710.1.4.101 NAME 'gluuCustomPerson'SUP ( top )AUXILIARYMAY ( telephoneNumber $ mobile $ carLicense $ facsimileTelephoneNumber $ departmentNumber $ employeeType $ cn $ st $ manager $ street $ postOfficeBox $ employeeNumber $ preferredDeliveryMethod $ roomNumber $ secretary $ homePostalAddress $ l $ postalCode $ description $ title $ customTest ) X-ORIGIN 'Gluu custom attribute' )' as a schema element because the end of the string was reached without finding an expected space after a closing single quote.')' But i just copied and pasted from documentation as you see above post.

By Jose Gonzalez staff 27 Mar 2019 at 11:05 a.m. CDT

Jose Gonzalez gravatar
It seems to me it's simply a matter of spaces/carriage returns, for instance, here is how it looks in my instance a custom attribute, and it works appropriately. Check your syntax ``` dn: cn=schema objectClass: top objectClass: ldapSubentry objectClass: subschema cn: schema attributeTypes: ( 1.3.6.1.4.1.48710.1.3.1400 NAME 'scimCustomFourth' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 X-ORIGIN 'Gluu - SCIM test attribute' ) objectClasses: ( 1.3.6.1.4.1.48710.1.4.101 NAME 'gluuCustomPerson' SUP ( top ) AUXILIARY MAY ( telephoneNumber $ mobile $ carLicense $ facsimileTelephoneNumber $ departmentNumber $ employeeType $ cn $ st $ manager $ street $ postOfficeBox $ employeeNumber $ preferredDeliveryMethod $ roomNumber $ secretary $ homePostalAddress $ l $ postalCode $ description $ title $ scimCustomFourth) X-ORIGIN 'Gluu - Custom persom objectclass' ) ```

By Burak Tuncel user 28 Mar 2019 at 5:31 a.m. CDT

Burak Tuncel gravatar
Hi Jose, I copied and pasted your syntax and it is worked ! Actually the only difference between my syntax and yours is `DESC 'Custom Attribute'`. In documentation this line is included but it wasn't worked. Thanks for your response, you can close the ticket.