Reading Values from Multiple SSO application in binding file

Topics: Bindings File, Settings Management and SSO
Jul 25, 2013 at 7:25 AM
Hi Tom,

I have a situation where we store all username and passwords in a single Biztalk SSO application which will be maintained by some group. In a Biztalk solution I will have my separate SettingsFileGenerator.xml that will contain other details like URL , ServerName etc which are specific to my solution. In my binding files I want to read the server name or URLs from my local SettingsFileGenerator.xml file which is what we do normally. But I want to set the username and password from the common sso application which is not present in my local SettingsFileGenerator.xml . Is it possible to use variables from two different SSO applications in a single binding file ?

BR,
Nikhil Rai
Coordinator
Aug 19, 2013 at 6:11 AM
Hi Nikhil,

There was a previous discussion along the same lines. It is not built-in functionality.

Will you have the other SettingsFileGenerator.xml file when you build the MSI, or will it exist only on the server and completely separate from your app deploy?

If it is completely separate, then you'd have to make an assumption of where it is located on the server and code your .btdfproj changes to use that location. You can add a Target element in your .btdfproj with the AfterTargets="ExportSettings" attribute, which will run immediately after your app's settings export. In there, you can call EnvironmentSettingsExporter.exe to export the other file. As for the bindings file, XmlPreprocess.exe itself supports multiple settings XML files with multiple /s parameters, but the Deployment Framework is coded to use only one file and one parameter.

You could override the PreprocessBindings target in your .btdfproj to add the additional /s parameter. You'd have to copy the PreprocessBindings target from BizTalkDeploymentFramework.targets (in the Program Files\MSBuild folder tree) and paste it into your .btdfproj, then modify it.

Anything is possible since you have the flexibility of MSBuild, but it will take some work on your part to make it come together.

Another option is to build the source code from the Environment Settings Manager, which has an option to merge together multiple setting spreadsheet files. It is unreleased but probably works fine.

Thanks,
Tom
Aug 19, 2013 at 5:33 PM
Hi Tom,
Thanks for your reply. I just want to read the value from a different SSO application which will be deployed only once and can be used by different Biztalk solutions.For example , I will deploy all the SAP user name and passwords in single SSO application say "SAPCredentials". Then I want to read the values from this common application "SAPCredentials" in binding files of different Biztalk solution where I do not have to insert the username and passwords in each SettingsFileGenerator.xml file .Is this possible ?

Also I would like to thank you for this wonderful framework which has made deployment/undeployment very convenient and is easy enough to extend according to different needs. We have started to use this for all our biztalk solution deployments.

With Regards,
Nikhil Rai


Coordinator
Aug 20, 2013 at 7:12 AM
Hi Nikhil,

First, thank you very much for your positive comments. It's great to hear that kind of feedback!

Second, the easiest way that comes to mind to work off of a deployed SSO app is to automate an export from the deployed SSO app to an XML settings file on disk early in the deployment process (same AfterTargets attribute mentioned in previous reply). You could then do what I described above to pass the app-specific settings file path and the exported-from-SSO settings file path to XmlPreprocess.exe. It would be easy to take the existing source code for SSOSettingsFileImport and add an export option to it that reverses the process and does SSO->disk.

No matter what you do, there will be a fair amount of work and testing involved for you to get it all working for both local and server deployments. That said, it can definitely be done.

Thanks,
Tom