GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: disabled and removed the Integrated auth of MsSql due to the a… · zerodaycode/Canyon-SQL@dfdf704

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Cargo.toml
  • canyon_core/src
    • column.rs
    • connection
      • clients
        • mssql.rs
      • datasources.rs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Cargo.toml‎

Copy file name to clipboardExpand all lines: Cargo.toml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ canyon_macros = { version = "0.5.1", path = "canyon_macros" }
4444
tokio = { version = "1.27.0", features = ["full"] }
4545
tokio-util = { version = "0.7.4", features = ["compat"] }
4646
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"] }
4848
mysql_async = { version = "0.36.1" }
4949
mysql_common = { version = "0.35.4", features = [ "chrono" ]}
5050

Collapse file

‎canyon_core/src/column.rs‎

Copy file name to clipboardExpand all lines: canyon_core/src/column.rs
-7Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use tokio_postgres::{self};
99

1010
/// Generic abstraction for hold a Column type that will be one of the Column
1111
/// types present in the dependent crates
12-
// #[derive(Copy, Clone)]
1312
pub struct Column<'a> {
1413
pub(crate) name: Cow<'a, str>,
1514
pub(crate) type_: ColumnType,
@@ -21,12 +20,6 @@ impl Column<'_> {
2120
pub fn column_type(&self) -> &ColumnType {
2221
&self.type_
2322
}
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-
// }
3023
}
3124

3225
pub trait ColType {
Collapse file

‎canyon_core/src/connection/clients/mssql.rs‎

Copy file name to clipboardExpand all lines: canyon_core/src/connection/clients/mssql.rs
-8Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ pub(crate) mod __impl {
230230
SqlServerAuth::Basic { username, password } => {
231231
Ok(tiberius::AuthMethod::sql_server(username, password))
232232
}
233-
SqlServerAuth::Integrated => Ok(tiberius::AuthMethod::Integrated),
234233
},
235234
#[cfg(any(feature = "postgres", feature = "mysql"))]
236235
_ => Err("Invalid auth configuration for a SqlServer datasource.".into()),
@@ -261,13 +260,6 @@ mod tests {
261260
}
262261
}
263262

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-
271263
#[test]
272264
fn test_sqlserver_config_from_datasource_basic() {
273265
let datasource = DatasourceConfig {
Collapse file

‎canyon_core/src/connection/datasources.rs‎

Copy file name to clipboardExpand all lines: canyon_core/src/connection/datasources.rs
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,12 @@ fn load_ds_config_from_array() {
4545
[canyon_sql]
4646
datasources = [
4747
{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' }
4948
]
5049
"#;
5150
let config: CanyonSqlConfig = toml::from_str(CONFIG_FILE_MOCK_ALT_MSSQL)
5251
.expect("A failure happened retrieving the [canyon_sql] section");
5352

5453
let ds_1 = &config.canyon_sql.datasources[0];
55-
let ds_2 = &config.canyon_sql.datasources[1];
5654

5755
assert_eq!(ds_1.name, "SqlServerDS");
5856
assert_eq!(ds_1.get_db_type(), DatabaseType::SqlServer);
@@ -67,8 +65,6 @@ fn load_ds_config_from_array() {
6765
assert_eq!(ds_1.properties.port, Some(3340));
6866
assert_eq!(ds_1.properties.db_name, "triforce2");
6967
assert_eq!(ds_1.properties.migrations, Some(Migrations::Disabled));
70-
71-
assert_eq!(ds_2.auth, Auth::SqlServer(SqlServerAuth::Integrated));
7268
}
7369
#[cfg(feature = "mysql")]
7470
{
@@ -181,8 +177,6 @@ pub enum PostgresAuth {
181177
pub enum SqlServerAuth {
182178
#[serde(alias = "Basic", alias = "basic")]
183179
Basic { username: String, password: String },
184-
#[serde(alias = "Integrated", alias = "integrated")]
185-
Integrated,
186180
}
187181

188182
#[derive(Deserialize, Debug, Clone, PartialEq)]

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.