By: Sved Devs user 19 Jul 2020 at 3:31 p.m. CDT

10 Responses
Sved Devs gravatar
Followed instructions at [Gluu Server 4.2 Docs](https://gluu.org/docs/gluu-server/4.2/admin-guide/attribute/#custom-attributes), but when I try to add the attributes to OxTrust, I get the errors: Attribute type 'projAttr1' definition not belong to list of allowed object classes Failed to update attribute 'Attribute 1' Here is my custom attribute file (/opt/opendj/config/schema/77-customAttributes.ldif) ``` dn: cn=schema objectClass: top objectClass: ldapSubentry objectClass: subschema cn: schema attributeTypes: ( 1.3.6.1.4.1.48710.1.3.1501 NAME 'projAttr1' EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 X-ORIGIN 'Gluu custom attribute' ) attributeTypes: ( 1.3.6.1.4.1.48710.1.3.1502 NAME 'projAttr2' 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 ( telephoneNumber $ mobile $ carLicense $ facsimileTelephoneNumber $ departmentNumber $ employeeType $ cn $ st $ manager $ street $ postOfficeBox $ employeeNumber $ preferredDeliveryMethod $ roomNumber $ secretary $ homePostalAddress $ l $ postalCode $ description $ title $ projAttr1 $ projAttr2) X-ORIGIN 'Gluu - Custom persom objectclass' ) ``` I restarted opendj after the change above using: systemctl restart opendj I even tried restarting the server without any success.

By Sved Devs user 19 Jul 2020 at 3:41 p.m. CDT

Sved Devs gravatar
The log at /opt/opendj/logs/access shows the following: ``` [19/Jul/2020:20:35:53 +0000] SEARCH REQ conn=0 op=187 msgID=188 base="ou=attributes,o=gluu" scope=sub filter="(&(&(objectClass=top)(objectClass=gluuAttribute))(&(gluuAttributeName=projAttr1)(oxMultivaluedAttribute=false)))" attrs="gluuAttributeName,oxMultivaluedAttribute,salt,gluuSAML1URI,gluuSAML2URI,gluuAttributeViewType,displayName,lifetime,description,gluuTooltip,inum,oxAuthClaimName,seeAlso,oxSourceAttribute,oxNameIdType,urn,oxValidation,gluuAttributeEditType,gluuAttributeOrigin,oxSCIMCustomAttribute,gluuAttributeType,gluuStatus,gluuAttributeUsageType" [19/Jul/2020:20:35:53 +0000] SEARCH RES conn=0 op=187 msgID=188 result=0 nentries=0 etime=2 [19/Jul/2020:20:35:53 +0000] SEARCH REQ conn=0 op=188 msgID=189 base="cn=schema" scope=base filter="(objectClass=*)" attrs="objectClasses,attributeTypes" [19/Jul/2020:20:35:53 +0000] SEARCH RES conn=0 op=188 msgID=189 result=0 nentries=1 etime=17 [19/Jul/2020:20:35:53 +0000] SEARCH REQ conn=0 op=189 msgID=190 base="cn=schema" scope=base filter="(objectClass=*)" attrs="objectClasses,attributeTypes" [19/Jul/2020:20:35:53 +0000] SEARCH RES conn=0 op=189 msgID=190 result=0 nentries=1 etime=11 [19/Jul/2020:20:35:54 +0000] SEARCH REQ conn=0 op=190 msgID=191 base="ou=configuration,o=gluu" scope=base filter="(objectClass=*)" attrs="gluuSamlEnabled,userPassword,displayName,oxTrustStoreConf,gluuHTTPstatus,gluuConfigurationPollingInterval,description,gluuDSstatus,oxTrustCacheRefreshServerIpAddress,oxLogConfigLocation,inum,gluuHostname,gluuPassportEnabled,oxIDPAuthentication,gluuStatus,gluuSPTR,gluuScimEnabled,oxTrustStoreCert,gluuManageIdentityPermission,gluuOrgProfileMgt,gluuVdsCacheRefreshLastUpdateCount,gluuSslExpiry,oxSmtpConfiguration,gluuVdsCacheRefreshEnabled,gluuConfigurationDnsServer,gluuMaxLogSize,oxCacheConfiguration,gluuVdsCacheRefreshPollingInterval,oxAuthenticationMode,passwordResetAllowed,gluuVdsCacheRefreshLastUpdate,gluuVdsCacheRefreshProblemCount,gluuVDSstatus,oxTrustAuthenticationMode,gluuRadiusEnabled,gluuLastUpdate,oxTrustEmail,oxLogViewerConfig,oxDocumentStoreConfiguration" [19/Jul/2020:20:35:54 +0000] SEARCH RES conn=0 op=190 msgID=191 result=0 nentries=1 etime=1 [19/Jul/2020:20:35:59 +0000] SEARCH REQ conn=0 op=191 msgID=192 base="ou=oxtrust,ou=configuration,o=gluu" scope=base filter="(objectClass=*)" attrs="oxRevision" [19/Jul/2020:20:35:59 +0000] SEARCH RES conn=0 op=191 msgID=192 result=0 nentries=1 etime=0 ``` Looks like opendj is having issues finding this attribute, but doesn't throw any errors when restarted.

By Michael Schwartz Account Admin 19 Jul 2020 at 4:36 p.m. CDT

Michael Schwartz gravatar
``` When I try to add the attributes to OxTrust, I get the errors: Attribute type 'projAttr1' definition not belong to list of allowed object classes Failed to update attribute 'Attribute 1' ``` Can you upload and a screenshot somewhere and reference it in this issue? I used your ldif and tried in both 4.1.1 and 4.2.0 and it worked fine. I wonder if you missed something when you were registering the attribute. I was using Ubuntu 20, but I don't think that makes a difference here.

By Sved Devs user 19 Jul 2020 at 5:10 p.m. CDT

Sved Devs gravatar
Hi Michael, Here is the screenshot. Strangely, when I replace the attribute names with the original ones, I see the issue, but when I use the placeholders I showed above (projAttr1), it goes through just fine.

By Michael Schwartz Account Admin 19 Jul 2020 at 5:25 p.m. CDT

Michael Schwartz gravatar
Does the "Name" attribute match exactly the name you have in LDAP, including case?

By Sved Devs user 19 Jul 2020 at 5:31 p.m. CDT

Sved Devs gravatar
Yes. It matches exactly.

By Michael Schwartz Account Admin 19 Jul 2020 at 6:39 p.m. CDT

Michael Schwartz gravatar
Does your attribute name contain any non alphanumeric text?

By Sved Devs user 19 Jul 2020 at 6:49 p.m. CDT

Sved Devs gravatar
({ STATIC_URL }}img/favicon.ico) No. It's plain ASCII text "volMonitoring"

By Michael Schwartz Account Admin 19 Jul 2020 at 7:13 p.m. CDT

Michael Schwartz gravatar
So it works when you call it `projAttr1` ... but not when you call it `volMonitoring` ?

By Sved Devs user 19 Jul 2020 at 7:41 p.m. CDT

Sved Devs gravatar
({ STATIC_URL }}img/favicon.ico) Yes. Unfortunately. I'm guessing it might turn to be something simple.

By Sved Devs user 19 Jul 2020 at 11:57 p.m. CDT

Sved Devs gravatar
I rebuilt the file by hand and it seems to be working fine now. I'm suspecting it must have something to do with the copy I made. I've had it in the past where Windows messes up line endings of a file when moving between instances. Thank you very much for looking into it on a Sunday Michael. Closing the issue now.