Explorar o código

fix: mark license key sensitive

so it's not logged to console when environment variable is used
Zaiming (Stone) Shi %!s(int64=4) %!d(string=hai) anos
pai
achega
4cee12614b
Modificáronse 1 ficheiros con 7 adicións e 3 borrados
  1. 7 3
      lib-ee/emqx_license/src/emqx_license_schema.erl

+ 7 - 3
lib-ee/emqx_license/src/emqx_license_schema.erl

@@ -19,9 +19,13 @@ roots() -> [{license, hoconsc:union(
                          hoconsc:ref(?MODULE, file_license)])}].
 
 fields(key_license) ->
-    [ {key, string()}
+    [ {key, #{type => string(),
+              sensitive => true, %% so it's not logged
+              desc => "Configure the license as a string"
+             }}
     ];
-
 fields(file_license) ->
-    [ {file, string()}
+    [ {file, #{type => string(),
+               desc => "Path to the license file"
+              }}
     ].