By digitally signing a message you can prevent tampering with a message and guarantee it is authentic. You can apply your unique digital mark to the message. This digital mark includes a certificate and public key. The public key is sent to recipients of your message. The recipient can use the public key to verify that message is from you and that it has not been altered in its transit.
The makecert is a tool available through Windows Software Development Kit (SDK) for Windows8. For testing and development purposes you may want to create your own Certificate Authority (CA) certificate and client certificate. The following command can be used to create your certificate authority, along with an explanation of each of the options you pass to makecert command line tool:
The following command can be used to create a certificate and store it and its private key in the Windows Certificate Store:
Note: -sr parameter is current user, however depending which host instance will access the certificate store you will need to specify the appropriate user account. When executing this command you will be asked for the certificate authority's private key's password, so that it can use the private key to sign the client certificate. It then will store the client certificate (and its private key) in the current user's Personal store. A copy of the client certificate will also be created on the hard drive. The other way the client certificate can be create is to create it and its private key as files on the hard drive. Both can then be combined into a single PFX (Personal Information Exchange) file, which can be imported into your certificate store if you wish. To do this, the following makecert command can be executed:
By executing this makecert command you will be asked for a password with which you lock the new private key you are creating for this certificate. It will also ask for the password of the certificate authority's private key. It subsequently creates the client certificate on the hard drive and also the private key in a PVK file. To combine the private key and the certificate into a PFX file, the following command with Pvk2Pfx command line tool:
A PFX file will be created, which you can import into the Personal store using MMC in a similar fashion as you did with the certificate authority certificate. Windows uses .pfx for a PKCS #12 file. This file can contain a variety of cryptographic information, including certificates, certificate chains, root authority certificates, and private keys. Its contents can be cryptographically protected (with passwords) to keep private keys private and preserve the integrity of the root certificates. You can import the PFX file when logged in under account that is used by the host instance that access the certificate store.
BizTalk Server uses a private key to sign outgoing messages. This can be achieved by using the standard encoding component (S/MIME) in the send pipeline. You can configure the encoding component to sign all outgoing messages. The signing key and certificate that are used to sign the outgoing message are retrieved from the personal certificate store for the host service account where the pipeline is running. See also Signing messages in BizTalk Server.
Request a digital signature certificate with a private-public key pair from a Certificate Authority (CA) for BizTalk Server to use or use the one generated by yourself using the makcert tool (see Makecert command tool). Send the certificate with the public key to the communication partner(s) that need to verify the digital signature on your messages. You can also use makecert.exe command line tool to create a self-signed certificate. For signing messages you need to log on the BizTalk machine with the service account for the host instance running the handler that will send messages to partner(s). Install the private key certificate that BizTalk Server will use to sign messages in the personal store for the service account. For verifying messages you need to install the public key certificate of your communication partner(s) in the Other People store. This certificate is used to verify the digital signature of the messages of your partner(s).
a) Create a new BizTalk project and add a new send pipeline by right-clicking the project, select Add --> New Item, and select Send Pipeline from the Add New Item dialog. Specify a name for the pipeline according to your naming convention. b) Drag the MIME/SMIME Encoder component from the BizTalk Pipeline Components section of the toolbox to the Encode stage of the send pipeline. c) Select and right-click the component, and select Properties. Change the value of the Signature Type to ClearSign or BlobSign. This will ensure that the certificate will be appended to the message and/or encoded. The other option is NoSign (default), which is not applicable as message will be not be signed. d) In case you use your own CA, you set the Check Certificate Revocation property of the S/MIME Encoder to False in your pipeline. If you use the your self-created CA then you can run into an error like "The revocation status of the certificate used to sign the message is unknown." e) Right click the project and go to Signing. Sign the project with a strong name. f) Subsequently go to deployment and specify a name for the application according to your naming convention. g) Build and deploy the BizTalk project. h) Create a send port to deliver the message to the recipient, using any transport adapter desired. You could choose FILE first for testing purposes. i) In the Administration Console right click BizTalk Group. Choose certificate and add the certificate to will be used for signing. Click Ok.
a) Create a new BizTalk project and add a new receive pipeline by right-clicking the project, select Add --> New Item, and select Receive Pipeline from the Add New Item dialog. Specify a name for the pipeline according to your naming convention. b) Drag the MIME/SMIME Encoder component from the BizTalk Pipeline Components section of the toolbox to the Decoder stage of the receive pipeline. c) Leave the properties as they are (default). d) In case you use your own CA, you set the Check Certificate Revocation property of the S/MIME Decoder to False in your pipeline. If you use the your self-created CA then you can run into an error like "The revocation status of the certificate used to sign the message is unknown." e) Subsequently go to deployment and specify a name for the application according to your naming convention. f) Build and deploy the BizTalk project. g) Create a receive port and a receive location to accept the signed message from the sender, using an appropriate transport adapter. Specify a name for the port and receive location according to your naming convention. h) Open the BizTalk Administration Console, and navigate to Platform Settings. Select Host Instances. Right click the BizTalk host that will receive the signed message and select Properties. i) Specify the certificate BizTalk will use to validate incoming messages. Paste the thumbprint of the certificate into the Thumbprint field in the Certificates section of the Host Properties dialog box.
BizTalk Server supports signing outbound messages and signature verification for inbound Secure Multipurpose Internet Mail Extensions (S/MIME) messages:
More information on how to configure BizTalk Server pipelines, receive locations, ports, and the BizTalk Server environment to receive and send signed messages:
The MakeCert.exe command line tool generates X.509 certificates for testing purposes only. It creates public and private key pairs for digital signatures and stores it in a certificate file. This tool also associates the key pair with a specified publisher's name and creates an X.509 certificate that binds a user-specified name to the public part of the key. For more information see:
Based on the security policies in your company, you may want to consider the questions provided through MSDN:
Naomi N edited Revision 43. Comment: Minor edit
Steef-Jan Wiggers edited Revision 39. Comment: Minor edit
Steef-Jan Wiggers edited Revision 38. Comment: Added additional tags
Sandro Pereira edited Revision 37. Comment: Fixing text format (bullets)
Steef-Jan Wiggers edited Revision 36. Comment: Fixed typos
Steef-Jan Wiggers edited Revision 35. Comment: Added resource link
Steef-Jan Wiggers edited Revision 34. Comment: Corrected text
Steef-Jan Wiggers edited Revision 33. Comment: Added Info
Steef-Jan Wiggers edited Revision 32. Comment: Added info
Steef-Jan Wiggers edited Revision 31. Comment: Added info
Steef-Jan Wiggers edited Original. Comment: Added topic and text
Steef-Jan Wiggers edited Revision 1. Comment: Added text and table
Steef-Jan Wiggers edited Revision 2. Comment: modified tabel and fixed toc
Steef-Jan Wiggers edited Revision 3. Comment: Added topic
Steef-Jan Wiggers edited Revision 4. Comment: Added text
Steef-Jan Wiggers edited Revision 5. Comment: Added topic See Also with resource links
Steef-Jan Wiggers edited Revision 6. Comment: Fixed TOC
Steef-Jan Wiggers edited Revision 9. Comment: Fixed header
Steef-Jan Wiggers edited Revision 10. Comment: Fixed TOC