summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ipalib: move server-side plugins to ipaserverJan Cholasta2016-06-03103-80/+65
| | | | | | | | | | Move the remaining plugin code from ipalib.plugins to ipaserver.plugins. Remove the now unused ipalib.plugins package. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* ipaclient: implement thin clientJan Cholasta2016-06-039-9/+352
| | | | | | | | | | Dynamically create plugin package for the remote server with modules and commands based on the API schema when client API is finalizes. For in-tree API instances, use ipalib.plugins directly. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* misc: hide the unused --all option of `env` and `plugins` in CLIJan Cholasta2016-06-031-2/+2
| | | | | | https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* ipalib: move File command arguments to ipaclientJan Cholasta2016-06-036-8/+51
| | | | | | | | | | File arguments are relevant only on the client, on the server they are the same as Str. Specify the arguments as Str in ipalib.plugins and override them with File in ipaclient.plugins. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* ipactl: use server APIJan Cholasta2016-06-031-1/+1
| | | | | | | | | Initialize API in ipactl with in_server=True, as this is a server-side script. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* client install: finalize API after CA certs are availableJan Cholasta2016-06-031-1/+2
| | | | | | | | | This is required for the finalize call to be able connect to the server to retrieve API schema. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* rpc: do not validate command name in RPCClient.forwardJan Cholasta2016-06-031-4/+0
| | | | | | | | | | | The validation is already done on the server. This allows manually forwarding commands unknown to the client but known to the server. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* rpc: optimize JSON-RPC response handlingJan Cholasta2016-06-031-3/+3
| | | | | | | | | | Speed up JSON-RPC response handling by putting received response data fragments in a list and joining them at once instead of concatenating each fragment one by one. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* rpc: specify connection options in API configJan Cholasta2016-06-0311-70/+73
| | | | | | | | | Specify RPC connection options once in API.bootstrap rather than in each invocation of rpcclient.connect. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* rpc: allow overriding NSS DB directory in API configJan Cholasta2016-06-032-5/+6
| | | | | | | | | Add new `nss_dir` API config option to allow rpcclient to use a non-default NSS DB for the connection. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* rpc: respect API config in RPCClient.create_connectionJan Cholasta2016-06-032-3/+10
| | | | | | | | | | When connecting rpcclient, get the default values of the `verbose`, `fallback` and `delegate` options from API config rather than hard-code them. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* ipalib: introduce API schema pluginsJan Cholasta2016-06-033-2/+757
| | | | | | | | | | | | | | | | | Add a set of plugins for API schema introspection. This includes: * a set of commands for command introspection (`command_find`, `command_show`, `command_defaults`), * a set of commands for command param introspection (`param_find`, `param_show`), * a set of commands for command output introspection (`output_find`, `output_show`), * a set of commands for help topic introspection (`topic_find`, `topic_show`), * a command to get the full API schema in one call (`schema`). https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* ipalib: replace DeprecatedParam with `deprecated` Param argumentJan Cholasta2016-06-0310-50/+74
| | | | | | | | | | | | | | | Introduce new `deprecated` Param keywork argument. Setting it to True on a param has the same effect as using DeprecatedParam. This allows deprecating params while retaining their type information. Revert all DeprecatedParam params back to their original definition and set `deprecated` to True. Remove the now unused DeprecatedParam class. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* parameters: introduce no_convert keyword argumentJan Cholasta2016-06-032-2/+12
| | | | | | | | | | | | | When set to true, the argument causes params to not convert unicode values to the param type. This will allow thin client to properly handle params which can be converted from unicode to the param type only on the server, e.g. because of a normalizer. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* parameters: introduce cli_metavar keyword argumentJan Cholasta2016-06-033-3/+7
| | | | | | | | | | Add new Param keyword argument cli_metavar to specify the stand-in for CLI option arguments in command help text. Uppercase class name is used by default. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* ipalib: split off client-side plugin code into ipaclientJan Cholasta2016-06-0334-751/+1198
| | | | | | | | | | | Provide client-side overrides for command plugins which implement any of the client-side `interactive_prompt_callback`, `forward` or `output_for_cli` methods and move the methods from the original plugins to the overrides. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* dns: move code shared by client and server to separate moduleJan Cholasta2016-06-034-77/+109
| | | | | | | | Move the shared code to a new ipalib.dns module. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* ipaclient: add client-side command override classJan Cholasta2016-06-031-0/+63
| | | | | | | | | | This adds a new ipaclient.frontend module with two classes, CommandOverride and MethodOverride, which can be used to implement additional client-side functionality on top of server-side Command and Method plugins. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* frontend: turn Method attributes into propertiesJan Cholasta2016-06-031-32/+11
| | | | | | | | | Implement the `obj_name`, `attr_name` and `obj` Method attributes as properties to allow them to be overriden in sub-classes. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* plugable: remember overriden plugins in APIJan Cholasta2016-06-031-0/+9
| | | | | | | | | | Remember what plugin class was overriden by what plugin class in API objects. Add new method API.get_plugin_next which returns the plugin class which was overriden by the plugin class specified as argument. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* plugable: simplify API plugin initialization codeJan Cholasta2016-06-031-32/+29
| | | | | | | | | Use a flat dictionary to track plugins in API rather than nested dictionaries. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* plugable: turn Plugin attributes into propertiesJan Cholasta2016-06-036-45/+32
| | | | | | | | | | | | | | Implement the `name`, `doc` and `summary` Plugin attributes as properties to allow them to be overriden in sub-classes. Always use .doc rather than .__doc__ to access plugin documentation. Remove the mostly unused `module`, `fullname`, `bases` and `label` attributes. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* help, makeapi: do not use hardcoded plugin package nameJan Cholasta2016-06-032-22/+43
| | | | | | | | | | | Iterate over all plugin packages defined in the API to find the given topic module. The last module found has priority. This will allow topics to be defined in client-side plugins. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* help, makeapi: specify module topic by nameJan Cholasta2016-06-0314-25/+46
| | | | | | | | | | | | | Specify module topic by name rather than by name and summary. A topic module of the topic name must exist. Summary is extracted from the docstring of the topic module. This changes makes topic handling more generic and consistent between modules and commands. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* help, makeapi: allow setting command topic explicitlyJan Cholasta2016-06-033-64/+64
| | | | | | | | | | | | Help topic can now be specified in the 'topic' class attribute of command plugins. Default value is the name of the module where the command is defined. This allows defining a command outside of the topic module. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* ipalib: move client-side plugins to ipaclientJan Cholasta2016-06-038-1185/+1276
| | | | | | | | | Move the rpcclient backend and commands which are executed on the client to ipaclient.plugins. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* ipaclient: introduce ipaclient.pluginsJan Cholasta2016-06-034-2/+17
| | | | | | | | Load plugins from ipaclient.plugins in client API instances. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* dns: fix dnsrecord interactive modeJan Cholasta2016-06-031-2/+2
| | | | | | | | Do not crash in interactive mode of dnsrecord_{add,mod}. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* cli: make optional positional command arguments actually optionalJan Cholasta2016-06-031-2/+2
| | | | | | | | | Fix commands defined in ipalib.cli not to assume optional positional arguments have a value of None when not specified. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* Decreased timeout for IO blocking for DSStanislav Laznicka2016-06-021-0/+4
| | | | | | | | | Should fix the DS from going unresponsive in some cases https://fedorahosted.org/freeipa/ticket/5383 Reviewed-By: Thierry Bordaz <tbordaz@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* Added <my_hostname>=<IPA REALM> mapping to krb5.confStanislav Laznicka2016-06-022-4/+8
| | | | | | https://fedorahosted.org/freeipa/ticket/5903 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Increased mod_wsgi socket-timeoutStanislav Laznicka2016-06-021-1/+2
| | | | | | | | | | | Longer-running CLI commands sometimes fail with "gateway time out" although the task still runs and finishes on server, not notifying the CLI back. Increasing socket-timeout should solve this. https://fedorahosted.org/freeipa/ticket/5833 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Petr Spacek <pspacek@redhat.com>
* Deprecated the domain-level option in ipa-server-installStanislav Laznicka2016-06-021-0/+1
| | | | | | https://fedorahosted.org/freeipa/ticket/5907 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Enable service authentication indicator managementNathaniel McCallum2016-06-023-6/+17
| | | | | | | https://fedorahosted.org/freeipa/ticket/433 Reviewed-By: Petr Vobornik <pvoborni@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
* Update the delete dialog on details user pagePavel Vomacka2016-06-021-23/+102
| | | | | | | | | Add option to preserve user to the delete dialog on active user's details page. The delete dialog is the same as on the page of all active users. https://fedorahosted.org/freeipa/ticket/5370 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
* Add option to show OTP when adding hostPavel Vomacka2016-06-024-3/+69
| | | | | | | | | | | Add option to add host dialog which allows to show generated OTP. This patch also changed the way of informing user about success of adding host but only when the 'Generate OTP' option is checked. There is a new dialog with generated OTP. https://fedorahosted.org/freeipa/ticket/4602 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
* Fix: topologysuffix_find doesn't have no_members optionMartin Basti2016-06-021-1/+1
| | | | | | | | | Remove no_members=False from because topologysuffix_attribute doesn't have no_members option, and this causes errors in replication.py https://fedorahosted.org/freeipa/ticket/4995 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Add more information regarding where to find revocation reason in "ipa ↵Patrice Duc-Jacquet2016-06-021-2/+4
| | | | | | | | | | | | | | | | | | | | | cert_revoke -h" and "ipa cert_find -h". According to review feedback, I changed the help message as follow $ ipa cert_revoke -h Usage: ipa [global-options] cert-revoke SERIAL-NUMBER [options] Revoke a certificate. Options: -h, --help show this help message and exit --revocation-reason=INT Reason for revoking the certificate (0-10). Type "ipa help cert" for revocation reason details. https://fedorahosted.org/freeipa/ticket/5819 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Gabe Alford <redhatrises@gmail.com>
* Fix: replace incorrect no_cli with no_option flagMartin Basti2016-06-021-1/+1
| | | | | | | | | The 'no_cli' is not valid flag in parameters scope, so to hide option from CLI 'no_option' flag should be used https://fedorahosted.org/freeipa/ticket/4995 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Test: fix failing host_testMartin Basti2016-06-011-1/+1
| | | | | | | | Regression caused by patches related to empty zones https://fedorahosted.org/freeipa/ticket/5710 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Performance: Find commands: do not process members by defaultMartin Basti2016-05-3128-87/+970
| | | | | | | | | | | | | | | | In all *-find commands, member attributes shouldn't be processed due high amount fo ldpaserches cause serious performance issues. For this reason --no-members option is set by default in CLI and API. To get members in *-find command option --all in CLI is rquired or 'no_members=False' or 'all=True' must be set in API call. For other commands processing of members stays unchanged. WebUI is not affected by this change. https://fedorahosted.org/freeipa/ticket/4995 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Make option --no-members public in CLIMartin Basti2016-05-311-1/+1
| | | | | | | | | With many members commands became slow. Making this option public allows users to speedup searches. https://fedorahosted.org/freeipa/ticket/4995 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* Translations: remove deprecated locale configurationMartin Basti2016-05-311-20/+0
| | | | | | | | | | zanata.xml should not contain <locale>, because this tag is deprecated and locales are handled/configured on the server side. Also locale mappings are done on server side. https://fedorahosted.org/freeipa/ticket/5915 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* DNS upgrade: change global forwarding policy in named.conf to "only" if ↵Petr Spacek2016-05-303-3/+57
| | | | | | | | | | | | | private IPs are used This change is necessary to override automatic empty zone configuration in latest BIND and bind-dyndb-ldap 9.0+. This upgrade has to be done on each IPA DNS server independently. https://fedorahosted.org/freeipa/ticket/5710 Reviewed-By: Martin Basti <mbasti@redhat.com>
* DNS upgrade: change global forwarding policy in LDAP to "only" if private ↵Petr Spacek2016-05-302-0/+34
| | | | | | | | | | | | | | IPs are used This change is necessary to override automatic empty zone configuration in latest BIND and bind-dyndb-ldap 9.0+. This procedure is still not complete because we need to handle global forwarders in named.conf too (independently on each server). https://fedorahosted.org/freeipa/ticket/5710 Reviewed-By: Martin Basti <mbasti@redhat.com>
* DNS upgrade: change forwarding policy to = only for conflicting forward zonesPetr Spacek2016-05-303-1/+84
| | | | | | | | | | | | This change is necessary to override automatic empty zone configuration in latest BIND and bind-dyndb-ldap 9.0+. This procedure is still not complete because we need to handle global forwarders too (in LDAP and in named.conf on each server). https://fedorahosted.org/freeipa/ticket/5710 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Add function ipapython.dnsutil.related_to_auto_empty_zone()Petr Spacek2016-05-301-0/+30
| | | | | | | | | It allows to test if given DNS name is sub/super domain of an automatic empty zone. https://fedorahosted.org/freeipa/ticket/5710 Reviewed-By: Martin Basti <mbasti@redhat.com>
* DNS upgrade: separate backup logic to make it reusablePetr Spacek2016-05-301-72/+73
| | | | | | https://fedorahosted.org/freeipa/ticket/5710 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Add ipaDNSVersion option to dnsconfig* commands and use new attributePetr Spacek2016-05-307-23/+78
| | | | | | | | | | | | | | | | | | | | Ad-hoc LDAP calls in DNS upgrade code were hard to maintain and ipaConfigString was bad idea from the very beginning as it was hard to manipulate the number in it. To avoid problems in future we are introducing new ipaDNSVersion attribute which is used on cn=dns instead of ipaConfigString. Original value of ipaConfigString is kept in the tree for now so older upgraders see it and do not execute the upgrade procedure again. The attribute can be changed only by installer/upgrade so it is not exposed in dnsconfig_mod API. Command dnsconfig_show displays it only if --all option was used. https://fedorahosted.org/freeipa/ticket/5710 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Turn verify_host_resolvable() into a wrapper around ipapython.dnsutilPetr Spacek2016-05-303-61/+72
| | | | | | | | | | | | | The code was duplicate and less generic anyway. As a side-effect I had to re-wrap dns.exception.DNSException into a PublicError so it can be displayed to the user. DNSError is now a super class for other DNS-related errors. Errors from DNS resolver are re-raised as DNSResolverError. https://fedorahosted.org/freeipa/ticket/5710 Reviewed-By: Martin Basti <mbasti@redhat.com>