From 876bcee7910b1482e7c97af1dc74d428d62815d2 Mon Sep 17 00:00:00 2001 From: Dennis Zhuang Date: Tue, 30 Apr 2024 09:21:11 +0800 Subject: [PATCH] fix: move cluster_info to greptime catalog --- src/catalog/src/information_schema.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/catalog/src/information_schema.rs b/src/catalog/src/information_schema.rs index e482a16e77de..5a812ff6c1ea 100644 --- a/src/catalog/src/information_schema.rs +++ b/src/catalog/src/information_schema.rs @@ -153,6 +153,7 @@ impl InformationSchemaProvider { fn build_tables(&mut self) { let mut tables = HashMap::new(); + // SECURITY NOTE: // Carefully consider the tables that may expose sensitive cluster configurations, // authentication details, and other critical information. // Only put these tables under `greptime` catalog to prevent info leak. @@ -169,6 +170,10 @@ impl InformationSchemaProvider { REGION_PEERS.to_string(), self.build_table(REGION_PEERS).unwrap(), ); + tables.insert( + CLUSTER_INFO.to_string(), + self.build_table(CLUSTER_INFO).unwrap(), + ); } tables.insert(TABLES.to_string(), self.build_table(TABLES).unwrap()); @@ -182,10 +187,6 @@ impl InformationSchemaProvider { TABLE_CONSTRAINTS.to_string(), self.build_table(TABLE_CONSTRAINTS).unwrap(), ); - tables.insert( - CLUSTER_INFO.to_string(), - self.build_table(CLUSTER_INFO).unwrap(), - ); // Add memory tables for name in MEMORY_TABLES.iter() {