diff --git a/cli/src/torii/routing.rs b/cli/src/torii/routing.rs index 89f33aed4ec..e65de41f691 100644 --- a/cli/src/torii/routing.rs +++ b/cli/src/torii/routing.rs @@ -22,6 +22,7 @@ use iroha_core::{ }; use iroha_crypto::SignatureOf; use iroha_data_model::{ + config::Configuration as PublicConfiguration, predicate::PredicateBox, prelude::*, query::{self, SignedQueryRequest}, @@ -192,7 +193,9 @@ async fn handle_get_configuration( .wrap_err("Failed to get docs {:?field}") .and_then(|doc| serde_json::to_value(doc).wrap_err("Failed to serialize docs")) } - Value => serde_json::to_value(iroha_cfg).wrap_err("Failed to serialize value"), + // Cast to public configuration to hide private keys. + Value => serde_json::to_value(PublicConfiguration::from(iroha_cfg)) + .wrap_err("Failed to serialize value"), } .map(|v| reply::json(&v)) .map_err(Error::Config) diff --git a/data_model/src/config.rs b/data_model/src/config.rs index da54cb7c596..622e7f0c50a 100644 --- a/data_model/src/config.rs +++ b/data_model/src/config.rs @@ -236,7 +236,7 @@ pub mod genesis { /// Module for wsv-related configuration and structs. pub mod wsv { use super::*; - use crate::metadata::Limits as MetadataLimits; + use crate::{metadata::Limits as MetadataLimits, LengthLimits}; /// `WorldStateView` configuration. #[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize)] @@ -251,8 +251,8 @@ pub mod wsv { /// [`MetadataLimits`] of any domain's metadata. pub domain_metadata_limits: MetadataLimits, /// [`LengthLimits`] for the number of chars in identifiers that can be stored in the WSV. - pub ident_length_limits: crate::LengthLimits, - /// [`WASM Runtime`](wasm::Runtime) configuration + pub ident_length_limits: LengthLimits, + /// WASM Runtime configuration pub wasm_runtime_config: wasm::Configuration, } }