- Jun 03, 2020
-
-
Thomas Woerner authored
The encode_certificate and decode_certificate are needed to encode and decode a certificate in the way that it can be passed back from a module and imported back into a usable certificate in another module. For newer IPA versions the certificate is normally an IPACertificate for older IPA versions it is simply a bytes array. But in both cases it needs to be converted not to break Ansible.
-
Thomas Woerner authored
The certificates should not be pre-generated as they will expire at some point. Simply generate them for each test run using the domain used in the test. Copy the certificate files each time into the test server after removing the old ones.
-
Samuel Veloso authored
-
Samuel Veloso authored
-
- May 27, 2020
-
-
Thomas Woerner authored
Fixes behavior of ipavault when no user, service or shared is given.
-
- May 20, 2020
-
-
Sergio Oliveira authored
Added pytests as test entrypoint
-
Sergio Oliveira Campos authored
-
- May 13, 2020
-
-
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.
-
- May 12, 2020
-
-
Rafael Guterres Jeffman authored
ipauser: Fix certmapdata, add missing certmapdata data option
-
Thomas Woerner authored
certmapdata was not processed properly. The certificate was not loaded and therefore the `issuer` and `subject` could not be compared to the certmapdata entries in the user record. The function `load_cert_from_str` from ansible_freeipa_moduleis used for this. Additionally there was no way to use the certmapdata data format. This is now possible with the `data` option in the certmapdata dict. Example: "data: X509:<I>dc=com,dc=example,CN=ca<S>dc=com,dc=example,CN=test" `data` may not be used together with `certificate`, `issuer` and `subject` in the same record. Given certmapdata for the ipauser module is now converted to the internal data representation using also the new function `DN_x500_text` from `ansible_freeipa_module`. New functions `convert_certmapdata` and `check_certmapdata` have been added to ipauser. tests/user/certmapdata/test_user_certmapdata.yml has been extended with additional tasks to verify more complex issuer and subjects and also using the data format.
-
Thomas Woerner authored
This function can be used to check if a command is available in the API. This is used in ipauser module to check if user_add_certmapdata is available in the API.
-
Thomas Woerner authored
This function is needed to properly convert issuer and subject from a certificate or the issuer and subject parameters in ipauser for certmapdata to the data representation where the items in DN are reversed. The function additionally provides a fallback solution for IPA < 4.5. Certmapdata is not supported for IPA < 4.5, but the conversion is done before the API version can be checked.
-
Thomas Woerner authored
For certmapdata processing in ipauser it is needed to be able to load a cert from a string given in the task to be able to get the issuer and subject of the certificate. The format of the certifiacte here is lacking the markers for the begin and end of the certificate. Therefore load_pem_x509_certificate can not be used directly. Also in IPA < 4.5 it is needed to load the certificate with load_certificate instead of load_pem_x509_certificate. The function is implementing this properly.
-
Thomas Woerner authored
Fixes removal of `all` from categories in sudorule and hbacrule modules.
-
Rafael Guterres Jeffman authored
ipauser: Use encode_certificate for certificates in find_user result
-
Rafael Guterres Jeffman authored
ipagroup: Add lacking service check for group_remove_member with old IPA
-
Rafael Guterres Jeffman authored
tests/host/test_hosts_principal.yml: Remove dudplicate hosts tag
-
Rafael Guterres Jeffman authored
ipahost: Use dnsrecord_show instead of dnsrecord_find command
-
Rafael Guterres Jeffman authored
ipahost: Honour update_password also for random
-
- May 11, 2020
-
-
Thomas Woerner authored
group_remove_member is not able to handle services in old IPA releases. In one case the check was missing and the removal of a user from a group failed because of this with an older IPA version. The missing check has been added. Fixes #257 (ipagroup fails to remove user from group ipausers)
-
Thomas Woerner authored
The hosts tag is used twice in some tests. This leads to a warning in Ansible. The commit removes the duplicate tags.
-
Thomas Woerner authored
The host_find command had to be replaced to get the "has_password" and "has_keytab" return values. This commit replaces the dnsrecord_find with the dnsrecord_show command to have consistent find functions in the module.
-
Thomas Woerner authored
If random is enabled and update_password is limited to "create_only", the random password may only be changed if the host does not exist yet. Additionally the generation of the random password will fail, if the host is already enrolled if update_password is "always" (default value). An error will be reported early in this case now. The command host_show is now used instead of host_find, as `has_password` and `has_keytab` are only returned by host_show, but not by host_find. The find_host function has been adapated for this change. Resolves: #253 (ipahost is not idempotent)
-
- May 08, 2020
-
-
Sergio Oliveira authored
Fixes usage of Kerberos credentials on Vault module.
-
- May 07, 2020
-
-
Rafael Guterres Jeffman authored
Do not remove member attributes while updating others
-
- May 06, 2020
-
-
Thomas Woerner authored
The find_user function was not using encode_certificate for certificates that are stored in the user record. This could lead to some issues with older ipa releases and Python 2.
-
Thomas Woerner authored
Because of a missing check member attributes (for use with action: member) are cleared when a non-member attribute is changed. The fix simply adds a check for None (parameter not set) to gen_add_del_lists in ansible_freeipa_module to make sure that the parameter is only changed if it should be changed. All places where the add and removal lists have been generated manually have been changed to also use gen_add_del_lists. Resolves: #252 (The "Manager" attribute is removed when updating any user attribute)
-
- May 04, 2020
-
-
Rafael Guterres Jeffman authored
Even after obtaining Kerberos TGT with temp_kinit(), when connecting to the IPA API with context `ansible-freeipa`, the API commands complained that Kerberos credentials were not available. This patch fixes this behavior.
-
- Apr 30, 2020
-
-
Sergio Oliveira authored
ansible_freeipa_module: Set KRB5CCNAME for api_connect (non root)
-
- Apr 29, 2020
-
-
Sergio Oliveira authored
Add flake8 and pydocstyle lints
-
- Apr 26, 2020
-
-
Sergio Oliveira Campos authored
-
Sergio Oliveira Campos authored
-
Sergio Oliveira Campos authored
-
Sergio Oliveira Campos authored
-
Sergio Oliveira Campos authored
-
- Apr 22, 2020
-
-
Thomas Woerner authored
Not delete keytab when ipaclient_on_master is true
-
- Apr 16, 2020
-
-
Thomas Woerner authored
In the case that the admin password has been set and become was not set the call to backend.connect in api_connect failed. The solution is simply to set os.environ["KRB5CCNAME"] in temp_kinit after kinit_password has been called using the temporary ccache. os.environ["KRB5CCNAME"] is not used automatically by api.Backend.[ldap2,rpcclient].connect. Afterwards os.environ["KRB5CCNAME"] is unset in temp_kdestroy if ccache_name is not None. Fixes: #249 (Kerberos errors while using the modules with a non-sudoer user)
-
- Apr 10, 2020
-
-
Rafael Guterres Jeffman authored
This patch allows the removal of option `all` from user, host, and service categories, by allowing an empty string as a valid choice for each option.
-
Rafael Guterres Jeffman authored
This patch allows the removal of option `all` from user, host, group, runasuser, and runasgroup categories, by allowing an empty string as a valid choice for each option.
-
- Apr 07, 2020
-
-
Rafael Guterres Jeffman authored
Galaxy fix
-