Everything we do is open source, including the LDAP feature ("custom" consultancy aside, where the highly specific parts are often not public). Most extensions are free, some are paid (including the convenient LDAP app), but all are open source, including the paid ones. XWiki is not open core.
In particular, the core code for dealing with LDAP is there [1], open source and gratis, and the paid app that provides a nice UI for it is... paid but also open source under LGPL and the code is here: [2].
You can actually clone the code, strip the license management, compile it and install it on your own instance, but people usually just pay and they also get support.
It's pretty much like OSMAnd Plus, which is paid on the Google Store, but the actual source code is still free software.
So yes, we actually sell free software (and free ≠ gratis has its full meaning with us), and it turns out convenience makes it so that it works out.
Usually organizations big enough to want to use LDAP can usually fork off a few bucks and will be glad to support us.
Of course it would be nicer if it were free and it's always a delicate balance to decide what should be a paid app / feature, but at least it's always open source , with all the relevant rights to users it implies: the right to take the code, adapt it and/or go find someone else if they are not happy with us.
As someone convinced that free software is the right way to do software, I think this is a sane way to fund free software, and good to take.
It's also way easier to handle than donation for an organization that would like to send us money, it's easy to justify.
[1]: https://xwiki.com/en/pricing/