[This is](https://github.com/GluuFederation/oxAuth/blob/master/Server/integrations/asimba/AsimbaExternalAuthenticator.py) script I had in mind.
First we include this:
```
from org.xdi.ldap.model import CustomAttribute
```
Script has property "user_object_classes" which include all objectclasses that must be added to an user entry (the script enrolls new entries on the fly). [Here](https://github.com/GluuFederation/oxAuth/blob/master/Server/integrations/asimba/AsimbaExternalAuthenticator.py#L597) they are processed, and then they are added to a new entry at different branches, [here](https://github.com/GluuFederation/oxAuth/blob/master/Server/integrations/asimba/AsimbaExternalAuthenticator.py#L685), to name one.
This may serve as a workaround, I guess. Please note support for custom scripts is not included into Community support, you'll need to study the rest yourself, it turns out.