Skip to content
Snippets Groups Projects
  1. Aug 16, 2022
  2. Dec 14, 2021
  3. Nov 24, 2021
  4. Oct 01, 2021
  5. Sep 29, 2021
    • Rafael Guterres Jeffman's avatar
      ipavault: Allow execution of plugin in client host. · 7e0624d8
      Rafael Guterres Jeffman authored
      Update vault README file and add tests for executing plugin with
      `ipaapi_context` set to `client`.
      
      A new test playbook can be found at:
      
          tests/vault/test_vault_client_context.yml
      
      As `ipavault` only works in client context, an error is raised if it
      is explicitly executed in a server context.
      7e0624d8
  6. Sep 02, 2021
    • Thomas Woerner's avatar
      vault: Use IPAAnsibleModule class · fc218878
      Thomas Woerner authored
      ipaadmin_variables are handled by IPAAnsibleModule,
      ansible_module.params_get is used to get the parameters and
      ansible_module.ipa_connect is used to simplify the module.
      fc218878
  7. May 27, 2021
  8. May 25, 2021
  9. May 24, 2021
  10. Jan 06, 2021
    • Eric Nothen's avatar
      Enabled Ansible check_mode · 7bbb401b
      Eric Nothen authored
      Added code to the ipa* plugins to support Ansible's check_mode, by
      means of a clean exit before the execution of the actual list of
      commands that would otherwise create/update/delete IPA servers
      and/or its resources.
      7bbb401b
  11. Jan 04, 2021
    • Rafael Guterres Jeffman's avatar
      Fix changing the type of an existing Vault. · 7e04a46f
      Rafael Guterres Jeffman authored
      Current implementation does not allow the change of an existingi Vault
      type. To allow it, data is retrieved from the current vault, the vault
      is modifiend, and then, data is stored again in the new vault.
      
      Due to changing the process of modifying a vault, this change also
      fixes the update of asymmetric vault keys. To change the key used,
      the task must provide the old private key, used to retrieve data,
      and the new public_key, used to store the data again. A new alias
      was added to public_key (new_public_key) and public_key_file
      (new_public_key_file) so that the playbook better express the
      intention of the tak.
      
      Vault tests have been updated to better test against the new update
      process, and a new test file has bee added:
      
          tests/vault/test_vault_change_type.
      7e04a46f
  12. Nov 13, 2020
    • Rafael Guterres Jeffman's avatar
      Bypass Ansible filtering on data returned by the module. · 88f84cef
      Rafael Guterres Jeffman authored
      Due to Ansible filtering out values in the output that might be match
      values in sensible attributes that have `no_log` set, if a module need
      to return data to the controller, it cannot rely on
      `ansible_module.exit_json` if there is a chance that a partial match
      may occur.
      
      See: https://github.com/ansible/ansible/issues/71789
      
      The change provided here uses the same implementation that is used on
      Ansible's `AnsibleModule.exit_json`, without the data filtering layer,
      so every attribute with be printed and, therefore, logged by Ansible.
      
      This is needed for the Vault module, as we need to return values that
      are explicit requested by the user and that might, at least partially,
      match the values in attributes with `no_log` set.
      
      Tests that reproduced the issue, and show it was fixed were provided
      for all Vault types.
      88f84cef
  13. Sep 17, 2020
  14. Sep 04, 2020
    • Rafael Guterres Jeffman's avatar
      Fixed log of vault data return when retrieving to a file. · 1f666609
      Rafael Guterres Jeffman authored
      When retrieving data from a vault using `out` to store the data in a
      file resulted is random characters being returned and logged. These
      characters could generate a traceback print from Ansible's logger,
      without breaking the script.
      
      The reason for that is that the result from `vault_retrive` was being
      processed when it was not needed, and data was beeing returned, when
      it shouldn't.
      
      This patch fixes this behavior by supressing the return data when `data`
      is not available, and only raising an error if it should be available.
      1f666609
  15. Aug 23, 2020
    • Rafael Guterres Jeffman's avatar
      Fix ipavault vault_type under Python 2.7. · 8b06e31e
      Rafael Guterres Jeffman authored
      When running module ipavault with Python 2.7, due to differences in
      the handling of unicode string than in Python 3, the vault_type type
      was different than the required.
      
      This patch changes the default value to force a unicode string in
      the supported versions of Python, fixing the module when Python 2
      is used.
      8b06e31e
  16. Aug 14, 2020
  17. Aug 11, 2020
    • Rafael Guterres Jeffman's avatar
      Modified return value for ipavault module. · 7dd0b547
      Rafael Guterres Jeffman authored
      The ipavault module was returning a single string value when retrieving
      data. To keep consistency with other modules, it should return a dict
      with the `data` variable in it.
      
      This change modifies the result of ipavault to be a dict and also fixes
      relevant tests, examples and documentation.
      7dd0b547
  18. Aug 05, 2020
  19. Jun 29, 2020
    • Rafael Guterres Jeffman's avatar
      Add suppport for changing password of symmetric vaults. · 78b635ae
      Rafael Guterres Jeffman authored
      Allows changing passwords of symmetric waults, using a new variable
      `new_password` (or the file-base version, `new_password_file`). The
      old password must be passed using the `password` or `password_file`
      variables that also received new aliases `old_password` and
      `old_password_file`, respectively.
      
      Tests were modyfied to reflect the changes.
      78b635ae
  20. Jun 11, 2020
    • Rafael Guterres Jeffman's avatar
      Add state `retrieved` to ipavault to retrieve vault stored data. · 0bcb4eaf
      Rafael Guterres Jeffman authored
      This patch adds support for retrieving data stored in an IPA vault by
      adding a new valid state for ipavault: `retrieved`.
      
      To allow the retrieval of data from assymetric vaults, the attributes
      `private_key`, `private_key_files` and `out` were also added to the
      module.
      
      The private key files, `private.pem`, should be paired with the already
      existing `public.pem` public key files.
      
      Tests were updated to reflect changes and two new playbooks were added:
      
          playbooks/vault/retrive-data-asymmetric-vault.yml
          playbooks/vault/retrive-data-symmetric-vault.yml
      0bcb4eaf
    • Rafael Guterres Jeffman's avatar
      Fixes password behavior on Vault module. · 04564248
      Rafael Guterres Jeffman authored
      This patch fixes handling of password and public_key files, parameter
      validation depending on vault type, usage of `salt` attribute and data
      retrieval.
      
      Tests were updated to reflect the changes.
      
      New example playbooks are added:
      
          playbooks/vault/vault-is-present-with-password-file.yml
          playbooks/vault/vault-is-present-with-public-key-file.yml
      04564248
  21. Jun 05, 2020
    • Rafael Guterres Jeffman's avatar
      Fixes password behavior on Vault module. · 59cb7eeb
      Rafael Guterres Jeffman authored
      This patch fixes handling of password and public_key files, parameter
      validation depending on vault type, usage of `salt` attribute and data
      retrieval.
      
      Tests were updated to reflect the changes.
      
      New example playbooks are added:
      
          playbooks/vault/vault-is-present-with-password-file.yml
          playbooks/vault/vault-is-present-with-public-key-file.yml
          playbooks/vault/retrive-data-asymmetric-vault.yml
          playbooks/vault/retrive-data-symmetric-vault.yml
      59cb7eeb
  22. May 28, 2020
  23. May 13, 2020
    • Rafael Guterres Jeffman's avatar
      Fixes behavior of ipavault when no user, service or shared is given. · c236fe3d
      Rafael Guterres Jeffman authored
      IPA CLI allows the creation of vaults without specifying user, service or a
      shared vault, defaulting to create a user vault for the `admin` user. The
      vault module, required that one of user, service or shared was explicitly
      provided, and this patch makes the module behave like the CLI command.
      
      Tests were added to reflect this change.
      c236fe3d
  24. May 04, 2020
  25. Feb 26, 2020
  26. Dec 16, 2019
    • Rafael Guterres Jeffman's avatar
      New vault management module. · af4e8432
      Rafael Guterres Jeffman authored
      There is a new vault management module placed in the plugins folder:
      
        plugins/modules/ipavault.py
      
      The vault module allows to ensure presence and absence of vaults, manage
      members and owner of the vault, and archive data in the vault.
      
      Here is the documentation for the module:
      
          README-vault.md
      
      New example playbooks have been added:
      
          playbooks/vault/data-archive-in-asymmetric-vault.yml
          playbooks/vault/data-archive-in-symmetric-vault.yml
          playbooks/vault/ensure-asymetric-vault-is-absent.yml
          playbooks/vault/ensure-asymetric-vault-is-present.yml
          playbooks/vault/ensure-service-vault-is-absent.yml
          playbooks/vault/ensure-service-vault-is-present.yml
          playbooks/vault/ensure-shared-vault-is-absent.yml
          playbooks/vault/ensure-shared-vault-is-present.yml
          playbooks/vault/ensure-standard-vault-is-absent.yml
          playbooks/vault/ensure-standard-vault-is-present.yml
          playbooks/vault/ensure-symetric-vault-is-absent.yml
          playbooks/vault/ensure-symetric-vault-is-present.yml
          playbooks/vault/ensure-vault-is-present-with-members.yml
          playbooks/vault/ensure-vault-member-group-is-absent.yml
          playbooks/vault/ensure-vault-member-group-is-present.yml
          playbooks/vault/ensure-vault-member-user-is-absent.yml
          playbooks/vault/ensure-vault-member-user-is-present.yml
          playbooks/vault/ensure-vault-owner-is-absent.yml
          playbooks/vault/ensure-vault-owner-is-present.yml
      
      New tests added for the module:
      
          tests/vault/test_vault.yml
      af4e8432
Loading