Commit Graph

15 Commits

Author SHA1 Message Date
Thomas Woerner
d99dcbbffb library/ipajoin.py: Fixed comment for missing keytab 2017-10-05 10:42:57 +02:00
Thomas Woerner
99c0891880 library/ipajoin.py: Fixed white spaces for comments and imports 2017-10-05 10:42:35 +02:00
Thomas Woerner
354039321e Fix raise call for Python3 support 2017-10-02 17:03:44 +02:00
Thomas Woerner
95811b0287 library/ipajoin.py: Drop unused subject base gathering from certificate
ipajoin is not called always and therefore we can no depend on the subject
base gathered from the certificate output of the join call.
2017-09-25 15:57:59 +02:00
Thomas Woerner
860794232e library/ipajoin.py: Fail for already joined hosts if krb5.keytab is missing
It is not possible to restore a missing krb5.keytab using the admin
credential. Therefore the only way is to fail in this case.
2017-09-21 12:16:02 +02:00
Thomas Woerner
1f2d397588 library/ipajoin.py: Return changed state and new parameter already_joined
The choined tag is only set if changes have been done with the join.

already_joined is set if the ipa-join command is filing with error 13
(already joined). The module is not calling fail_json in this case anymore.
2017-09-18 17:44:23 +02:00
Thomas Woerner
0a8672fcb5 library/ipajoin.py: Enhanced tests for password and keytab
mutually_exclusive and required_one_of are only able to check if the parameters
are defined, but not if they are set to "".
2017-09-18 17:33:08 +02:00
Thomas Woerner
db12c0959a library/ipajoin.py: Fix principal usage with otp
With otp usage the user supplied principal may not be used for join.
2017-09-15 14:06:39 +02:00
Thomas Woerner
c088e3f9a6 library/ipajoin.py: Add kinit_attempts default value
Also: Add ipaclient_kinit_attempts default value to
roles/ipaclient/defaults/main.yml
2017-09-15 12:26:03 +02:00
Thomas Woerner
3cd878d10b library/ipajoin.py: Fix required_one_of, add mutually_exclusive
The one_of check was using a tuple instead of a list, the check for principal
or keytab has been removed, a new mutually exclusive check for password
xor keytab has been added.
2017-09-15 12:22:34 +02:00
Thomas Woerner
218d77e9c6 library/ipajoin.py: Compatibilty to ipa 4.4 and later, new version check
For ipa versions prior to 4.5 it is needed to use ipa-client-install script
as a source for functions. But the script contains a global finally clause
in which the generated ccache file gets removed. Threfore the script is
temporarily copied to ipa_client_install.py and the global finally clause
gets removed from the copy. All this is done in a temporary directory, which
gets removed right after the import has been done.

A Object called options is generated as ipa-client-install and also
ipaclient/install/client.py functions are using this object.

inspect.argspec is used on configure_krb5_conf to find out if the function
requires configure_sssd as an optional argument or in the options object.
2017-09-15 09:40:08 +02:00
Thomas Woerner
e5b6eb2381 library/ipajoin.py: Fix required tags for servers and domain in docs 2017-08-31 17:34:02 +02:00
Thomas Woerner
5724212b58 library/ipajoin.py: New documentation, debug flag, added missing kdestroy call 2017-08-30 14:25:32 +02:00
Thomas Woerner
5cfcccd616 library/ipajoin.py: Doc updates, renamed ca_certs_file
Documentation for domain, principal, keytab, ca_cert_file and kinit_attempts
has been added.

ca_certs_file has been renamed to ca_cert_file as it is used in
ipa-client-install.
2017-08-24 12:54:37 +02:00
Thomas Woerner
44e4ee7459 library/ipajoin.py: New module for ipajoin
The module is doing the important part of the code in ipa-client-install
to be able to use ipa-join on the client. get_ca_certs* from client.py are
used as a temporary solution.
2017-08-24 12:33:23 +02:00