Skip to content

Commit b1f72de

Browse files
authored
Adding missing SecureEnclaves option to connection provider options (#2447)
* adding missing SecureEnclaves connection option * updated strings files * Updating test * keeping naming consistent * Updating string names
1 parent a4cb908 commit b1f72de

File tree

6 files changed

+81
-24
lines changed

6 files changed

+81
-24
lines changed

src/Microsoft.SqlTools.ServiceLayer/Connection/ConnectionProviderOptionsHelper.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,21 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions()
150150
GroupName = GroupNames.Security,
151151
CategoryValues =
152152
[
153-
new CategoryValue { Name = "Disabled", DisplayName = SR.ConnectionConfigOptions_columnEncryptionSetting_category_Disabled },
154-
new CategoryValue { Name = "Enabled", DisplayName = SR.ConnectionConfigOptions_columnEncryptionSetting_category_Enabled }
153+
new CategoryValue { Name = "Disabled", DisplayName = SR.ConnectionConfigOptions_common_category_Disabled },
154+
new CategoryValue { Name = "Enabled", DisplayName = SR.ConnectionConfigOptions_common_category_Enabled }
155+
]
156+
},
157+
new ConnectionOption
158+
{
159+
Name = "secureEnclaves",
160+
DisplayName = SR.ConnectionConfigOptions_secureEnclaves_displayName,
161+
Description = SR.ConnectionConfigOptions_secureEnclaves_description,
162+
ValueType = ConnectionOption.ValueTypeCategory,
163+
GroupName = GroupNames.Security,
164+
CategoryValues =
165+
[
166+
new CategoryValue { Name = "Disabled", DisplayName = SR.ConnectionConfigOptions_common_category_Disabled },
167+
new CategoryValue { Name = "Enabled", DisplayName = SR.ConnectionConfigOptions_common_category_Enabled }
155168
]
156169
},
157170
new ConnectionOption

src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9983,6 +9983,22 @@ public static string ConnectionConfigOptions_groups_context
99839983
}
99849984
}
99859985

9986+
public static string ConnectionConfigOptions_common_category_Enabled
9987+
{
9988+
get
9989+
{
9990+
return Keys.GetString(Keys.ConnectionConfigOptions_common_category_Enabled);
9991+
}
9992+
}
9993+
9994+
public static string ConnectionConfigOptions_common_category_Disabled
9995+
{
9996+
get
9997+
{
9998+
return Keys.GetString(Keys.ConnectionConfigOptions_common_category_Disabled);
9999+
}
10000+
}
10001+
998610002
public static string ConnectionConfigOptions_server_displayName
998710003
{
998810004
get
@@ -10183,19 +10199,19 @@ public static string ConnectionConfigOptions_columnEncryptionSetting_description
1018310199
}
1018410200
}
1018510201

10186-
public static string ConnectionConfigOptions_columnEncryptionSetting_category_Disabled
10202+
public static string ConnectionConfigOptions_secureEnclaves_displayName
1018710203
{
1018810204
get
1018910205
{
10190-
return Keys.GetString(Keys.ConnectionConfigOptions_columnEncryptionSetting_category_Disabled);
10206+
return Keys.GetString(Keys.ConnectionConfigOptions_secureEnclaves_displayName);
1019110207
}
1019210208
}
1019310209

10194-
public static string ConnectionConfigOptions_columnEncryptionSetting_category_Enabled
10210+
public static string ConnectionConfigOptions_secureEnclaves_description
1019510211
{
1019610212
get
1019710213
{
10198-
return Keys.GetString(Keys.ConnectionConfigOptions_columnEncryptionSetting_category_Enabled);
10214+
return Keys.GetString(Keys.ConnectionConfigOptions_secureEnclaves_description);
1019910215
}
1020010216
}
1020110217

@@ -14883,6 +14899,12 @@ public class Keys
1488314899
public const string ConnectionConfigOptions_groups_context = "ConnectionConfigOptions_groups_context";
1488414900

