As a client API developer, i would like to have a consistent API
The FreeIPA API has some inconsistencies in itself.
1: usually objects classes that have a mod, find, add and del method, also have a "show" method.
except for "trustdomain", this one is missing the show domain, while most likely one can use trustdomain_find, + specifying the "cn" to archive the same goal, this is somehow inconvenient.
2: the vault object class methods are completely wild, compared to the other object classes. 2.1: there is no "add" method, i guess what "add" is for other object classes, is "add_internal" 2.2: same for mod_internal
3: the "servrole" objects "takes_params" attribute, is a dict, where all other object classes use a list of dicts.
FYI: i am currently trying to create an auto generated Object oriented client for python, using the FreeIPA APi specs available.
take a look at the output of the "command" methods output, when setting every param to "all"
API is inconsistent
consistent API (what do you expect to happen)
$ rpm -q freeipa-server freeipa-client ipa-server ipa-client 389-ds-base pki-ca krb5-server
Any additional information, configuration, data or log snippets that is needed for reproduction or investigation of the issue.
Log file locations: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Linux_Domain_Identity_Authentication_and_Policy_Guide/config-files-logs.html Troubleshooting guide: https://www.freeipa.org/page/Troubleshooting
Missing trustdomain_show it sounds like a good idea to me to add the feature. @abbra what do you think ?
trustdomain_show
Vault plugin: The vault plugin works differently than most other plugins. A considerable amount of logic is implemented in the client library. The client library encrypts secrets and wraps the encryption key with the KRA transport cert. The vault client code also implements additional encryption schemes like private/public key encryption. The vault plugin behaves as designed and cannot be changed to behave like other plugins.
takes_params is a tuple of parameter objects, not a list of dicts. The servrole code is just missing a comma.
takes_params
https://github.com/freeipa/freeipa/pull/4592 addresses the issue with servrole.takes_params. Thanks for the report.
servrole.takes_params
master:
Adding trustdomain_show is OK, it should not expose more information than trustdomain_find already exposes.
trustdomain_find
As for vault, we have a plan to redesign it but it is a long term work, that's not simple to do, as @cheimes commented.
thanks for the information, and the two proposed fixes.
regarding vault, i will simply ignore it for now in the client APi i am building.
ipa-4-6:
ipa-4-8: