fix: harden streaming transport and ownership checks
This commit is contained in:
@@ -2246,10 +2246,18 @@ impl AdminService {
|
||||
let created_at = now_string().map_err(|error| RuntimeError::SecretCrypto {
|
||||
details: error.to_string(),
|
||||
})?;
|
||||
let expires_at =
|
||||
add_millis(&created_at, 300_000).map_err(|error| RuntimeError::SecretCrypto {
|
||||
details: error.to_string(),
|
||||
})?;
|
||||
let streaming = runtime.execution_config.streaming.as_ref().ok_or_else(|| {
|
||||
RuntimeError::MissingStreamingConfig {
|
||||
operation_id: runtime.operation_id.as_str().to_owned(),
|
||||
}
|
||||
})?;
|
||||
let expires_at = add_millis(
|
||||
&created_at,
|
||||
streaming.max_session_lifetime_ms.unwrap_or(300_000),
|
||||
)
|
||||
.map_err(|error| RuntimeError::SecretCrypto {
|
||||
details: error.to_string(),
|
||||
})?;
|
||||
let job = AsyncJobHandle {
|
||||
id: crank_core::AsyncJobId::new(new_prefixed_id("job")),
|
||||
workspace_id: workspace_id.clone(),
|
||||
|
||||
Reference in New Issue
Block a user