fix: do not gc sso saml SP singing keys

This commit is contained in:
Zaiming (Stone) Shi 2023-09-27 23:08:26 +02:00
parent 34367fc4ec
commit 6f7a4344dc
2 changed files with 11 additions and 2 deletions

View File

@ -271,9 +271,12 @@ find_config_references(Root) ->
is_file_reference(Stack) -> is_file_reference(Stack) ->
lists:any( lists:any(
fun(KP) -> lists:prefix(lists:reverse(KP), Stack) end, fun(KP) -> lists:prefix(lists:reverse(KP), Stack) end,
emqx_tls_lib:ssl_file_conf_keypaths() conf_keypaths()
). ).
conf_keypaths() ->
emqx_tls_lib:ssl_file_conf_keypaths().
mk_fileref(AbsPath) -> mk_fileref(AbsPath) ->
case emqx_utils_fs:read_info(AbsPath) of case emqx_utils_fs:read_info(AbsPath) of
{ok, Info} -> {ok, Info} ->

View File

@ -50,11 +50,17 @@
-define(IS_FALSE(Val), ((Val =:= false) orelse (Val =:= <<"false">>))). -define(IS_FALSE(Val), ((Val =:= false) orelse (Val =:= <<"false">>))).
-define(SSL_FILE_OPT_PATHS, [ -define(SSL_FILE_OPT_PATHS, [
%% common ssl options
[<<"keyfile">>], [<<"keyfile">>],
[<<"certfile">>], [<<"certfile">>],
[<<"cacertfile">>], [<<"cacertfile">>],
[<<"ocsp">>, <<"issuer_pem">>] %% OCSP
[<<"ocsp">>, <<"issuer_pem">>],
%% SSO
[<<"sp_public_key">>],
[<<"sp_private_key">>]
]). ]).
-define(SSL_FILE_OPT_PATHS_A, [ -define(SSL_FILE_OPT_PATHS_A, [
[keyfile], [keyfile],
[certfile], [certfile],