diff --git a/libs/tip_2x/controller.py b/libs/tip_2x/controller.py index c44dd6c2ce..2709fe8723 100644 --- a/libs/tip_2x/controller.py +++ b/libs/tip_2x/controller.py @@ -2587,7 +2587,8 @@ def encryption_lookup(self, encryption="psk"): "wpa2": "eap", "wpa3": "eap", "wpa-mixed": "eap", - "wpa3-mixed": "sae" + "wpa3-mixed": "sae", + "wpa3-192": "eap" } if encryption in encryption_mapping.keys(): return encryption_mapping[encryption] diff --git a/tests/conftest.py b/tests/conftest.py index 4d7d22b4e9..df8d92243c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -250,7 +250,7 @@ def get_security_flags(): """used to get the essential markers on security and band""" # Add more classifications as we go security = ["open", "wpa", "wep", "wpa2_personal", "wpa3_personal", "wpa3_personal_mixed", - "wpa_wpa2_enterprise_mixed", "wpa2_eap", "wpa2_only_eap", + "wpa_wpa2_enterprise_mixed", "wpa2_eap", "wpa2_only_eap", "wpa3_enterprise_192", "wpa_wpa2_personal_mixed", "wpa_enterprise", "wpa2_enterprise", "wpa3_enterprise_mixed", "wpa3_enterprise", "twog", "fiveg", "sixg", "fiveg_lower", "fiveg_upper", "radius", "owe"] yield security diff --git a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_ttls.py b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_ttls.py index 5bd3c81851..1506473fa1 100644 --- a/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_ttls.py +++ b/tests/e2e/basic/validation_of_operating_modes/bridge_mode/client_connectivity/test_enterprise_ttls.py @@ -344,4 +344,136 @@ def test_wpa3_enterprise_mixed_5g(self, get_test_library, get_dut_logs_per_test_ identity=identity, num_sta=num_stations, dut_data=setup_configuration) + assert passes == "PASS", result + + + +# Wpa3-192 +setup_params_enterprise= { + "mode": "BRIDGE", + "ssid_modes": { + "wpa3_enterprise_192": [ + {"ssid_name": "OpenWifi_wpa3192_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "OpenWifi_wpa3192_5g", "appliedRadios": ["5G"]}, + {"ssid_name": "OpenWifi_wpa3192_6g", "appliedRadios": ["6G"]}], + }, + "rf": { + "2G": { + "band": "2G", + "channel": 6, + "channel-width": 20 } + , + "5G": { + "band": "5G", + "channel": 36, + "channel-width": 80 } + , + "6G": { + "band": "6G", + "channel": 33, + "channel-width": 320 } + }, + "radius": True, +} + +@allure.parent_suite("Client Connectivity Tests") +@allure.feature("Client Connectivity") +@allure.suite(suite_name="BRIDGE Mode") +@allure.sub_suite(sub_suite_name="WPA3-192 Enterprise Client Connectivity") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.ow_regression_lf +@pytest.mark.usefixtures("setup_configuration") +@pytest.mark.wpa3_enterprise_192 +class TestBridgeModeEnterpriseTTLSSuiteA(object): + """ SuiteA Enterprise Test Cases + pytest -m "client_connectivity_tests and bridge and enterprise and ttls and suiteA" + """ + @pytest.mark.sixg + @pytest.mark.twog + @allure.title("Test for wpa3-192 enterprise 6 GHz") + def test_wpa3_192_enterprise_6g(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + get_target_object, num_stations, setup_configuration, check_connectivity, radius_info): + """ + wpa3-192 enterprise 6g + pytest -m "client_connectivity_tests and bridge and ttls and wpa3_enterprise_192 and sixg" + """ + profile_data = {"ssid_name": "OpenWifi_wpa3192_6g", "appliedRadios": ["6G"]} + ssid_name = profile_data["ssid_name"] + security = "wpa3" + mode = "BRIDGE" + band = "sixg" + ttls_passwd = radius_info["password"] + eap = "TTLS" + identity = radius_info['user'] + key_mgmt = "WPA-EAP-SUITE-B-192" + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration, + ieee80211w=2, pairwise="GCMP-256", + group="GCMP-256", + key_mgmt=key_mgmt) + + assert passes == "PASS", result + + @pytest.mark.fiveg + @allure.title("Test for wpa3-192 enterprise 5 GHz") + def test_wpa3_192_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + get_target_object, num_stations, setup_configuration, check_connectivity, radius_info): + """ + wpa3-192 enterprise 5g + pytest -m "client_connectivity_tests and bridge and ttls and wpa3_enterprise_192 and fiveg" + """ + profile_data = {"ssid_name": "OpenWifi_wpa3192_5g", "appliedRadios": ["5G"]} + ssid_name = profile_data["ssid_name"] + security = "wpa3" + mode = "BRIDGE" + band = "fiveg" + ttls_passwd = radius_info["password"] + eap = "TTLS" + identity = radius_info['user'] + key_mgmt = "WPA-EAP-SUITE-B-192" + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration, + ieee80211w=2, pairwise="GCMP-256", + group="GCMP-256", + key_mgmt=key_mgmt) + + assert passes == "PASS", result + + @pytest.mark.twog + @allure.title("Test for wpa3-192 enterprise 2 GHz") + def test_wpa3_192_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + get_target_object, num_stations, setup_configuration, check_connectivity, radius_info): + """ + wpa3-192 enterprise 2g + pytest -m "client_connectivity_tests and bridge and ttls and wpa3_enterprise_192 and twog and not sixg" + """ + profile_data = {"ssid_name": "OpenWifi_wpa3192_2g", "appliedRadios": ["2G"]} + ssid_name = profile_data["ssid_name"] + security = "wpa3" + mode = "BRIDGE" + band = "twog" + ttls_passwd = radius_info["password"] + eap = "TTLS" + identity = radius_info['user'] + key_mgmt = "WPA-EAP-SUITE-B-192" + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration, + ieee80211w=2, pairwise="GCMP-256", + group="GCMP-256", + key_mgmt=key_mgmt) + assert passes == "PASS", result \ No newline at end of file diff --git a/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_ttls.py b/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_ttls.py index 041f3d6935..58896081d1 100644 --- a/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_ttls.py +++ b/tests/e2e/basic/validation_of_operating_modes/nat_mode/client_connectivity/test_enterprise_ttls.py @@ -8,7 +8,7 @@ import pytest pytestmark = [pytest.mark.client_connectivity_tests, pytest.mark.nat, pytest.mark.enterprise, pytest.mark.ttls, - pytest.mark.ucentral, pytest.mark.sanity, pytest.mark.uc_sanity, pytest.mark.ow_sanity_lf] + pytest.mark.ucentral, pytest.mark.sanity, pytest.mark.uc_sanity] setup_params_enterprise = { "mode": "NAT", @@ -27,7 +27,7 @@ "radius": True } - +@pytest.mark.ow_sanity_lf @allure.parent_suite("Client Connectivity Tests") @allure.feature("Client Connectivity") @allure.suite(suite_name="NAT Mode") @@ -221,7 +221,7 @@ def test_wpa3_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, "radius": True } - +@pytest.mark.ow_sanity_lf @allure.parent_suite("Client Connectivity Tests") @allure.feature("Client Connectivity") @allure.suite(suite_name="NAT Mode") @@ -233,7 +233,7 @@ def test_wpa3_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, scope="class" ) @pytest.mark.usefixtures("setup_configuration") -class TestNATModeEnterpriseTTLSSuiteTwo(object): +class TestNATModeEnterpriseTTLSSuiteOne(object): """ SuiteA Enterprise Test Cases pytest -m "client_connectivity_tests and nat and enterprise and ttls and suiteB" """ @@ -365,6 +365,7 @@ def test_wpa3_enterprise_mixed_5g(self, get_test_library, get_dut_logs_per_test_ }, "radius": True } +@pytest.mark.ow_sanity_lf @allure.parent_suite("Client Connectivity Tests") @allure.feature("Client Connectivity") @allure.suite(suite_name="NAT Mode") @@ -378,9 +379,9 @@ def test_wpa3_enterprise_mixed_5g(self, get_test_library, get_dut_logs_per_test_ @pytest.mark.usefixtures("setup_configuration") @pytest.mark.wpa3_enterprise @pytest.mark.twog -class TestNATModeEnterpriseTTLSSuiteC(object): +class TestNATModeEnterpriseTTLSSuiteTwo(object): """ SuiteC Enterprise Test Cases - pytest -m "client_connectivity_tests and nat and enterprise and ttls and suiteC" + pytest -m "client_connectivity_tests and nat and enterprise and ttls and suiteB" """ @pytest.mark.wpa3_enterprise @@ -410,3 +411,133 @@ def test_wpa3_enterprise_6g(self, get_test_library, get_dut_logs_per_test_case, key_mgmt="WPA-EAP-SHA256") assert passes == "PASS", result + +# Wpa3-192 +setup_params_enterprise= { + "mode": "NAT", + "ssid_modes": { + "wpa3_enterprise_192": [ + {"ssid_name": "OpenWifi_wpa3192_2g", "appliedRadios": ["2G"]}, + {"ssid_name": "OpenWifi_wpa3192_5g", "appliedRadios": ["5G"]}, + {"ssid_name": "OpenWifi_wpa3192_6g", "appliedRadios": ["6G"]}], + }, + "rf": { + "2G": { + "band": "2G", + "channel": 6, + "channel-width": 20 } + , + "5G": { + "band": "5G", + "channel": 36, + "channel-width": 80 } + , + "6G": { + "band": "6G", + "channel": 33, + "channel-width": 320 } + }, + "radius": True, +} + +@pytest.mark.ow_regression_lf +@allure.parent_suite("Client Connectivity Tests") +@allure.feature("Client Connectivity") +@allure.suite(suite_name="NAT Mode") +@allure.sub_suite(sub_suite_name="WPA3-192 Enterprise Client Connectivity") +@pytest.mark.parametrize( + 'setup_configuration', + [setup_params_enterprise], + indirect=True, + scope="class" +) +@pytest.mark.usefixtures("setup_configuration") +@pytest.mark.wpa3_enterprise_192 +class TestNATModeEnterpriseTTLSSuiteC(object): + """ SuiteA Enterprise Test Cases + pytest -m "client_connectivity_tests and nat and enterprise and ttls and suiteA" + """ + @pytest.mark.sixg + @pytest.mark.twog + @allure.title("Test for wpa3-192 enterprise 6 GHz") + def test_wpa3_192_enterprise_6g(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + get_target_object, num_stations, setup_configuration, check_connectivity, radius_info): + """ + wpa3 enterprise 6g + pytest -m "client_connectivity_tests and nat and ttls and wpa3_enterprise_192 and sixg" + """ + profile_data = {"ssid_name": "OpenWifi_wpa3192_6g", "appliedRadios": ["6G"]} + ssid_name = profile_data["ssid_name"] + security = "wpa3" + mode = "NAT-WAN" + band = "sixg" + ttls_passwd = radius_info["password"] + eap = "TTLS" + identity = radius_info['user'] + key_mgmt = "WPA-EAP-SUITE-B-192" + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration, + ieee80211w=2, pairwise="GCMP-256", + group="GCMP-256", + key_mgmt=key_mgmt) + + assert passes == "PASS", result + + @pytest.mark.fiveg + @allure.title("Test for wpa3-192 enterprise 5 GHz") + def test_wpa3_192_enterprise_5g(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + get_target_object, num_stations, setup_configuration, check_connectivity, radius_info): + """ + wpa3 enterprise 5g + pytest -m "client_connectivity_tests and nat and ttls and wpa3_enterprise_192 and fiveg" + """ + profile_data = {"ssid_name": "OpenWifi_wpa3192_5g", "appliedRadios": ["5G"]} + ssid_name = profile_data["ssid_name"] + security = "wpa3" + mode = "NAT-WAN" + band = "fiveg" + ttls_passwd = radius_info["password"] + eap = "TTLS" + identity = radius_info['user'] + key_mgmt = "WPA-EAP-SUITE-B-192" + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration, + ieee80211w=2, pairwise="GCMP-256", + group="GCMP-256", + key_mgmt=key_mgmt) + + assert passes == "PASS", result + + @pytest.mark.twog + @allure.title("Test for wpa3-192 enterprise 2 GHz") + def test_wpa3_192_enterprise_2g(self, get_test_library, get_dut_logs_per_test_case, get_test_device_logs, + get_target_object, num_stations, setup_configuration, check_connectivity, radius_info): + """ + wpa3 enterprise 2g + pytest -m "client_connectivity_tests and nat and ttls and wpa3_enterprise_192 and twog and not sixg" + """ + profile_data = {"ssid_name": "OpenWifi_wpa3192_2g", "appliedRadios": ["2G"]} + ssid_name = profile_data["ssid_name"] + security = "wpa3" + mode = "NAT-WAN" + band = "twog" + ttls_passwd = radius_info["password"] + eap = "TTLS" + identity = radius_info['user'] + key_mgmt = "WPA-EAP-SUITE-B-192" + passes, result = get_test_library.enterprise_client_connectivity_test(ssid=ssid_name, security=security, + mode=mode, band=band, eap=eap, + ttls_passwd=ttls_passwd, + identity=identity, num_sta=num_stations, + dut_data=setup_configuration, + ieee80211w=2, pairwise="GCMP-256", + group="GCMP-256", + key_mgmt=key_mgmt) + + assert passes == "PASS", result \ No newline at end of file