[Freeipa-devel] LDAP attributes with incompatible names?

Rob Crittenden rcritten at redhat.com
Mon May 9 18:28:12 UTC 2016


Jeffery Harrell wrote:
> Hi. I’m trying to find a way to expose via the Python plugin API some
> non-default LDAP attributes that have hyphens in their names — e.g,
> "apple-user-homeurl”. Obviously I can’t create a Param with that name.
> Is there a customary way to handle this kind of situation, or do I have
> to subclass Param?

A Param needs to be a valid python variable name which is why dashes 
aren't allowed.

I'm not sure subclassing the parameter type would do it but you can try. 
I suspect it needs to be addressed in the LDAP code. I think what I'd do 
is use underscore instead of dash, then do a replacement before storing 
and retrieving the attributes. This is probably in ipapython/ipaldap.py.

rob




More information about the Freeipa-devel mailing list