Harden auth/vault path sanitization and clean WeKnora docs
This commit is contained in:
@@ -48,7 +48,7 @@ use std::sync::atomic::{AtomicU64, Ordering};
|
||||
static TOOL_BLOCK_COUNTER: AtomicU64 = AtomicU64::new(1);
|
||||
static MINDMAP_UID_COUNTER: AtomicU64 = AtomicU64::new(1);
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
#[derive(Clone, PartialEq, Eq)]
|
||||
pub struct BridgeContext {
|
||||
pub deployment_id: Option<String>,
|
||||
pub project_id: Option<String>,
|
||||
@@ -67,6 +67,31 @@ pub struct BridgeContext {
|
||||
pub dry_run: bool,
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for BridgeContext {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("BridgeContext")
|
||||
.field("deployment_id", &self.deployment_id)
|
||||
.field("project_id", &self.project_id)
|
||||
.field("request_id", &self.request_id)
|
||||
.field("trace_id", &self.trace_id)
|
||||
.field("actor_type", &self.actor_type)
|
||||
.field("actor_id", &self.actor_id)
|
||||
.field("session_id", &self.session_id)
|
||||
.field("workspace_id", &self.workspace_id)
|
||||
.field("tenant_id", &self.tenant_id)
|
||||
.field(
|
||||
"auth_token",
|
||||
&self.auth_token.as_ref().map(|_| "<redacted>"),
|
||||
)
|
||||
.field("source_channel", &self.source_channel)
|
||||
.field("source_client", &self.source_client)
|
||||
.field("idempotency_key", &self.idempotency_key)
|
||||
.field("validate_only", &self.validate_only)
|
||||
.field("dry_run", &self.dry_run)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum BridgeErrorKind {
|
||||
Validation,
|
||||
@@ -271,7 +296,7 @@ pub enum RuntimeInput {
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[derive(Clone, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct RuntimeBridgeContextWire {
|
||||
pub deployment_id: Option<String>,
|
||||
@@ -288,6 +313,28 @@ pub struct RuntimeBridgeContextWire {
|
||||
pub dry_run: bool,
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for RuntimeBridgeContextWire {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("RuntimeBridgeContextWire")
|
||||
.field("deployment_id", &self.deployment_id)
|
||||
.field("project_id", &self.project_id)
|
||||
.field("workspace_id", &self.workspace_id)
|
||||
.field("request_id", &self.request_id)
|
||||
.field("trace_id", &self.trace_id)
|
||||
.field("actor", &self.actor)
|
||||
.field("source", &self.source)
|
||||
.field("tenant_id", &self.tenant_id)
|
||||
.field(
|
||||
"auth_token",
|
||||
&self.auth_token.as_ref().map(|_| "<redacted>"),
|
||||
)
|
||||
.field("idempotency_key", &self.idempotency_key)
|
||||
.field("validate_only", &self.validate_only)
|
||||
.field("dry_run", &self.dry_run)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct RuntimeActorWire {
|
||||
|
||||
Reference in New Issue
Block a user