I had been using I am using Atlassian.SDK C# v10.3.0 for months until end Jun without problems. Then, I started getting the "Could not create SSL/TLS secure channel" error, so I updated to Atlassian.SDK C# v10.6.0, and added TLS1.2 before calling CreateRestClient:
// server requires TLS1.2 due to vulnerability in older protocols
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
Jira = Jira.CreateRestClient("https://company.atlassian.net", txtUsername.Text, txtPassword.Text);
And it was able to to connect properly without the error, but then next when I tried to call
var user = Jira.Users.GetUserAsync("admin");
user.Wait();
I get an exception with InnerException:
{"Response Content: <html>\n\n<head>\n \n\n\n\n\n\n <script id=\"@atlassian/spa-iframe-script\" type=\"text/javascript\">\n (function() {\n var spaIframeRegex = /([&?]spaIframe=true*$|spaIframe=true&|[?&]spaIframe=true(?=#))/;\n ...
What is happening and how can I resolve it?
Hey Jake,
In addition to dropping TLS 1.0 and 1.1, we've also recently stopped supporting passwords over basic authentication. This change was enforced on all accounts near the end of June, so I think this may be what you're running into.
The short answer is that you'll need to generate an API token at https://id.atlassian.com/manage/api-tokens and drop that in where you've currently got your password stored. The great thing about tokens is that you can assign unique ones per-application, and you can revoke them in the future without having to change your account password.
More details are on this KB article, but for your convenience I've copied over the setup instructions:
Note:
Cheers,
Daniel
Thanks Daniel. This solves my problem. We need to update the documentation! Make it a community wiki or something so that we can save people from the panick.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel Eads we are facing the same SSL/TSL issue, after the JIRA patch update 8.13.1 to 8.13.4, while requesting from C# http request.
We also added security protocol as suggested most of blogs.
Could you/anyone, Pls guide us to resolve the issue. if you have working C# code snippet ,pls share with us.
"System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @navneet sharma , an upgrade to Jira Server shouldn't affect the TLS configuration or cipher suites involved. The settings for TLS termination are in Jira's server.xml file if it's serving HTTPS directly, or with the reverse proxy application if you are fronting Jira Server with a reverse proxy. You would need to check with one of your server administrators to get a list of enabled protocols and ciphers - this is going to vary by environment for Server.
Is it possible you're trying to connect to Jira Cloud? We did recently change the cipher suites configuration for Atlassian Cloud by disabling some less secure ciphers, as outlined in this announcement.
I'd recommend taking a peek at this Microsoft thread for further investigation. Just enabling TLS 1.2 in your code might not be enough. Depending on the framework version or operating system you're running it on, you might need to enable things in Windows directly (on the machine running your C# code).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.