diff --git a/src/auth/src/user_provider.rs b/src/auth/src/user_provider.rs index e27c2a28a9..03ec034f3a 100644 --- a/src/auth/src/user_provider.rs +++ b/src/auth/src/user_provider.rs @@ -65,7 +65,7 @@ fn load_credential_from_file(filepath: &str) -> Result>> ensure!( path.exists() && path.is_file(), InvalidConfigSnafu { - value: filepath.to_string(), + value: filepath, msg: "UserProvider file must be a valid file path", } ); @@ -86,7 +86,7 @@ fn load_credential_from_file(filepath: &str) -> Result>> ensure!( !credential.is_empty(), InvalidConfigSnafu { - value: filepath.to_string(), + value: filepath, msg: "UserProvider's file must contains at least one valid credential", } ); diff --git a/src/auth/src/user_provider/watch_file_user_provider.rs b/src/auth/src/user_provider/watch_file_user_provider.rs index 6e67603597..d268cb51b6 100644 --- a/src/auth/src/user_provider/watch_file_user_provider.rs +++ b/src/auth/src/user_provider/watch_file_user_provider.rs @@ -30,6 +30,7 @@ use crate::{Identity, Password, UserInfoRef, UserProvider}; pub(crate) const WATCH_FILE_USER_PROVIDER: &str = "watch_file_user_provider"; +/// A user provider that reads user credential from a file and watches the file for changes. pub(crate) struct WatchFileUserProvider { users: Arc>>>, }