mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Initial AD support for BDCs (#6741)
Partially working AD support for BDCs with some known issues - Plumbed through kerberos support to Notebooks. - Using "gateway-0" for service temporarily as service endpoints API doesn't yet return correct DNS name. Will update in separate PR once available - Plumbed kerberos auth to HDFS, Spark. Only partially working as we use same token on each call - Will fix in separate PR, as this requires a refactor of WebHDFS library. Will need to either get new token every time or set a cookie, both of which require refactors - Fixed error when Data Service node expansion failed and blocked all OE expansion - Support for SqlToolsService change to use new cluster endpoints DMV - Updated API to add new endpoints field to replace IP + port - Added logic to handle case where endpoints for Yarn, Grafana etc. are in the list - Sort list and use expected new localized strings - Updated SqlToolsService to include support for new DMV - Add "gateway-0" handling in Jupyter session as workaround for lack of domain names in endpoints list
This commit is contained in:
14
extensions/mssql/src/util/auth.ts
Normal file
14
extensions/mssql/src/util/auth.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as kerberos from 'kerberos';
|
||||
|
||||
export async function authenticateKerberos(hostname: string): Promise<string> {
|
||||
const service = 'HTTP' + (process.platform === 'win32' ? '/' : '@') + hostname;
|
||||
const mechOID = kerberos.GSS_MECH_OID_KRB5;
|
||||
let client = await kerberos.initializeClient(service, { mechOID });
|
||||
let response = await client.step('');
|
||||
return response;
|
||||
}
|
||||
Reference in New Issue
Block a user