Skip to content

[Bug]: Custom attributes using "ExtensibleObjectClass" are listed as "internal" #480

Description

@einhirn

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- OS: Ubuntu24.04, docker
- LDAP Server: OpenLDAP

PLA Code

Docker hub

PLA Version

v2.3.11-rel-3c70bc73

Current Behavior

Custom attributetypes assigned to entries using "ExtensibleObjectClass" are listed as "internal" and thus not editable.

Expected Behavior

Since the RFC doesn't require attributeTypes to be used by object classes and specifies that "extensibleObjectClass" (with an implicit "may" for all Attributes) can be implemented by servers, PLA should not categorize these attributetypes as internal.

Steps To Reproduce

The custom attributes are defined in schema but not assigned to a custom objectclass. One example in OpenLDAP format - I hope I don't miss anything needed to reproduce this. The custom attribute type schema entry:

dn: cn=local,cn=schema,cn=config
changetype: add
objectClass: olcSchemaConfig
cn: local
olcAttributeTypes: ( 1.3.6.1.4.1.14309.2.1.2  NAME 'rztucElmsUserId' DESC 'If exists is used as UserId in the ELMS-System' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} SINGLE-VALUE )

An example entry to use the custom attribute type via extensibleObject - "dc=example,dc=com" may need adjustment:

dn: uid=test-blubb,ou=people,dc=example,dc=com
changetype: add
objectClass: Person
objectClass: extensibleObject
uid: test
sn: sn
cn: cn
rztucelmsuserid: test

Relevant log output

Anything else?

Looks like this here results in attributes not being "owned" by a specific object class to be handled as "unavailable", i.e. internal!?

/**
* Return a list of available attributes - as per the objectClass entry of the record
*
* @return Collection
*/
public function getAvailableAttributes(): Collection
{
$result = collect();
foreach (($this->getObject('objectclass')?->values->dot() ?: []) as $oc)
$result = $result->merge(config('server')->schema('objectclasses',$oc)?->all_attributes);
return $result;
}

This should probably handle "extensibleObject" as special case containing all but "really internal" attributes!?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions