Commit Graph
16109 Commits
Author SHA1 Message Date
Rob Crittenden 2085b61cf6 Remove migration from mod_nss to mod_ssl
mod_nss was the original crypto engine used in Apache with IPA.
Support was dropped in IPA release 4.7.0 in 4596674 and looks
like it was introduced into Fedora in F28.

It's time to remove this upgrade code.

This retains the HTTPD_NSS_CONF definition so that
contrib/copy-schema-to-ca-RHEL6.py can still work.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2025-02-26 16:29:05 +01:00
Frederik Himpe 1937189e60 Make name of nobody group configurable and use nogroup on Debian
Fixes: https://pagure.io/freeipa/issue/9753

Signed-off-by: Frederik Himpe <frederik@frehi.be>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2025-02-26 16:14:28 +01:00
Rob Crittenden 0dee69d771 Fix some memory errors identified by a static analyzer
Fix a couple of leaks and a double free.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rafael Guterres Jeffman <rjeffman@redhat.com>
2025-02-26 20:29:17 +05:30
Rob Crittenden 8fda2e0dc7 Use new(er) PKI connection API in ipa-pki-wait-running
Since PKI v10.8.0 the PKIConnection object can longer be
created for a specific subsystem. The client that consumes
the connection specifies the subsystem instead.

Use this new API unconditionally as we require PKI >= 10.10.0
and what is available in supported repos is generally 11.5.0+.

See https://github.com/dogtagpki/pki/wiki/PKI-10.8-Python-Changes

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2025-02-26 20:20:17 +05:30
Florence Blanc-Renaud d2b5a9b93c ipatests: use "sos report" instead of "sosreport" command
The "soscommand" has been deprecated and "sos report" should be
used instead. The redirector was removed in sos 4.9.

Fixes: https://pagure.io/freeipa/issue/9752
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2025-02-26 20:04:39 +05:30
Rob Crittenden 018b3d3dc6 Validate the default e-mail domain in the config plugin
There was zero validation at all. Re-use the Email validator
since that will be used to validate the eventual e-mail
address set in a user.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Rafael Guterres Jeffman <rjeffman@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2025-02-13 11:04:23 -05:00
Mark Reynolds 4b7235c8b3 ipa-migrate - do not migrate tombstone entries, ignore MidairCollisions, and krbpwdpolicyreference
Replication related entries should not be migrated.  The main reason is
that we do not allow entries to be added that have an RDN of nsuniqueid
(only the server can internally add them).

Most midair collisions are transient issues and can be ignored for
migration purposes. In migration tests this only happens when an
attribute does not exist in the local server.  This happens frequently
with COS attributes.

We should also ignore 'krbpwdpolicyreference' as it's an attribute that is
set by COS and does not need to be migrated.

Fixes: https://pagure.io/freeipa/issue/9737
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-02-12 14:01:41 -05:00
Antonio Torres 91353b1074 dns: only disable unbound when DoT is enabled
Ensure unbound is only stopped and disabled when DNS over TLS was
enabled during installation.

Signed-off-by: Antonio Torres <antorres@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-02-12 19:47:57 +01:00
Antonio Torres 4323900863 spec: add unbound requirement and template file
Signed-off-by: Antonio Torres <antorres@redhat.com>
Reviewed-By: Francisco Trivino <ftrivino@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Varun Mylaraiah <mvarun@redhat.com>
Reviewed-By: Pavel Brezina <pbrezina@redhat.com>
2025-02-11 09:09:22 +01:00
Antonio Torres 4d0aacaa05 PRCI: add definitions for DNS over TLS tests
Signed-off-by: Antonio Torres <antorres@redhat.com>
Reviewed-By: Francisco Trivino <ftrivino@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Varun Mylaraiah <mvarun@redhat.com>
Reviewed-By: Pavel Brezina <pbrezina@redhat.com>
2025-02-11 09:09:22 +01:00
Antonio Torres 62c6c09689 ipatests: add tests for DNS over TLS
Signed-off-by: Antonio Torres <antorres@redhat.com>
Reviewed-By: Francisco Trivino <ftrivino@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Varun Mylaraiah <mvarun@redhat.com>
Reviewed-By: Pavel Brezina <pbrezina@redhat.com>
2025-02-11 09:09:22 +01:00
Antonio Torres 3de127433c Add DNS over TLS support
Add DNS over TLS support using Unbound as a local resolver. This
includes new options on both server and client side.

