Skip to content

Commit

Permalink
Adding missing SecureEnclaves option to connection provider options (#…
Browse files Browse the repository at this point in the history
…2447)

* adding missing SecureEnclaves connection option

* updated strings files

* Updating test

* keeping naming consistent

* Updating string names
  • Loading branch information
Benjin authored Feb 20, 2025
1 parent a4cb908 commit b1f72de
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,21 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions()
GroupName = GroupNames.Security,
CategoryValues =
[
new CategoryValue { Name = "Disabled", DisplayName = SR.ConnectionConfigOptions_columnEncryptionSetting_category_Disabled },
new CategoryValue { Name = "Enabled", DisplayName = SR.ConnectionConfigOptions_columnEncryptionSetting_category_Enabled }
new CategoryValue { Name = "Disabled", DisplayName = SR.ConnectionConfigOptions_common_category_Disabled },
new CategoryValue { Name = "Enabled", DisplayName = SR.ConnectionConfigOptions_common_category_Enabled }
]
},
new ConnectionOption
{
Name = "secureEnclaves",
DisplayName = SR.ConnectionConfigOptions_secureEnclaves_displayName,
Description = SR.ConnectionConfigOptions_secureEnclaves_description,
ValueType = ConnectionOption.ValueTypeCategory,
GroupName = GroupNames.Security,
CategoryValues =
[
new CategoryValue { Name = "Disabled", DisplayName = SR.ConnectionConfigOptions_common_category_Disabled },
new CategoryValue { Name = "Enabled", DisplayName = SR.ConnectionConfigOptions_common_category_Enabled }
]
},
new ConnectionOption
Expand Down
34 changes: 28 additions & 6 deletions src/Microsoft.SqlTools.ServiceLayer/Localization/sr.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9983,6 +9983,22 @@ public static string ConnectionConfigOptions_groups_context
}
}

public static string ConnectionConfigOptions_common_category_Enabled
{
get
{
return Keys.GetString(Keys.ConnectionConfigOptions_common_category_Enabled);
}
}

public static string ConnectionConfigOptions_common_category_Disabled
{
get
{
return Keys.GetString(Keys.ConnectionConfigOptions_common_category_Disabled);
}
}

public static string ConnectionConfigOptions_server_displayName
{
get
Expand Down Expand Up @@ -10183,19 +10199,19 @@ public static string ConnectionConfigOptions_columnEncryptionSetting_description
}
}

public static string ConnectionConfigOptions_columnEncryptionSetting_category_Disabled
public static string ConnectionConfigOptions_secureEnclaves_displayName
{
get
{
return Keys.GetString(Keys.ConnectionConfigOptions_columnEncryptionSetting_category_Disabled);
return Keys.GetString(Keys.ConnectionConfigOptions_secureEnclaves_displayName);
}
}

public static string ConnectionConfigOptions_columnEncryptionSetting_category_Enabled
public static string ConnectionConfigOptions_secureEnclaves_description
{
get
{
return Keys.GetString(Keys.ConnectionConfigOptions_columnEncryptionSetting_category_Enabled);
return Keys.GetString(Keys.ConnectionConfigOptions_secureEnclaves_description);
}
}

Expand Down Expand Up @@ -14883,6 +14899,12 @@ public class Keys
public const string ConnectionConfigOptions_groups_context = "ConnectionConfigOptions_groups_context";


public const string ConnectionConfigOptions_common_category_Enabled = "ConnectionConfigOptions_common_category_Enabled";


public const string ConnectionConfigOptions_common_category_Disabled = "ConnectionConfigOptions_common_category_Disabled";


public const string ConnectionConfigOptions_server_displayName = "ConnectionConfigOptions_server_displayName";


Expand Down Expand Up @@ -14958,10 +14980,10 @@ public class Keys
public const string ConnectionConfigOptions_columnEncryptionSetting_description = "ConnectionConfigOptions_columnEncryptionSetting_description";


public const string ConnectionConfigOptions_columnEncryptionSetting_category_Disabled = "ConnectionConfigOptions_columnEncryptionSetting_category_Disabled";
public const string ConnectionConfigOptions_secureEnclaves_displayName = "ConnectionConfigOptions_secureEnclaves_displayName";


public const string ConnectionConfigOptions_columnEncryptionSetting_category_Enabled = "ConnectionConfigOptions_columnEncryptionSetting_category_Enabled";
public const string ConnectionConfigOptions_secureEnclaves_description = "ConnectionConfigOptions_secureEnclaves_description";


