diff --git a/CHANGELOG.md b/CHANGELOG.md index c0c29ba..4642ed6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to Guepard CLI will be documented in this file. +## Unreleased + +### Features +- **Tenet `auth`**: name one of the deployment's database users as `auth.upstream.user` and the API supplies its password, for `deploy --masked` and `tenet proxy set` alike; a standalone `tenet deploy` takes it with `--upstream-password` (or `GUEPARD_TENET_UPSTREAM_PASSWORD`) + +### Fixes +- **Masked deploy**: waits for `masked_status: ready` instead of returning as soon as a Tenet port exists +- **Tenet commands**: a proxy that is still starting (API answer 202, `status: pending`) is reported as such instead of as an error + +### Documentation +- **Tenet guide**: [behaviour changes in the next Tenet release](docs/documentation/tenet.md#behaviour-changes-in-the-next-tenet-release). Writes through a masked port are refused by default (`block_writes`), masked values change for the same salt (`seed_derivation: siphash`), rules with a column pattern (`"*phone*"`) now apply where the previous release ignored them, and `LIKE`/range filters on masked columns are refused; the guide shows how to keep the old behaviour, and why allowing writes needs `strict_masking: true`. Every sample `proxy.yaml` under `scripts/` was checked against that release and loads unchanged. + ## v0.29.10 (2026-06-08) ### Features diff --git a/docs/documentation/tenet.md b/docs/documentation/tenet.md index 1a5b08a..52b7524 100644 --- a/docs/documentation/tenet.md +++ b/docs/documentation/tenet.md @@ -108,6 +108,94 @@ This repo ships small samples under **`scripts/`**: | `scripts/sql/tenet_masking_seed.sql` | Seed table + row for demos | | `scripts/tenet-e2e-from-deploy.sh` | Scripted flow: deploy → compute → seed → tenet (`cargo run` by default; set `USE_INSTALLED_GUEPARD=1` for `guepard` on `PATH`) | +### Behaviour changes in the next Tenet release + +The next Tenet (guepard-tenet branch `feature/performance-tuning`, not yet on its `main`) reads +every `proxy.yaml` shipped under `scripts/` unchanged, but these changes affect what clients of a +masked port see. Settings go in `proxy.yaml`, pushed with `guepard tenet proxy set`. + +| Change | What a client notices | Keep the old behaviour | +|--------|-----------------------|------------------------| +| **Writes are refused** on a masked connection (`block_writes`, on by default) | `INSERT` / `UPDATE` / `DELETE` through the Tenet port fail with `UPDATE is not permitted on a masked connection while block_writes is on…`. Reads are unchanged. Writing directly to Postgres still works. | `block_writes: false` **together with `strict_masking: true`** ([see below](#allowing-writes-safely)). | +| **Masked values change** for the same salt (`seed_derivation` now defaults to `siphash`, was `xxhash64`) | Every deterministic masked value (for example a `hash` column) differs from what the previous release returned. | `seed_derivation: xxhash64`, while anything that stored old masked values is migrated. | +| **Rules with a column pattern now apply** (for example `column: "*phone*"`) | The previous release matched rule columns literally, so a pattern rule did not apply: a `phone` column under `column: "*phone*"` came back in clear. It is masked now. | None needed; this is the rule doing what it says. Check your `proxy.yaml` for patterns to see which columns start being masked. | +| **`LIKE` and range filters on a masked column are refused** (`LIKE`, regex, `SIMILAR TO`, `BETWEEN`, `<`, `>`; `refuse_unsupported_predicates`, on by default) | The query fails with `LIKE on a masked column is not permitted…`. The previous release ran these filters on the real values, so a client could learn them one guess at a time. Filter with `=`, `<>` or `IN` on a value the proxy showed instead. | `refuse_unsupported_predicates: false` answers them again, on real values, with a `NOTICE`: it reopens that leak. | + +Other additions, all opt-in (see the guepard-tenet docs on that branch): + +- **`tuning`**: developers can create and drop indexes and refresh statistics on the real database through Tenet, without seeing values. +- **`auth`**: Tenet authenticates clients itself and connects upstream with its own account. +- **`strict_masking`**: refuses any statement that would move a masked value out of its column. On by default only with `tuning` or `auth`. +- **`column_groups`**: masks related columns from one draw, so a row stays consistent. +- **Column patterns and `table: "*"`**: one rule can cover several columns. + +#### Allowing writes safely + +Never set `block_writes: false` without `strict_masking: true`. With strict masking off, a +client can copy a masked column into a column no rule covers and read the real value back: + +```sql +UPDATE customers SET notes = 'reach me: ' || email WHERE id = 4; -- accepted +SELECT notes FROM customers WHERE id = 4; -- the real email, unmasked +``` + +With `strict_masking: true` the copy is refused (`the operator || over a masked column is not +permitted`; a plain `SET notes = email` gets `'notes' would receive the value of a masked +column`). Strict masking also refuses functions and casts over masked columns +in reads (`SELECT upper(email)`), so check the application's queries before turning it on. + +```yaml +block_writes: false +strict_masking: true +``` + +The content scanner does not mask an email that sits inside free text in a column without a +rule (`call back at user1@example.com` comes through as is). Give free-text columns a rule of +their own, for example `column: notes` with `transformer: redacted`. + +The `custom-wasm` transformer is removed. Columns that used it fall back to the generic masking and log a warning. + +`table:` is not enforced: a rule masks its column in every result set, not only in the named +table. The proxy logs this as a warning at startup. + +#### Tenet's own login (`auth`) + +With `auth:`, clients sign in to Tenet with Tenet's own users, and Tenet signs in to the +database with one account of its own. Name one of the deployment's database users as that +account: the user you deployed with (`-u`, default `guepard`) or the admin (`guepard-admin`). +The API created both and already holds their passwords, so it gives Tenet the right one; you send +no password. + +```yaml +auth: + users: + - name: dev + password: "SCRAM-SHA-256$4096:..." # a verifier, as PostgreSQL stores it + upstream: + user: guepard # a database user of this deployment + password_env: TENET_UPSTREAM_PASSWORD +``` + +```bash +guepard deploy ... -u guepard -w '' --masked --proxy-config ./proxy.yaml +guepard tenet proxy set --proxy-config ./proxy.yaml # an existing masked deployment +``` + +The password never goes in `proxy.yaml`: the API refuses an inline `auth.upstream.password`, and an +`upstream.user` that is not one of the deployment's users, with 400. It keeps the password in the +proxy's Nomad Variable and hands it to Tenet as `TENET_UPSTREAM_PASSWORD`; it is not in the job +definition, its history, or `tenet proxy get`. + +Only a standalone `guepard tenet deploy`, pointed at an upstream that is not a Guepard deployment, +needs the password from you: `--upstream-password`, or `GUEPARD_TENET_UPSTREAM_PASSWORD`. + +#### When a change takes a while to apply + +`tenet deploy`, `tenet start` and `tenet proxy set` wait up to about 20 seconds for the proxy to +run. If it is still starting, they say so (`⏳ The proxy is still starting...`) instead of +failing; the change is saved and applies on its own. `guepard deploy -x ` shows +`Masked status: ready` once both Tenet and the database behind it are running. + --- ## Connecting with `psql` @@ -134,6 +222,8 @@ psql "host= port= user=guepard dbname=postgres ss | **`tenet start` 404** | Scheduler idempotency / job already running — verify Nomad alloc. | | **Hang on `psql` to EIP:tenet-port** | Security group / NACL / no DNAT to host where Tenet listens. Open same path as for Postgres host port. | | **Plaintext through Tenet** | Rules don’t match **table/column** names; wrong DB in connection string; or `masking_enabled: false`. | +| **`… is not permitted on a masked connection while block_writes is on`** | Next Tenet release: writes through the masked port are refused by default. Write directly to Postgres, or set `block_writes: false` with `strict_masking: true` ([allowing writes safely](#allowing-writes-safely)). | +| **Masked values differ after a Tenet upgrade** | Next Tenet release: `seed_derivation` defaults to `siphash`. Pin `seed_derivation: xxhash64` to keep the old values. | --- diff --git a/src/application/commands/tenet.rs b/src/application/commands/tenet.rs index 53b4797..0ee6710 100644 --- a/src/application/commands/tenet.rs +++ b/src/application/commands/tenet.rs @@ -112,6 +112,14 @@ async fn resolve_postgres_host_for_hints(upstream_host: &str) -> Option Some(picked.ip().to_string()) } +const PENDING_NOTE: &str = + "⏳ The proxy is still starting with this config; it is not accepting connections yet. Check again in a few seconds."; + +/// The API answers 202 with status "pending" when the proxy was not running yet when it stopped waiting. +fn is_pending(status: Option<&str>) -> bool { + status == Some("pending") +} + async fn deploy( d: &TenetDeployCliArgs, config: &Config, @@ -146,6 +154,7 @@ async fn deploy( config_yaml, proxy_port: d.proxy_port, api_port: d.api_port, + upstream_password: d.upstream_password.clone(), }; let resp = tenet::deploy_tenet(&body, config).await?; @@ -176,6 +185,9 @@ async fn deploy( if output_format == OutputFormat::Table { println!("{} Tenet deploy submitted", "✅".green()); + if is_pending(resp.status.as_deref()) { + println!("{}", PENDING_NOTE.yellow()); + } print_row_or_json(row, output_format); for line in tenet_deploy_hint_lines(&resp, connect_host_str) { println!("{}", line); @@ -199,6 +211,7 @@ async fn lifecycle( _ => unreachable!(), }; + let pending = is_pending(resp.status.as_deref()); let message = resp .message .unwrap_or_else(|| format!("Tenet {} completed", action)); @@ -210,6 +223,9 @@ async fn lifecycle( if output_format == OutputFormat::Table { println!("{} Tenet {}", "✅".green(), action); + if pending { + println!("{}", PENDING_NOTE.yellow()); + } print_row_or_json(row, output_format); } else { print_json(&row); @@ -265,6 +281,7 @@ async fn proxy_set( })?; let apply = s.apply.unwrap_or(true); let resp = tenet::set_proxy_yaml(&s.job_id, &yaml, apply, config).await?; + let pending = is_pending(resp.status.as_deref()); if output_format == OutputFormat::Json { print_json(&serde_json::json!({ @@ -272,7 +289,11 @@ async fn proxy_set( "apply": apply, "message": resp.message, "status": "updated", + "proxy_status": resp.status, })); + } else if pending { + println!("{} Proxy config saved (apply={})", "✅".green(), apply); + println!("{}", PENDING_NOTE.yellow()); } else { println!("{} Proxy config updated (apply={})", "✅".green(), apply); if let Some(m) = resp.message { @@ -285,6 +306,84 @@ async fn proxy_set( #[cfg(test)] mod tests { use super::*; + + fn parse_tenet_deploy(args: &[&str]) -> crate::structure::TenetDeployCliArgs { + use clap::Parser; + let cli = crate::structure::CLI::try_parse_from(args).expect("parses"); + match cli.sub_commands { + crate::structure::SubCommand::Tenet(t) => match t.command { + crate::structure::TenetCommand::Deploy(d) => d, + other => panic!("not tenet deploy: {:?}", other), + }, + other => panic!("not tenet: {:?}", other), + } + } + + #[test] + fn standalone_tenet_deploy_takes_upstream_password_from_flag_or_env() { + let base = [ + "guepard", + "tenet", + "deploy", + "--tenant-id", + "t1", + "--upstream-host", + "10.0.0.5", + "--upstream-port", + "5432", + "--masking-salt", + "s", + "--config-yaml", + "rules: []", + ]; + let from_flag = + parse_tenet_deploy(&[&base[..], &["--upstream-password", "flag-pw"]].concat()); + assert_eq!(from_flag.upstream_password.as_deref(), Some("flag-pw")); + + std::env::set_var("GUEPARD_TENET_UPSTREAM_PASSWORD", "env-pw"); + let from_env = parse_tenet_deploy(&base); + std::env::remove_var("GUEPARD_TENET_UPSTREAM_PASSWORD"); + assert_eq!(from_env.upstream_password.as_deref(), Some("env-pw")); + } + + #[test] + fn proxy_set_and_masked_deploy_take_no_upstream_password() { + use clap::Parser; + // The API supplies the deployment user's password for these two. + for args in [ + &[ + "guepard", + "tenet", + "proxy", + "set", + "job-1", + "--proxy-config", + "p.yaml", + "--upstream-password", + "x", + ][..], + &[ + "guepard", + "deploy", + "--masked", + "--proxy-config", + "p.yaml", + "--upstream-password", + "x", + ][..], + ] { + let without_flag = &args[..args.len() - 2]; + assert!(crate::structure::CLI::try_parse_from(without_flag).is_ok()); + assert!(crate::structure::CLI::try_parse_from(args).is_err()); + } + } + + #[test] + fn only_a_pending_status_is_pending() { + assert!(is_pending(Some("pending"))); + assert!(!is_pending(Some("running"))); + assert!(!is_pending(None)); + } use crate::application::dto::tenet::TenetDeployRequest; use std::fs; @@ -298,6 +397,7 @@ mod tests { host: Some("10.0.0.2".into()), proxy_port: Some(6544), api_port: Some(3010), + status: None, }; let lines = tenet_deploy_hint_lines(&resp, Some("10.0.0.2")); assert_eq!(lines.len(), 2); @@ -316,6 +416,7 @@ mod tests { host: None, proxy_port: Some(6544), api_port: None, + status: None, }; assert!(tenet_deploy_hint_lines(&resp, None).is_empty()); } @@ -330,6 +431,7 @@ mod tests { host: None, proxy_port: Some(6544), api_port: Some(3010), + status: None, }; let lines = tenet_deploy_hint_lines(&resp, Some("44.239.18.139")); assert_eq!(lines.len(), 2); @@ -347,6 +449,7 @@ mod tests { host: None, proxy_port: Some(6544), api_port: None, + status: None, }; let lines = tenet_deploy_hint_lines(&resp, Some("10.0.4.20")); assert_eq!(lines.len(), 1); @@ -386,6 +489,7 @@ mod tests { config_yaml: yaml, proxy_port: None, api_port: None, + upstream_password: None, }; let j = serde_json::to_value(&body).unwrap(); assert_eq!( diff --git a/src/application/dto/tenet.rs b/src/application/dto/tenet.rs index ad8023f..19b7e08 100644 --- a/src/application/dto/tenet.rs +++ b/src/application/dto/tenet.rs @@ -15,6 +15,8 @@ pub struct TenetDeployRequest { pub proxy_port: Option, #[serde(skip_serializing_if = "Option::is_none")] pub api_port: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub upstream_password: Option, } #[derive(Debug, Clone, Deserialize, Serialize)] @@ -29,6 +31,9 @@ pub struct TenetDeployResponse { pub proxy_port: Option, #[serde(default)] pub api_port: Option, + /// "pending" when the API answered before the proxy was running. + #[serde(default)] + pub status: Option, } #[cfg(test)] @@ -47,6 +52,7 @@ mod tests { config_yaml: "x: 1".to_string(), proxy_port: None, api_port: None, + upstream_password: None, }; let v = serde_json::to_value(&r).unwrap(); assert!(v.get("proxy_port").is_none()); @@ -54,6 +60,41 @@ mod tests { assert_eq!(v.get("tenant_id").unwrap(), "t1"); } + #[test] + fn upstream_password_is_sent_only_when_set() { + let unset = TenetDeployRequest { + tenant_id: "t1".to_string(), + compute_job_id: None, + upstream_host: "h".to_string(), + upstream_port: 5432, + masking_salt: "s".to_string(), + config_dir: None, + config_yaml: "x: 1".to_string(), + proxy_port: None, + api_port: None, + upstream_password: None, + }; + assert!(serde_json::to_value(&unset) + .unwrap() + .get("upstream_password") + .is_none()); + let set = TenetDeployRequest { + upstream_password: Some("pw".to_string()), + ..unset + }; + assert_eq!( + serde_json::to_value(&set).unwrap()["upstream_password"], + "pw" + ); + } + + #[test] + fn deploy_response_reads_a_pending_status() { + let j = r#"{"job_id":"j","eval_id":"e","alloc_id":"","node_id":"","proxy_port":31000,"status":"pending"}"#; + let r: TenetDeployResponse = serde_json::from_str(j).unwrap(); + assert_eq!(r.status.as_deref(), Some("pending")); + } + #[test] fn deploy_request_json_includes_ports_when_set() { let r = TenetDeployRequest { @@ -66,6 +107,7 @@ mod tests { config_yaml: "rules: []".to_string(), proxy_port: Some(6544), api_port: Some(3010), + upstream_password: None, }; let v = serde_json::to_value(&r).unwrap(); assert_eq!(v.get("proxy_port").and_then(|x| x.as_u64()), Some(6544)); @@ -100,4 +142,7 @@ pub struct TenetProxyYamlSetRequest { pub struct TenetLifecycleResponse { #[serde(default)] pub message: Option, + /// "pending" when the API answered before the proxy was running again. + #[serde(default)] + pub status: Option, } diff --git a/src/application/services/deploy.rs b/src/application/services/deploy.rs index 6cef9cd..e81e796 100644 --- a/src/application/services/deploy.rs +++ b/src/application/services/deploy.rs @@ -74,6 +74,25 @@ pub async fn create_deployment( create_deployment_with_deps(request, config, &auth_provider).await } +#[derive(Debug, PartialEq, Eq)] +enum MaskedProgress { + Ready, + Failed, + Pending, +} + +/// The API returns the Tenet port as soon as the proxy job runs, before the database behind it +/// is up, so only `masked_status: ready` means ready. The port alone counts only for an API that +/// sends no `masked_status` at all. +fn masked_progress(masked_status: Option<&str>, tenet_proxy_port: Option) -> MaskedProgress { + match masked_status { + Some("ready") => MaskedProgress::Ready, + Some("failed") => MaskedProgress::Failed, + None if tenet_proxy_port.is_some() => MaskedProgress::Ready, + _ => MaskedProgress::Pending, + } +} + /// Poll GET /deploy/{id} until masked Tenet is ready or failed. pub async fn poll_masked_deployment_ready( deployment_id: &str, @@ -85,12 +104,15 @@ pub async fn poll_masked_deployment_ready( loop { let dep = get_deployment(deployment_id, config).await?; - if dep.masked_status.as_deref() == Some("ready") || dep.tenet_proxy_port.is_some() { - return Ok(dep); - } - if dep.masked_status.as_deref() == Some("failed") { - let detail = dep.message.unwrap_or_else(|| "Tenet provisioning failed".to_string()); - return Err(DeployError::ApiError(detail)); + match masked_progress(dep.masked_status.as_deref(), dep.tenet_proxy_port) { + MaskedProgress::Ready => return Ok(dep), + MaskedProgress::Failed => { + let detail = dep + .message + .unwrap_or_else(|| "Tenet provisioning failed".to_string()); + return Err(DeployError::ApiError(detail)); + } + MaskedProgress::Pending => {} } if started.elapsed() > MAX_WAIT { return Err(DeployError::ApiError( @@ -314,6 +336,27 @@ pub async fn list_pending_deployments( mod tests { use super::*; + #[test] + fn masked_deployment_with_a_port_but_not_ready_keeps_waiting() { + // What GET returns while Tenet runs and the database behind it is still starting. + let progress = masked_progress(Some("provisioning"), Some(30665)); + assert_eq!(progress, MaskedProgress::Pending); + } + + #[test] + fn masked_deployment_is_ready_only_on_ready() { + let port = Some(30665); + assert_eq!(masked_progress(Some("ready"), port), MaskedProgress::Ready); + assert_eq!(masked_progress(Some("failed"), port), MaskedProgress::Failed); + assert_eq!(masked_progress(Some("starting"), None), MaskedProgress::Pending); + } + + #[test] + fn an_api_without_masked_status_falls_back_to_the_port() { + assert_eq!(masked_progress(None, Some(30665)), MaskedProgress::Ready); + assert_eq!(masked_progress(None, None), MaskedProgress::Pending); + } + #[tokio::test] async fn test_list_deployments_session_error() { let config = Config { diff --git a/src/application/services/tenet.rs b/src/application/services/tenet.rs index 7b1185e..f51f0c6 100644 --- a/src/application/services/tenet.rs +++ b/src/application/services/tenet.rs @@ -20,6 +20,27 @@ impl TenetAuthProvider for DefaultTenetAuthProvider { } } +/// 202: the API registered the change but answered before the proxy was running again. +fn is_accepted(status: StatusCode) -> bool { + status == StatusCode::OK || status == StatusCode::ACCEPTED +} + +/// The API's own reason from an error body (`{"message": ...}`), else the body as it came. +/// A Nomad failure carries the reason in `body` under `message: "Nomad error"`. +fn error_detail(body: &str) -> String { + let Ok(json) = serde_json::from_str::(body) else { + return body.to_string(); + }; + match json.get("message").and_then(|m| m.as_str()) { + Some("Nomad error") => match json.get("body").and_then(|b| b.as_str()) { + Some(reason) => format!("Nomad: {}", reason), + None => body.to_string(), + }, + Some(message) => message.to_string(), + None => body.to_string(), + } +} + async fn read_error_body(response: reqwest::Response) -> String { response .text() @@ -46,7 +67,7 @@ pub async fn deploy_tenet_with_deps( .map_err(TenetError::RequestFailed)?; match response.status() { - StatusCode::OK => response + status if is_accepted(status) => response .json::() .await .map_err(|e| TenetError::ParseError(e.to_string())), @@ -54,7 +75,8 @@ pub async fn deploy_tenet_with_deps( let text = read_error_body(response).await; Err(TenetError::Unexpected(format!( "Status {}: {}", - status, text + status, + error_detail(&text) ))) } } @@ -135,7 +157,7 @@ async fn lifecycle_post( .map_err(TenetError::RequestFailed)?; match response.status() { - StatusCode::OK => { + status if is_accepted(status) => { let text = response .text() .await @@ -147,6 +169,7 @@ async fn lifecycle_post( Ok(v) => Ok(v), Err(_) => Ok(TenetLifecycleResponse { message: Some(text), + status: None, }), } } @@ -154,7 +177,8 @@ async fn lifecycle_post( let text = read_error_body(response).await; Err(TenetError::Unexpected(format!( "Status {}: {}", - status, text + status, + error_detail(&text) ))) } } @@ -185,7 +209,8 @@ pub async fn get_proxy_yaml_with_deps( let text = read_error_body(response).await; Err(TenetError::Unexpected(format!( "Status {}: {}", - status, text + status, + error_detail(&text) ))) } } @@ -224,7 +249,7 @@ pub async fn set_proxy_yaml_with_deps( .map_err(TenetError::RequestFailed)?; match response.status() { - StatusCode::OK => { + status if is_accepted(status) => { let text = response .text() .await @@ -236,6 +261,7 @@ pub async fn set_proxy_yaml_with_deps( Ok(v) => Ok(v), Err(_) => Ok(TenetLifecycleResponse { message: Some(text), + status: None, }), } } @@ -243,7 +269,8 @@ pub async fn set_proxy_yaml_with_deps( let text = read_error_body(response).await; Err(TenetError::Unexpected(format!( "Status {}: {}", - status, text + status, + error_detail(&text) ))) } } @@ -263,6 +290,28 @@ pub async fn set_proxy_yaml( mod tests { use super::*; + #[test] + fn errors_print_the_api_reason() { + assert_eq!( + error_detail(r#"{"message":"auth.upstream.user \"stranger\" has no password"}"#), + r#"auth.upstream.user "stranger" has no password"# + ); + assert_eq!( + error_detail(r#"{"message":"Nomad error","status":502,"body":"no leader"}"#), + "Nomad: no leader" + ); + assert_eq!(error_detail("plain text"), "plain text"); + assert_eq!(error_detail(r#"{"other":1}"#), r#"{"other":1}"#); + } + + #[test] + fn a_pending_202_counts_as_success() { + assert!(is_accepted(StatusCode::OK)); + assert!(is_accepted(StatusCode::ACCEPTED)); + assert!(!is_accepted(StatusCode::BAD_GATEWAY)); + assert!(!is_accepted(StatusCode::NO_CONTENT)); + } + #[tokio::test] async fn deploy_session_error() { let config = Config { @@ -288,6 +337,7 @@ mod tests { config_yaml: "x: 1".to_string(), proxy_port: None, api_port: None, + upstream_password: None, }; let r = deploy_tenet_with_deps(&body, &config, &auth).await; assert!(matches!(r.unwrap_err(), TenetError::SessionError(_))); @@ -314,6 +364,7 @@ mod tests { config_yaml: "x".to_string(), proxy_port: None, api_port: None, + upstream_password: None, }; assert!(deploy_tenet_with_deps(&body, &config, &auth).await.is_err()); assert!(start_tenet_with_deps("job", &config, &auth).await.is_err()); diff --git a/src/structure.rs b/src/structure.rs index 73e6c8e..caf96d1 100644 --- a/src/structure.rs +++ b/src/structure.rs @@ -891,6 +891,11 @@ pub struct TenetDeployCliArgs { /// Address shown in hints / where clients connect to Tenet (VPC or node IP, e.g. 10.0.4.20), not necessarily the upstream DB host. #[arg(long)] pub client_host: Option, + /// Tenet's own database password when proxy.yaml uses auth (password_env: TENET_UPSTREAM_PASSWORD). + /// Needed here because this upstream is not a Guepard deployment whose users the API knows. + /// Stored in the proxy's Nomad Variable, never in proxy.yaml. + #[arg(long, env = "GUEPARD_TENET_UPSTREAM_PASSWORD", hide_env_values = true)] + pub upstream_password: Option, } #[derive(Args, Debug)]