* `--dns-over-tls`: enable DNS over TLS support. This option is present
  on both client and server. It deploys Unbound and configures BIND on
the server to receive DoT requests.
* `--dot-forwarder`: the upstream DNS server with DoT support. It must
  be specified in the format `1.2.3.4#dns.server.test`
* `--dns-over-tls-key` and `--dns-over-tls-cert`: in case user prefers
  to have the DoT certificate in BIND generated by themselves. If these
  are empty, IPA CA is used instead to request a new certificate.

Signed-off-by: Antonio Torres <antorres@redhat.com>
Reviewed-By: Francisco Trivino <ftrivino@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Varun Mylaraiah <mvarun@redhat.com>
Reviewed-By: Pavel Brezina <pbrezina@redhat.com>
2025-02-11 09:09:22 +01:00
Rob Crittenden 4952dff42d Align startup_timeout with the systemd default and document it
We had it set to 120 seconds while the systemd default is 90.
They should be the same because the first one that times out "wins".

Move where during the installation we create the systemd override
file so that the timeout will be applied across all subsequent
server starts during and post installation.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2025-02-11 09:00:46 +01:00
Rob Crittenden 11b4ef749c Configure the pki-tomcatd service systemd timeout
IPA defines a startup timeout that is primarily used
during installation to extend service start-up timeouts
on slower systems.

This tends to work ok when runing pki-spawn but can fail when
systemd is starting the tomcat service.

Use the value of startup_timeout to set TimeoutStartSec in
the pki-tomcat systemd override file ipa.conf. This will
preserve the necessary startup_timeout for all future restarts.

This was seen with a very slow HSM where installation was successful
(pki-spawn) but pki-tomcatd startup timed out at the end of the
installation.

To increase the value in installation one needs to create the file
/etc/ipa/installer.conf with contents:

[global]
startup_timeout = 300 (or whatever)

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2025-02-11 09:00:46 +01:00
Andi Chandler 538e5c1215 Translated using Weblate (English (United Kingdom))
Currently translated at 0.2% (13 of 4881 strings)

Co-authored-by: Andi Chandler <andi@gowling.com>
Translate-URL: https://translate.fedoraproject.org/projects/freeipa/master/en_GB/
Translation: freeipa/master
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2025-02-11 08:54:59 +01:00
Florence Blanc-Renaud 50e8c4a127 ipatests: simulate FIPS mode and install replica
The procedure allowing to simulate FIPS mode is now working
(fixed since fedora 38).
The installation of a PKI clone in FIPS mode works with PKI 11.6 but
fails below. Adjust the test to skip if pki < 11.6.

