Pavel Zuna wrote:
Rob Crittenden wrote:
Pavel Zuna wrote:
Only pwpolicy test is still broken - I'm looking into it.


This brings up the return values question again. I thought we had decided that any attribute that had only one value would be returned as a scalar. In this case userCertificate is being returned as a list which is causing things to fail. Now arguably userCertificate is a multi-valued attribute but we will only store one certificate at a time there so I think we're ok.
Yeah, I remember, but I'm not sure if we agreed on the logic.

There are 2 ways of doing this:

1) Make ldap backend check the schema. If it's multi-value - leave it as a list. If it's single-value - convert it to a scalar.

2) Make ldap backend check if the attribute contains 1 or more values. If there's only one, convert it to a scalar.

With 1) plugin authors can depend on the schema when manipulating attributes, but they have to know the schema and handle multi/single attributes differently.

Yes but they already have to deal with it/be aware of it because updates may fail if you try to add another value to a single-valued attribute.

With 2) plugin authors have to always check, if the attribute is a list or a scalar.

Not necessarly. If the author has some awareness of the schema they can get by ok.

I think that having attributes always returned as list makes things easier on plugin authors - no checks required, everything is handled the same way. What's the advantage of returning attribute values as 2 different types?

Because some values are single-value by nature and we're treating them like multi-values.

Also, why the change to the principal name in the service tests?
At first I didn't know where the problem in this test was. So, I tried a few different things and this is a leftover. Doesn't hurt anything, but I can always change it back.

Yes, please do. You're effectively adding a subdomain onto the hostname.


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Freeipa-devel mailing list

Reply via email to