Skip to content

Commit

Permalink
Merge remote-tracking branch 'UpStream/master' into EventCounter
Browse files Browse the repository at this point in the history
  • Loading branch information
DavoudEshtehari committed Sep 3, 2020
2 parents 74bb4da + 1103108 commit 33b6fe5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 22 deletions.
11 changes: 3 additions & 8 deletions SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@ Microsoft.Data.SqlClient library follows the latest .NET Core support policy for

[View the .NET Core Support Policy](https://dotnet.microsoft.com/platform/support/policy/dotnet-core)

## Microsoft.Data.SqlClient release cadence

We will publish new GA (stable) releases every 6 months on a regular cadence beginning with v2.0 along with 2-3 preview releases in between. LTS releases will be chosen by stakeholders and maintainers based on a few qualifications and customer response.
[View SqlClient Support Policy on Microsoft Documentation](https://docs.microsoft.com/sql/connect/ado-net/sqlclient-driver-support-lifecycle)

## Release Life Cycles
## Microsoft.Data.SqlClient release cadence

| Version | Official Release Date | Latest Patch Version | Patch Release Date | Support Level | End of Support |
| -- | -- | -- | -- | -- | -- |
| v1.1 | November 20, 2019 | | | Current | |
| v1.0 | August 28, 2019 | v1.0.19269.1 | September 26, 2019 | Current | February 20, 2020 |
New stable (GA) releases will be published every six months on a regular cadence beginning with version 1.2, along with 2 to 3 preview releases in between. Long Term Support (LTS) releases will be chosen by stakeholders and maintainers based on a few qualifications and customer response.

## Long Term Support (LTS) Releases

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public static class DataTestUtility
public static readonly string AADPasswordConnectionString = null;
public static readonly string AADServicePrincipalId = null;
public static readonly string AADServicePrincipalSecret = null;
public static readonly string AADAccessToken = null;
public static readonly string AKVBaseUrl = null;
public static readonly string AKVUrl = null;
public static readonly string AKVClientId = null;
Expand All @@ -52,6 +51,7 @@ public static class DataTestUtility

public static readonly string EnclaveAzureDatabaseConnString = null;

public static string AADAccessToken = null;
public const string UdtTestDbName = "UdtTestDb";
public const string AKVKeyName = "TestSqlClientAzureKeyVaultProvider";
private const string ManagedNetworkingAppContextSwitch = "Switch.Microsoft.Data.SqlClient.UseManagedNetworkingOnWindows";
Expand Down Expand Up @@ -84,9 +84,11 @@ static DataTestUtility()
IsDNSCachingSupportedTR = c.IsDNSCachingSupportedTR;
EnclaveAzureDatabaseConnString = c.EnclaveAzureDatabaseConnString;

System.Net.ServicePointManager.SecurityProtocol |= System.Net.SecurityProtocolType.Tls12;

if (TracingEnabled)
{
TraceListener = new DataTestUtility.TraceEventListener();
TraceListener = new TraceEventListener();
}

if (UseManagedSNIOnWindows)
Expand All @@ -95,13 +97,6 @@ static DataTestUtility()
Console.WriteLine($"App Context switch {ManagedNetworkingAppContextSwitch} enabled on {Environment.OSVersion}");
}

if (IsAADPasswordConnStrSetup() && IsAADAuthorityURLSetup())
{
string username = RetrieveValueFromConnStr(AADPasswordConnectionString, new string[] { "User ID", "UID" });
string password = RetrieveValueFromConnStr(AADPasswordConnectionString, new string[] { "Password", "PWD" });
AADAccessToken = GenerateAccessToken(AADAuthorityURL, username, password);
}

string url = c.AzureKeyVaultURL;
if (!string.IsNullOrEmpty(url) && Uri.TryCreate(url, UriKind.Absolute, out Uri AKVBaseUri))
{
Expand Down Expand Up @@ -131,8 +126,6 @@ static DataTestUtility()
AEConnStrings.Add(TCPConnectionStringAASSGX);
AEConnStringsSetup.Add(TCPConnectionStringAASSGX);
}

System.Net.ServicePointManager.SecurityProtocol |= System.Net.SecurityProtocolType.Tls12;
}
else
{
Expand Down Expand Up @@ -178,13 +171,14 @@ private static Task<string> AcquireTokenAsync(string authorityURL, string userID
string scope = "https://database.windows.net//.default";
string applicationName = "Microsoft Data SqlClient Manual Tests";
string clientVersion = "1.0.0.0";
string adoClientId = "4d079b4c-cab7-4b7c-a115-8fd51b6f8239";
string adoClientId = "2fd908ad-0664-4344-b9be-cd3e8b574c38";

IPublicClientApplication app = PublicClientApplicationBuilder.Create(adoClientId)
.WithAuthority(authorityURL)
.WithClientName(applicationName)
.WithClientVersion(clientVersion)
.Build();

AuthenticationResult result;
string[] scopes = new string[] { scope };

Expand Down Expand Up @@ -284,7 +278,7 @@ public static bool IsAADAuthorityURLSetup()

public static bool IsNotAzureServer()
{
return !AreConnStringsSetup() || !Utils.IsAzureSqlServer(new SqlConnectionStringBuilder((DataTestUtility.TCPConnectionString)).DataSource);
return !AreConnStringsSetup() || !Utils.IsAzureSqlServer(new SqlConnectionStringBuilder((TCPConnectionString)).DataSource);
}

public static bool IsAKVSetupAvailable()
Expand All @@ -301,7 +295,7 @@ public static bool IsUTF8Supported()
bool retval = false;
if (AreConnStringsSetup())
{
using (SqlConnection connection = new SqlConnection(DataTestUtility.TCPConnectionString))
using (SqlConnection connection = new SqlConnection(TCPConnectionString))
using (SqlCommand command = new SqlCommand())
{
command.Connection = connection;
Expand Down Expand Up @@ -388,6 +382,12 @@ public static void DropStoredProcedure(SqlConnection sqlConnection, string spNam

public static string GetAccessToken()
{
if (null == AADAccessToken && IsAADPasswordConnStrSetup() && IsAADAuthorityURLSetup())
{
string username = RetrieveValueFromConnStr(AADPasswordConnectionString, new string[] { "User ID", "UID" });
string password = RetrieveValueFromConnStr(AADPasswordConnectionString, new string[] { "Password", "PWD" });
AADAccessToken = GenerateAccessToken(AADAuthorityURL, username, password);
}
// Creates a new Object Reference of Access Token - See GitHub Issue 438
return (null != AADAccessToken) ? new string(AADAccessToken.ToCharArray()) : null;
}
Expand Down

0 comments on commit 33b6fe5

Please sign in to comment.