summaryrefslogtreecommitdiffstats
path: root/ipaclient
Commit message (Collapse)AuthorAgeFilesLines
* client: add placeholders for required remote pluginsJan Cholasta2016-06-303-3/+78
| | | | | | | | | | | | Add placeholders for remote plugins which are required by client-side commands. They are used when the remote plugins are not available. This fixes API initialization error when the remote server does not have the plugins. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* client: ignore override errors in command overridesJan Cholasta2016-06-3022-43/+43
| | | | | | | | | This fixes API initialization errors when the remote server does not have the overriden command. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* cert: fix CLI output of cert_remove_holdJan Cholasta2016-06-301-1/+13
| | | | | | | | | | cert_remove_hold uses output params instead of exceptions to convey unsuccessful result. Move the output params to the client side before the command is fixed to use exceptions. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* frontend: do not ignore client-side output paramsJan Cholasta2016-06-301-1/+12
| | | | | | | | Do not ignore output params defined in client-side overrides. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* schema: properly fix Flag arguments on the clientJan Cholasta2016-06-301-2/+2
| | | | | | | | | The previous fix in commit a77e21cbca05be422fe5826857cfba7e0ba6e71f made some Bool arguments appear as Flag on the client. This change fixes that. https://fedorahosted.org/freeipa/ticket/6009 Reviewed-By: David Kupka <dkupka@redhat.com>
* schema: fix Flag arguments on the clientJan Cholasta2016-06-291-1/+1
| | | | | | | | Fix Flag arguments appearing as Bool on the client. https://fedorahosted.org/freeipa/ticket/6009 Reviewed-By: David Kupka <dkupka@redhat.com>
* ipa-certupdate: track lightweight CA certificatesFraser Tweedale2016-06-291-4/+48
| | | | | | | | | | | | | | Enhance the ipa-certupdate program to add Certmonger tracking requests for lightweight CA certificates. Also update the dogtag-ipa-ca-renew-agent-submit to not store or retrieve lightweight CA certificates, becaues Dogtag clones observe renewals and update their NSSDBs on their own, and allow the helper to request non-self-signed certificates. Part of: https://fedorahosted.org/freeipa/ticket/4559 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* schema: Caching on schema on clientDavid Kupka2016-06-281-10/+220
| | | | | | | | | Store schema in per user cache. Together with schemas also information about mapping between server and fingerprint is stored to reduce traffic. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* schema: support plugin versioningJan Cholasta2016-06-281-16/+25
| | | | | | | | Update API schema server and client code to support plugin versioning. https://fedorahosted.org/freeipa/ticket/4427 Reviewed-By: David Kupka <dkupka@redhat.com>
* plugable: support plugin versioningJan Cholasta2016-06-281-0/+2
| | | | | | | | | | | | | | Allow multiple incompatible versions of a plugin using the same name. The current plugins are assumed to be version '1'. The unique identifier of plugins was changed from plugin name to plugin name and version. By default, the highest version available at build time is used. If the plugin is an unknown remote plugin, version of '1' is used by default. https://fedorahosted.org/freeipa/ticket/4427 Reviewed-By: David Kupka <dkupka@redhat.com>
* schema: client-side code cleanupJan Cholasta2016-06-271-242/+190
| | | | | | | | Move client-side code scattered in global functions into neat classes. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* schema: fix param default value handlingJan Cholasta2016-06-271-3/+3
| | | | | | | | | | | | Advertise param's default value even when `autofill` is False. When `autofill` is False, set `alwaysask` to True in the schema, as it is semantically equivallent and removes redundancy. This fixes default value disappearing in CLI for some params. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* pylint: fix: multiple-statementsJan Barta2016-06-211-1/+2
| | | | Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
* dns: fix dns_update_system_records to work with thin clientJan Cholasta2016-06-211-2/+2
| | | | | | | https://fedorahosted.org/freeipa/ticket/2008 https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: Martin Basti <mbasti@redhat.com>
* cert: allow search by certificateJan Cholasta2016-06-211-0/+23
| | | | | | | | | Allow search by certificate data or file in cert-find. https://fedorahosted.org/freeipa/ticket/5381 Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
* cert: add object pluginJan Cholasta2016-06-211-3/+3
| | | | | | | | | | Implement cert as an object with methods rather than a bunch of loosely related commands. https://fedorahosted.org/freeipa/ticket/5381 Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
* schema: remove `no_cli` from command schemaJan Cholasta2016-06-201-2/+2
| | | | | | | | | Instead, support excluding commands from specified contexts and exclude commands with NO_CLI set from the 'cli' context. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* schema: remove redundant informationJan Cholasta2016-06-201-9/+4
| | | | | | | | | | | | | | | | | | | | Remove the `autofill` kwarg from param schema. On the server, include default value only if autofill is set. On the client, set autofill if param has a default value. Remove the `deprecated_cli_aliases`, `hint` and `sortorder` kwargs, and the `dnsrecord_extra`, `dnsrecord_part` and `suppress_empty` flags from param schema, as they are now handled exclusively on the client. Replace the `no_option` and `no_output` flags in param schema with exclusion of the param in 'cli' and 'webui' contexts. Remove the `no_display` flag from output schema, as it is now handled exclusively on the client. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* schema: merge command args and optionsJan Cholasta2016-06-201-6/+5
| | | | | | | | | | Rather than having args and options separately in command schema, merge them together and use new `positional` param flag to differentiate between them. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* schema: remove output_paramsJan Cholasta2016-06-202-5/+130
| | | | | | | | | | | | | Since output params are copied from object plugins, remove them from command schema and include object name instead. One exception to this are the output params used for failed members in member add/remove commands. Move these to the client side, as they will be replaced by warnings. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* schema: add object class schemaJan Cholasta2016-06-201-10/+42
| | | | | | | | | | | | Support object classes defined by object plugins in API schema. Added new commands `class-show` and `class-find` to retrieve information about object classes. `param-show` and `param-find` now support both commands and classes. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* permission: handle ipapermright deprecated CLI alias on the clientJan Cholasta2016-06-201-0/+31
| | | | | | https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* passwd: handle sort order of passwd argument on the clientJan Cholasta2016-06-201-0/+17
| | | | | | https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* misc: skip `count` and `total` output in env.output_for_cliJan Cholasta2016-06-201-0/+3
| | | | | | | | | Do not include the `count` and `total` output values in CLI output in env.output_for_cli by default. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* dns: do not rely on custom param fields in record attributesJan Cholasta2016-06-201-3/+4
| | | | | | | | | Obtain the information provided by the `hint` kwarg and `dnsrecord_part` and `dnsrecord_extra` flags by other means. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* frontend: don't copy command arguments to output paramsJan Cholasta2016-06-201-0/+1
| | | | | | | | | | | | | | Use only object params and params defined in has_output_params as output params. This removes unnecessary duplication of params defined both in object plugins and as command arguments. This requires all command output params to be properly defined in either the object plugins or the command's has_output_params. Fix the plugins where this wasn't true. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* server-del: perform full master removal in managed topologyMartin Babinsky2016-06-171-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements most of the del_master_managed() functionality as a part of `server-del` command. `server-del` nows performs these actions: * check topology connectivity * check that at least one CA/DNS server and DNSSec masters are left after removal * cleanup all LDAP entries/attributes exposing information about the master * cleanup master DNS records * remove master and service principals * remove master entry from LDAP * check that all segments pointing to the master were removed `server-del` now accepts the following options: * `--force`: force master removal even if it doesn't exist * `--ignore-topology-disconnect`: ignore errors arising from disconnected topology before and after master removal * `--ignore-last-of-role`: remove master even if it is last DNS server, and DNSSec key master. The last CA will *not* be removed regardless of this option. https://fedorahosted.org/freeipa/ticket/5588 Reviewed-By: Martin Basti <mbasti@redhat.com>
* DNS Locations: command dns-update-system-recordsMartin Basti2016-06-171-1/+28
| | | | | | | | | | | | | | command dns-update-system-records updates/fixes DNS records for IPA services: * updating A, AAAA records for CA * updating SRV records for LDAP, kerberos and AD trust * updating TXT record in _kerberos with proper realm * updating dns locations if used https://fedorahosted.org/freeipa/ticket/2008 Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Added missing translation to automount.py methodAbhijeet Kasurde2016-06-161-12/+12
| | | | | | | Fixes: https://fedorahosted.org/freeipa/ticket/5920 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* schema: fix client-side dynamic defaultsJan Cholasta2016-06-151-3/+3
| | | | | | | | Call command_defaults with properly typed arguments. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* misc: fix empty CLI output of `env` and `plugins` commandsJan Cholasta2016-06-151-0/+24
| | | | | | https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* batch, schema: use Dict instead of AnyJan Cholasta2016-06-151-1/+1
| | | | | | | | | Add new Dict parameter class and use it in the batch and command_defaults plugins. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* schema: generate client-side commands on demandJan Cholasta2016-06-151-7/+28
| | | | | | | | | | Instead of pre-generating all command classes from API schema on API initialization and using them as plugins, use placeholder objects which generate the classes on demand. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* schema: fix typoJan Cholasta2016-06-091-1/+1
| | | | | | | | This fixes summary lines for commands in the help command. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* schema: fix topic command outputJan Cholasta2016-06-091-0/+2
| | | | | | | | | | Return topic names as text instead of binary blob. This fixes ipa help topic display. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* otptoken: support Python 3 for the qr codeAlexander Bokovoy2016-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | | When IPA client is using Python 3, there is no str.decode() method anymore. ipa: ERROR: AttributeError: 'str' object has no attribute 'decode' Traceback (most recent call last): File "/usr/lib/python3.5/site-packages/ipalib/cli.py", line 1345, in run sys.exit(api.Backend.cli.run(argv)) File "/usr/lib/python3.5/site-packages/ipalib/cli.py", line 1110, in run rv = cmd.output_for_cli(self.api.Backend.textui, result, *args, **options) File "/usr/lib/python3.5/site-packages/ipaclient/plugins/otptoken.py", line 103, in output_for_cli qr = self._get_qrcode(output, uri, options['version']) File "/usr/lib/python3.5/site-packages/ipaclient/plugins/otptoken.py", line 61, in _get_qrcode qr_code = qr_output.getvalue().decode(encoding) AttributeError: 'str' object has no attribute 'decode' ipa: ERROR: an internal error has occurred Fixes https://fedorahosted.org/freeipa/ticket/5938 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Add the culprit line when a configuration file has an incorrect formatFlorence Blanc-Renaud2016-06-061-1/+5
| | | | | | | | | | | | | | For instance if /etc/nsswitch.conf contains an incorrect line sudoers file sss (Note the missing : after sudoers) ipa-client-install exits with a SyntaxError traceback but does not state which line caused the issue. With the fix, the filename and the line are displayed in the SyntaxError message. https://fedorahosted.org/freeipa/ticket/5811 Reviewed-By: Martin Basti <mbasti@redhat.com>
* DNS Location: location-show: return list of servers in locationMartin Basti2016-06-031-0/+35
| | | | | | | | | location-show returns list of servers curently assigned to the location https://fedorahosted.org/freeipa/ticket/2008 Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Fix minor typoYuri Chornoivan2016-06-031-1/+1
| | | | Reviewed-By: Martin Basti <mbasti@redhat.com>
* ipalib: move server-side plugins to ipaserverJan Cholasta2016-06-031-1/+1
| | | | | | | | | | 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-034-0/+336
| | | | | | | | | | 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>
* ipalib: move File command arguments to ipaclientJan Cholasta2016-06-033-0/+36
| | | | | | | | | | 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>
* ipalib: split off client-side plugin code into ipaclientJan Cholasta2016-06-0317-0/+1197
| | | | | | | | | | | 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>
* 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>
* help, makeapi: specify module topic by nameJan Cholasta2016-06-031-1/+1
| | | | | | | | | | | | | 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>
* ipalib: move client-side plugins to ipaclientJan Cholasta2016-06-035-0/+1478
| | | | | | | | | 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-032-2/+11
| | | | | | | | Load plugins from ipaclient.plugins in client API instances. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
* build: fix client-only buildJan Cholasta2016-05-191-0/+2
| | | | | | https://fedorahosted.org/freeipa/ticket/5889 Reviewed-By: Martin Basti <mbasti@redhat.com>
* pylint: remove bare exceptMartin Basti2016-03-221-1/+1
| | | | | | | Bare except should not be used. Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
* only search for Kerberos SRV records when autodiscovery was requestedMartin Babinsky2016-03-141-3/+7
| | | | | | | | | | | When a list of servers is passed to ipa-client-{install,automount} the search of Kerberos and LDAP SRV records should be suppressed and the specified hostnames used directly as LDAP servers/KDCs. We thus should not performed search for KDCs when the autodiscovery was actually not requested. https://fedorahosted.org/freeipa/ticket/4305 Reviewed-By: Martin Basti <mbasti@redhat.com>