1488514901

14902+
public const string ConnectionConfigOptions_common_category_Enabled = "ConnectionConfigOptions_common_category_Enabled";
14903+
14904+
14905+
public const string ConnectionConfigOptions_common_category_Disabled = "ConnectionConfigOptions_common_category_Disabled";
14906+
14907+
1488614908
public const string ConnectionConfigOptions_server_displayName = "ConnectionConfigOptions_server_displayName";
1488714909

1488814910

@@ -14958,10 +14980,10 @@ public class Keys
1495814980
public const string ConnectionConfigOptions_columnEncryptionSetting_description = "ConnectionConfigOptions_columnEncryptionSetting_description";
1495914981

1496014982

14961-
public const string ConnectionConfigOptions_columnEncryptionSetting_category_Disabled = "ConnectionConfigOptions_columnEncryptionSetting_category_Disabled";
14983+
public const string ConnectionConfigOptions_secureEnclaves_displayName = "ConnectionConfigOptions_secureEnclaves_displayName";
1496214984

1496314985

14964-
public const string ConnectionConfigOptions_columnEncryptionSetting_category_Enabled = "ConnectionConfigOptions_columnEncryptionSetting_category_Enabled";
14986+
public const string ConnectionConfigOptions_secureEnclaves_description = "ConnectionConfigOptions_secureEnclaves_description";
1496514987

1496614988

1496714989
public const string ConnectionConfigOptions_attestationProtocol_displayName = "ConnectionConfigOptions_attestationProtocol_displayName";

src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5437,6 +5437,14 @@ The Query Processor estimates that implementing the following index could improv
54375437
<value>Data Source &amp; Context</value>
54385438
<comment></comment>
54395439
</data>
5440+
<data name="ConnectionConfigOptions_common_category_Enabled" xml:space="preserve">
5441+
<value>Disabled</value>
5442+
<comment></comment>
5443+
</data>
5444+
<data name="ConnectionConfigOptions_common_category_Disabled" xml:space="preserve">
5445+
<value>Disabled</value>
5446+
<comment></comment>
5447+
</data>
54405448
<data name="ConnectionConfigOptions_server_displayName" xml:space="preserve">
54415449
<value>Server name</value>
54425450
<comment></comment>
@@ -5537,12 +5545,12 @@ The Query Processor estimates that implementing the following index could improv
55375545
<value>Enables or disables Always Encrypted for the connection</value>
55385546
<comment></comment>
55395547
</data>
5540-
<data name="ConnectionConfigOptions_columnEncryptionSetting_category_Disabled" xml:space="preserve">
5541-
<value>Disabled</value>
5548+
<data name="ConnectionConfigOptions_secureEnclaves_displayName" xml:space="preserve">
5549+
<value>Secure Enclaves</value>
55425550
<comment></comment>
55435551
</data>
5544-
<data name="ConnectionConfigOptions_columnEncryptionSetting_category_Enabled" xml:space="preserve">
5545-
<value>Enabled</value>
5552+
<data name="ConnectionConfigOptions_secureEnclaves_description" xml:space="preserve">
5553+
<value>Enables or disables Secure Enclaves for the connection</value>
55465554
<comment></comment>
55475555
</data>
55485556
<data name="ConnectionConfigOptions_attestationProtocol_displayName" xml:space="preserve">

src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2289,6 +2289,9 @@ ConnectionConfigOptions_groups_resiliency = Connection Resiliency & Failover
22892289
ConnectionConfigOptions_groups_pooling = Pooling Settings
22902290
ConnectionConfigOptions_groups_context = Data Source & Context
22912291