public const string ConnectionConfigOptions_attestationProtocol_displayName = "ConnectionConfigOptions_attestationProtocol_displayName";
Expand Down
16 changes: 12 additions & 4 deletions src/Microsoft.SqlTools.ServiceLayer/Localization/sr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -5437,6 +5437,14 @@ The Query Processor estimates that implementing the following index could improv
<value>Data Source &amp; Context</value>
<comment></comment>
</data>
<data name="ConnectionConfigOptions_common_category_Enabled" xml:space="preserve">
<value>Disabled</value>
<comment></comment>
</data>
<data name="ConnectionConfigOptions_common_category_Disabled" xml:space="preserve">
<value>Disabled</value>
<comment></comment>
</data>
<data name="ConnectionConfigOptions_server_displayName" xml:space="preserve">
<value>Server name</value>
<comment></comment>
Expand Down Expand Up @@ -5537,12 +5545,12 @@ The Query Processor estimates that implementing the following index could improv
<value>Enables or disables Always Encrypted for the connection</value>
<comment></comment>
</data>
<data name="ConnectionConfigOptions_columnEncryptionSetting_category_Disabled" xml:space="preserve">
<value>Disabled</value>
<data name="ConnectionConfigOptions_secureEnclaves_displayName" xml:space="preserve">
<value>Secure Enclaves</value>
<comment></comment>
</data>
<data name="ConnectionConfigOptions_columnEncryptionSetting_category_Enabled" xml:space="preserve">
<value>Enabled</value>
<data name="ConnectionConfigOptions_secureEnclaves_description" xml:space="preserve">
<value>Enables or disables Secure Enclaves for the connection</value>
<comment></comment>
</data>
<data name="ConnectionConfigOptions_attestationProtocol_displayName" xml:space="preserve">
Expand Down
7 changes: 5 additions & 2 deletions src/Microsoft.SqlTools.ServiceLayer/Localization/sr.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2289,6 +2289,9 @@ ConnectionConfigOptions_groups_resiliency = Connection Resiliency & Failover
ConnectionConfigOptions_groups_pooling = Pooling Settings
ConnectionConfigOptions_groups_context = Data Source & Context

ConnectionConfigOptions_common_category_Enabled = Disabled
ConnectionConfigOptions_common_category_Disabled = Disabled

ConnectionConfigOptions_server_displayName = Server name
ConnectionConfigOptions_server_description = Name of the SQL Server instance
ConnectionConfigOptions_database_displayName = Database name
Expand All @@ -2314,8 +2317,8 @@ ConnectionConfigOptions_currentLanguage_displayName = Current language
ConnectionConfigOptions_currentLanguage_description = The SQL Server language record name
ConnectionConfigOptions_columnEncryptionSetting_displayName = Always Encrypted
ConnectionConfigOptions_columnEncryptionSetting_description = Enables or disables Always Encrypted for the connection
ConnectionConfigOptions_columnEncryptionSetting_category_Disabled = Disabled
ConnectionConfigOptions_columnEncryptionSetting_category_Enabled = Enabled
ConnectionConfigOptions_secureEnclaves_displayName = Secure Enclaves
ConnectionConfigOptions_secureEnclaves_description = Enables or disables Secure Enclaves for the connection
ConnectionConfigOptions_attestationProtocol_displayName = Attestation Protocol
ConnectionConfigOptions_attestationProtocol_description = Specifies a protocol for attesting a server-side enclave used with Always Encrypted with secure enclaves
ConnectionConfigOptions_attestationProtocol_category_HGS = Host Guardian Service
Expand Down
30 changes: 20 additions & 10 deletions src/Microsoft.SqlTools.ServiceLayer/Localization/sr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,6 @@
<target state="new">Enables or disables Always Encrypted for the connection</target>
<note></note>
</trans-unit>
<trans-unit id="ConnectionConfigOptions_columnEncryptionSetting_category_Disabled">
<source>Disabled</source>
<target state="new">Disabled</target>
<note></note>
</trans-unit>
<trans-unit id="ConnectionConfigOptions_columnEncryptionSetting_category_Enabled">
<source>Enabled</source>
<target state="new">Enabled</target>
<note></note>
</trans-unit>
<trans-unit id="ConnectionConfigOptions_attestationProtocol_displayName">
<source>Attestation Protocol</source>
<target state="new">Attestation Protocol</target>
Expand Down Expand Up @@ -7023,6 +7013,26 @@ The Query Processor estimates that implementing the following index could improv
<target state="new">Data Source &amp; Context</target>
<note></note>
</trans-unit>
<trans-unit id="ConnectionConfigOptions_secureEnclaves_displayName">
<source>Secure Enclaves</source>
<target state="new">Secure Enclaves</target>
<note></note>
</trans-unit>
<trans-unit id="ConnectionConfigOptions_secureEnclaves_description">
<source>Enables or disables Secure Enclaves for the connection</source>
<target state="new">Enables or disables Secure Enclaves for the connection</target>
<note></note>
</trans-unit>
<trans-unit id="ConnectionConfigOptions_common_category_Enabled">
<source>Disabled</source>
<target state="new">Disabled</target>
<note></note>
</trans-unit>
<trans-unit id="ConnectionConfigOptions_common_category_Disabled">
<source>Disabled</source>
<target state="new">Disabled</target>
<note></note>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ public void ConnectionDetailsOptionsShouldBeDefinedInConnectionProviderOptions()
details.MinPoolSize = expectedForInt + index++;
details.PacketSize = expectedForInt + index++;
details.ColumnEncryptionSetting = expectedForStrings + index++;
details.SecureEnclaves = expectedForStrings + index++;
details.EnclaveAttestationProtocol = expectedForStrings + index++;
details.EnclaveAttestationUrl = expectedForStrings + index++;
details.Encrypt = expectedForStrings + index++;
Expand Down

0 comments on commit b1f72de

Please sign in to comment.