summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* named.conf template: update API for bind 9.11Tomas Krizek2017-02-093-9/+9
| | | | | | | | | | | | | Use the new API for bind 9.11. Removed deprecated "serial_autoincrement" and updated the rest of configuration to conform to the new format. This only fixes new IPA installations. For existing installations, named.conf will be transformed when the new version of bind-dyndb-ldap is installed. https://fedorahosted.org/freeipa/ticket/6565 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Remove obsolete serial_autoincrement from named.conf parsingTomas Krizek2017-02-091-52/+4
| | | | | | | | | Option serial_autoincrement is no longer supported. Remove it from the named.conf parser and add it to deprecated options to be removed. https://fedorahosted.org/freeipa/ticket/6565 Reviewed-By: Martin Basti <mbasti@redhat.com>
* certdb: remove unused valid_months propertyTomas Krizek2017-02-091-1/+0
| | | | | | | | Property valid_months is no longer used anywhere in the code. It was removed when the selfsign funcionality was dropped. Reviewed-By: Stanislav Laznicka <slaznick@redhat.com> Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
* certdb: remove unused keysize propertyTomas Krizek2017-02-091-1/+0
| | | | | | | | | Keysize property is no longer used anywhere in the code. It was originally introduced for the request_cert function, which was later refactored to use a function argument instead. Reviewed-By: Stanislav Laznicka <slaznick@redhat.com> Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
* ipaldap: preserve order of values in LDAPEntry._sync()Jan Cholasta2017-02-091-2/+2
| | | | | | | | | | In Python 2, the order was preserved by accident. This change makes sure the order is preserved in both Python 2 and 3. https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Martin Basti <mbasti@redhat.com>
* Print test env informationChristian Heimes2017-02-091-0/+11
| | | | | | | | Print api.env, uname, euid/egid, cwd and Python version when tests are run with -v (e.g. ipa-run-tests -v). Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* replica install: relax domain level check for promotionFraser Tweedale2017-02-091-26/+30
| | | | | | | | | | | | | | | promote_check currently requires DL == 1. Relax the check to require DL >= 1, so that things will work for future DL increases. Also separate the concerns of retrieving the current domain level, validating whether the domain level is supported by the IPA version, and validating whether the current domain level supports the replica installation method attempted (i.e. replica file versus promotion). Part of: https://fedorahosted.org/freeipa/ticket/5011 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* Replace exit() calls with exceptionsMartin Babinsky2017-02-091-13/+17
| | | | | | | | | | | In order to enable correct handling of hard errors from within the composite installer code, all calls to `sys.exit` have to be replaced with raising ScriptError. https://fedorahosted.org/freeipa/ticket/6629 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* Remove unused variables in exception handlingMartin Babinsky2017-02-091-2/+2
| | | | | | | https://fedorahosted.org/freeipa/ticket/6629 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* ipa-adtrust-install: format the code for PEP-8 complianceMartin Babinsky2017-02-091-81/+144
| | | | | | | https://fedorahosted.org/freeipa/ticket/6629 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
* Travis CI: Upload the logs from failed jobs to transfer.shMartin Babinsky2017-02-092-0/+27
| | | | | | | | | When a non-lint job fails, all the relevant logs from the test runner will be gzipped and uploaded to https://transfer.sh file sharing service. The download link will then be displayed at the very end of the Travis build log. Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* py3: ldapupdate: fix logging str(bytes) issueMartin Basti2017-02-081-3/+5
| | | | | | | | | | | | bytes as argument of str() gives unexpected result by adding prefix "b" there. Also add missing safe_option() call to logging (it will fix another str(bytes) issue) https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
* DNSSEC: forwarders validation improvementMartin Basti2017-02-081-2/+1
| | | | | | | | | Some DNS servers behaves oddly and instead sending result without RRSIG records don't reply at all when DNSSEC flag is enabled (timeout). Instead of hard error IPA should this handle as DNSSEC error and continue with installation/adding forwarders. Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
* py3: test_ipaserver: fix BytesWarningsMartin Basti2017-02-081-5/+7
| | | | | | https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* py3: get_memberofindirect: fix ByteWarningsMartin Basti2017-02-082-3/+5
| | | | | | | | DN must be converted to bytes as other variables adn lists contain bytes https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* py3: DN: fix BytesWarningMartin Basti2017-02-081-1/+1
| | | | | | | | | User repr() instead of str() for bytes, it has the same effect, but it is proper way how to print bytes https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Tests: fix wait_for_replication taskMartin Basti2017-02-081-2/+9
| | | | | | | | | | DS changed a format of replication status attribute. Now it is with prefix "Error (x)" where x is the error code. Both formats were kept to allow tests run on older and new versions of DS. Reviewed-By: Milan Kubik <mkubik@redhat.com>
* py3: send Decimal number as string instead of base64 encoded valueMartin Basti2017-02-081-1/+1
| | | | | | | | | | | | | | | for Decimal only from client to server direction uses __base64__ notation. Server replies with pure string for Decimal data, and also server is able to parse string and create decimal values where needed. without this we need ugly py3 code: - return {'__base64__': base64.b64encode(str(val))} + return {'__base64__': base64.b64encode( + str(val).encode('ascii')).decode('ascii')} https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* py3: ipaldap: properly encode DNSName to bytesMartin Basti2017-02-081-1/+1
| | | | | | | | | | The encode method of LDAPClient didn't return DNSName as bytes but string in py3. In py2 it returns non-unicode string so it can be encoded safely by ascii as to_text() method returns only ascii characters. https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* py3: _convert_to_idna: fix bytes/unicode mistmatchMartin Basti2017-02-081-2/+3
| | | | | | | | ToASCII() returns bytes, it must be decoded to unicode https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* py3: DNS: get_record_entry_attrs: do not modify dict during iterationMartin Basti2017-02-081-1/+1
| | | | | | | | | In py3 keys() doesn't return list but iterator so it must be transformed to tuple otherwise iterator will be broken. https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* py3: _ptrrecord_precallaback: use bytes with labelsMartin Basti2017-02-081-1/+1
| | | | | | | | DNS labels are bytes so bytes must be used for comparison https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* py3: remove_entry_from_group: attribute name must be stringMartin Basti2017-02-081-1/+1
| | | | | | | | Do not encode attribute names https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* py3: base64 encoding/decoding returns always bytes don't mix itMartin Basti2017-02-084-7/+7
| | | | | | | | | Using unicode(bytes) call causes undesired side effect that is inserting `b` character to result. This obviously causes issues with binary base64 data https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* tests: Add tests for kerberos principal aliases in stageuserDavid Kupka2017-02-072-1/+11
| | | | | | https://fedorahosted.org/freeipa/ticket/6623 Reviewed-By: Martin Basti <mbasti@redhat.com>
* tests: kerberos_principal_aliases: Deduplicate testsDavid Kupka2017-02-071-30/+32
| | | | | | https://fedorahosted.org/freeipa/ticket/6623 Reviewed-By: Martin Basti <mbasti@redhat.com>
* tests: Stageuser-{add,remove}-certDavid Kupka2017-02-071-0/+19
| | | | | | https://fedorahosted.org/freeipa/ticket/6623 Reviewed-By: Martin Basti <mbasti@redhat.com>
* tests: add-remove-cert: Use harcoded certificates instead of requesting themDavid Kupka2017-02-071-5/+81
| | | | | | | | | | | | | Requesting certificates for test purposes is not necessary as we allow to upload arbitrary certificate to the user, host or service. Also requesting certificate from dogtag takes some time and the test is slower for no good reason. More it's not posible to request certificate for stageuser even though it's possible to upload certificates to stageusers now. https://fedorahosted.org/freeipa/ticket/6623 Reviewed-By: Martin Basti <mbasti@redhat.com>
* ipalib.x509: Handle missing SAN gracefullyDavid Kupka2017-02-071-1/+5
| | | | | | | When extension is not present None is returned instead of empty iterable or exception thrown. Reviewed-By: Martin Basti <mbasti@redhat.com>
* stageuser: Add stageuser-{add,remove}-principalDavid Kupka2017-02-072-0/+38
| | | | | | https://fedorahosted.org/freeipa/ticket/6623 Reviewed-By: Martin Basti <mbasti@redhat.com>
* stageuser: Add stageuser-{add,remove}-certDavid Kupka2017-02-074-38/+78
| | | | | | | | | Move {add,remove}-cert implementation from user to baseuser and inherit {,stage}user-{add,remove}-cert from it. https://fedorahosted.org/freeipa/ticket/6623 Reviewed-By: Martin Basti <mbasti@redhat.com>
* replica install: do not log host OTPJan Cholasta2017-02-071-1/+3
| | | | | | | | | | Do not log the value of the --password option of ipa-client-install when it is run from ipa-replica-install before replica promotion. https://fedorahosted.org/freeipa/ticket/6633 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Abhijeet Kasurde <akasurde@redhat.com>
* pki-base: use pki-base-python2 as dependencyMartin Basti2017-02-071-3/+2
| | | | | | | | | | | | | pki-base provides pki-base-python2, but we should depend directly on pki-base-python2 because in future pki-base may provide pki-base-python3 instead. Source: cheimes@redhat.com https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* pki: add missing depedency pki-base[-python3]Martin Basti2017-02-071-2/+3
| | | | | | | | | FreeIPA server modules requires pki module https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
* ipatests: nested netgroups (intg)Petr Čech2017-02-072-0/+170
| | | | | | | | | | | Adds a test case for issue in SSSD that manifested in an inability to resolve nested membership in netgroups The test case tests for direct and indirect membership. https://fedorahosted.org/freeipa/ticket/6439 Reviewed-By: Martin Basti <mbasti@redhat.com>
* py3: x509.py: return principal as unicode stringMartin Basti2017-02-071-6/+6
| | | | | | | | | X509 return principal as unicode string https://fedorahosted.org/freeipa/ticket/4985 https://fedorahosted.org/freeipa/ticket/6640 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
* Fix reference before assignmentFraser Tweedale2017-02-061-0/+1
| | | | | | | | | | In 'store_session_cookie', if the server does not set the session cookie for some reason, the 'session_cookie' variable does not get assigned, resulting in UnboundLocalError. Set an initial value of 'None'. Fixes: https://fedorahosted.org/freeipa/ticket/6636 Reviewed-By: Martin Basti <mbasti@redhat.com>
* build: Add missing dependency on libxmlrpc{,_util}David Kupka2017-02-061-1/+1
| | | | | | | | | | Change in libxmlrpc packaging uncovered missing linking dependency in our build system. https://fedorahosted.org/freeipa/ticket/6637 Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
* tests: add test for PEM certificate files with leading textJan Cholasta2017-02-061-0/+11
| | | | Reviewed-By: Christian Heimes <cheimes@redhat.com>
* ipa-kra-install must create directory if it does not existFlorence Blanc-Renaud2017-02-021-0/+4
| | | | | | | | | | | | | ipa-kra-install creates an admin cert file in /root/.dogtag/pki-tomcat/ca_admin.cert but does not check that the parent directory exists. This situation can happen when uninstall + restore has been run. The fix creates the directory if not present. https://fedorahosted.org/freeipa/ticket/6606 Reviewed-By: Christian Heimes <cheimes@redhat.com>
* py3: tests_xmlrpc: do not call str() on bytesMartin Basti2017-02-022-3/+3
| | | | | | | | | Calling str() on bytes causes undesired side effect: it adds prefix "b" to the result of conversion. The method decode() should be used instead. https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes <cheimes@redhat.com>
* private_ccache: yield ccache nameFraser Tweedale2017-01-311-1/+1
| | | | | | | | | | When using private_ccache, yield 'path' from the context manager. This is cleaner than inspecting 'os.environ['KRB5CCNAME']' within the context. Part of: https://fedorahosted.org/freeipa/ticket/5011 Reviewed-By: Martin Basti <mbasti@redhat.com>
* py3: normalize_certificate: support both bytes and unicodeMartin Basti2017-01-311-6/+15
| | | | | | https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes <cheimes@redhat.com>
* py3: strip_header: support both bytes and unicodeMartin Basti2017-01-311-6/+10
| | | | | | | | Various method passed various bytes or unicode as parameter https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes <cheimes@redhat.com>
* py3: fingerprint_hex_sha256: fix encoding/decodingMartin Basti2017-01-311-3/+2
| | | | | | https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes <cheimes@redhat.com>
* py3: fix CSR encoding inside frameworkMartin Basti2017-01-312-2/+4
| | | | | | | | | csr must be in string because framework excpects only strings, so we have to decode it back https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes <cheimes@redhat.com>
* Principal: validate type of input parameterMartin Basti2017-01-311-1/+6
| | | | | | | Bytes are unsupported and we should raise a TypeError from Principal __init__ method otherwise we get hard to debug result Reviewed-By: Christian Heimes <cheimes@redhat.com>
* Use dict comprehensionMartin Basti2017-01-311-1/+3
| | | | Reviewed-By: Christian Heimes <cheimes@redhat.com>
* py3: can_read: attributelevelrights is already stringMartin Basti2017-01-311-1/+1
| | | | | | | | | Remove decode() as it causes error in py3 because the attribute is already string not bytes https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes <cheimes@redhat.com>
* py3: get_effective_rights: values passed to ldap must be bytesMartin Basti2017-01-311-1/+4
| | | | | | | | Values passed to LDAP must be bytes https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes <cheimes@redhat.com>