Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HCK-8756: removed Windows Username Password auth method #92

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"key": "authMethod",
"value": [
"Username / Password",
"Username / Password (Windows)",
"Azure Active Directory (Username / Password)",
"Azure Active Directory (MFA)"
]
Expand All @@ -76,7 +75,6 @@
"key": "authMethod",
"value": [
"Username / Password",
"Username / Password (Windows)",
"Azure Active Directory (Username / Password)",
"Azure Active Directory (MFA)"
]
Expand All @@ -94,13 +92,6 @@
"value": "Username / Password"
}
},
{
"value": "https://hackolade.com/help/Windowsauthentication.html",
"dependency": {
"key": "authMethod",
"value": "Username / Password (Windows)"
}
},
{
"value": "https://hackolade.com/help/AzureActiveDirectoryauthenticati.html",
"dependency": {
Expand All @@ -120,10 +111,6 @@
"value": "Username / Password",
"label": "SQL Server"
},
{
"value": "Username / Password (Windows)",
"label": "Windows"
},
{
"value": "Azure Active Directory (Username / Password)",
"label": "Azure Active Directory (Username / Password)"
Expand All @@ -134,31 +121,14 @@
}
]
},
{
"inputLabel": "User Domain",
"inputKeyword": "userDomain",
"inputType": "text",
"inputPlaceholder": "User Domain",
"dependency": {
"key": "authMethod",
"value": "Username / Password (Windows)"
},
"validation": {
"regex": "([^\\s])"
}
},
{
"inputLabel": "User Name",
"inputKeyword": "userName",
"inputType": "text",
"inputPlaceholder": "User Name",
"dependency": {
"key": "authMethod",
"value": [
"Username / Password",
"Username / Password (Windows)",
"Azure Active Directory (Username / Password)"
]
"value": ["Username / Password", "Azure Active Directory (Username / Password)"]
},
"validation": {
"regex": "([^\\s])"
Expand All @@ -171,11 +141,7 @@
"inputPlaceholder": "Password",
"dependency": {
"key": "authMethod",
"value": [
"Username / Password",
"Username / Password (Windows)",
"Azure Active Directory (Username / Password)"
]
"value": ["Username / Password", "Azure Active Directory (Username / Password)"]
},
"isHiddenKey": true,
"validation": {
Expand Down
29 changes: 0 additions & 29 deletions reverse_engineering/databaseService/helpers/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,33 +51,6 @@ class UsernamePasswordConnection extends Connection {
}
}

class UsernamePasswordWindowsConnection extends Connection {
constructor({ connectionInfo, commonConfig, credentialsConfig, logger }) {
super({ logger });
this.connectionInfo = connectionInfo;
this.commonConfig = commonConfig;
this.credentialsConfig = credentialsConfig;
}

async connect() {
logConnectionHostAndUsername({
hostname: this.commonConfig.hostName,
username: this.credentialsConfig.user,
authMethod: this.connectionInfo.authMethod,
logger: this.logger,
});
return sql.connect({
...this.commonConfig,
...this.credentialsConfig,
domain: this.connectionInfo.userDomain,
options: {
encrypt: false,
enableArithAbort: true,
},
});
}
}

class AzureActiveDirectoryMFAConnection extends Connection {
constructor({ connectionInfo, commonConfig, tenantId, clientId, redirectUri, logger }) {
super({ logger });
Expand Down Expand Up @@ -254,8 +227,6 @@ const getConnection = ({ authMethod, ...data }) => {
switch (authMethod) {
case 'Username / Password':
return new UsernamePasswordConnection(data);
case 'Username / Password (Windows)':
return new UsernamePasswordWindowsConnection(data);
case 'Azure Active Directory (MFA)':
return new AzureActiveDirectoryMFAConnection(data);
case 'Azure Active Directory (Username / Password)':
Expand Down