summaryrefslogtreecommitdiffstats
path: root/ipaserver/servroles.py
Commit message (Collapse)AuthorAgeFilesLines
* Consider configured servers as validChristian Heimes2019-04-291-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | Under some conditions, ipa config-show and several other commands were failing with error message: ERROR: invalid 'PKINIT enabled server': all masters must have IPA master role enabled Amongst others the issue can be caused by a broken installation, when some services are left in state 'configuredServices'. The problem even block uninstallation or removal of replicas. Now configured servers are also consider valid providers for associated roles. A new test verifies that config-show works with hidden and configured HTTP service. Remark: The original intent of the sanity check is no longer clear to me. I think it was used to very that all services can be started by ipactl. Since ipactl starts hidden, configured, and enabled services, the new logic reflect the fact, too. Fixes: https://pagure.io/freeipa/issue/7929 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
* Improve config-show to show hidden serversChristian Heimes2019-03-281-0/+6
| | | | | | | | | | | | | | config-show only used to show enabled servers. Now also show hidden servers on separate lines. Additionally include information about KRA and DNS servers. The augmented config-show output makes it easier to diagnose a cluster and simplifies sanity checks. Fixes: https://pagure.io/freeipa/issue/7892 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Francois Cami <fcami@redhat.com> Reviewed-By: Thomas Woerner <twoerner@redhat.com>
* Consider hidden servers as role providerChristian Heimes2019-03-281-3/+4
| | | | | | | | | | | | | | | Hidden services are now considered as associated role providers, too. This fixes the issue of: invalid 'PKINIT enabled server': all masters must have IPA master role enabled and similar issues with CA and DNS. Fixes: https://pagure.io/freeipa/issue/7892 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Francois Cami <fcami@redhat.com> Reviewed-By: Thomas Woerner <twoerner@redhat.com>
* Add hidden replica featureChristian Heimes2019-03-281-6/+21
| | | | | | | | | | | | A hidden replica is a replica that does not advertise its services via DNS SRV records, ipa-ca DNS entry, or LDAP. Clients do not auto-select a hidden replica, but are still free to explicitly connect to it. Fixes: https://pagure.io/freeipa/issue/7892 Co-authored-by: Francois Cami <fcami@redhat.com>: Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Francois Cami <fcami@redhat.com> Reviewed-By: Thomas Woerner <twoerner@redhat.com>
* pylint 2.2: Fix unnecessary pass statementChristian Heimes2018-11-261-2/+0
| | | | | | | | | | pylint 2.2.0 has a new checker for unnecessary pass statements. There is no need to have a pass statement in functions or classes with a doc string. Fixes: https://pagure.io/freeipa/issue/7772 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Thomas Woerner <twoerner@redhat.com>
* Unify and simplify LDAP service discoveryChristian Heimes2018-11-211-6/+3
| | | | | | | | | Move LDAP service discovery and service definitions from ipaserver.install to ipaserver. Simplify and unify different implementations in favor of a single implementation. Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* Py3: Remove subclassing from objectChristian Heimes2018-09-271-1/+1
| | | | | | | | | Python 2 had old style and new style classes. Python 3 has only new style classes. There is no point to subclass from object any more. See: https://pagure.io/freeipa/issue/7715 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
* Removes NTP server role from servroles and descriptionTibor Dudlák2018-04-091-5/+0
| | | | | Resolves: https://pagure.io/freeipa/issue/7024 Reviewed-By: Rob Crittenden <rcritten@redhat.com>
* Do not remove the old masters when setting the attribute failsMartin Babinsky2017-07-041-7/+12
| | | | | | | | | | | If the setting of server attribute fails (e.g. due to master not having the associated role enabled) the error would pop up *after* the old values were cleared from LDAP. Fix this behavior so that all checks are performed before manipulating any data. https://pagure.io/freeipa/issue/7029 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Add an attribute reporting client PKINIT-capable serversMartin Babinsky2017-05-261-0/+7
| | | | | | | | | | | | A new multi-valued server attribute `pkinit_server` was added which reports IPA masters that have PKINIT configuration usable by clients. The existing tests were modified to allow for testing the new attribute. https://pagure.io/freeipa/issue/6937 Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Allow for multivalued server attributesMartin Babinsky2017-05-261-36/+73
| | | | | | | | | | | | | | | In order to achieve the task, the following changes were required: * vectorize the base class for server attributes * add a child class that enforces single-value attributes. It still accepts/returns single-value lists in order to not break Liskov substitution principle * Existing attributes inherit from the child class https://pagure.io/freeipa/issue/6937 Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Introduce "NTP server" roleMartin Babinsky2016-06-151-0/+5
| | | | | | | | | | | | | This makes IPA servers that publish their NTP services in LDAP searchable by `server-role-find` and `server-find` command. The list of active IPA NTP servers will be displayed in to output of `ipa config-show` command. https://fedorahosted.org/freeipa/ticket/5815 Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* Server Roles: definitions of server roles and attributesMartin Babinsky2016-06-131-0/+586
This patch introduces classes which define the properties of server roles and attributes and their relationship to LDAP attributes representing the role/attribute. A brief documentation about defining and using roles is given at the beginning of the module. http://www.freeipa.org/page/V4/Server_Roles https://fedorahosted.org/freeipa/ticket/5181 Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>