Commit Graph
22659 Commits
Author SHA1 Message Date
Timo Aaltonen 6ed540208a patches: Support PyCA 44.0. (Closes: #1118599) 2025-10-24 18:12:17 +03:00
Timo Aaltonen 898dda7ce7 releasing package freeipa version 4.12.4-1 debian/4.12.4-1 2025-06-25 12:45:13 +03:00
Timo Aaltonen 74be893f80 version bump 2025-06-25 12:37:35 +03:00
Timo Aaltonen a3857e8611 Merge branch 'upstream' 2025-06-25 12:36:07 +03:00
Timo Aaltonen 0cf737065b patches: Map nobody group to nogroup on Debian. (Closes: #1012592) 2025-06-25 12:25:33 +03:00
Timo Aaltonen 53ac430f23 add a ref to the linss-myhostname bug 2025-06-25 12:19:34 +03:00
Timo Aaltonen 605986b798 patches: Fix samba lock directory location. (Closes: #1012593) 2025-06-25 12:18:55 +03:00
Antonio Torres f2fc367fb0 Become IPA 4.12.4 2025-06-17 09:14:30 +02:00
Rob Crittenden e8c410ae5f Set krbCanonicalName=admin@REALM on the admin user
The admin must always own this name. If another entry has this
value set then remove it.

There is a uniqueness plugin for this attribute so the only two
possibilities are:

- no entry has this value set
- the admin user has this value set
- a different entry has the value set

Still, for robustness purposes, the upgrade plugin will handle
more entries.

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
2025-06-17 09:11:34 +02:00
Julien Rische 6ae52a2fb4 kdb: keep ipadb_get_connection() from succeeding with null LDAP context
The final call to ipadb_reinit_mspac() in ipadb_get_connection() is not
considered essential for the function to succeed, as there might be
cases where the required pieces of information to generate PACs are not
yet configured in the database. However, in environments where 389ds is
overwhelmed, the LDAP connection established at the beginning of
ipadb_get_connection() might already be lost while executing
ipadb_reinit_mspac().

Connection errors were not distinguished from configuration errors,
which could result in ipadb_get_connection() succeeding while the LDAP
context is set to null, leading to a KDC crash on the next LDAP request.

ipadb_get_connection() now explicitly checks the value of the LDAP
context before returning.

Fixes: https://pagure.io/freeipa/issue/9777
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Rafael Guterres Jeffman <rjeffman@redhat.com>
2025-06-17 09:08:19 +02:00
Timo Aaltonen b5c86fac93 control: Demote libnss-myhostname to Suggests. 2025-02-05 08:22:43 +02:00
Timo Aaltonen fcc7692fc0 releasing package freeipa version 4.12.2-3 debian/4.12.2-3 2025-02-04 21:09:25 +02:00
Timo Aaltonen 3c6d4bf95b control: Add python3-sphinx to build-depends. (Closes: #1003179, #1044642, #1049799) 2025-02-04 21:06:41 +02:00
Timo Aaltonen acd5bddbec control: Add python3-ifaddr to ipalib depends. (Closes: #1089716) 2025-02-04 14:02:59 +02:00
Timo Aaltonen 1912d5bdbb control: Add libnss-myhostname to client depends. (Closes: #1006829) 2025-02-04 13:56:28 +02:00
Timo Aaltonen ce6934e0ec releasing package freeipa version 4.12.2-2 2025-02-01 20:09:56 +02:00
Timo Aaltonen 87544d0e7e control: Migrate to bind9-dnsutils. (Closes: #1094939) 2025-02-01 20:09:50 +02:00
Antonio Torres f33a0e8e71 Become IPA 4.12.3 2025-01-15 12:01:25 +01:00
Sumit Bose 7a5a10b6bf ipa-otpd: use oidc_child's --client-secret-stdin option
To remove the client secret from the command line where it would be
visible e.g. when calling ps it is now passed via stdin to oidc_child.

Fixes: CVE-2024-11029

Signed-off-by: Sumit Bose <sbose@redhat.com>
2025-01-15 11:15:39 +01:00
Alexander Bokovoy 3b38efe758 ipa tools: remove sensitive material from the commandline
When command line tools accept passwords, remove them from the command
line so that they don't get visible in '/proc/pid/commandline'.

There is no common method to access the original ARGV vector and modify
it from Python. Since this mostly affects Linux systems where IPA
services run, we expect use of GNU libc and thus can rely on internal
glibc symbols. If they aren't available, the code will skip removing
passwords.

Fixes: CVE-2024-11029

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
2025-01-15 11:15:39 +01:00
Alexander Bokovoy cf84a22228 Unify use of option parsers
Do not use direct optparse references, instead import IPAOptionParser

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
2025-01-15 11:15:09 +01:00
Timo Aaltonen e6dee45604 releasing package freeipa version 4.12.2-1 debian/4.12.2-1 2024-12-09 15:35:04 +02:00
Timo Aaltonen b3b50d9fb2 ack nmu 2024-12-09 14:27:55 +02:00
Timo Aaltonen 0c9632eeb5 control: Drop python3-nose from build-depends, unused. (Closes: #1018359) 2024-12-09 13:52:55 +02:00
Timo Aaltonen 07fbf75f2a rules: Fix installing bash-completions. (Closes: #1089329) 2024-12-09 13:46:04 +02:00
Timo Aaltonen df4f5134e6 control: Build-depend on systemd-dev instead of systemd. 2024-12-09 13:41:08 +02:00
Timo Aaltonen 44deb5b456 use-raw-strings.diff: Dropped, upstream. 2024-12-09 13:05:34 +02:00
Timo Aaltonen cc26a6d20d control: Drop conflicts on systemd-timesyncd as upstream recognizes it now. (Closes: #1072168) 2024-12-09 12:40:32 +02:00
Timo Aaltonen 89021d8b9d version bump 2024-12-09 12:39:05 +02:00
Timo Aaltonen 897198ef20 Merge branch 'master' into m 2024-12-09 12:17:04 +02:00
Timo Aaltonen 74032671f8 Merge tag 'release-4-11-1' into m
tagging IPAv4 4.11.1
2024-12-09 12:16:59 +02:00
Rob Crittenden c7da7e0dc9 Become IPA v4.12.2 2024-08-21 11:06:37 -04:00
Sudhir Menon f5c7237204 ipatests: Test to check that the configured value for "nsslapd-ignore-time-skew" remains on even after a "force-sync" is done
Related: https://pagure.io/freeipa/issue/9635

Signed-off-by: Sudhir Menon <sumenon@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2024-08-21 16:59:22 +02:00
Sudhir Menon ed813fe6f0 ipatests: Replace 'usermod -r' command with 'gpasswd -d' in test_hsm.py
Test 'test_hsm_negative_bad_token_dir_permissions'
was failing in RHEL because of the below error.

"ipa: ERROR: stderr: usermod: invalid option -- 'r'"

Hence replaced the usermod with gpasswd command which does the same and
works on both RHEL and Fedora.

Ref: https://pagure.io/freeipa/issue/9626

Signed-off-by: Sudhir Menon <sumenon@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2024-08-16 17:14:03 +02:00
Rob Crittenden 21c6ccc982 Fix some resource leaks identified by a static analyzer
Fixes: https://pagure.io/freeipa/issue/9367

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Francisco Trivino <ftrivino@redhat.com>
2024-08-16 07:18:33 +02:00
Rob Crittenden d0684a7ecf Ignore TripleDES python-cryptography import warnings
TripleDES will be deprecated in python-cryptography 48.0.0. We
have code that uses it if it is available and otherwise ignores
it.

Because this gets imports in constants.py this warning is promiment
pretty much everywhere. So let's ignore it since we already handle
the issue.

Related: https://pagure.io/freeipa/issue/9641

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2024-08-15 10:03:40 +02:00
Rob Crittenden 5cc7941f30 Correct usage of public_key_algorithm_oid in ipalib/x509
public_key_algorithm_oid is property of underlying Certificate object
that is not supposed to be callable. I missed that it contained
() at the end.

Fixes: https://pagure.io/freeipa/issue/9641

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2024-08-15 10:03:40 +02:00
Florence Blanc-Renaud f37c2eb878 trust-add: handle unavailable domain
When ipa trust-add fails to retrieve the remote domain information,
it exits with "an internal error has occurred".
Handle the case with a better error message.

Fixes: https://pagure.io/freeipa/issue/9488

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2024-08-14 18:34:48 +02:00
Florence Blanc-Renaud 1fc63e2b51 HSM: fix the module name
During the server installation, the installer checks if the
SElinux policy module for the specific hardware is detected. The
current code mixed up SElinux policy module name and RPM
package name and resulted in a false warning that the module
was missing.

The module name is ipa-nfast or ipa-luna, not ipa-selinux-nfast
or ipa-selinux-luna.
The name is defined in the spec file as %{module}-nfast
and module=ipa.

Fixes: https://pagure.io/freeipa/issue/9636

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2024-08-14 17:05:16 +02:00
Florence Blanc-Renaud 84751a26a9 ipatests: skip HSM test if pki < 11.5.9
The test TestHSMNegative should be skipped if PKI is too old,
but its uninstall method does not check the PKI version.

Add a call to check_version in the class uninstall method.

Fixes: https://pagure.io/freeipa/issue/9648

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Michal Polovka <mpolovka@redhat.com>
2024-08-12 07:42:33 +02:00
Sudhir Menon 8046023fc4 ipatests: ipa-migrate tool with -Z option (CACERTFILE)
This patch add tests to check the scenarios associated with
pagure tickets

https://pagure.io/freeipa/issue/9642 - ipa-migrate - properly handle invalid certificates
https://pagure.io/freeipa/issue/9619 - ipa-migrate starttls does not work

Signed-off-by: Sudhir Menon <sumenon@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2024-08-08 16:20:26 +02:00
Mohammad Rizwan ee96c129a6 ipatests: Verify that SIDgen task continue even if it fails to assign sid
related: https://pagure.io/freeipa/issue/9618

Signed-off-by: Mohammad Rizwan <myusuf@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2024-08-08 13:37:42 +02:00
Florence Blanc-Renaud 81401e6c01 ipatests: increase the timeout for test_hsm.py::TestHSMInstall
The test is often failing on timeout. Add 15min to the test definitions.

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2024-08-05 21:23:27 +02:00
Rob Crittenden e83d949c7f Log errors reported by adtrustinstance.check_inst() using logger
It previously only printed the issue which made troubleshooting
after the fact difficult. Using logger.error() provides the same
visual functionality but also logs to the server install log.

Fixes: https://pagure.io/freeipa/issue/9637

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2024-08-05 14:52:12 +02:00
Rob Crittenden ffba69648a Force a logout in KerberosSession if a login is needed
Remove the client side cookie if a user possesses an IPA session
cookie and the associated credentials can't be found on the
server.

This handles the case where the ccaches are removed for some reason
(maybe cleanup, maybe a container was restarted) and allows for
a successful SSO if the user's Kerberos ticket is still valid.

Without this change the user is always dropped into a the
username/password dialog. The only workaround is to remove
the cookie on the client side.

Fixes: https://pagure.io/freeipa/issue/9624

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2024-08-05 14:50:10 +02:00
Florence Blanc-Renaud aadb8051d4 Replica CA installation: ignore time skew during initial replication
During a replica CA installation, the initial replication step may fail
if there is too much time skew between the server and replica.

The replica installer already takes care of this for the replication of
the domain suffix but the replica CA installer does not set
nssldapd-ignore-time-skew to on for o=ipaca suffix.

During a replica CA installation, read the initial value of
nssldapd-ignore-time-skew, force it to on, start replication and
revert to the initial value.

Apply the same logic to dsinstance and ipa-replica-manage force-sync.

Fixes: https://pagure.io/freeipa/issue/9635
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2024-08-01 09:51:11 +02:00
Alexander Bokovoy 7b5f3d7971 Get rid of unicode and long helpers in ipa-otptoken-import
Related: https://pagure.io/freeipa/issue/9641

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2024-07-31 16:20:31 -04:00
Alexander Bokovoy fc02904340 ipalib/constants.py: factor out TripleDES use
Cryptography 43 started to warn that in version 48 it will remove
TripleDES support. Change the code to detect missing TripleDES algorithm
and do not fail.

Related: https://pagure.io/freeipa/issue/9641

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2024-07-31 16:20:31 -04:00
Alexander Bokovoy 7f9c890c04 ipalib/x509.py: get rid of unicode helper
Pylint started to complain that 'unicode' variable is accessed before
definition. This is clearly a bug in how 'six' and pylint are working
together.

Replace use of 'unicode()' by 'str()'.

Fixes: https://pagure.io/freeipa/issue/9644

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2024-07-31 16:20:31 -04:00
Alexander Bokovoy 531bd05de9 ipalib/x509.py: support Cryptography 43
Cryptography 43 added two new abstract methods to Certificate class of
which we are using one, public_key_algorithm_oid.

Fixes: https://pagure.io/freeipa/issue/9641

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2024-07-31 16:20:31 -04:00