2292+
ConnectionConfigOptions_common_category_Enabled = Disabled
2293+
ConnectionConfigOptions_common_category_Disabled = Disabled
2294+
22922295
ConnectionConfigOptions_server_displayName = Server name
22932296
ConnectionConfigOptions_server_description = Name of the SQL Server instance
22942297
ConnectionConfigOptions_database_displayName = Database name
@@ -2314,8 +2317,8 @@ ConnectionConfigOptions_currentLanguage_displayName = Current language
23142317
ConnectionConfigOptions_currentLanguage_description = The SQL Server language record name
23152318
ConnectionConfigOptions_columnEncryptionSetting_displayName = Always Encrypted
23162319
ConnectionConfigOptions_columnEncryptionSetting_description = Enables or disables Always Encrypted for the connection
2317-
ConnectionConfigOptions_columnEncryptionSetting_category_Disabled = Disabled
2318-
ConnectionConfigOptions_columnEncryptionSetting_category_Enabled = Enabled
2320+
ConnectionConfigOptions_secureEnclaves_displayName = Secure Enclaves
2321+
ConnectionConfigOptions_secureEnclaves_description = Enables or disables Secure Enclaves for the connection
23192322
ConnectionConfigOptions_attestationProtocol_displayName = Attestation Protocol
23202323
ConnectionConfigOptions_attestationProtocol_description = Specifies a protocol for attesting a server-side enclave used with Always Encrypted with secure enclaves
23212324
ConnectionConfigOptions_attestationProtocol_category_HGS = Host Guardian Service

src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,6 @@
117117
<target state="new">Enables or disables Always Encrypted for the connection</target>
118118
<note></note>
119119
</trans-unit>
120-
<trans-unit id="ConnectionConfigOptions_columnEncryptionSetting_category_Disabled">
121-
<source>Disabled</source>
122-
<target state="new">Disabled</target>
123-
<note></note>
124-
</trans-unit>
125-
<trans-unit id="ConnectionConfigOptions_columnEncryptionSetting_category_Enabled">
126-
<source>Enabled</source>
127-
<target state="new">Enabled</target>
128-
<note></note>
129-
</trans-unit>
130120
<trans-unit id="ConnectionConfigOptions_attestationProtocol_displayName">
131121
<source>Attestation Protocol</source>
132122
<target state="new">Attestation Protocol</target>
@@ -7023,6 +7013,26 @@ The Query Processor estimates that implementing the following index could improv
70237013
<target state="new">Data Source &amp; Context</target>
70247014
<note></note>
70257015
</trans-unit>
7016+
<trans-unit id="ConnectionConfigOptions_secureEnclaves_displayName">
7017+
<source>Secure Enclaves</source>
7018+
<target state="new">Secure Enclaves</target>
7019+
<note></note>
7020+
</trans-unit>
7021+
<trans-unit id="ConnectionConfigOptions_secureEnclaves_description">
7022+
<source>Enables or disables Secure Enclaves for the connection</source>
7023+
<target state="new">Enables or disables Secure Enclaves for the connection</target>
7024+
<note></note>
7025+
</trans-unit>
7026+
<trans-unit id="ConnectionConfigOptions_common_category_Enabled">
7027+
<source>Disabled</source>
7028+
<target state="new">Disabled</target>
7029+
<note></note>
7030+
</trans-unit>
7031+
<trans-unit id="ConnectionConfigOptions_common_category_Disabled">
7032+
<source>Disabled</source>
7033+
<target state="new">Disabled</target>
7034+
<note></note>
7035+
</trans-unit>
70267036
</body>
70277037
</file>
70287038
</xliff>

test/Microsoft.SqlTools.ServiceLayer.UnitTests/Connection/ConnectionDetailsTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ public void ConnectionDetailsOptionsShouldBeDefinedInConnectionProviderOptions()
171171
details.MinPoolSize = expectedForInt + index++;
172172
details.PacketSize = expectedForInt + index++;
173173
details.ColumnEncryptionSetting = expectedForStrings + index++;
174+
details.SecureEnclaves = expectedForStrings + index++;
174175
details.EnclaveAttestationProtocol = expectedForStrings + index++;
175176
details.EnclaveAttestationUrl = expectedForStrings + index++;
176177
details.Encrypt = expectedForStrings + index++;

0 commit comments

Comments
 (0)