|
|
31db7b |
From 6d7b2d7d1b4711255ea72d62d27b5c5f4ec7c6e1 Mon Sep 17 00:00:00 2001
|
|
|
31db7b |
From: Sergey Orlov <sorlov@redhat.com>
|
|
|
31db7b |
Date: Tue, 16 Feb 2021 12:32:55 +0100
|
|
|
31db7b |
Subject: [PATCH] ipatests: skip tests for AD trust with shared secret in FIPS
|
|
|
31db7b |
mode
|
|
|
31db7b |
|
|
|
31db7b |
Related to https://pagure.io/freeipa/issue/8715
|
|
|
31db7b |
|
|
|
31db7b |
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
|
|
|
31db7b |
---
|
|
|
31db7b |
ipatests/test_integration/test_trust.py | 22 ++++++++++++++++++++++
|
|
|
31db7b |
1 file changed, 22 insertions(+)
|
|
|
31db7b |
|
|
|
31db7b |
diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py
|
|
|
31db7b |
index 3e522617d..c8a348212 100644
|
|
|
31db7b |
--- a/ipatests/test_integration/test_trust.py
|
|
|
31db7b |
+++ b/ipatests/test_integration/test_trust.py
|
|
|
31db7b |
@@ -5,6 +5,7 @@ from __future__ import absolute_import
|
|
|
31db7b |
import re
|
|
|
31db7b |
import textwrap
|
|
|
31db7b |
import time
|
|
|
31db7b |
+import functools
|
|
|
31db7b |
|
|
|
31db7b |
import pytest
|
|
|
31db7b |
|
|
|
31db7b |
@@ -13,6 +14,7 @@ from ipaplatform.paths import paths
|
|
|
31db7b |
|
|
|
31db7b |
from ipatests.test_integration.base import IntegrationTest
|
|
|
31db7b |
from ipatests.pytest_ipa.integration import tasks
|
|
|
31db7b |
+from ipatests.pytest_ipa.integration import fips
|
|
|
31db7b |
from ipapython.dn import DN
|
|
|
31db7b |
from collections import namedtuple
|
|
|
31db7b |
from contextlib import contextmanager
|
|
|
31db7b |
@@ -20,6 +22,18 @@ from contextlib import contextmanager
|
|
|
31db7b |
TestDataRule = namedtuple('TestDataRule',
|
|
|
31db7b |
['name', 'ruletype', 'user', 'subject'])
|
|
|
31db7b |
|
|
|
31db7b |
+
|
|
|
31db7b |
+def skip_in_fips_mode_due_to_issue_8715(test_method):
|
|
|
31db7b |
+ @functools.wraps(test_method)
|
|
|
31db7b |
+ def wrapper(instance):
|
|
|
31db7b |
+ if fips.is_fips_enabled(instance.master):
|
|
|
31db7b |
+ pytest.skip('Skipping in FIPS mode due to '
|
|
|
31db7b |
+ 'https://pagure.io/freeipa/issue/8715')
|
|
|
31db7b |
+ else:
|
|
|
31db7b |
+ test_method(instance)
|
|
|
31db7b |
+ return wrapper
|
|
|
31db7b |
+
|
|
|
31db7b |
+
|
|
|
31db7b |
class BaseTestTrust(IntegrationTest):
|
|
|
31db7b |
num_clients = 1
|
|
|
31db7b |
topology = 'line'
|
|
|
31db7b |
@@ -751,6 +765,7 @@ class TestTrust(BaseTestTrust):
|
|
|
31db7b |
|
|
|
31db7b |
# Test for one-way forest trust with shared secret
|
|
|
31db7b |
|
|
|
31db7b |
+ @skip_in_fips_mode_due_to_issue_8715
|
|
|
31db7b |
def test_establish_forest_trust_with_shared_secret(self):
|
|
|
31db7b |
tasks.configure_dns_for_trust(self.master, self.ad)
|
|
|
31db7b |
tasks.configure_windows_dns_for_trust(self.ad, self.master)
|
|
|
31db7b |
@@ -775,6 +790,7 @@ class TestTrust(BaseTestTrust):
|
|
|
31db7b |
tasks.establish_trust_with_ad(
|
|
|
31db7b |
self.master, self.ad_domain, shared_secret=self.shared_secret)
|
|
|
31db7b |
|
|
|
31db7b |
+ @skip_in_fips_mode_due_to_issue_8715
|
|
|
31db7b |
def test_trustdomains_found_in_forest_trust_with_shared_secret(self):
|
|
|
31db7b |
result = self.master.run_command(
|
|
|
31db7b |
['ipa', 'trust-fetch-domains', self.ad.domain.name],
|
|
|
31db7b |
@@ -783,6 +799,7 @@ class TestTrust(BaseTestTrust):
|
|
|
31db7b |
self.check_trustdomains(
|
|
|
31db7b |
self.ad_domain, [self.ad_domain, self.ad_subdomain])
|
|
|
31db7b |
|
|
|
31db7b |
+ @skip_in_fips_mode_due_to_issue_8715
|
|
|
31db7b |
def test_user_gid_uid_resolution_in_forest_trust_with_shared_secret(self):
|
|
|
31db7b |
"""Check that user has SID-generated UID"""
|
|
|
31db7b |
# Using domain name since it is lowercased realm name for AD domains
|
|
|
31db7b |
@@ -801,6 +818,7 @@ class TestTrust(BaseTestTrust):
|
|
|
31db7b |
assert re.search(
|
|
|
31db7b |
testuser_regex, result.stdout_text), result.stdout_text
|
|
|
31db7b |
|
|
|
31db7b |
+ @skip_in_fips_mode_due_to_issue_8715
|
|
|
31db7b |
def test_remove_forest_trust_with_shared_secret(self):
|
|
|
31db7b |
ps_cmd = (
|
|
|
31db7b |
'[System.DirectoryServices.ActiveDirectory.Forest]'
|
|
|
31db7b |
@@ -823,6 +841,7 @@ class TestTrust(BaseTestTrust):
|
|
|
31db7b |
|
|
|
31db7b |
# Test for one-way external trust with shared secret
|
|
|
31db7b |
|
|
|
31db7b |
+ @skip_in_fips_mode_due_to_issue_8715
|
|
|
31db7b |
def test_establish_external_trust_with_shared_secret(self):
|
|
|
31db7b |
tasks.configure_dns_for_trust(self.master, self.ad)
|
|
|
31db7b |
tasks.configure_windows_dns_for_trust(self.ad, self.master)
|
|
|
31db7b |
@@ -838,6 +857,7 @@ class TestTrust(BaseTestTrust):
|
|
|
31db7b |
self.master, self.ad_domain, shared_secret=self.shared_secret,
|
|
|
31db7b |
extra_args=['--range-type', 'ipa-ad-trust', '--external=True'])
|
|
|
31db7b |
|
|
|
31db7b |
+ @skip_in_fips_mode_due_to_issue_8715
|
|
|
31db7b |
def test_trustdomains_found_in_external_trust_with_shared_secret(self):
|
|
|
31db7b |
result = self.master.run_command(
|
|
|
31db7b |
['ipa', 'trust-fetch-domains', self.ad.domain.name],
|
|
|
31db7b |
@@ -846,6 +866,7 @@ class TestTrust(BaseTestTrust):
|
|
|
31db7b |
self.check_trustdomains(
|
|
|
31db7b |
self.ad_domain, [self.ad_domain])
|
|
|
31db7b |
|
|
|
31db7b |
+ @skip_in_fips_mode_due_to_issue_8715
|
|
|
31db7b |
def test_user_uid_resolution_in_external_trust_with_shared_secret(self):
|
|
|
31db7b |
"""Check that user has SID-generated UID"""
|
|
|
31db7b |
# Using domain name since it is lowercased realm name for AD domains
|
|
|
31db7b |
@@ -864,6 +885,7 @@ class TestTrust(BaseTestTrust):
|
|
|
31db7b |
assert re.search(
|
|
|
31db7b |
testuser_regex, result.stdout_text), result.stdout_text
|
|
|
31db7b |
|
|
|
31db7b |
+ @skip_in_fips_mode_due_to_issue_8715
|
|
|
31db7b |
def test_remove_external_trust_with_shared_secret(self):
|
|
|
31db7b |
self.ad.run_command(
|
|
|
31db7b |
['netdom.exe', 'trust', self.master.domain.name,
|
|
|
31db7b |
--
|
|
|
31db7b |
2.29.2
|
|
|
31db7b |
|