Skip to content

Commit 681c72f

Browse files
committed
MB-47768: Make clusterEncryptionLevel available on pools/default
Change-Id: I139de1ba99acf1f4971dfbcde53bcb8d2ad0530d Reviewed-on: http://review.couchbase.org/c/ns_server/+/158833 Well-Formed: Build Bot <[email protected]> Tested-by: Build Bot <[email protected]> Reviewed-by: Raluca Lupu <[email protected]> Reviewed-by: Steve Watanabe <[email protected]>
1 parent 9d66f7c commit 681c72f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/menelaus_web_pools.erl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ do_build_pool_info(Id, InfoLevel, Stability, LocalAddr) ->
233233
<<"/pools/default/serverGroups?v=",
234234
(list_to_binary(integer_to_list(GroupsV)))/binary>>},
235235
{clusterName, list_to_binary(get_cluster_name())},
236+
{clusterEncryptionLevel, misc:get_cluster_encryption_level(Config)},
236237
{balanced, ns_cluster_membership:is_balanced()},
237238
build_check_permissions_uri(InfoLevel, Id, Snapshot),
238239
menelaus_web_node:build_memory_quota_info(Config),

src/misc.erl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1521,13 +1521,17 @@ is_cluster_encryption_fully_disabled() ->
15211521

15221522
-spec get_cluster_encryption_level() -> none | control | all | strict.
15231523
get_cluster_encryption_level() ->
1524+
get_cluster_encryption_level(ns_config:latest()).
1525+
1526+
-spec get_cluster_encryption_level(term()) -> none | control | all | strict.
1527+
get_cluster_encryption_level(Config) ->
15241528
Default = case is_cluster_encryption_fully_enabled() of
15251529
true ->
15261530
control;
15271531
false ->
15281532
none
15291533
end,
1530-
ns_config:search(ns_config:latest(), cluster_encryption_level, Default).
1534+
ns_config:search(Config, cluster_encryption_level, Default).
15311535

15321536
-spec should_cluster_data_be_encrypted() -> true | false.
15331537
should_cluster_data_be_encrypted() ->

0 commit comments

Comments
 (0)