![Lead Image © P.Gudella, 123RF.com Lead Image © P.Gudella, 123RF.com](/var/ezflow_site/storage/images/archive/2016/34/a-rest-interface-for-freeipa/po-21796-123rf-p_gudella_123rf-steckdosen_resized.png/128133-1-eng-US/PO-21796-123RF-P_Gudella_123RF-Steckdosen_resized.png_medium.png)
Lead Image © P.Gudella, 123RF.com
A REST interface for FreeIPA
Plugged In
If you have ever submitted a request to the FreeIPA framework, you will be aware that most actions are only successful if preceded by successful authentication. This can be done either with Kerberos or a password. Initially it makes no difference whether authentication is via the web interface or the ipa
command-line tool. The JavaScript-based web application runs within the calling browser, and all instructions for the framework ultimately take place within the scope of a secure HTTPS connection using JSON-RPC. The ipa
tool uses the framework's Python API to abstract access. If you want to use this API, you need to install the free-ipa-python
(ipa-python
) package to import the ipalib
module into your scripts.
Querying the framework directly via the JSON-RPC API is especially useful for access from a system that is not part of the FreeIPA domain. This is the case, for example, if another web tool is to be used to read or manipulate data from the server. A query always comprises the desired method followed by an array of arguments and options. The method names of the JSON-RPC API are identical to those of the Python API. For example, a FreeIPA User
plugin provides classes for user management. The individual class names are identical to the arguments that need to be passed in to the ipa
tool. For example, the statement for creating a new user is
ipa user-add
The corresponding class in the Python API is therefore user_add
. And this is also the name of the method to be used for accessing the JSON-RPC interface.
An API browser
that describes each of these methods has existed within the graphical web interface since FreeIPA version 4.2 (Figure 1). Otherwise, it is also possible to invoke the ipa
tool in verbose mode (-vv
option). The output shows the
Buy this article as PDF
(incl. VAT)
Buy ADMIN Magazine
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Most Popular
Support Our Work
ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.
![Learn More”>
</a>
<hr>
</div>
</div>
<div class=](https://www.admin-magazine.com/var/ezflow_site/storage/images/media/images/learn-more/211417-1-eng-US/Learn-More.png)