Skip to content

Add experimental config to disable TLS1.3 #6025

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

Merged
merged 1 commit into from
Oct 21, 2021
Merged

Conversation

stevejgordon
Copy link
Contributor

@stevejgordon stevejgordon commented Oct 21, 2021

Workaround for #5951

There is currently an issue for users on Windows 11, targetting .NET 5.0 where TLS negotiation to some cloud regions is failing when TLS 1.3 is enabled. A workaround is to disable TLS 1.3 at the OS level but that is problematic as it affects all client-side apps.

This PR adds a temporary and experimental configuration option that may be used to disable TLS 1.3 in the client directly. This setting affects only .NET Core and .NET 5.0+ targets. It is intended to be used purely as a short term workaround until changes can be made at the cloud proxy layer to resolve the negotiation issue.

Example usage:

var credentials = new BasicAuthenticationCredentials("elastic", "password"); 
var pool = new CloudConnectionPool("CloudId", credentials); 
var esClient = new ElasticClient(new ConnectionSettings(pool).UnsafeDisableTls13());

@stevejgordon stevejgordon merged commit 9dbd786 into 7.x Oct 21, 2021
@stevejgordon stevejgordon deleted the feature/configure-tls branch October 21, 2021 10:59
@github-actions
Copy link
Contributor

The backport to 7.15 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-7.15 7.15
# Navigate to the new working tree
cd .worktrees/backport-7.15
# Create a new branch
git switch --create backport-6025-to-7.15
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick --mainline 1 9dbd7869447ae88de4a0796001b81dfe672429eb
# Push it to GitHub
git push --set-upstream origin backport-6025-to-7.15
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-7.15

Then, create a pull request where the base branch is 7.15 and the compare/head branch is backport-6025-to-7.15.

stevejgordon added a commit that referenced this pull request Oct 21, 2021
stevejgordon added a commit that referenced this pull request Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant