11
Views
3
Comments
Solved
How to access certificate from my server to use in SOAP Call
Question

Hi I'm trying to consume a SOAP service which needs a Client Certificate to authenticate.  I've already got Client certificate uploaded to the Server but can't find how to bind the certificate to the Web service like is shown here:  https://www.outsystems.com/forums/discussion/9471/configure-and-use-web-service-client-side-certificates/


The service center does not have there options in my case like in the post that I reference:  


I've created the function SetupCertificateAuth and now need the Binary data from the certificate to import into that function.  How can I get that Binary from the Certificate.


Here is my Cert: 

mvp_badge
MVP
Rank: #76
Solution

Hi Viktor,

If you want to fetch the certificate from the Local Machine Certificate Store on the server, you would indeed need to write C# code for that functionality as there is no existing function that does that for you.

I did a quick search on the Forge and it seems this component already includes an extension that you can use to fetch certificates from the certificate store on the server. You can check it out to see if it suits your needs.

Hope this helps!

Regards,

Nordin

mvp_badge
MVP
Rank: #76

Hi Viktor,

Have you seen this more recent guide on how to authenticate using a client certificate?

As is stated in the Notes, you are free to choose where you want to retrieve the client certificate you want to include in your OutSystems application from. You could for example simply create a Certificate entity in your Database where you store the .pfx filecontent. But there are some other options as you can read from the notes.

After you have chosen where you want to store the Certificate file, you simply need to fetch it from that location and pass the binary content of the certificate and its password to the SetupCertificateAuth function (which you call in the OnBeforeRequestAdvanced callback action) as shown in the example and described in Step 7 in the article.

Hope this helps!

Regards,

Nordin

Rank: #22099

Hi Nordin, thanks for the response, yes I saw this article and I'm using a CA certificate there for I have gotten it installed (stored) on the server.   So the question is how to I fetch it (the binary)  from that location (the server)?  Is there a function for that or do I have to write a code for that in the Integration studio?


If the client certificate you're using was signed by an intermediate CA (Certificate Authority) and not a root CA, you must install the certificate for this intermediate CA in every front-end server of the environment. The servers must contain the certificates for every CA in the certificate chain, from intermediate CAs to the root CA. To request the installation on OutSystems cloud environments check this document and for self-managed environments follow these instructions instead.

mvp_badge
MVP
Rank: #76
Solution

Hi Viktor,

If you want to fetch the certificate from the Local Machine Certificate Store on the server, you would indeed need to write C# code for that functionality as there is no existing function that does that for you.

I did a quick search on the Forge and it seems this component already includes an extension that you can use to fetch certificates from the certificate store on the server. You can check it out to see if it suits your needs.

Hope this helps!

Regards,

Nordin