chore(ocsp): hide ocsp from schema for now

We're going to release it in a later version.  So, for now, we'll just
hide it.
This commit is contained in:
Thales Macedo Garitezi 2023-03-17 09:02:23 -03:00
parent 356be81aa4
commit 166191abd6
5 changed files with 11 additions and 13 deletions

View File

@ -29,7 +29,7 @@
{esockd, {git, "https://github.com/emqx/esockd", {tag, "5.9.4"}}}, {esockd, {git, "https://github.com/emqx/esockd", {tag, "5.9.4"}}},
{ekka, {git, "https://github.com/emqx/ekka", {tag, "0.14.5"}}}, {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.14.5"}}},
{gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "2.8.1"}}}, {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "2.8.1"}}},
{hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.37.0"}}}, {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.37.2"}}},
{emqx_http_lib, {git, "https://github.com/emqx/emqx_http_lib.git", {tag, "0.5.2"}}}, {emqx_http_lib, {git, "https://github.com/emqx/emqx_http_lib.git", {tag, "0.5.2"}}},
{pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {tag, "2.0.4"}}}, {pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {tag, "2.0.4"}}},
{recon, {git, "https://github.com/ferd/recon", {tag, "2.5.1"}}}, {recon, {git, "https://github.com/ferd/recon", {tag, "2.5.1"}}},

View File

@ -1285,6 +1285,8 @@ fields("listener_wss_opts") ->
); );
fields("listener_quic_ssl_opts") -> fields("listener_quic_ssl_opts") ->
%% Mark unsupported TLS options deprecated. %% Mark unsupported TLS options deprecated.
Schema0 = server_ssl_opts_schema(#{}, false),
Schema1 = lists:keydelete("ocsp", 1, Schema0),
lists:map( lists:map(
fun({Name, Schema}) -> fun({Name, Schema}) ->
case is_quic_ssl_opts(Name) of case is_quic_ssl_opts(Name) of
@ -1294,7 +1296,7 @@ fields("listener_quic_ssl_opts") ->
{Name, Schema#{deprecated => {since, "5.0.20"}}} {Name, Schema#{deprecated => {since, "5.0.20"}}}
end end
end, end,
server_ssl_opts_schema(#{}, false) Schema1
); );
fields("ssl_client_opts") -> fields("ssl_client_opts") ->
client_ssl_opts_schema(#{}); client_ssl_opts_schema(#{});
@ -2258,6 +2260,8 @@ server_ssl_opts_schema(Defaults, IsRanchListener) ->
ref("ocsp"), ref("ocsp"),
#{ #{
required => false, required => false,
%% TODO: remove after e5.0.2
hidden => true,
validator => fun ocsp_inner_validator/1 validator => fun ocsp_inner_validator/1
} }
)} )}

View File

@ -677,15 +677,9 @@ do_t_update_listener(Config) ->
%% no ocsp at first %% no ocsp at first
ListenerId = "ssl:default", ListenerId = "ssl:default",
{ok, {{_, 200, _}, _, ListenerData0}} = get_listener_via_api(ListenerId), {ok, {{_, 200, _}, _, ListenerData0}} = get_listener_via_api(ListenerId),
?assertMatch( ?assertEqual(
#{ undefined,
<<"ssl_options">> := emqx_map_lib:deep_get([<<"ssl_options">>, <<"ocsp">>], ListenerData0, undefined)
#{
<<"ocsp">> :=
#{<<"enable_ocsp_stapling">> := false}
}
},
ListenerData0
), ),
assert_no_http_get(), assert_no_http_get(),

View File

@ -69,7 +69,7 @@ defmodule EMQXUmbrella.MixProject do
# in conflict by emqtt and hocon # in conflict by emqtt and hocon
{:getopt, "1.0.2", override: true}, {:getopt, "1.0.2", override: true},
{:snabbkaffe, github: "kafka4beam/snabbkaffe", tag: "1.0.7", override: true}, {:snabbkaffe, github: "kafka4beam/snabbkaffe", tag: "1.0.7", override: true},
{:hocon, github: "emqx/hocon", tag: "0.37.0", override: true}, {:hocon, github: "emqx/hocon", tag: "0.37.2", override: true},
{:emqx_http_lib, github: "emqx/emqx_http_lib", tag: "0.5.2", override: true}, {:emqx_http_lib, github: "emqx/emqx_http_lib", tag: "0.5.2", override: true},
{:esasl, github: "emqx/esasl", tag: "0.2.0"}, {:esasl, github: "emqx/esasl", tag: "0.2.0"},
{:jose, github: "potatosalad/erlang-jose", tag: "1.11.2"}, {:jose, github: "potatosalad/erlang-jose", tag: "1.11.2"},

View File

@ -69,7 +69,7 @@
, {system_monitor, {git, "https://github.com/ieQu1/system_monitor", {tag, "3.0.3"}}} , {system_monitor, {git, "https://github.com/ieQu1/system_monitor", {tag, "3.0.3"}}}
, {getopt, "1.0.2"} , {getopt, "1.0.2"}
, {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {tag, "1.0.7"}}} , {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {tag, "1.0.7"}}}
, {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.37.0"}}} , {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.37.2"}}}
, {emqx_http_lib, {git, "https://github.com/emqx/emqx_http_lib.git", {tag, "0.5.2"}}} , {emqx_http_lib, {git, "https://github.com/emqx/emqx_http_lib.git", {tag, "0.5.2"}}}
, {esasl, {git, "https://github.com/emqx/esasl", {tag, "0.2.0"}}} , {esasl, {git, "https://github.com/emqx/esasl", {tag, "0.2.0"}}}
, {jose, {git, "https://github.com/potatosalad/erlang-jose", {tag, "1.11.2"}}} , {jose, {git, "https://github.com/potatosalad/erlang-jose", {tag, "1.11.2"}}}