diff --git a/meilisearch-auth/Cargo.toml b/meilisearch-auth/Cargo.toml
index dafeeef05..29fa78a14 100644
--- a/meilisearch-auth/Cargo.toml
+++ b/meilisearch-auth/Cargo.toml
@@ -4,6 +4,7 @@ version = "0.27.1"
edition = "2021"
[dependencies]
+base64 = "0.13.0"
enum-iterator = "0.7.0"
meilisearch-error = { path = "../meilisearch-error" }
milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.28.0" }
@@ -11,7 +12,6 @@ rand = "0.8.4"
serde = { version = "1.0.136", features = ["derive"] }
serde_json = { version = "1.0.79", features = ["preserve_order"] }
sha2 = "0.10.2"
-base64 = "0.13.0"
thiserror = "1.0.30"
time = { version = "0.3.7", features = ["serde-well-known", "formatting", "parsing", "macros"] }
uuid = { version = "0.8.2", features = ["serde", "v4"] }
diff --git a/meilisearch-auth/src/key.rs b/meilisearch-auth/src/key.rs
index f6ff7096c..0e336a7db 100644
--- a/meilisearch-auth/src/key.rs
+++ b/meilisearch-auth/src/key.rs
@@ -133,7 +133,7 @@ impl Key {
let uid = Uuid::new_v4();
Self {
name: Some("Default Admin API Key".to_string()),
- description: Some("Use it for all other than search operations. Caution! Do not expose it on a public frontend".to_string()),
+ description: Some("Use it for anything that is not a search operation. Caution! Do not expose it on a public frontend".to_string()),
uid,
actions: vec![Action::All],
indexes: vec!["*".to_string()],
diff --git a/meilisearch-auth/src/lib.rs b/meilisearch-auth/src/lib.rs
index 578093abf..e41fd92f4 100644
--- a/meilisearch-auth/src/lib.rs
+++ b/meilisearch-auth/src/lib.rs
@@ -4,20 +4,19 @@ pub mod error;
mod key;
mod store;
-use crate::store::generate_key;
use std::collections::{HashMap, HashSet};
use std::path::Path;
-
use std::sync::Arc;
-use uuid::Uuid;
use serde::{Deserialize, Serialize};
use serde_json::Value;
use time::OffsetDateTime;
+use uuid::Uuid;
pub use action::{actions, Action};
use error::{AuthControllerError, Result};
pub use key::Key;
+use store::generate_key_as_base64;
pub use store::open_auth_store_env;
use store::HeedAuthStore;
@@ -63,16 +62,18 @@ impl AuthController {
.ok_or_else(|| AuthControllerError::ApiKeyNotFound(uid.to_string()))
}
- pub fn get_optional_uid_from_sha(&self, sha: &[u8]) -> Result