Skip to content

Commit 8c9584e

Browse files
committed
Do not check encryption in variables that we know are not encrypted, and also, it is not necessary to read Env variables for them.
1 parent d458217 commit 8c9584e

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

dotnet/src/dotnetcore/Providers/Messaging/GXAzureServiceBus/AzureServiceBus.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ private void Initialize(GXService providerService)
4646
_connectionString = serviceSettings.GetEncryptedPropertyValue(PropertyConstants.QUEUE_CONNECTION_STRING);
4747
_subscriptionName = serviceSettings.GetEncryptedPropertyValue(PropertyConstants.TOPIC_SUBSCRIPTION);
4848
_fullyqualifiedNamespace = serviceSettings.GetEncryptedPropertyValue(PropertyConstants.FULLYQUALIFIEDNAMESPACE);
49-
string authenticationMethod = serviceSettings.GetEncryptedPropertyValue(PropertyConstants.AUTHENTICATION_METHOD);
49+
string authenticationMethod = serviceSettings.GetPropertiesValue(PropertyConstants.AUTHENTICATION_METHOD);
5050

51-
string sessionEnabled = serviceSettings.GetEncryptedOptPropertyValue(PropertyConstants.SESSION_ENABLED);
51+
string sessionEnabled = serviceSettings.GetPropertiesValue(PropertyConstants.SESSION_ENABLED);
5252

5353
if (!string.IsNullOrEmpty(sessionEnabled))
5454
_sessionEnabled = Convert.ToBoolean(sessionEnabled);
5555
else
5656
_sessionEnabled = false;
5757

58-
string senderIdentifier = serviceSettings.GetEncryptedOptPropertyValue(PropertyConstants.SENDER_IDENTIFIER);
58+
string senderIdentifier = serviceSettings.GetPropertiesValue(PropertyConstants.SENDER_IDENTIFIER);
5959

6060
ServiceBusSenderOptions serviceBusSenderOptions = new ServiceBusSenderOptions();
6161
if (!string.IsNullOrEmpty(senderIdentifier))
@@ -82,9 +82,9 @@ private void Initialize(GXService providerService)
8282
{
8383
_serviceBusReceiverOptions = new ServiceBusReceiverOptions();
8484

85-
string receiveMode = serviceSettings.GetEncryptedOptPropertyValue(PropertyConstants.RECEIVE_MODE);
86-
string prefetchCount = serviceSettings.GetEncryptedOptPropertyValue(PropertyConstants.PREFETCH_COUNT);
87-
string receiverIdentifier = serviceSettings.GetEncryptedOptPropertyValue(PropertyConstants.RECEIVER_IDENTIFIER);
85+
string receiveMode = serviceSettings.GetPropertiesValue(PropertyConstants.RECEIVE_MODE);
86+
string prefetchCount = serviceSettings.GetPropertiesValue(PropertyConstants.PREFETCH_COUNT);
87+
string receiverIdentifier = serviceSettings.GetPropertiesValue(PropertyConstants.RECEIVER_IDENTIFIER);
8888

8989
if (!string.IsNullOrEmpty(receiveMode))
9090
_serviceBusReceiverOptions.ReceiveMode = (ServiceBusReceiveMode)Convert.ToInt16(receiveMode);

dotnet/src/dotnetcore/Providers/Messaging/GXMessageBroker/MessageBrokerProvider.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ private static void Preprocess(string name, GXProperties properties)
7575
SetEncryptedProperty(properties, PropertyConstants.MESSAGEBROKER_AZURESB_QUEUENAME);
7676
SetEncryptedProperty(properties, PropertyConstants.MESSAGEBROKER_AZURESB_SUBSCRIPTION_NAME);
7777
SetEncryptedProperty(properties, PropertyConstants.MESSAGEBROKER_AZURESB_CONNECTIONSTRING);
78-
SetEncryptedProperty(properties, PropertyConstants.MESSAGEBROKER_AZURESB_FULLYQUALIFIEDNAMESPACE);
79-
SetEncryptedProperty(properties, PropertyConstants.AUTHENTICATION_METHOD);
78+
SetEncryptedProperty(properties, PropertyConstants.MESSAGEBROKER_AZURESB_FULLYQUALIFIEDNAMESPACE);
8079
if (string.IsNullOrEmpty(providerService.ClassName) || !providerService.ClassName.Contains(className))
8180
{
8281
providerService.ClassName = PropertyConstants.AZURE_SB_PROVIDER_CLASSNAME;

dotnet/src/dotnetcore/Providers/Messaging/GXMessageBroker/ServiceSettings.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ public ServiceSettings(string serviceNameResolver, string name, GXService gXServ
2020
service = gXService;
2121
}
2222

23-
public string GetEncryptedOptPropertyValue(string propertyName, string alternativePropertyName = null)
23+
public string GetPropertiesValue(string propertyName)
2424
{
25-
string value = GetEncryptedPropertyValue(propertyName, alternativePropertyName, null);
26-
return value;
25+
return service.Properties.Get(propertyName);
2726
}
2827
public string GetEncryptedPropertyValue(string propertyName, string alternativePropertyName = null)
2928
{

0 commit comments

Comments
 (0)