GeezerVison is showing github.com — chore: disabled and removed the Integrated auth of MsSql due to the a… · zerodaycode/Canyon-SQL@dfdf704
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: Cargo.toml +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -44,7 +44,7 @@ canyon_macros = { version = "0.5.1", path = "canyon_macros" } | 44 | 44 | tokio = { version = "1.27.0", features = ["full"] } | 45 | 45 | tokio-util = { version = "0.7.4", features = ["compat"] } | 46 | 46 | tokio-postgres = { version = "0.7.2", features = ["with-chrono-0_4"] } | 47 | | -tiberius = { version = "0.12.3", features = ["tds73", "chrono", "integrated-auth-gssapi"] } | | 47 | +tiberius = { version = "0.12.3", features = ["tds73", "chrono"] } | 48 | 48 | mysql_async = { version = "0.36.1" } | 49 | 49 | mysql_common = { version = "0.35.4", features = [ "chrono" ]} | 50 | 50 |
| |
Collapse file Copy file name to clipboardExpand all lines: canyon_core/src/column.rs -7Lines changed: 0 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -9,7 +9,6 @@ use tokio_postgres::{self}; | 9 | 9 |
| 10 | 10 | /// Generic abstraction for hold a Column type that will be one of the Column | 11 | 11 | /// types present in the dependent crates | 12 | | -// #[derive(Copy, Clone)] | 13 | 12 | pub struct Column<'a> { | 14 | 13 | pub(crate) name: Cow<'a, str>, | 15 | 14 | pub(crate) type_: ColumnType, | @@ -21,12 +20,6 @@ impl Column<'_> { | 21 | 20 | pub fn column_type(&self) -> &ColumnType { | 22 | 21 | &self.type_ | 23 | 22 | } | 24 | | - // pub fn type_(&'a self) -> &'_ dyn Type { | 25 | | - // match (*self).type_ { | 26 | | - // #[cfg(feature = "postgres")] ColumnType::Postgres(v) => v as &'a dyn Type, | 27 | | - // #[cfg(feature = "mssql")] ColumnType::SqlServer(v) => v as &'a dyn Type, | 28 | | - // } | 29 | | - // } | 30 | 23 | } | 31 | 24 |
| 32 | 25 | pub trait ColType { | |
Collapse file Copy file name to clipboardExpand all lines: canyon_core/src/connection/clients/mssql.rs -8Lines changed: 0 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -230,7 +230,6 @@ pub(crate) mod __impl { | 230 | 230 | SqlServerAuth::Basic { username, password } => { | 231 | 231 | Ok(tiberius::AuthMethod::sql_server(username, password)) | 232 | 232 | } | 233 | | - SqlServerAuth::Integrated => Ok(tiberius::AuthMethod::Integrated), | 234 | 233 | }, | 235 | 234 | #[cfg(any(feature = "postgres", feature = "mysql"))] | 236 | 235 | _ => Err("Invalid auth configuration for a SqlServer datasource.".into()), | @@ -261,13 +260,6 @@ mod tests { | 261 | 260 | } | 262 | 261 | } | 263 | 262 |
| 264 | | - #[test] | 265 | | - fn test_extract_mssql_auth_integrated() { | 266 | | - let auth = Auth::SqlServer(SqlServerAuth::Integrated); | 267 | | - let result = __impl::extract_mssql_auth(&auth).unwrap(); | 268 | | - assert!(matches!(result, AuthMethod::Integrated)); | 269 | | - } | 270 | | - | 271 | 263 | #[test] | 272 | 264 | fn test_sqlserver_config_from_datasource_basic() { | 273 | 265 | let datasource = DatasourceConfig { | |
Collapse file Copy file name to clipboardExpand all lines: canyon_core/src/connection/datasources.rs -6Lines changed: 0 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -45,14 +45,12 @@ fn load_ds_config_from_array() { | 45 | 45 | [canyon_sql] | 46 | 46 | datasources = [ | 47 | 47 | {name = 'SqlServerDS', auth = { sqlserver = { basic = { username = "sa", password = "SqlServer-10" } } }, properties.host = '192.168.0.250.1', properties.port = 3340, properties.db_name = 'triforce2', properties.migrations='disabled' }, | 48 | | - {name = 'SqlServerDS', auth = { sqlserver = { integrated = {} } }, properties.host = '192.168.0.250.1', properties.port = 3340, properties.db_name = 'triforce2', properties.migrations='disabled' } | 49 | 48 | ] | 50 | 49 | "#; | 51 | 50 | let config: CanyonSqlConfig = toml::from_str(CONFIG_FILE_MOCK_ALT_MSSQL) | 52 | 51 | .expect("A failure happened retrieving the [canyon_sql] section"); | 53 | 52 |
| 54 | 53 | let ds_1 = &config.canyon_sql.datasources[0]; | 55 | | - let ds_2 = &config.canyon_sql.datasources[1]; | 56 | 54 |
| 57 | 55 | assert_eq!(ds_1.name, "SqlServerDS"); | 58 | 56 | assert_eq!(ds_1.get_db_type(), DatabaseType::SqlServer); | @@ -67,8 +65,6 @@ fn load_ds_config_from_array() { | 67 | 65 | assert_eq!(ds_1.properties.port, Some(3340)); | 68 | 66 | assert_eq!(ds_1.properties.db_name, "triforce2"); | 69 | 67 | assert_eq!(ds_1.properties.migrations, Some(Migrations::Disabled)); | 70 | | - | 71 | | - assert_eq!(ds_2.auth, Auth::SqlServer(SqlServerAuth::Integrated)); | 72 | 68 | } | 73 | 69 | #[cfg(feature = "mysql")] | 74 | 70 | { | @@ -181,8 +177,6 @@ pub enum PostgresAuth { | 181 | 177 | pub enum SqlServerAuth { | 182 | 178 | #[serde(alias = "Basic", alias = "basic")] | 183 | 179 | Basic { username: String, password: String }, | 184 | | - #[serde(alias = "Integrated", alias = "integrated")] | 185 | | - Integrated, | 186 | 180 | } | 187 | 181 |
| 188 | 182 | #[derive(Deserialize, Debug, Clone, PartialEq)] | |
|