Skip to content

Commit

Permalink
Hck 8467 add client id to azure active directory username password (#79)
Browse files Browse the repository at this point in the history
* HCK-8467: added clientId input to Azure Active Directory (Username / Password) connection config and removed from Control Pane on Azure AD (Username / Password) auth metod chosen

* HCK-8467: removed redundant brackets for dependancy

* HCK-8467: added client id pass to connection

* HCK-8467: removed lexical declaration from MFA case block

* HCK-8467: reused HCK app clientId

* HCK-8467: reverted config change
  • Loading branch information
WilhelmWesser authored Oct 24, 2024
1 parent 04b38ec commit e4eaad5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions reverse_engineering/databaseService/databaseService.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ const getConnectionClient = async (connectionInfo, logger) => {
password: connectionInfo.userPassword,
};

const clientId = '0dc36597-bc44-49f8-a4a7-ae5401959b85';
const redirectUri = 'http://localhost:8080';

switch (connectionInfo.authMethod) {
case 'Username / Password':
return sql.connect({
Expand All @@ -51,8 +54,6 @@ const getConnectionClient = async (connectionInfo, logger) => {
},
});
case 'Azure Active Directory (MFA)':
const clientId = '0dc36597-bc44-49f8-a4a7-ae5401959b85';
const redirectUri = 'http://localhost:8080';
const token = await getToken({ connectionInfo, tenantId, clientId, redirectUri, logger });
return sql.connect({
...commonConfig,
Expand Down Expand Up @@ -80,7 +81,8 @@ const getConnectionClient = async (connectionInfo, logger) => {
options: {
userName: connectionInfo.userName,
password: connectionInfo.userPassword,
domain: tenantId,
tenantId,
clientId,
},
},
});
Expand Down

0 comments on commit e4eaad5

Please sign in to comment.