summaryrefslogtreecommitdiffstats
path: root/ipaclient/plugins/vault.py
Commit message (Collapse)AuthorAgeFilesLines
* py3: decode bytes for json.loads()Martin Basti2017-01-241-1/+1
| | | | | | | | | | | | In py 3.5 json.loads requires to have string as input, all bytes must be decoded. Note: python 3.6 supports bytes for json.loads() https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* ipaclient.plugins: Use api_version from internally called commandsDavid Kupka2016-12-141-0/+16
| | | | | | | | | | | | In client plugins make sure the api_version is 'inherited' from server command that is internally called. Otherwise the api_version is obtained from client API instance. When calling server command from client command 'version' is passed in options and it overrides the right one. Server then refuses to handle such call. https://fedorahosted.org/freeipa/ticket/6539 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Use api.env.nss_dir instead of paths.IPA_NSSDB_DIRChristian Heimes2016-11-141-5/+2
| | | | | | | | | | ipaclient plugins are now using nss_dir from api.env instead of hard-coded paths.IPA_NSSDB_DIR. Closes: https://fedorahosted.org/freeipa/ticket/6386 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Tomas Krizek <tkrizek@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Remove unused variables in the codeMartin Basti2016-09-271-6/+0
| | | | | | | | | | | This commit removes unused variables or rename variables as "expected to be unused" by using "_" prefix. This covers only cases where fix was easy or only one unused variable was in a module Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* client: Do not create instance just to check isinstanceDavid Kupka2016-08-171-8/+8
| | | | | | | | | Checking that classes are idenical gives the same result and avoids unnecessary instantiation. https://fedorahosted.org/freeipa/ticket/6048 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* client: add missing output params to client-side commandsJan Cholasta2016-08-101-0/+24
| | | | | | | | | | | | Add output params for the otptoken-add-yubikey, vault-add, vault-mod, vault-archive and vault-retrieve commands. This fixes the commands not having any output in CLI. https://fedorahosted.org/freeipa/ticket/6182 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: David Kupka <dkupka@redhat.com>
* vault: add missing salt option to vault_modJan Cholasta2016-08-041-1/+1
| | | | | | | | | The option was accidentally removed in commit 4b119e21a2f93ca16c5edf3d1058552b44feeaf8. https://fedorahosted.org/freeipa/ticket/6154 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* frontend: Change doc, summary, topic and NO_CLI to class propertiesDavid Kupka2016-08-031-13/+22
| | | | | | | | | Avoid need to instantiate all commands just to get information for displaying help. https://fedorahosted.org/freeipa/ticket/6048 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* vault: Catch correct exception in decryptDavid Kupka2016-08-031-1/+1
| | | | | | | | ValueError is raised when decryption fails. https://fedorahosted.org/freeipa/ticket/6160 Reviewed-By: David Kupka <dkupka@redhat.com>
* client: fix hiding of commands which lack server supportJan Cholasta2016-07-281-4/+8
| | | | | | | | | | Rather than checking the server counterpart's NO_CLI, which may be False even for commands supported on the server, check wheter the server counterpart is a command defined on the server or a local placeholder. https://fedorahosted.org/freeipa/ticket/6089 Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
* Revert "Enable vault-* commands on client"Jan Cholasta2016-07-281-0/+16
| | | | | | | | This reverts commit 9feeaca9fb552229638ce98086aa75905a45b48d. https://fedorahosted.org/freeipa/ticket/6089 Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
* vault-add: set the default vault type on the client side if none was givenMartin Babinsky2016-07-131-0/+5
| | | | | | | | | | | | `vault-add` commands does much processing depending on the vault type even before the request is forwarded to remote server. Since default values for parameters are now filled only on server side, the client-side logic would fail if the vault type was not explicitly given. In this case we have to retrieve and use the default vault type from schema. https://fedorahosted.org/freeipa/ticket/6047 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Enable vault-* commands on clientMartin Basti2016-07-121-16/+0
| | | | | | | | | | | | | Client plugins fot vault commands were disabled by NO_CLI=True, inherited from vault_add_interal, that is always NO_CLI=True. Introduced by this commit 8278da6967dbe425b4e0c6cf37dc1c53052525b2 Removed NO_CLI=True from client side plugins for vault. https://fedorahosted.org/freeipa/ticket/6035 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
* client: add placeholders for required remote pluginsJan Cholasta2016-06-301-1/+46
| | | | | | | | | | | | 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-301-1/+1
| | | | | | | | | 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>
* ipalib: split off client-side plugin code into ipaclientJan Cholasta2016-06-031-0/+20
| | | | | | | | | | | 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>
* ipalib: move client-side plugins to ipaclientJan Cholasta2016-06-031-0/+936
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>