Commit Graph
16368 Commits
Author SHA1 Message Date
Viktor Ashirov edc00aae57 ipa-pwd-extop: fix valueset memory leak in ipapwd_get_cur_kvno()
In `ipapwd_get_cur_kvno()`, the `Slapi_ValueSet` obtained via
`slapi_attr_get_valueset()` was never freed. This function returns a
copy of the valueset that must be freed by the caller using
`slapi_valueset_free()`.

Add `slapi_valueset_free(svs)` before returning from the function.

Related: https://pagure.io/freeipa/issue/9895
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-18 08:39:20 -03:00
Viktor Ashirov 614b3cdc87 ipa-pwd-extop: fix memory leaks in ipapwd_gen_hashes() error path
In `ipapwd_gen_hashes()`, when an error occurred after allocating output
parameters, `*ntvals` was freed but `*nthash` was not.

Add `slapi_ch_free_string(nthash)` to the error cleanup section.

Related: https://pagure.io/freeipa/issue/9895
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-18 08:39:20 -03:00
Viktor Ashirov 370cdf0357 ipa-pwd-extop: fix password history values memory leak
In `ipapwd_post_modadd()`, the `pwvals` array returned by
`ipapwd_setPasswordHistory()` was passed to `slapi_mods_add_mod_values()`
but never freed. The `slapi_mods_add_mod_values()` function makes a copy
of the values, so the original array still needs to be freed.

Add `ipapwd_free_slapi_value_array()` call in the cleanup section to
free the array.

Related: https://pagure.io/freeipa/issue/9895
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-18 08:39:20 -03:00
Viktor Ashirov f5e47c974b ipa-pwd-extop: fix NT hash string memory leak
In `ipapwd_pre_add()` and `ipapwd_pre_mod()`, the `nt` string returned
by `ipapwd_gen_hashes()` was only freed when `is_smb` was true.  When NT
hashes are generated for `is_ipant` entries but `is_smb` is false, the
`nt` string was leaked.

Free `nt`, `ntvals` and `svals` unconditionally.

Fix the error path in `ipapwd_pre_add()` where `nt` and `ntvals` were
leaked when `slapi_entry_attr_replace_sv()` failed for `svals`.

Related: https://pagure.io/freeipa/issue/9895
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-18 08:39:20 -03:00
Viktor Ashirov 1545c3fd7d ipa-pwd-extop: fix bind DN memory leaks in pre-op handlers
In `ipapwd_pre_add()` and `ipapwd_pre_mod()`, `binddn` is obtained via
`slapi_pblock_get()` with SLAPI_CONN_DN which returns an allocated
string. This string was never freed after use.

Add `slapi_ch_free_string(&binddn)` calls after the bind DN is no longer
needed in both functions.

Related: https://pagure.io/freeipa/issue/9895
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-18 08:39:20 -03:00
Viktor Ashirov 28979893e6 ipa-pwd-extop: fix memory leaks in ipapwd_pre_add()
In `ipapwd_pre_add()`, when processing password from entry extension,
`userpw` was reassigned without freeing the previous value.
Additionally, `enabled` obtained from `ipapwd_getIpaConfigAttr()` was
never freed, and early returns bypassed the cleanup section causing
memory leaks.

Free `userpw` before reassigning it.
Free `enabled` after use.
Replace early `return 0` statements with `goto done` to ensure proper
cleanup of all allocated resources.

Related: https://pagure.io/freeipa/issue/9895
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-18 08:39:20 -03:00
Viktor Ashirov 1a7819b2c6 ipa-pwd-extop: fix memory leaks of bind DN
In `ipapwd_chpwop()`, `ipapwd_setkeytab()`, and `ipapwd_getkeytab()`
functions, `bindDN`/`bind_dn` is obtained via `slapi_pblock_get()` with
SLAPI_CONN_DN which returns an allocated string. This string was never
freed in the cleanup sections of these functions.

Add `slapi_ch_free_string()` calls for the bind DN variables in the
`free_and_return` sections of all three functions.

Related: https://pagure.io/freeipa/issue/9895
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-18 08:39:20 -03:00
PRANAV THUBE c8c7192225 Extended eDNS testsuite with Enforced DNS policy testcases.
Extend the EDNS test suite by, adding structured tests for DNS-over-TLS under a enforced policy with IPA and external CAs.
Tests:
TestDNSOverTLS_EnforcedPolicy_IPA_CA
TestDNSOverTLS_EnforcedPolicy_External_CA

