Skip to main content

windmill_api/models/
vault_settings.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.683.2
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct VaultSettings {
16    /// HashiCorp Vault server address (e.g., https://vault.company.com:8200)
17    #[serde(rename = "address")]
18    pub address: String,
19    /// KV v2 secrets engine mount path (e.g., windmill)
20    #[serde(rename = "mount_path")]
21    pub mount_path: String,
22    /// Vault JWT auth role name for Windmill (optional, if not provided token auth is used)
23    #[serde(rename = "jwt_role", skip_serializing_if = "Option::is_none")]
24    pub jwt_role: Option<String>,
25    /// Vault Enterprise namespace (optional)
26    #[serde(rename = "namespace", skip_serializing_if = "Option::is_none")]
27    pub namespace: Option<String>,
28    /// Static Vault token for testing/development (optional, if provided this is used instead of JWT authentication)
29    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
30    pub token: Option<String>,
31    /// Skip TLS certificate verification when connecting to Vault. Only use for self-signed certificates in development environments.
32    #[serde(rename = "skip_ssl_verify", skip_serializing_if = "Option::is_none")]
33    pub skip_ssl_verify: Option<bool>,
34}
35
36impl VaultSettings {
37    pub fn new(address: String, mount_path: String) -> VaultSettings {
38        VaultSettings {
39            address,
40            mount_path,
41            jwt_role: None,
42            namespace: None,
43            token: None,
44            skip_ssl_verify: None,
45        }
46    }
47}
48