Commit Graph
16243 Commits
Author SHA1 Message Date
Alexander Bokovoy 2b2cd1eade ipasam: remove definitions which included from ndr_drsblobs.h
Do not need to have duplicates as we include them. They used to be not
exported by Samba but not anymore.

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2025-09-19 13:45:16 +02:00
Rob Crittenden cc459c8c66 Catch decoding errors in CertificateSigningRequest parameters
A try/except is needed around base64.b64decode in case an invalid
CSR is passed in to a cert function.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2025-09-18 17:22:19 +02:00
Rob Crittenden 46b7c16be1 Don't let lack of subca in PKI prevent LDAP deletion
If a subCA only exists in LDAP then it couldn't be removed.

Allow the process to continue. It will fail in the same way if
it doesn't exist on both Dogtag and IPA.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2025-09-18 17:20:01 +02:00
Florence Blanc-Renaud 92f992a6ec ipatests: add xfail for TestKRAinstallAfterCertRenew
With PKI 11.6, pkispawn checks that the certificate provided in
pki_admin_cert_file = /root/.dogtag/pki-tomcat/ca_admin.cert is still
valid.
In this scenario the date is moved past the validy date and IPA
does not refresh the certificate, hence the test fails.
Mark as known issue (ticket https://pagure.io/freeipa/issue/9763)

Related: https://pagure.io/freeipa/issue/9763
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-09-18 17:16:06 +02:00
Florence Blanc-Renaud 0d0a558b79 ipatests: exclude TomcatFileCheck when RSN are enabled
Because of PKI issue #4906, the permissions of
/var/lib/pki/pki-tomcat/conf/ca/CS.cfg
are too permissive when RSN is enabled and the check TomcatFileCheck
from ipahealthcheck.ipa.files fails.

Exclude this check when RSN are enabled.

Related: https://github.com/dogtagpki/pki/issues/4906
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-09-18 17:14:08 +02:00
Alexander Bokovoy 2f3c035e2b GetEntryFromLDIF: handle DNs case-insensitive
LDAP expects case-insensitive DNs, so modify LDIF parser to
compare DNs as case-insensitive strings and use case-preserving but
case-insensitive dictionary.

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

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2025-09-18 13:29:32 +05:30
Rob Crittenden f2a8f5cc9f Test that password expiration date past 2038 works
There was a time we capped the expiration date at 2038
because otherwise time would overflow. That was fixed.
Add a test to ensure it stays that way.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2025-09-18 09:49:09 +02:00
Rob Crittenden 9f49a8daa6 Test that certificates beyond 2038 can be parsed
The old 32-bit time_t will overflow in 2038. Test that
the IPA certificate loader will be able to parse
certificates far into the future.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2025-09-18 09:49:09 +02:00
Florence Blanc-Renaud b73d8f18a6 ipatests: update the Let's Encrypt cert chain
The test TestIPACommand::test_cacert_manage is using
Let's Encrypt chain to check the ipa-cacert-manage install
command.
The chain isrgrootx1 > r3 must be replaced with
isrgrootx1 > r12 because r3 expired Sep 15.

Fixes: https://pagure.io/freeipa/issue/9857
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-09-17 10:50:15 -04:00
Alexander Bokovoy 516ad5a821 ipasam: define prototypes
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Julien Rische <jrische@redhat.com>
2025-09-12 14:03:09 +02:00
Alexander Bokovoy 3c3a094500 ipasam: address signedness warnings
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Julien Rische <jrische@redhat.com>
2025-09-12 14:03:09 +02:00
Alexander Bokovoy 6594c9d5e3 ipasam: simplify error handling in fill_pdb_trusted_domain
Related: https://pagure.io/freeipa/issue/9852

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Julien Rische <jrische@redhat.com>
2025-09-12 14:03:09 +02:00
Alexander Bokovoy ae8e850708 dcerpc: Support Samba 4.23
Samba 4.23 ignores trust to PIM and 'within the forest' domains. It
didn't know what to do with them in past as well but starting with 4.23
the domain trust entries which have trust attributes with
LSA_TRUST_ATTRIBUTE_PIM_TRUST and LSA_TRUST_ATTRIBUTE_WITHIN_FOREST bits
set will be ignored.

FreeIPA did default to LSA_TRUST_ATTRIBUTE_WITHIN_FOREST for domains
stored with trusted attributes set to 0 or missing. This was behavior in
past for Samba as well. Since FreeIPA only supports forest trust and an
external trust, in both cases we should set explicit LSA trust attribute
bits:
 - LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE for the forest trust
 - LSA_TRUST_ATTRIBUTE_NON_TRANSITIVE for the external trust

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

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Julien Rische <jrische@redhat.com>
2025-09-12 14:03:09 +02:00
Alexander Bokovoy 96c3d2d1ad dcerpc: make sure forest trust info structure version is 1
[MS-DRSR] 5.64 FOREST_TRUST_INFORMATION defines version of the
ForestTrustInfo structure as 1. We didn't set it so it was defaulting to
zero. Samba validates the version number and rejects ForestTrustInfo
structures from FreeIPA.

Make sure new structures are always set to version 1 and old strutures
fixed up to have version 1.

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

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Julien Rische <jrische@redhat.com>
2025-09-12 14:03:09 +02:00
Florence Blanc-Renaud 70518cec0d azure webui tests: force chromium version
azure webui tests are failing with chromium-140.0.7339.80-1.fc42
Force to install an older version

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2025-09-10 07:58:44 +02:00
Florence Blanc-Renaud b0e4cdbf9d ipatests: fix test_otp
The test is performing ssh from the runner to the master
but is using the external_hostname and randomly fails.

Make sure to use the configured hostname instead.

Fixes: https://pagure.io/freeipa/issue/9849
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-09-05 17:13:55 +02:00
Florence Blanc-Renaud ca29a5a43e xmlrpc test: fix test_find_orphan_automember_rules
The test was written with a complex logic depending on the
installed version of 389-ds. The command was expected to fail if
version < 1.4.0.22.

Fedora has been shipping the fixed version for a long time already,
and the test can be simplified. Moreover, the code responsible
for retrieving 389 ds version does not work for ds 3.1.3 which
provides a vendorVersion attribute not compliant with python
versioning schema.

Fixes: https://pagure.io/freeipa/issue/9850
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2025-09-05 10:59:05 +02:00
Florence Blanc-Renaud 81aadac8c0 ipatests: remove xfail for PKI 11.7
The test test_ca_show_error_handling is green with PKI 11.7
because the PKI regression has been fixed.
Update the xfail condition to 11.5 <= version < 11.7.

Fixes: https://pagure.io/freeipa/issue/9606
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-09-03 08:41:00 +02:00
Florence Blanc-Renaud 40b24b24c7 ipatests: fix test_certmonger_ipa_responder_jsonrpc
Test scenario:
- install IPA server and client
- store the start date
- request a certificate on the client using ipa-getcert
- check in the journal after start date that the request was done using the
https://.../ipa/json URI

The test obtains the start date on the runner. As a consequence, if the runner
is late compared to the client, it may miss the message in the journal.
The date should rather be obtained on the client.

Fixes: https://pagure.io/freeipa/issue/9848
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-09-03 08:37:50 +02:00
Florence Blanc-Renaud c0994948b5 DNS over TLS: use system trust store
When a client or server is configured with DoT, the installer
creates /etc/unbound/conf.d/zzz-ipa.conf with
    tls-cert-bundle: /etc/pki/tls/certs/ca-bundle.crt

This certificate bundle does not exist any more in fedora 43+
(https://fedoraproject.org/wiki/Changes/droppingOfCertPemFile)
and the missing file prevents unbound service from starting.

The configuration should rather set
    tls-system-cert: yes
in order to rely on the systemwide trust store.

The upgrade is also handled by this change.

Fixes: https://pagure.io/freeipa/issue/9838
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2025-09-01 13:52:09 +02:00
Florence Blanc-Renaud 6069147e3b Spec file: bump samba version to 4.23.0 in f43 and above
Fixes: https://pagure.io/freeipa/issue/9843
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2025-08-26 16:51:01 +02:00
Sam Morris 6480991091 Fix ipa-client-install failure when a trusted CA's distinguished name contains slash characters
Fixes: https://pagure.io/freeipa/issue/8924
Signed-off-by: Sam Morris <sam@robots.org.uk>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2025-08-14 16:31:22 -04:00
Anuja More 76727f970c ipatests: Add comprehensive tests for ipa-client-automount --domain option
- Add parametrized test for domain validation covering valid/invalid formats
- Add cross-domain discovery test showing --domain enables discovery when
  client is in different domain than IPA domain
- Validate configuration in sssd.conf after successful automount setup

The new tests ensure --domain option works correctly and provides proper
hints for DNS discovery in cross-domain scenarios, reducing user friction
compared to requiring --server specification.

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

Signed-off-by: Anuja More <amore@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-08-06 13:22:32 -04:00
Wouter Schoot 3ade90de02 Update 11-kerberos-ticket-policy.rst
Fixed missing backtick

Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2025-07-31 09:09:10 +02:00
Florence Blanc-Renaud 52024ed7f3 Spec file: use nodejs22 on fedora 41+
Do not use the newest nodesjs24 as it does not provide the /usr/bin/node
command, only /usr/bin/node-24.
Force the use of nodejs22.

Fixes: https://pagure.io/freeipa/issue/9836
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-07-30 16:46:15 +02:00
Anuja More d8017371d3 ipatests: Remove xfail from test_installation::test_number_of_zones
Removed xfail for test_number_of_zones
This test is xpass when executed in IdM-CI
but still failing in PRCI. There is a different configuration
in the 2 CIs and with this we will get a green test
in IdM-CI nightly tests.

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

Signed-off-by: Anuja More <amore@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-07-30 10:10:34 +02:00
Antonio Torres e6445b88ab dns: disable all previous Unbound configuration before deploying ours
Previous configuration from another packages might break our Unbound
setup. Rename the config files to disable them before deploying our
configuration.

Fixes: https://pagure.io/freeipa/issue/9814
Signed-off-by: Antonio Torres <antorres@redhat.com>
Reviewed-By: Thomas Woerner <twoerner@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-07-29 17:14:45 +02:00
Michal Polovka e8378a0d77 ipatests: test_fips: Remove obsolete patch
Remove no-longer-required patch for crypto policy from the test_fips.py
suite which causes failures in the test runs.

Resolves: https://pagure.io/freeipa/issue/9810

Signed-off-by: Michal Polovka <mpolovka@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-07-28 14:31:07 +02:00
Sudhir Menon 15d5093f6d ipatests: Nightly definitions for TestIPAMigratewithBackupRestore
Signed-off-by: Sudhir Menon <sumenon@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-07-28 08:45:52 +02:00
Sudhir Menon 82fa9f1e88 ipatests: Tests for ipa-migrate tool with ldif file
This test checks that when ipa-migrate tool
uses ldif file it works without any error.

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

Signed-off-by: Sudhir Menon <sumenon@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-07-28 08:45:52 +02:00
Stanislav Levin 7e436ff6fe install: make use of shared temp directory for hsm validation
During hsm validation temporary directory and files are prepared
by root in base temporary directory which can be private and
thereby not readable by anybody but root. The validation in its
turn, run some checks as pkiuser and fail to read not accessible
resources in such a case.

Hence, to make them available some shared place need to be used,
e.g. /tmp.

Fixes: https://pagure.io/freeipa/issue/9831
Signed-off-by: Stanislav Levin <slev@altlinux.org>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-07-25 16:00:15 -04:00
David Hanina 4484ad7290 Fix terminal height for Rawhide
Replaces old ioctl function with shutil.get_terminal_size.
This should be more universal.

Fixes: https://pagure.io/freeipa/issue/9824
Signed-off-by: David Hanina <dhanina@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-07-23 14:16:44 -04:00
Alexander Bokovoy a53b2a374d kdb: prevent double crash in RBCD ACL free
acl_list was set to prev->tl_data_contents and its value is freed but
then is is freed again outside of the if(). Just reset acl_list pointer
as prev->tl_data_contents is removed unconditionally outside of the RBCD
ACL removal.

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

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-07-23 14:15:25 -04:00
Alexander Bokovoy eada98e48d freeipa.spec.in: protect scriptlets in environment where dbus or systemd do not run
For quite some time, even as early as with Fedora 37, we had

  Running scriptlet: freeipa-server-trust-ad-4.10.1-1.fc37.x86_64
                                            338/343
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
warning: %post(freeipa-server-trust-ad-4.10.1-1.fc37.x86_64) scriptlet failed,
exit status 1

Error in POSTIN scriptlet in rpm package freeipa-server-trust-ad

when installing freeipa-server-trust-ad, but the whole rpm transaction passed
and the dnf command returned with exit 0. So we did not care about that failure
because, well, it did not get reported in any way it could be caught.

This has changed with recent registry.fedoraproject.org/fedora:rawhide image
which seem so have rpm-5.99.91-1.fc43.x86_64. Now instead of exiting with 0 as
with previous registry.fedoraproject.org/fedora:rawhide images, the dnf exits
with 1, even if the version freeipa-server-trust-ad-4.12.2-14.fc43.x86_64 is
the same in both cases.

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

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-07-14 09:36:24 -04:00
Rafael Guterres Jeffman 9d7689f959 Use correct capitalization for GitHub and GitLab
The correct third party trademarks are GitHub and GitLab, and this is
the capitalization that needs to be used for documentation and messages,
when referring to each service.

Fixes: https://pagure.io/freeipa/issue/9811
Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-07-10 14:02:58 -04:00
Antonio Torres 76b3a342d5 dns: only overwrite resolv.conf during eDNS setup when needed
Don't overwrite resolv.conf if it already points to 127.0.0.1. This
ensures compatibility with read-only containers.

Fixes: https://pagure.io/freeipa/issue/9813
Signed-off-by: Antonio Torres <antorres@redhat.com>
Reviewed-By: Thomas Woerner <twoerner@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-07-01 15:36:19 +02:00
Thomas Woerner 47626a950f Replica: Request cert for DoT before setting up bind
Deploying a replica with DNS support using an IPA server DNS with DoT
fails while setting up DNS over TLS. The request for the certificate for
DoT using IPA CA is done after the DNS server for the replica is configured.

The nameserver in /etc/resolv.conf has been changed to 127.0.0.1, but
unbound was not yet configured as a forwarder.

The solution is to move the cert request before the DNS server
configuration. The unbound config from the client deployment is still
working at that moment.

Fixes: https://pagure.io/freeipa/issue/9808
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
Reviewed-By: Antonio Torres <antorres@redhat.com>
2025-06-26 12:08:50 +02:00
Thomas Woerner 0bc089681c ipaserver/install/dns.py: Allow to Turn off DNSSEC validation for unbound
Unbound is by default configured to do DNSSEC validation with the validator
module. The solution is to set module-config to "iterator".

When the server is built with EDNS client subnet support this should be
changed to "subnetcache iterator" according to the unbound man page.

Fixes: https://pagure.io/freeipa/issue/9805
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
Reviewed-By: Antonio Torres <antorres@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-06-26 08:19:51 +02:00
Thomas Woerner 4b877c7ccd ipa-client-install: New --no-dnssec-validation option
The new option is needed to be able to deactivate DNSSEC validation
for unbound.

Unbound is by default configured to do DNSSEC validation with the
validator module.

The solution is to set module-config to "iterator".

When the server is built with EDNS client subnet support this should be
changed to "subnetcache iterator" according to the unbound man page.

Fixes: https://pagure.io/freeipa/issue/9805
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
Reviewed-By: Antonio Torres <antorres@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-06-26 08:19:51 +02:00
Sudhir Menon 43033b0c01 ipatests: prci nightly definitions for 32BitIdranges
32BitIdranges testuiste has been included in the
nightly prvi definitions.

Signed-off-by: Sudhir Menon <sumenon@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2025-06-25 17:01:22 +05:30
Sudhir Menon 49ae3f1580 ipatests: Tests for 32BitIdranges.
Running 32BitIdrange tests in AD enviornment

Signed-off-by: Sudhir Menon <sumenon@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2025-06-25 17:01:22 +05:30
Florence Blanc-Renaud 2eaba8497a ipatests: fix test_adtrust_install_with_non_ipa_user
Fix the test scenario:
create a user with a second krbprincipalname but no
krbcanonical name.
kinit -E with the other name
try ipa-adtrust-install with the other name
It should fail with the error message 'user not found'

Fixes: https://pagure.io/freeipa/issue/9812
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-06-24 11:33:39 +02:00
Mark Reynolds 878b800e87 ipa-migrate - only remove repl state attribute options
Improve how we process attributes that might include replication state
data. Previously we only cared about ";binary" but there are other
attribute options that are used in IPA. Now we completely break down the
attribute into each option and rebuild it without any repl state options

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

Signed-off-by: Mark Reynolds <mreynolds@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-06-23 08:15:21 +02:00
Julien Rische fb36633e69 Add test for master key upgrade
Since commit 4ed7da378940198cf4415f86d4eb013de6ac6455 in MIT krb5,
kdb5_util sets the required bits on the modification mask of updated
principal entries to enable ipa-kdb to switch the active master key.

This commit creates a "test_fedora_legacy" ipaplatform where the AES
HMAC-SHA2 encryption types are not enabled. "test_mkey_upgrade" uses
this platform to initialize a domain with an aes256-cts-hmac-sha1-96
master key, and test its upgrade to aes256-cts-hmac-sha384-192.

Some parts of the test infrastructure had to be made aware of this new
platform (e.g. firewall integration).

Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-06-20 17:24:23 +02:00
Julien Rische fb12d9e14e Use ipaplatform tasks for krb5 enctypes
Provide the master key encryption type and the list of supported
encryption types as ipaplatform.<platform>.tasks methods. This allows
to generate the list at runtime based on the environment (e.g. FIPS) and
override the list depending of the platform.

3DES HMAC-SHA1 encryption type is now removed from supported encryption
types if it is present.

Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-06-20 17:24:23 +02:00
Julien Rische 43b1fd77f1 ipa-kdb: support storing multiple KVNO for the same principal
All MIT krb5 keys are encoded with an encryption type identifier and a
KVNO (key version number). The KVNO is referring to the original
credentials string (and its associated salt) which was used to generate
the key using the derivation function of the associated encryption type.

So far, when a set of Kerberos keys was provided to ipa-kdb, only the
newest KVNO ones were saved in a single "krbPrincipalKey" LDAP
attribute. All the older ones were deleted in the process.

This commit allows to keep older keys by splitting them in multiple
"krbPrincipalKey" attribute based on their KVNO.

Fixes: https://pagure.io/freeipa/issue/9370
Signed-off-by: Julien Rische <jrische@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-06-20 17:24:23 +02:00
Rob Crittenden 6346ca71d7 Add token options to immutables for pki override
Setting the HSM options in a pki-override-file will
result in a successful installation but it affects the
storage of the token library path. It is stored as None.

We could also instead save the provided value from the
override but an override isn't necessary in this case
since IPA provides command-line options to enable it.

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2025-06-20 16:30:04 +02:00
Florence Blanc-Renaud 5323b77013 ipa-idrange-fix: check that IPA server is installed
If ipa-idrange-fix is called on a system where the server is not configured,
it crashes with a Traceback when trying to access api.env.basedn.

Check that IPA server is configured before processing further

ipatests: add test launching ipa-idrange-fix on unconfigured server

Fixes: https://pagure.io/freeipa/issue/9809
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: David Hanina <dhanina@redhat.com>
2025-06-19 13:48:18 +02:00
Rob Crittenden 6b9400c135 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:48:44 +02:00
Thomas Woerner 974a507ee0 ipa-client-install: Fix nsupdate issues when dns_over_tls is enabled
The server commands for nsupdate.txt to define the server with the port
853 have been added for dns_over_tls. These commands do not have a leading
newline. This results in a syntax error as the next line is added to the
command.

Fixes: https://pagure.io/freeipa/issue/9806
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
Reviewed-By: David Hanina <dhanina@redhat.com>
2025-06-16 14:49:26 +05:30