0
Answered

Improve error message or remove issue with gtrSecurePassword being present but not populated

Matthew Clark 8 years ago in UNIFYBroker/Frontier ichris/chris21 • updated by anonymous 3 years ago 4

If an empty gtrSecurePassword attribute is present in a communicator element (ie. gtrSecurePassword=""), the below error message is thrown to the Event Viewer. This error message should be made more specific. The better solution would be to change the method to deal with an empty value.

Error occurred in module: Connectors

The following error occurred:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)
at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.Stream.Dispose()
at Unify.Framework.SecureStringExtensions.WorkerDecryptString(String encryptedString)
at Unify.Framework.SecureStringExtensions.GetAttributeSecureString(XElement workerInformation, XName attributeName, String defaultValue)
at Unify.Framework.Chris21GtrWorkerFactory.CreateComponent(XElement workerElement)
at Unify.Connectors.Chris21GtrConnectorFactoryBase`3.CreateComponent(IMultiKeyedConnectorFactoryInformation factoryInformation)
at Unify.Framework.PlugInGeneratorBase`4.CreateComponent(TFactoryInfo factoryInformation)
at Unify.Framework.ConnectorEngineConnectorGenerator.CreateComponent(IMultiKeyedConnectorFactoryInformation factoryInformation)
at Unify.Framework.ConnectorGenerator.CreateComponent(IConnectorGeneratorInformation factoryInformation)
at Unify.Framework.PollingConnectorEngineConfigurationFactory.CreateConnectorConfigurationBase(XElement xmlConfiguration, IConnectorHelper connectorHelper, ITiming pollingTiming, INotificationMessageService messageService, ITiming getAllEntitiesTiming, IConnectorGroup connectorGroup)
at Unify.Framework.PollingConnectorConfigurationFactoryBase`2.CreateComponent(IConnectorConfigurationFactoryInformation`1 factoryInformation)
at Unify.Framework.PlugInGeneratorBase`4.CreateComponent(TFactoryInfo factoryInformation)
at Unify.Framework.ConnectorConfigurationGeneratorBase`4.CreateConnectorConfigurationFromNode(THelper connectorHelper, XElement connectorNode, TConnectorConfigurationCollection connectorConfigurationCollection, IConnectorGroup connectorGroup)
at Unify.Framework.ConnectorConfigurationGeneratorBase`4.CreateConnectorConfigurationCollection(XElement xmlCollection, THelper connectorHelper)
at Unify.Framework.ConnectorEngine.Initialize()
at Unify.Framework.UnifyEngine.Initialize()

Affected Versions:
Fixed by Version:

Confirmed that the Frontier chris21 password can be empty in the Frontier chris21 system.

The precedence for determining the password from the configuration is to:

1. Check for the existance of the gtrSecurePassword attribute, use the decrypted value.
2. Check for the existance of the gtrPassword attribute, use this value.
3. Neither gtrSecurePassword or gtrPassword attributes exist, so use an empty value.

As a workaround, you should be able to remove the gtrSecurePassword="" attribute and use gtrPassword="" instead, or remove both attributes and the default ampty value will be used.

If this works, then I will not make the change to allow gtrSecurePassword="".

My config did have a value for gtrPassword, but the service would not start with gtrSecurePassword="" also present

This is correct that removing the gtrSecurePassword="" attribute resolves the issue, hence it is minor

I agree with Rodney - if gtrSecurePassword is present then password should be ignored. I don't believe anyone should use a blank password in here and this is more of a knowledge base issue.

Remember in future versions there will be no hand editing of these files, I'd rather concentrate on the UI instead of covering our tracks against things like this.

No action to be taken.