Fixes: https://pagure.io/freeipa/issue/9002
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-02-06 10:54:39 +01:00
Florence Blanc-Renaud d9bf35dcc0 ipatests: on rhel10 do not install firefox
Firefox will be installed as a pre-requisite as it either comes
as a flatpak or a tar file. The flatpak is not compatible with
geckodriver as explained in geckodriver release notes
(https://github.com/mozilla/geckodriver/releases/tag/v0.35.0)

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Michal Polovka <mpolovka@redhat.com>
2025-02-04 13:41:54 +01:00
Rob Crittenden 18c4a2f9e3 Suppress spurious failure messages when uninstalling ACME
We fork out to pki-server to uninstall the ACME service and
the results are very coarse, currently just a pass/fail. This
can lead to displaying very long tracebacks as an error
message.

So check for the existence of the acme path and only invoke
the uninstaller if it exists.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
2025-01-31 13:58:32 -05:00
Rob Crittenden ac93176434 Add a message where the ipa service restarted at end of install
There is a noticeable near the end of an IPA server installation
after the client installation is complete and before the
"Setup complete" message is displayed.

A few minor things are done here but the big time sink is
enabling ipa.service and restarting it because the CA takes
so long to start. In my testing it was between 40 and 60 seconds.

So add a little message so folks don't think the client installer
hung up at the end.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
2025-01-31 08:55:13 -05:00
Rob Crittenden 6633548695 Write out the PKI admin certificate as a PEM file
It was being written out in base-64 only. The PKI team gave
us a heads-up that that may not always be supported. So use
a standard PEM file instead.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
2025-01-31 08:53:10 -05:00
Francisco Trivino 3cd3d175c1 ipatests: increase delays for WebUI host test
Previously, it waited 0.5 seconds before checking if the record was present,
but this delay was often insufficient, causing intermittent failures.

Fixes: https://pagure.io/freeipa/issue/9721
Signed-off-by: Francisco Trivino <ftrivino@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
2025-01-30 13:21:20 -05:00
Rob Crittenden c5300a3127 Apply certmonger_timeout to start_tracking and request_cert
We've seen that with some slow HSMs the default DBus timeout
the HSM doesn't respond quickly enough to certmonger start
tracking requests which fails the entire installation.

A first attempt was made to bump up the default to 30 seconds
which turned out to not be long enough.

There is already a certmonger timeout defined in the API but it
is 300 seconds so I was hesitant to use it. It could delay the
actual failure of a blown install by 5 minutes. But it also gives
the end user the flexibility to be able to control success over
an installation so we'll go ahead and use it.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Mohammad Rizwan Yusuf <myusuf@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2025-01-27 08:31:49 +01:00
Alexander Bokovoy 92ca7c6332 Reintroduce test_idp to gating tests
test_idp should complete in ~27 minutes.

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

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-01-21 17:23:13 +01:00
Alexander Bokovoy 4e43dd7cd3 Migrate Keycloak tests to JDK 21 and Keycloak 26
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-01-21 17:23:13 +01:00
Alexander Bokovoy f12c4ed600 ipa-otpd: do not pass OIDC client secret if there is none to pass
If there is no client secret specified for the OIDC client, don't push
it to oidc_child via stdin. oidc_child does only expect client secret if
--client-secret-stdin option was specified and we already specify it
only if client secret is not empty.

In addition, if client secret is empty (it is a public OIDC client),
then strlen(NULL) would crash in glibc internals. Avoid that!

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

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-01-21 17:23:13 +01:00
Florence Blanc-Renaud 6f475294e0 ipatests: restart dirsrv after time jumps
The test for ipa-healthcheck is moving the date in the future.
Restart the dirsrv instance because the LDAP server is
sensitive to large time jumps.

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-01-17 09:22:41 +01:00
Florence Blanc-Renaud 1d93e48644 ipatests: skip test_ipahealthcheck_ds_configcheck for recent versions
389-ds removed the parameter nsslapd-logging-hr-timestamps-enabled
in 2.5.3 and above. Skip the test that exercises the corresponding
healthcheck.

Fixes: https://pagure.io/freeipa/issue/9730
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-01-17 09:22:41 +01:00
Florence Blanc-Renaud 3863043fd1 Nightly tests: add test_ipahelthcheck to 389ds pipeline
Add the test to the list of nightlies run against 389ds.

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-01-17 09:22:41 +01:00
Florence Blanc-Renaud 6e26b06087 ipatests: force the version for uninstall/reinstall
The backup-restore tests ensure that ipa-restore complains if
a required package is missing. The test scenario removes the
ipa-server-dns package, tries a restore (expecting a failure),
then reinstall the ipa-server-dns pkg and retry the restore
(expecting a success).
The issue is that reinstallation sometimes pulls a more recent
version and ipa-restore fails because of the version mismatch.

Ensure the reinstallation pulls the same version.

Fixes: https://pagure.io/freeipa/issue/9723
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-01-16 13:41:35 -05:00
Florence Blanc-Renaud 31338fea70 Fix pylint issue in ipatests/i18n.py
This file should not import ipa modules

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rafael Guterres Jeffman <rjeffman@redhat.com>
2025-01-15 18:36:25 -03:00
Sumit Bose bd844036dd 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 12:18:47 +01:00
Alexander Bokovoy 0591de367f 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 12:18:46 +01:00
Alexander Bokovoy ba720b921d 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 12:18:46 +01:00
Ricky Tigg ba2985013f Translated using Weblate (Finnish)
Currently translated at 19.9% (976 of 4881 strings)

Translated using Weblate (Finnish)

Currently translated at 18.4% (900 of 4881 strings)

Co-authored-by: Ricky Tigg <ricky.tigg@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/freeipa/master/fi/
Translation: freeipa/master
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2025-01-14 15:02:51 +01:00
Rob Crittenden 4776a8babd Add 30-second timeout for certmonger request/start tracking
certmonger needs to validate that the PIN/password and/or token
are valid and available. In the case of a very slow HSM this can
take longer than the 5-second default timeout.

We saw an HSM that took 18 seconds to start tracking the CA signing
certificate so default to 30 to be safe.

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

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
2025-01-08 15:59:59 +01:00
Florence Blanc-Renaud e13be8a7c5 ipatests: certbot removed the --manual-public-ip-logging-ok parameter
The certbot CLI has deprecated the parameter --manual-public-ip-logging-ok
and finally removed it from certbot 3.0.
The test test_acme.py is using this parameter and fails in rawhide.

Do not use this parameter any more.

Fixes: https://pagure.io/freeipa/issue/9724
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-01-07 16:31:13 +01:00
Florence Blanc-Renaud 4146d77d25 Temp commit: move to fedora 41
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-01-03 08:11:16 -05:00
Florence Blanc-Renaud 7ec0cb4ced Cert renewal: update the trust flags for audit cert
When certmonger renews the auditSigningCert for the CA
or the KRA, it has to add the P trust flag to the NSS
database in /etc/pki/pki-tomcat/alias.

If IPA is installed in FIPS mode with an HSM, the
certutil commands must be provided a password file
containing both the internal token password and the
HSM password, and the cert name must be prefixed
with the tokenname (otherwise certutil -M succeeds
but does not update the trust flags).

Fixes: https://pagure.io/freeipa/issue/9705
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-01-03 08:11:16 -05:00
Florence Blanc-Renaud 1e5eb442ad Dogtag instance: add method to create temp password file
The temp password file contains the password for the internal
token as well as the password for HSM (if any).

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

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-01-03 08:11:16 -05:00
Florence Blanc-Renaud 10c3464e55 KRA cert renewal: update ca.connector.KRA.transportCert
After the KRA transport cert has been renewed, the value
of ca.connector.KRA.transportCert must also be updated in
/etc/pki/pki-tomcat/ca/CS.cfg.
Otherwise replica installation with KRA fails.

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

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-01-02 13:27:04 -05:00
Florence Blanc-Renaud 76dfadd95f Installation test: KRA on replica after cert renewal
Add a new test installing the KRA on a replica after the
KRA certs have been renewed on the master.

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

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2025-01-02 13:27:04 -05:00
Weblate Translation Memory 3a5ce9cb2a Translated using Weblate (Finnish)
Currently translated at 17.9% (876 of 4881 strings)

Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/freeipa/master/fi/
Translation: freeipa/master
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2024-12-20 15:33:40 +01:00
Ricky Tigg 05a6e52d4d Translated using Weblate (Finnish)
Currently translated at 17.9% (876 of 4881 strings)

Co-authored-by: Ricky Tigg <ricky.tigg@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/freeipa/master/fi/
Translation: freeipa/master
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2024-12-20 15:33:40 +01:00
Jonathan Steffan ab82b3d8cf workshop: Increase RAM for VMs to Avoid OOM
- Update all VMs to have 2GB of RAM

Fixes: https://pagure.io/freeipa/issue/9720
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2024-12-16 14:20:10 +01:00
Sudhir Menon 03ba8d4252 ipatests: Fixes for ipa-ipa-migration tool
The test test_ipa_migrate_with_invalid_host has been
failing in downstream run due to mismatch in the expected test output,
hence the assert statement has been modified.

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

Signed-off-by: Sudhir Menon <sumenon@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2024-12-12 16:06:16 +01:00
Sudhir Menon 1a9ee0d85b Fix the typo in ipa_migrate_constants.
ipa-migrate.log displays Privileges migrated as Privledges
due to typo in labelling i.e 'label': 'Privledges'
Hence changed that to 'label': 'Privileges'

---- LOG FILE ----
INFO  - Privledges: 3
------------------

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

Signed-off-by: Sudhir Menon <sumenon@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2024-12-10 16:10:06 +01:00
Florence Blanc-Renaud b9d7137d8a Fix copr build
With fedora41 and rpm 4.20, the copr build does not work anymore.

- rpm 4.20 introduces a change in %autopatch.
The command now issues a warning if there is no patch to apply.
This makes "dnf builddep" crash. The warning can be silenced
with the "-q" option.

- dnf builddep produces non-utf8 characters (for instance
when installing logrotate, the output of the scriptlet is
printed in color). rpm-coprbuild fails to decode the output
and exits on error.
To avoid this failure, redirect the output to a file.

- dnf5 does not recognize the options --skip-broken and --spec.

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2024-12-09 12:42:38 +01:00
Stanislav Levin e184864a30 adtrust: add missing ipaAllowedOperations objectclass
Per @abbra explanation:
> When expected Kerberos principal names for this object were flipped to
  follow requirements for cross-realm krbtgt objects expected by Active
  Directory, trusted object changed its canonical Kerberos principal name.
  The keytab for this Kerberos principal name is fetched by SSSD and it
  needs to be permitted to read the key. We added the virtual permission
  to allow the keytab retrieval but didn't add the objectclass that
  actually allows adding an LDAP attribute to express the permission. When
  an attribute is added to an LDAP object, objectclasses of the object
  must allow presence of that attribute.

This is the followup to #9471 and fixes the upgrade.

Thanks @abbra!

Related: https://pagure.io/freeipa/issue/9471
Fixes: https://pagure.io/freeipa/issue/9712
Signed-off-by: Stanislav Levin <slev@altlinux.org>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2024-12-09 09:23:58 +01:00
Alexander Bokovoy 60f9bd0430 ipa-pwd-extop: clarify OTP use over LDAP binds
OTP use during LDAP bind can be enforced either explicitly via client
specifying a control with OID 2.16.840.1.113730.3.8.10.7 and no payload
or implicitly through the global IPA configuration with EnforceLDAPOTP.

OTP token enforcement overrides IPA user authentication types
requirements:

If OTP enforcement is required:

 - if user authentication types still allow password authentication,
   authentication with just a password is denied, regardless whether OTP
   tokens are associated with the user or not.

If OTP enforcement is not required:

 - if user has no OTP tokens but user authentication types require OTP
   use, authentication with just a password is allowed until a token is
   added.

 - if user has OTP tokens and user authentication types require OTP use
   but not password, authentication with just a password is denied.

Additionally, enforcement of OTP only applies to LDAP objects which
don't use 'simpleSecurityObject' objectclass. This allows system service
accounts to continue authenticate with a password regardless of the
OTP enforcement.

Fixes: https://pagure.io/freeipa/issue/9699
Fixes: https://pagure.io/freeipa/issue/9711

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2024-12-04 12:11:22 -05:00
Stanislav Levin bc31c2700c pyca: adapt import paths for TripleDES cipher
https://cryptography.io/en/latest/hazmat/primitives/symmetric-encryption/#cryptography.hazmat.primitives.ciphers.algorithms.TripleDES

> This algorithm has been deprecated and moved to the Decrepit
  cryptography module. If you need to continue using it then update your
  code to use the new module path. It will be removed from this namespace
  in 48.0.0.

Fixes: https://pagure.io/freeipa/issue/9708
Signed-off-by: Stanislav Levin <slev@altlinux.org>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2024-12-04 09:50:44 +01:00