On su, 28 loka 2018, Joshua D Doll via FreeIPA-users wrote:
I'm in the same boat. The current documentation leaves a lot to
be
desired. Most resources you find are terribly outdated.
There are two sources that
stay more or less up to date:
- FreeIPA source code
- My plugins at
https://github.com/abbra/
The last is a shameless plug but I try to keep them up to date with the
current state of plugin development and packaging I do as part of my day
to day job.
For the source code, an easy way to explore the documentation we already
have is to start with pydoc:
pydoc ipalib
this will give you an overview of a plugin infrastructure and
parameters.
All commands that operate on objects in LDAP are built on top of classes
provided by ipaserver.plugins.baseldap, so 'pydoc
ipaserver.plugins.baseldap' would give you a basic view of how it is
structured. Any specific plugin's code in ipaserver/plugins/*.py would
serve as an example.
I'd recommend to look at simple plugins in my github tree to understand
how you can amend some aspects:
https://github.com/abbra/freeipa-userstatus-plugin/
If you want a bit more complex example,
https://github.com/abbra/freeipa-desktop-profile gives a fully working
sample that stores two different objects in LDAP and even has managed
entries plugin integration for bridging them together under specific
complex access controls.
Even more harcode is
https://github.com/abbra/freeipa-adusers-admins
--
/ Alexander Bokovoy
Sr. Principal Software Engineer
Security / Identity Management Engineering
Red Hat Limited, Finland