mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
tests: ensure AD-SUPPORT subpolicy is active
Use AD-SUPPORT subpolicy when testing trust to Active Directory in FIPS mode. This is required in FIPS mode due to AD not supporting Kerberos AES-bases encryption types using FIPS-compliant PBKDF2 and KDF, as defined in RFC 8009. Fixes: https://pagure.io/freeipa/issue/9119 Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Julien Rische <jrische@redhat.com> Reviewed-By: Francisco Trivino <ftrivino@redhat.com>
This commit is contained in:
committed by
Florence Blanc-Renaud
parent
d38dd2680f
commit
2eee5931d7
@@ -68,3 +68,9 @@ def disable_userspace_fips(host):
|
||||
# sanity check
|
||||
assert not is_fips_enabled(host)
|
||||
host.run_command(["openssl", "md5", "/dev/null"])
|
||||
|
||||
|
||||
def enable_crypto_subpolicy(host, subpolicy):
|
||||
result = host.run_command(["update-crypto-policies", "--show"])
|
||||
policy = result.stdin_text.strip() + ":" + subpolicy
|
||||
host.run_command(["update-crypto-policies", "--set", policy])
|
||||
|
||||
@@ -66,6 +66,7 @@ from .env_config import env_to_script
|
||||
from .host import Host
|
||||
from .firewall import Firewall
|
||||
from .resolver import ResolvedResolver
|
||||
from .fips import is_fips_enabled, enable_crypto_subpolicy
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -362,6 +363,8 @@ def install_master(host, setup_dns=True, setup_kra=False, setup_adtrust=False,
|
||||
if setup_adtrust:
|
||||
args.append('--setup-adtrust')
|
||||
fw_services.append("freeipa-trust")
|
||||
if is_fips_enabled(host):
|
||||
enable_crypto_subpolicy(host, "AD-SUPPORT")
|
||||
if external_ca:
|
||||
args.append('--external-ca')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user