diff options
author | Michal Kuratczyk <mkuratczyk@vmware.com> | 2021-11-18 12:58:57 +0100 |
---|---|---|
committer | mergify-bot <noreply@mergify.io> | 2021-11-18 12:14:46 +0000 |
commit | 868ac53a4269b603ebcaf638fad6cbd2849543f3 (patch) | |
tree | 75d6bcf31b815bf486360ee45725c6dd29fb677b | |
parent | 0a3fef450dc88b860f415379e694090b9c49c606 (diff) | |
download | rabbitmq-server-git-868ac53a4269b603ebcaf638fad6cbd2849543f3.tar.gz |
Fix cuttlefish config for oauth2
The structure of the signing_keys map should be `<<"id">> => {pem, <<"key">>}`.
Previously it was mapped directly as `<<"id">> => <<"key">>`.
(cherry picked from commit acf474e0566eb6baf8328e9a9e2abb3ec3fc0890)
(cherry picked from commit ce147ade423e7cdded61751c0b277de88fec2c87)
2 files changed, 4 insertions, 4 deletions
diff --git a/deps/rabbitmq_auth_backend_oauth2/priv/schema/rabbitmq_auth_backend_oauth2.schema b/deps/rabbitmq_auth_backend_oauth2/priv/schema/rabbitmq_auth_backend_oauth2.schema index 010604647d..0feb73d9aa 100644 --- a/deps/rabbitmq_auth_backend_oauth2/priv/schema/rabbitmq_auth_backend_oauth2.schema +++ b/deps/rabbitmq_auth_backend_oauth2/priv/schema/rabbitmq_auth_backend_oauth2.schema @@ -49,7 +49,7 @@ %% A map of signing keys %% -%% {signing_keys, #{<<"id1">> => <<"value1">>,<<"id2">> => <<"value2">>}} +%% {signing_keys, #{<<"id1">> => {pem, <<"value1">>}, <<"id2">> => {pem, <<"value2">>}}} %% validator doesn't work {mapping, @@ -73,7 +73,7 @@ end, SigningKeys = lists:map(fun({Id, Path}) -> - {list_to_binary(lists:last(Id)), TryReadingFileFun(Path)} + {list_to_binary(lists:last(Id)), {pem, TryReadingFileFun(Path)}} end, Settings), maps:from_list(SigningKeys) end}. diff --git a/deps/rabbitmq_auth_backend_oauth2/test/config_schema_SUITE_data/rabbitmq_auth_backend_oauth2.snippets b/deps/rabbitmq_auth_backend_oauth2/test/config_schema_SUITE_data/rabbitmq_auth_backend_oauth2.snippets index a6d3d24a0f..2b7018fdd8 100644 --- a/deps/rabbitmq_auth_backend_oauth2/test/config_schema_SUITE_data/rabbitmq_auth_backend_oauth2.snippets +++ b/deps/rabbitmq_auth_backend_oauth2/test/config_schema_SUITE_data/rabbitmq_auth_backend_oauth2.snippets @@ -13,8 +13,8 @@ {default_key, <<"id1">>}, {signing_keys, #{ - <<"id1">> => <<"I'm not a certificate">>, - <<"id2">> => <<"I'm not a certificate">> + <<"id1">> => {pem, <<"I'm not a certificate">>}, + <<"id2">> => {pem, <<"I'm not a certificate">>} } } ] |