IPA config - file /etc/ipa/default.conf

class insights.parsers.ipa_conf.IPAConfig(context)[source]

Bases: IniConfigFile

Parse the IPA default configuration

The file /etc/ipa/default.conf contains settings for IPA client and server such as domain and realm name. It is a standard ini file. The global section must exist. It contains all IPA settings. Other sections are unused.

The parser provides additional properties which implements the same fallbacks as IPA’s internal config system. For example the server property attempts to get the server name from [global] server, then falls back to the net location of xmlrpc_uri and jsonrpc_uri.

Raises:

ParseException -- When config is missing required section or options.

Sample configuration::

[global] host = client.ipa.test basedn = dc=ipa,dc=test realm = IPA.TEST domain = ipa.test xmlrpc_uri = https://server.ipa.test/ipa/xml

Examples

>>> type(ipaconfig)
<class 'insights.parsers.ipa_conf.IPAConfig'>
>>> ipaconfig.ipa_section
'global'
>>> ipaconfig.sections()
['global']
>>> ipaconfig.server
'server.ipa.test'
>>> ipaconfig.domain
'ipa.test'
>>> ipaconfig.realm
'IPA.TEST'
>>> ipaconfig.basedn
'dc=ipa,dc=test'
>>> ipaconfig.xmlrpc_uri
'https://server.ipa.test/ipa/xml'
>>> ipaconfig.jsonrpc_uri
'https://server.ipa.test/ipa/json'
property basedn

LDAP base DN

Falls back to basedn from domain’s domain components

property domain

Domain name

Falls back to lower-case Kerberos realm name

property jsonrpc_uri

JSON-RPC uri

Falls back to server to build an https:// URI.

property ldap_uri

LDAP server uri

Falls back to server to build an ldap:// URI.

parse_content(content, allow_no_value=False)[source]

This method must be implemented by classes based on this class.

property realm

Kerberos realm name

property server

IPA server FQDN

Falls back to xmlrpc_uri and jsonrpc_uri

property xmlrpc_uri

XML-RPC uri

Falls back to server to build an https:// URI.