Remove unneeded logs
parent: tbd commit: cfba404
Showing 6 changed files with 0 insertions and 30 deletions
giterated-daemon/src/authentication.rs
@@ -125,8 +125,6 @@ impl AuthenticationTokenGranter { | ||
125 | 125 | panic!() |
126 | 126 | } |
127 | 127 | |
128 | info!("Token Extension Request Token validated"); | |
129 | ||
130 | 128 | let private_key = { |
131 | 129 | let mut file = File::open( |
132 | 130 | self.config["giterated"]["keys"]["private"] |
giterated-daemon/src/backend/git.rs
@@ -204,7 +204,6 @@ impl GitBackend { | ||
204 | 204 | }); |
205 | 205 | } |
206 | 206 | } else if matches!(repository.visibility, RepositoryVisibility::Private) { |
207 | info!("Unauthenticated"); | |
208 | 207 | // Unauthenticated users can never view private repositories |
209 | 208 | |
210 | 209 | return Err(GitBackendError::RepositoryNotFound { |
@@ -411,7 +410,6 @@ impl RepositoryBackend for GitBackend { | ||
411 | 410 | // .into()); |
412 | 411 | // } |
413 | 412 | // } else if matches!(repository.visibility, RepositoryVisibility::Private) { |
414 | // info!("Unauthenticated"); | |
415 | 413 | // // Unauthenticated users can never view private repositories |
416 | 414 | |
417 | 415 | // return Err(Box::new(GitBackendError::RepositoryNotFound { |
giterated-daemon/src/connection/wrapper.rs
@@ -130,12 +130,10 @@ pub async fn connection_wrapper( | ||
130 | 130 | // Message::Close(_) => return, |
131 | 131 | // _ => continue, |
132 | 132 | // }; |
133 | // info!("one payload"); | |
134 | 133 | |
135 | 134 | // let message = NetworkMessage(payload.clone()); |
136 | 135 | |
137 | 136 | // if !handshaked { |
138 | // info!("im foo baring"); | |
139 | 137 | // if handshake_handle(&message, &connection_state).await.is_ok() { |
140 | 138 | // if connection_state.handshaked.load(Ordering::SeqCst) { |
141 | 139 | // handshaked = true; |
@@ -164,8 +162,6 @@ pub async fn connection_wrapper( | ||
164 | 162 | |
165 | 163 | // let message_type = &raw.message_type; |
166 | 164 | |
167 | // info!("Handling message with type: {}", message_type); | |
168 | ||
169 | 165 | // match authentication_handle(message_type, &message, &connection_state).await { |
170 | 166 | // Err(e) => { |
171 | 167 | // let _ = connection_state |
@@ -217,7 +213,6 @@ pub async fn connection_wrapper( | ||
217 | 213 | // return; |
218 | 214 | // } |
219 | 215 | // _ => { |
220 | // info!("Unhandled"); | |
221 | 216 | // continue; |
222 | 217 | // } |
223 | 218 | // } |
@@ -243,7 +238,6 @@ pub struct ConnectionState { | ||
243 | 238 | impl ConnectionState { |
244 | 239 | pub async fn send<T: Serialize>(&self, message: T) -> Result<(), Error> { |
245 | 240 | let payload = serde_json::to_string(&message)?; |
246 | info!("Sending payload: {}", &payload); | |
247 | 241 | self.socket |
248 | 242 | .lock() |
249 | 243 | .await |
@@ -255,7 +249,6 @@ impl ConnectionState { | ||
255 | 249 | |
256 | 250 | pub async fn send_raw<T: Serialize>(&self, message: T) -> Result<(), Error> { |
257 | 251 | let payload = serde_json::to_string(&message)?; |
258 | info!("Sending payload: {}", &payload); | |
259 | 252 | self.socket |
260 | 253 | .lock() |
261 | 254 | .await |
giterated-daemon/src/message.rs
@@ -112,8 +112,6 @@ impl FromMessage<ConnectionState> for AuthenticatedInstance { | ||
112 | 112 | let message: AuthenticatedPayload = |
113 | 113 | serde_json::from_slice(&network_message).map_err(|e| Error::from(e))?; |
114 | 114 | |
115 | info!("Authenticated payload: {:?}", message); | |
116 | ||
117 | 115 | let (instance, signature) = message |
118 | 116 | .source |
119 | 117 | .iter() |
@@ -132,10 +130,6 @@ impl FromMessage<ConnectionState> for AuthenticatedInstance { | ||
132 | 130 | // TODO: Instance authentication error |
133 | 131 | .ok_or_else(|| UserAuthenticationError::Missing)?; |
134 | 132 | |
135 | info!("Instance: {}", instance.clone().to_string()); | |
136 | ||
137 | info!("Instance public key: {}", state.public_key(instance).await?); | |
138 | ||
139 | 133 | let public_key = RsaPublicKey::from_pkcs1_pem(&state.public_key(instance).await?).unwrap(); |
140 | 134 | |
141 | 135 | let verifying_key: VerifyingKey<Sha256> = VerifyingKey::new(public_key); |
@@ -241,8 +235,6 @@ where | ||
241 | 235 | let payload: AuthenticatedPayload = serde_json::from_slice(&message)?; |
242 | 236 | let payload = bincode::deserialize(&payload.payload)?; |
243 | 237 | |
244 | info!("Deserialized payload: {:#?}", payload); | |
245 | ||
246 | 238 | Ok(Message(payload)) |
247 | 239 | } |
248 | 240 | } |
giterated-models/src/authenticated.rs
@@ -9,7 +9,6 @@ use rsa::{ | ||
9 | 9 | }; |
10 | 10 | use serde::{Deserialize, Serialize}; |
11 | 11 | use serde_json::Value; |
12 | use tracing::info; | |
13 | 12 | |
14 | 13 | use crate::{ |
15 | 14 | instance::Instance, |
@@ -42,9 +41,7 @@ pub struct AuthenticatedPayload { | ||
42 | 41 | |
43 | 42 | impl AuthenticatedPayload { |
44 | 43 | pub fn into_message(self) -> GiteratedMessage<AnyObject, AnyOperation> { |
45 | info!("Into message: {:#?}", self); | |
46 | 44 | let payload = serde_json::from_slice::<Value>(&self.payload).unwrap(); |
47 | info!("Message payload: {}", payload); | |
48 | 45 | GiteratedMessage { |
49 | 46 | object: AnyObject(self.object), |
50 | 47 | operation: self.operation, |
@@ -94,13 +91,6 @@ impl<O: GiteratedObject, D: GiteratedOperation<O>> Authenticated<O, D> { | ||
94 | 91 | &mut self, |
95 | 92 | authentication: P, |
96 | 93 | ) { |
97 | let message_payload = serde_json::to_vec(&self.message).unwrap(); | |
98 | ||
99 | info!( | |
100 | "Verifying payload: {}", | |
101 | std::str::from_utf8(&message_payload).unwrap() | |
102 | ); | |
103 | ||
104 | 94 | self.source |
105 | 95 | .push(Box::new(authentication) as Box<dyn AuthenticationSourceProvider + Send + Sync>); |
106 | 96 | } |
giterated-models/src/repository/mod.rs
@@ -183,7 +183,6 @@ pub struct RepositoryTreeEntry { | ||
183 | 183 | } |
184 | 184 | |
185 | 185 | impl RepositoryTreeEntry { |
186 | // I love you Emilia <3 | |
187 | 186 | pub fn new(id: &str, name: &str, object_type: RepositoryObjectType, mode: i32) -> Self { |
188 | 187 | Self { |
189 | 188 | id: id.to_string(), |