add never_expires to remove expiration dates of admin tokens and access keys

This commit is contained in:
Alex Auvolat
2025-04-17 11:44:09 +02:00
parent 590c9bb4db
commit 5d338f0b8f
7 changed files with 61 additions and 6 deletions
+6
View File
@@ -366,6 +366,9 @@ pub struct UpdateAdminTokenRequestBody {
pub name: Option<String>,
/// Expiration time and date, formatted according to RFC 3339
pub expiration: Option<DateTime<Utc>>,
/// Set the admin token to never expire
#[serde(default)]
pub never_expires: bool,
/// Scope of the admin API token, a list of admin endpoint names (such as
/// `GetClusterStatus`, etc), or the special value `*` to allow all
/// admin endpoints. **WARNING:** Granting a scope of `CreateAdminToken` or
@@ -737,6 +740,9 @@ pub struct UpdateKeyRequestBody {
pub name: Option<String>,
/// Expiration time and date, formatted according to RFC 3339
pub expiration: Option<DateTime<Utc>>,
/// Set the access key to never expire
#[serde(default)]
pub never_expires: bool,
/// Permissions to allow for the key
pub allow: Option<KeyPerm>,
/// Permissions to deny for the key