EldoS | Feel safer!

Software components for data protection, secure storage and transfer

XmlSigner and BinarySecurityToken

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#36835
Posted: 05/30/2016 06:11:35
by Paolo  (Standard support level)
Joined: 12/15/2015
Posts: 30

Hi guys!

I have the necessity to include in my sign XML (as title stated) 2 nodes as :
1) BinarySecurityToken
2) SecurityTokenReference

Point 2) is not a problem I already found how to write it :

Code
Dim WSSEtokenRef As TElXMLWSSESecurityTokenReference = New TElXMLWSSESecurityTokenReference(True)
WSSEtokenRef.ReferenceType = SBXMLWSSCore.Unit.wsrtReference
WSSEtokenRef.Reference.ValueType = SBXMLDefs.Unit.xmlWSSBinaryTokenX509v3
WSSEtokenRef.Reference.URI = "#uuid_" + LCase(uuid_guid)


But for poiont 1) I cant find a way to extract the B64 value of token. I found some old topics about it but no one of them can help me totally (I suppose becouse of the old structure).

Have you any suggestion?

Thanks.

bye
Paolo
#36836
Posted: 05/30/2016 07:16:23
by Dmytro Bogatskyy (EldoS Corp.)

Thank you for contacting us,

As I understand, you are trying to sign a SOAP message. Then, please check Samples\[Language]\XMLBlackbox\Desktop\SecureSOAP sample. It allows to create WS-Security digital signature and place a signer certificate in BinarySecurityToken (use "WSS Signature Handler" in signature option and "In Binary Security Token" for embed certificate option).
#36837
Posted: 05/30/2016 08:02:25
by Paolo  (Standard support level)
Joined: 12/15/2015
Posts: 30

Am I wrong or these samples are only in C# language?

No such folders in VB.NET sub folders
#36838
Posted: 05/30/2016 12:33:46
by Dmytro Bogatskyy (EldoS Corp.)

Hi,

Quote

Am I wrong or these samples are only in C# language?

No such folders in VB.NET sub folders

Yes, this sample is not available for VB.NET. So, please use C# sample to check if SOAP components could create signature in format that you need, if it match your requirements then it should not be too difficult to translate the code for signing (normally it is 10-20 lines of code).
#36840
Posted: 05/31/2016 03:51:25
by Paolo  (Standard support level)
Joined: 12/15/2015
Posts: 30

Hi Dmytro, yeah the problem is not the translate :)

Actually I have tried to search inside that project the structure that operate that single transformation transaction for the BinarySecurityToken but there is nothing that seems to fit my purpouse.

From where I go into my project, I only need the B64 value of the certificate and 2 InclusiveNamespace's tag (1 in CanonicalizationMethod and 1 in Transform TAG).

Which SecureBlock's classes are involved in the process?

Thanks a lot.

Sincerly
Paolo
#36841
Posted: 05/31/2016 06:13:42
by Dmytro Bogatskyy (EldoS Corp.)

Hi,

Here, you can find a short sample that add WSS signature to the SOAP message:
https://www.eldos.com/documentation/sb...ature.html

Quote
From where I go into my project, I only need the B64 value of the certificate and 2 InclusiveNamespace's tag (1 in CanonicalizationMethod and 1 in Transform TAG).

Which SecureBlackbox's classes are involved in the process?

To create and fill BinarySecurityToken element the TElXMLWSSSignatureHandler class uses SBXMLWSSCore.TElXMLWSSEBinarySecurityToken class, this class allows to set certificate as Base64 value.
As for "InclusiveNamespace's tag", the TElXMLWSSSignatureHandler class uses inclusive canonicalization method by default for signature and references, so you don't need to do anything here.

P.S. Could you please post a sample signature that you need to create, so we could suggest the most suitable component for this. Please use Helpdesk ( https://www.eldos.com/helpdesk/ ) to post the documents to us privately.
#36842
Posted: 05/31/2016 07:45:22
by Paolo  (Standard support level)
Joined: 12/15/2015
Posts: 30

Hi Dmytro,

ticket submitted as you request!

Thanks a lot :)

Paolo
Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.

Reply

Statistics

Topic viewed 870 times

Number of guests: 2, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!