Skip to content

Commit dfb7831

Browse files
committed
Add http.proxyKerberosServicePrincipal setting (microsoft#187456)
1 parent a6b766d commit dfb7831

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/vs/platform/request/common/request.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ function registerProxyConfigurations(scope: ConfigurationScope): void {
148148
description: localize('strictSSL', "Controls whether the proxy server certificate should be verified against the list of supplied CAs."),
149149
restricted: true
150150
},
151+
'http.proxyKerberosServicePrincipal': {
152+
type: 'string',
153+
markdownDescription: localize('proxyKerberosServicePrincipal', "Overrides the principal service name for Kerberos authentication with the HTTP proxy. A default based on the proxy hostname is used when this is not set."),
154+
restricted: true
155+
},
151156
'http.proxyAuthorization': {
152157
type: ['null', 'string'],
153158
default: null,

src/vs/workbench/api/node/proxyResolver.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ async function lookupProxyAuthorization(
136136
try {
137137
const kerberos = await import('kerberos');
138138
const url = new URL(proxyURL);
139-
// TODO: Add core user setting.
140-
const spn = configProvider.getConfiguration('github.copilot')?.advanced?.kerberosServicePrincipal as string | undefined
139+
const spn = configProvider.getConfiguration('http').get<string>('proxyKerberosServicePrincipal')
141140
|| (process.platform === 'win32' ? `HTTP/${url.hostname}` : `HTTP@${url.hostname}`);
142141
extHostLogService.debug('ProxyResolver#lookupProxyAuthorization Kerberos authentication lookup', `proxyURL:${proxyURL}`, `spn:${spn}`);
143142
const client = await kerberos.initializeClient(spn);

0 commit comments

Comments
 (0)