Related: https://issues.redhat.com/browse/IDM-1524

Signed-off-by: PRANAV THUBE <pthube@redhat.com>
Reviewed-By: Antonio Torres <antorres@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2025-12-18 15:58:04 +05:30
Rob Crittenden f28c8a2bc3 ipatests: Add the remote IP before running ipa-migrate
The base class MigrationTest installation sets up two
separate servers, each with their own DNS. The second
one (replica[0]) is the "new" IPA server and will migrate
data from the "old" one (master).

When manually running these tests in my own environment
they fail because the new server can't connect to the old
one because it doesn't have its IP address. This somehow
works in PR-CI. So add the master IP address on the replica
so it has a way to contact it.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Sudhir Menon <sumenon@redhat.com>
Reviewed-By: Rafael Guterres Jeffman <rjeffman@redhat.com>
2025-12-16 17:01:39 -03:00
Mohammad Rizwan 381e00e5db ipatests: allow dns zone overlap where dns is handled externaly
When dns is handles externaly and `--auto-reverse` is used to install
ipa-server, installation fails as
```
ipa: ERROR: stderr: Checking DNS domain testrelm.test., please wait ...
Checking DNS domain xx.xx.xx.in-addr.arpa., please wait ...
DNS zone xx.xx.xx.in-addr.arpa. already exists in DNS and is handled by server(s): ['xxx.', 'xxx.', 'xxx.', 'xxx.']
The ipa-server-install command failed. See /var/log/ipaserver-install.log for more information
```

Allow ipa-server install adding '--allow-zone-overlap' option for these
cases.

Signed-off-by: Mohammad Rizwan <myusuf@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-16 14:39:55 -03:00
MOHAMMAD SAMI f094818347 Fix incorrect error handling in ipapython/graph.py
fix: correction in exception type for remove_edge

the previous code raises the KeyError but the list.remove() actually raises ValueError so the Actual problem was not getting resolved.

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

signed-off-by: Sami Shaikh 1694samishaikh@gmail.com
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-16 11:23:26 -03:00
Anuja More 386e9f37af ipatests: sysaccounts: add missing integration/webui/xmlrpc tests
Add comprehensive test coverage for system accounts:

Integration tests:
- Password management and privileged behavior
- Backup/restore scenarios (full, data-only, with various attributes)
- Replica deletion and SysAcctManagersDNs persistence

Web UI tests:
- CRUD operations, privileged flag, associations
- Enable/disable, password validation, negative cases

XML-RPC tests:
- Permission checks for normal users and Security Architects
- All CRUD operations and policy management

- Automated with Cursor+Claude

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

Signed-off-by: Anuja More <amore@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: PRANAV THUBE <pthube@redhat.com>
Signed-off-by: Anuja More <amore@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: PRANAV THUBE <pthube@redhat.com>
2025-12-16 11:16:34 -03:00
Anuja More f580f12e5b sysaccount_mod: Use object.__setattr__ to set allow_empty_update in exception handler
The error only happens in developer mode (when mode=developer instead of
mode=production in /etc/ipa/default.conf). Using object.__setattr__ bypasses
normal attribute assignment which fails in developer mode when trying to set
the class attribute allow_empty_update on an instance.

Signed-off-by: Anuja More <amore@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: PRANAV THUBE <pthube@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: PRANAV THUBE <pthube@redhat.com>
2025-12-16 11:16:34 -03:00
Viktor Ashirov 8eeccb6dba ipa-pwd-extop: fix memory leaks
In `ipapwd_set_extradata` free `xdata` after it's not longer needed.  It
was leaked because `slapi_value_new_berval()` makes a copy of the data.

