BizTalk: Removing a password from a send port for a user adapter when exporting a binding for an application

I have problems clearing the password when exporting an application containing a send port using the adapter I made for BizTalk Server 2010.

The send port uses the adapter I made, based on Microsoft.Samples.BizTalk.Adapter.Common BaseAdapter (v.1.0.2).

The TransmitLocation.xsd and TransmitHandler.xsd schemas use a field for a specific AdapterFramework password, and both are defined as:

<xs:element minOccurs="1" default="" name="passwordField"> <xs:simpleType> <xs:annotation> <xs:appinfo> <baf:designer xmlns:baf="BiztalkAdapterFramework.xsd"> <baf:category _locID="mailAuthIndstillingerKategori">Password related category</baf:category> <baf:displayname _locID="passwordName">Password:</baf:displayname> <baf:description _locID="passwordDescription">Password description.</baf:description> <baf:editor assembly="%BTSROOT%\\Developer Tools\\Microsoft.BizTalk.Adapter.Framework.dll">Microsoft.BizTalk.Adapter.Framework.ComponentModel.PasswordUITypeEditor</baf:editor> <baf:converter assembly="%BTSROOT%\\Developer Tools\\Microsoft.BizTalk.Adapter.Framework.dll">Microsoft.BizTalk.Adapter.Framework.ComponentModel.PasswordTypeConverter</baf:converter> </baf:designer> </xs:appinfo> </xs:annotation> <xs:restriction base="xs:string"> <xs:maxLength value="50" /> </xs:restriction> </xs:simpleType> </xs:element> 

Some google hits mention that setting the vt = "1" 'attribute for an item to be cleared should do the trick. I tried to set / add this attribute when ValidateConfiguration () is called. But the XML-configuration is returned as a string, which is then escaped before being inserted into the < CustomProps> xml exported to the binding file.

I tried to indicate that SendHandlerPropertiesXML and SendLocationPropertiesXML AdapterConfig in the registry entry should use the following <CustomProps> , with the vt = "1" attribute, in the hope that it will remove all the binding properties for the port (not optimal, but better solution than letting anyone or export password):

 SendHandlerPropertiesXML : <CustomProps><AdapterConfig vt="1"/></CustomProps> SendLocationPropertiesXML : <CustomProps><AdapterConfig vt="1"/></CustomProps> 

When an application with a configured send port is exported, the specific XML is as follows:

 <TransportTypeData>&lt;CustomProps&gt;&lt;AdapterConfig vt="1"&gt;&amp;lt;Config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&amp;gt;&amp;lt;passwordField vt="1"&amp;gt;CLEARTEXTPASSWORD;lt;/passwordField&amp;gt;&amp;lt;uri&amp;gt;SMTP://NOT-USED&amp;lt;/uri&amp;gt;&amp;lt;/Config&amp;gt;&lt;/AdapterConfig&gt;&lt;/CustomProps&gt;</TransportTypeData> 

Each time the binding is exported, the adapter method is overloaded: ValidateConfiguration () , but there is no way to find out if it was when the adapter was configured or when the bindings were exported, which means: you cannot cancel the password in the returned xml string, since it will also lock password during setup.

There are other built-in adapters that do this (EG: SMTP adapter), and I'm sure this is something basic that I misunderstand. But any help or pointers would be very helpful.

+4
source share
1 answer

I noticed that the Blogical Sftp Adapter on CodePlex did the job and I was able to replicate it.

All you have to do is add type="baf:Password" to the password elements.

You can link to your circuit here .

+2
source

All Articles