Skip to content

Commit

Permalink
Remove fast_tls from big_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonVides committed Jan 9, 2025
1 parent 1af3144 commit 98bc2d6
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 56 deletions.
11 changes: 2 additions & 9 deletions big_tests/tests/connect_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ all() ->
{group, incorrect_behaviors},
{group, proxy_protocol},
%% these groups must be last, as they really... complicate configuration
{group, fast_tls},
{group, just_tls}
].

Expand All @@ -77,7 +76,6 @@ groups() ->
{verify_peer, [], [verify_peer_disconnects_when_client_has_no_cert,
verify_peer_ignores_when_client_has_no_cert]},
{just_tls, [{group, verify_peer} | tls_groups()]},
{fast_tls, tls_groups()},
{session_replacement, [], [same_resource_replaces_session,
clean_close_of_replaced_session,
replaced_session_cannot_terminate,
Expand Down Expand Up @@ -119,7 +117,7 @@ cipher_test_cases() ->
clients_can_connect_with_advertised_ciphers,
% String cipher
'clients_can_connect_with_ECDHE-RSA-AES256-GCM-SHA384',
%% MIM2 accepts ECDHE-RSA-AES256-GCM-SHA384 exclusively with fast_tls on alternative port
%% MIM2 accepts ECDHE-RSA-AES256-GCM-SHA384 exclusively on alternative port
%% MIM3 accepts #{cipher => aes_256_gcm, key_exchange => ecdhe_rsa, mac => aead, prf => sha384}
%% exclusively with just_tls on alternative port
'clients_can_connect_with_ECDHE-RSA-AES256-GCM-SHA384_only'
Expand Down Expand Up @@ -171,8 +169,6 @@ init_per_group(tls, Config) ->
[{c2s_port, ct:get_config({hosts, mim, c2s_port})} | Config2];
init_per_group(just_tls, Config)->
[{tls_module, just_tls} | Config];
init_per_group(fast_tls, Config)->
[{tls_module, fast_tls} | Config];
init_per_group(proxy_protocol, Config) ->
configure_c2s_listener(Config, #{proxy_protocol => true}),
Config;
Expand Down Expand Up @@ -371,10 +367,7 @@ clients_can_connect_with_advertised_ciphers(Config) ->
ciphers_working_with_ssl_clients(Config))).

'clients_can_connect_with_ECDHE-RSA-AES256-GCM-SHA384_only'(Config) ->
Port = case ?config(tls_module, Config) of
just_tls -> ct:get_config({hosts, mim3, c2s_tls_port});
fast_tls -> ct:get_config({hosts, mim2, c2s_tls_port})
end,
Port = ct:get_config({hosts, mim3, c2s_tls_port}),
Config1 = [{c2s_port, Port} | Config],
CiphersStr = os:cmd("openssl ciphers 'ECDHE-RSA-AES256-GCM-SHA384'"),
ct:pal("Available cipher suites for : ~s", [CiphersStr]),
Expand Down
2 changes: 1 addition & 1 deletion big_tests/tests/mod_global_distrib_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ set_opts(defaults, Opts) ->
set_opts(connections, #{connections := ConnExtra} = Opts) ->
TLSOpts = config([modules, mod_global_distrib, connections, tls],
#{certfile => "priv/ssl/fake_server.pem",
cacertfile => "priv/ssl/ca/cacert.pem"}),
cacertfile => "priv/ssl/cacert.pem"}),
Opts#{connections := config([modules, mod_global_distrib, connections],
maps:merge(#{tls => TLSOpts}, ConnExtra))};
set_opts(redis, #{redis := RedisExtra} = Opts) ->
Expand Down
18 changes: 2 additions & 16 deletions big_tests/tests/sasl_external_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

all() ->
[
{group, fast_tls},
{group, just_tls}].

groups() ->
Expand All @@ -25,7 +24,6 @@ groups() ->
{self_signed_certs_not_allowed, [parallel], self_signed_certs_not_allowed_test_cases()},
{ca_signed, [self_signed_certs_not_allowed_group() | base_groups()]},
{self_signed, [self_signed_certs_allowed_group() | base_groups()]},
{fast_tls, [{group, ca_signed}]},
{just_tls, all_groups()} ].

all_groups() ->
Expand Down Expand Up @@ -101,10 +99,6 @@ end_per_suite(Config) ->
ejabberd_node_utils:restart_application(mongooseim),
escalus:end_per_suite(Config).

init_per_group(just_tls, Config) ->
[{tls_module, just_tls} | Config];
init_per_group(fast_tls, Config) ->
[{tls_module, fast_tls} | Config];
init_per_group(ca_signed, Config) ->
[{signed, ca},
{ssl_options, "\n tls.disconnect_on_failure = false"},
Expand Down Expand Up @@ -144,21 +138,13 @@ init_per_group(_, Config) ->
Config.

modify_config_and_restart(CyrsaslExternalConfig, Config) ->
TLSModule = atom_to_list(escalus_config:get_config(tls_module, Config, just_tls)),
VerifyMode = escalus_config:get_config(verify_mode, Config, ""),
SSLOpts = case TLSModule of
"just_tls" -> escalus_config:get_config(ssl_options, Config, "") ++ VerifyMode;
"fast_tls" -> ""
end,
SSLOpts = escalus_config:get_config(ssl_options, Config, "") ++ VerifyMode,
AuthMethods = escalus_config:get_config(auth_methods, Config,
[{auth_method, "pki"}, {auth_method_opts, false}]),
CACertFile = filename:join([path_helper:repo_dir(Config),
"tools", "ssl", "ca-clients", "cacert.pem"]),
NewConfigValues = [{tls_config, "tls.module = \"" ++ TLSModule ++ "\"\n"
" tls.certfile = \"priv/ssl/fake_server.pem\"\n"
" tls.cacertfile = \"" ++ CACertFile ++ "\""
++ SSLOpts},
{s2s_tls_config, "tls.certfile = \"priv/ssl/fake_server.pem\"\n"
NewConfigValues = [{tls_config, "tls.certfile = \"priv/ssl/fake_server.pem\"\n"
" tls.cacertfile = \"" ++ CACertFile ++ "\""
++ SSLOpts},
{https_config, "tls.certfile = \"priv/ssl/fake_cert.pem\"\n"
Expand Down
5 changes: 0 additions & 5 deletions rel/fed1.vars-toml.config
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@
tls.mode = \"starttls\"
tls.ciphers = \"ECDHE-RSA-AES256-GCM-SHA384\""}.

{s2s_tls_config, "tls.verify_mode = \"none\"
tls.certfile = \"priv/ssl/fake_server.pem\"
tls.mode = \"starttls\"
tls.ciphers = \"ECDHE-RSA-AES256-GCM-SHA384\""}.

{instrumentation, "[instrumentation.exometer]

[instrumentation.prometheus]
Expand Down
6 changes: 3 additions & 3 deletions rel/files/mongooseim.toml
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@
port = {{{incoming_s2s_port}}}
shaper = "s2s_shaper"
max_stanza_size = 131072
{{#s2s_tls_config}}
{{{s2s_tls_config}}}
{{/s2s_tls_config}}
{{#tls_config}}
{{{tls_config}}}
{{/tls_config}}
{{#s2s_dhfile}}
tls.dhfile = {{{s2s_dhfile}}}
{{/s2s_dhfile}}
Expand Down
5 changes: 2 additions & 3 deletions rel/mim1.vars-toml.config
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@
{tls_config, "tls.verify_mode = \"none\"
tls.certfile = \"priv/ssl/fake_server.pem\""}.

{s2s_tls_config, "tls.verify_mode = \"none\"
tls.certfile = \"priv/ssl/fake_server.pem\""}.

{secondary_c2s,
"[[listen.c2s]]
port = {{ c2s_tls_port }}
Expand All @@ -74,7 +71,9 @@
max_stanza_size = 65536
tls.certfile = \"priv/ssl/fake_server.pem\"
tls.cacertfile = \"priv/ssl/cacert.pem\"
tls.verify_mode = \"none\"
tls.mode = \"tls\""}.

{listen_component,
"[[listen.component]]
port = {{ component_port }}
Expand Down
5 changes: 0 additions & 5 deletions rel/mim2.vars-toml.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
tls.mode = \"starttls\"
tls.ciphers = \"ECDHE-RSA-AES256-GCM-SHA384\""}.

{s2s_tls_config, "tls.verify_mode = \"none\"
tls.certfile = \"priv/ssl/fake_server.pem\"
tls.mode = \"starttls\"
tls.ciphers = \"ECDHE-RSA-AES256-GCM-SHA384\""}.

{secondary_c2s,
"[[listen.c2s]]
port = {{ c2s_tls_port }}
Expand Down
6 changes: 0 additions & 6 deletions rel/mim3.vars-toml.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@
tls.mode = \"starttls\"
tls.ciphers = \"ECDHE-RSA-AES256-GCM-SHA384\""}.

{s2s_tls_config, "tls.verify_mode = \"none\"
tls.certfile = \"priv/ssl/fake_server.pem\"
tls.mode = \"starttls\"
tls.ciphers = \"ECDHE-RSA-AES256-GCM-SHA384\""}.

{instrumentation, "[instrumentation.exometer]

[instrumentation.prometheus]
Expand All @@ -55,7 +50,6 @@
tls.cacertfile = \"priv/ssl/cacert.pem\"
tls.certfile = \"priv/ssl/fake_server.pem\"
tls.mode = \"tls\"
tls.module = \"just_tls\"
tls.ciphers = \"ECDHE-RSA-AES256-GCM-SHA384\""}.

{c2s_dhfile, "\"priv/ssl/fake_dh_server.pem\""}.
Expand Down
3 changes: 0 additions & 3 deletions rel/prod.vars-toml.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
{tls_config, "tls.verify_mode = \"none\"
tls.certfile = \"priv/ssl/fake_server.pem\""}.

{s2s_tls_config, "tls.verify_mode = \"none\"
tls.certfile = \"priv/ssl/fake_server.pem\""}.

{instrumentation, "[instrumentation.prometheus]

[instrumentation.log]"}.
Expand Down
5 changes: 0 additions & 5 deletions rel/reg1.vars-toml.config
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@
tls.mode = \"starttls\"
tls.ciphers = \"ECDHE-RSA-AES256-GCM-SHA384\""}.

{s2s_tls_config, "tls.verify_mode = \"none\"
tls.certfile = \"priv/ssl/fake_server.pem\"
tls.mode = \"starttls\"
tls.ciphers = \"ECDHE-RSA-AES256-GCM-SHA384\""}.

{instrumentation, "[instrumentation.exometer]

[instrumentation.prometheus]
Expand Down

0 comments on commit 98bc2d6

Please sign in to comment.