In `ipapwd_free_slapi_value_array` free `svals` (caller's pointer)
instead of `sv` (local pointer).

Related: https://pagure.io/freeipa/issue/9895
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-12 09:40:21 +01:00
Viktor Ashirov ba9074c960 ipa-pwd-extop: free krbcfg in all exit paths
Add `free_ipapwd_krbcfg()` calls.

Related: https://pagure.io/freeipa/issue/9895
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-12 09:40:21 +01:00
Viktor Ashirov 61bc55c9c3 topology: fix memory leaks
`agmt_attr_val`, `targetHost` and internal search results pblock were
not freed.

Related: https://pagure.io/freeipa/issue/9895
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-12 09:40:21 +01:00
Viktor Ashirov bfc9552d56 ipa-enrollment: fix memory leaks
`smods`, `fqdn`, `sdn` were not freed.

Related: https://pagure.io/freeipa/issue/9895
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-12 09:40:21 +01:00
Viktor Ashirov 4a62d6141a ipa-extdom-extop: fix memory leaks
In various code paths the `ctx` structure was freed, but not `ctx`
resources (`base_dn`, `nss_ctx`, `extdom_instance_counter`) which may
have been allocated.

Plugin didn't have SLAPI_PLUGIN_CLOSE_FN registered, so context was
never freed on server shutdown.

Related: https://pagure.io/freeipa/issue/9895
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-12 09:40:21 +01:00
Viktor Ashirov 0e409d1955 ipa-range-check: fix memory leak
`ipa_range_check_close` function didn't do any cleanup.
The `ctx` structure was freed, but not `ctx->base_dn` which may have
been allocated.

Related: https://pagure.io/freeipa/issue/9895
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-12 09:40:21 +01:00
Viktor Ashirov 67ea4467ec ipa-sidgen: fix memory leaks
In various code paths the `ctx` structure was freed, but not
`ctx->base_dn` which may have been allocated.

`sid` was duplicated, but the original memory was never freed.

Related: https://pagure.io/freeipa/issue/9895
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-12 09:40:21 +01:00
Viktor Ashirov 29699af133 ipa-pwd-extop: fix memory leaks
`cur_pw` was allocated but not freed after password validation.
`principal_expire` was allocated but not freed in all code paths.

Related: https://pagure.io/freeipa/issue/9895
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-12 09:40:21 +01:00
Viktor Ashirov 819fddc3d2 ipa-lockout: fix memory leaks
Move cleanup of `unlock_time` to `done` label to ensure cleanup in all code paths.

Related: https://pagure.io/freeipa/issue/9895
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-12 09:40:21 +01:00
Viktor Ashirov c173a70c85 ipa-graceperiod: fix memory leaks
Direct return of invalid grace limit bypassed cleanup code.
`tmpstr` variable was not freed in all code paths.

Related: https://pagure.io/freeipa/issue/9895
Signed-off-by: Viktor Ashirov <vashirov@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-12 09:40:21 +01:00
Carla Martinez f39acce911 Fix: Incorrect auth error message
There is a small bug in the server code that processes
the user-locked situation: while kinit reports `kinit:
Client's credentials have been revoked ...`, the code
expects `kinit: Clients credentials have been revoked ...`
(doesn't contain the apostrophe). By correcting the
message and adding the apostrophe the right message
should be displayed.

Fixes: https://pagure.io/freeipa/issue/9891
Signed-off-by: Carla Martinez <carlmart@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-12-09 20:53:28 +01:00
Florence Blanc-Renaud c03f7eb2b9 ipatest: add an integration test for samba upgrade
When a trust was establish pre samba 4.23, the trust domain object
could contain ipanttrustattributes = 40 (LSA_TRUST_ATTRIBUTE_WITHIN_FOREST)
and winbind would fail to restart after an upgrade to samba 4.23.

Add a test simulating the situation and calling ipa-server-upgrade

Related: https://pagure.io/freeipa/issue/9892
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-09 12:33:34 +01:00
Florence Blanc-Renaud 6f0cd075e5 Trust: fix tdo with WITH_FOREST
When a trust was established pre samba 4.23, the trust domain object
could contain ipanttrustattributes: 8 (LSA_TRUST_ATTRIBUTE_WITHIN_FOREST)
This value prevents winbind restart.

The current code replaces 0 with LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE
but should also handle the case for LSA_TRUST_ATTRIBUTE_WITHIN_FOREST.
In this case we should drop the bit and replace it by FOREST_TRANSITIVE
one because otherwise Samba will skip the domain. Do not change the LDAP
representation to allow older replicas to continue operations.

Fixes: https://pagure.io/freeipa/issue/9892
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-12-09 12:33:34 +01:00
Florence Blanc-Renaud b575e3dc39 Nightly test definitions: configure 4.13 branch
Configure the gating and nightly pipelines for ipa-4-13 branch

Fixes: IDM-3230
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
Reviewed-By: Rafael Guterres Jeffman <rjeffman@redhat.com>
Reviewed-By: Sudhir Menon <sumenon@redhat.com>
2025-12-08 14:26:49 +01:00
Antonio Torres a4617fb04b Back to git snapshots
Signed-off-by: Antonio Torres <antorres@redhat.com>
2025-12-04 11:42:21 +01:00
Antonio Torres dd8ba50929 Become IPA 4.13.0
Signed-off-by: Antonio Torres <antorres@redhat.com>
2025-12-04 11:32:44 +01:00
Antonio Torres fb28051781 Update list of contributors
Signed-off-by: Antonio Torres <antorres@redhat.com>
2025-12-04 11:24:07 +01:00
Florence Blanc-Renaud 443aff6a0a ipatests: fix teardown of TestIpaCertFix
The test is moving the date in the future to simulate CA certificate
expiration, then uninstalls the server. If certmonger is working,
the uninstaller may fail with a Dbus Exception.

The test can be fixed with the same strategy as other tests changing
the date: stop certmonger and remove the tracking requests before
uninstallation.

Fixes: https://pagure.io/freeipa/issue/9888
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-12-02 16:38:02 +01:00
Antonio Torres 68cc47a3e4 eDNS: disable dnsconfd before configuring Unbound
If dnsconfd is kept enabled after we are done configuring Unbound for the
encrypted DNS setup, it might overwrite the configuration,
resulting in a broken setup. dnsconfd should be disabled prior to
configuring Unbound during the server/client install process.

Fixes: https://pagure.io/freeipa/issue/9859
Signed-off-by: Antonio Torres <antorres@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
2025-12-02 10:26:56 -05:00
Finn Krein-Schuch 2dcc943e6b Use mod_auth_gssapi option GssapiNegotiateOnce
In some user agents (e.g. Chrome on Windows) after negotiation of
Kerberos auth fails the agent will try negotiating NTML auth.  This
will not work but may prompt http basic auth popups before showing the
html login form, confusing the users.

To circumvent this problem mod_auth_gssapi added the option
GssapiNegotiateOnce, sending the negotiate header only once.

References:
[1] Discussion in mod_auth_gssapi:
https://github.com/gssapi/mod_auth_gssapi/discussions/293

Fixes: https://pagure.io/freeipa/issue/5614
Signed-off-by: Finn Krein-Schuch <finn.krein-schuch@sva.de>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2025-12-02 14:27:24 +01:00
Rafael Guterres Jeffman c98d1b819e ipa-idrange-fix: Fix typo when ID under 1000 is present.
Fixes: https://pagure.io/freeipa/issue/9885

Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
Reviewed-By: David Hanina <dhanina@redhat.com>
2025-12-01 11:19:26 +01:00
Arif Budiman 136ab8ca30 Translated using Weblate (Indonesian)
Currently translated at 42.4% (2071 of 4881 strings)

Co-authored-by: Arif Budiman <arifpedia@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/freeipa/master/id/
Translation: freeipa/master
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2025-11-28 18:01:32 +01:00
Rob Crittenden ffb8fe3541 Don't assume the server has a CA service when issuing certificates
The hostname "localhost" was harcoded in pki_issue_certificate.
This worked for installations, even without a CA, because this
wasn't called for issuing those certificates.

It fails with ipa-pkinit-enable on a server without a CA because
only attempted the local server which lacks a CA.

Instead detect the CA based on the local capabilities and the
server list of available CAs, preferring the local server if it
has a CA.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
2025-11-26 14:17:23 -05:00
Florence Blanc-Renaud 9b9c71475b test_ipahealthcheck_dogtag_ca_connectivity_check: update expected msg
With the changes related to PKI API, a different error message is
returned when PKI is not reachable.
This breaks the test test_ipahealthcheck_dogtag_ca_connectivity_check.

Update the expected error message.
Fixes: https://pagure.io/freeipa/issue/9881
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-11-25 17:08:58 +01:00
Julien Rische 0aced73926 ipatests: fix kdcproxy tests against AD
In recent kdcproxy commit 1773f28eeea72ec6efcd433d3b66595c44d1253f, the
use of DNS discovery has been restricted to declared realms in order to
mitigate CVE-2025-59088. The present commit update the
TestHttpKdcProxy::test_ad_user_login_on_client_with_kdcproxy test to
take this change into account.

Signed-off-by: Julien Rische <jrische@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2025-11-21 16:26:19 +05:30
Rob Crittenden b7c66bf23b Revert "Temp commit"
This reverts commit a5132136cd.

It was merged on accident.
2025-11-20 15:57:54 -05:00
Sumedh Sidhaye a5132136cd Temp commit
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-11-20 15:42:45 -05:00
Sumedh Sidhaye e9a644feb0 Validate message to check if not a trust agent/controller Previously the check would return an empty SUCCESS message.
This is an update to the integration test since this involves a
beahviour change

Related PR: https://github.com/freeipa/freeipa-healthcheck/pull/367
Related JIRA: https://issues.redhat.com/browse/RHEL-112752

Signed-off-by: Sumedh Sidhaye <ssidhaye@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-11-20 15:42:45 -05:00
Florence Blanc-Renaud bcbc88dc4a temp_commit: revert to the version pre 0b521f7
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-11-20 15:40:37 -05:00
Florence Blanc-Renaud ca5510a08d ipatests: mark test_dnssec as xfail in fips mode
The test test_fips.py::TestInstallFIPS::test_dnssec is failing and
the issue is reported upstream at 9785.
Mark the test as xfail for now.

Related: https://pagure.io/freeipa/issue/9785
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-11-20 15:40:37 -05:00
Florence Blanc-Renaud 3e6b5b954b FIPS mode: openssl pkcs12 command needs -nomacver option
In FIPS mode, ipa server installation fails in a call to
openssl pkcs12 command because the PKCS12 MAC requires PKCS12KDF
which is not an approved FIPS algo.
The fix consists in passing the additional option -nomacver

Fixes: https://pagure.io/freeipa/issue/9878
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-11-20 15:40:37 -05:00
Rob Crittenden 0b521f7d19 PR-CI: Run test_installation_TestInstallKeySizes in the nightlies
This tests the key and type installation arguments so the end
user can have some level of control over the type and key size
of some of the IPA keys.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rafael Guterres Jeffman <rjeffman@redhat.com>
Reviewed-By: Thomas Woerner <twoerner@redhat.com>
2025-11-19 16:50:37 -05:00
Rob Crittenden d424dc6dd2 Move some functions to installutils to be more independent
This is needed to avoid importing functions and static values
from cainstance.py and krainstance.py. Both import dsinstance.py
which imports lib389 and initializes things that don't work
well within the server API.

They are moved to installutils and ipalib.constants to be more
centralized and reduce imports.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rafael Guterres Jeffman <rjeffman@redhat.com>
Reviewed-By: Thomas Woerner <twoerner@redhat.com>
2025-11-19 16:50:37 -05:00
Rob Crittenden d322bbfb3f Detect the highest API version the remote server supports
There are deployed 11.7.0 servers that aren't yet configured
to expose the v2 API. This change will allow IPA to fall back
to the v1 API.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rafael Guterres Jeffman <rjeffman@redhat.com>
Reviewed-By: Thomas Woerner <twoerner@redhat.com>
2025-11-19 16:50:37 -05:00
Rob Crittenden f74ff21364 Refine restricting CA profiles to known subjects
Since renewal now occurs through IPA and not directly via
the CA, restrict the CA profiles to only those certificates
we know about and expect.

The RA Agent cert and the subsystem cert share the same profile
so there is another hoop to jump through in validating that
the subjects are valid and expected.

Since the code runs as ipaapi it does not have access to check
the run status of DS so skip in that case. If it fails, it fails.

Contributions from Fraser Tweedale <ftweedal@redhat.com>

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rafael Guterres Jeffman <rjeffman@redhat.com>
Reviewed-By: Thomas Woerner <twoerner@redhat.com>
2025-11-19 16:50:37 -05:00
Rob Crittenden 56620f400a Sort when comparing tuples in the xmlrpc tests
Two test were failing because the order within the result
keys changed. We shouldn't rely on order so sort the result
and compare that.

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rafael Guterres Jeffman <rjeffman@redhat.com>
Reviewed-By: Thomas Woerner <twoerner@redhat.com>
2025-11-19 16:50:37 -05:00
Rob Crittenden 372468511d Set minimum version of certmonger and PKI for PKI-API
The updated certmonger supports the --json-api flag used
to signal that all requests go through the IPA API.

The updated PKI packages provide fixes for the python API
so that all CA requests can be directed through that instead
of using the REST API directly.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rafael Guterres Jeffman <rjeffman@redhat.com>
Reviewed-By: Thomas Woerner <twoerner@redhat.com>
2025-11-19 16:50:37 -05:00