cryptography 44.0.0 brought several changes related to its usage in IPA code.
cryptography
44.0.0
$ python3 -c 'import ipalib.x509' /usr/src/RPM/BUILD/freeipa-4.12.2/ipalib/constants.py:392: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. if getattr(algorithms, 'TripleDES', None): /usr/src/RPM/BUILD/freeipa-4.12.2/ipalib/constants.py:393: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. if backend.cipher_supported(algorithms.TripleDES( Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/src/RPM/BUILD/freeipa-4.12.2/ipalib/__init__.py", line 921, in <module> from ipalib.frontend import Command, LocalOrRemote, Updater File "/usr/src/RPM/BUILD/freeipa-4.12.2/ipalib/frontend.py", line 31, in <module> from ipalib.parameters import create_param, Param, Str, Flag File "/usr/src/RPM/BUILD/freeipa-4.12.2/ipalib/parameters.py", line 125, in <module> from ipalib.x509 import ( File "/usr/src/RPM/BUILD/freeipa-4.12.2/ipalib/x509.py", line 91, in <module> class IPACertificate(crypto_x509.Certificate): TypeError: type 'cryptography.hazmat.bindings._rust.x509.Certificate' is not an acceptable base type
the warning message about TripleDES has been changed https://github.com/pyca/cryptography/pull/11407
TripleDES
Certificate (and many others) are concrete classes https://github.com/pyca/cryptography/issues/11437 https://github.com/pyca/cryptography/pull/11989
Certificate
I raised this issue with PyCA developers and we'll get ability to subclass x509.Certificate class back. There is a work in progress in https://github.com/pyca/cryptography/pull/12077 but it does not work yet as more changes are needed in Rust code to allow actual instantiation of the class.
See my comments in https://github.com/pyca/cryptography/issues/11437#issuecomment-2509170229 for more details.
@slev could you please handle the deprecation warnings in this ticket? We also should skip PyCA 44.0.0 as it is clearly not compatible with FreeIPA.
Feel free to take the commit for your PR: https://github.com/stanislavlevin/freeipa/commits/issue_9708_warnings/
Thank you, the implementation looks good to me. I added it to https://github.com/freeipa/freeipa/pull/7614
Metadata Update from @abbra: - Issue assigned to abbra
Metadata Update from @frenaud: - Custom field rhbz adjusted to https://issues.redhat.com/browse/RHEL-53854, https://issues.redhat.com/browse/RHEL-69926, https://issues.redhat.com/browse/RHEL-69927
master:
Metadata Update from @frenaud: - Custom field rhbz adjusted to https://issues.redhat.com/browse/RHEL-53854, https://issues.redhat.com/browse/RHEL-69926, https://issues.redhat.com/browse/RHEL-69927, https://issues.redhat.com/browse/RHEL-69928 (was: https://issues.redhat.com/browse/RHEL-53854, https://issues.redhat.com/browse/RHEL-69926, https://issues.redhat.com/browse/RHEL-69927)
ipa-4-12:
ipa-4-11:
Metadata Update from @frenaud: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)