diff --git a/cli/src/torii/routing.rs b/cli/src/torii/routing.rs index b8fdec1ad7d..8e846d70986 100644 --- a/cli/src/torii/routing.rs +++ b/cli/src/torii/routing.rs @@ -19,6 +19,7 @@ use iroha_core::{ }; use iroha_crypto::SignatureOf; use iroha_data_model::{ + config::Configuration as PublicConfiguration, predicate::PredicateBox, prelude::*, query::{self, SignedQueryRequest}, @@ -189,7 +190,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/config/src/lib.rs b/config/src/lib.rs index 9dfb62f9a86..76b6fa6f1d4 100644 --- a/config/src/lib.rs +++ b/config/src/lib.rs @@ -69,7 +69,7 @@ pub mod derive { /// ## Container attributes /// /// ### `#[view(ViewType)]` - /// Sets container type view type. + /// Sets container view type. /// /// ## Field attributes /// ### `#[view(ignore)]` 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, } }