microsoft / team-explorer-everywhere

Team Explorer Everywhere Plugin for Eclipse
Other
300 stars 96 forks source link

TEE Login to TFS in Azure devops with PAT failing #362

Closed lukepopp closed 6 months ago

lukepopp commented 8 months ago

Hi

I'm running TEE-CLC-14.139.0 in Linux and trying to authenticate to https://dev.azure.com/ using a PAT from a corporate environment behind a proxy but this fails with host not found and there seems to be no switch to specify token type . The proxy resolves to Azure in all other cases just fine - for example via browser.

I've managed to connect to TFS in Azure using Eclipse via the Team Explorer plugin but I can't get any files due to the error: com.microsoft.tfs.core.httpclient.auth.AuthenticationSecurityException: Basic credentials are only support over HTTPS secured connections. I can't use basic credentials as access to Azure is via an SSO process with token/password combo.

eric-milles commented 7 months ago

Is your proxy declared with http:// protocol? You can try setting system property com.microsoft.tfs.core.config.httpclient.sslsocketfactory.sslprotocol to TLSv1.2 or com.microsoft.tfs.core.config.httpclient.sslsocketfactory.disable to any value.

lukepopp commented 7 months ago

Thanks @eric-milles , you are correct - I'm running a http proxy. I've made these changes to eclipse.ini but the exception is still being raised.

-vmargs -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclientjava -Dosgi.requiredJavaVersion=17 -Dosgi.instance.area.default=@user.home/eclipse-workspace -Dosgi.dataAreaRequiresExplicitInit=true -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true -Declipse.e4.inject.javax.warning=false -Dsun.java.command=Eclipse -Xms256m -Xmx2048m -XX:+UseG1GC -XX:+UseStringDeduplication --add-modules=ALL-SYSTEM -Djava.security.manager=allow -Djavax.net.ssl.trustStore=/my/cacerts -Dcom.microsoft.tfs.core.config.httpclient.sslsocketfactory.disable=true

eric-milles commented 6 months ago

What we saw here is that a proxy disrupts the secure path to ADO. I don't know too much about PAT, but you sould try without the proxy to see if that is the thing causing the main problem.

lukepopp commented 6 months ago

Hi @eric-milles

I added the property -Dcom.microsoft.tfs.client.allowInsecureBasic=true which has fixed the issue. Thanks.

lukepopp commented 6 months ago

Closing.