Mirroring through Azure App (Certificate hosting?)

Hi,

I've tried setting up db-mirroring with the mirroring service being hosted as an Azure Application between online and a local database (not hosted in Azure).

My question really is how do you generally make the required online-certificates available to the Azure App?

RE: Mirroring through Azure App (Certificate hosting?)

Hi Johan

Our solution was to upload the SuperOffice certificates to Azure as part of the deployment and map it in my code like this:

var soFederatedLoginCertPath = HostingEnvironment.MapPath("~/App_Data/Prod/") + "SuperOfficeFederatedLogin.crt";

tokenHandler.JwtIssuerSigningCertificate = new X509Certificate2(soFederatedLoginCertPath),

 

Arild

Av: Arild Eik 9. aug 2021

RE: Mirroring through Azure App (Certificate hosting?)

I see, so you've got the SO Login nuget aswell in your mirroring service?

And then, how do you attach that to the mirroring calls?

Av: Johan Spånberg 9. aug 2021

RE: Mirroring through Azure App (Certificate hosting?)

I’m not sure what you mean by SO Login nuget. Our solutions are all based on the example code from SuperOffice where only two SO nuget packages are installed: SuperOffice.Crm.Online.Core and SuperOffice.Crm.Online.Mirroring.

I must also admit that we always have the app + DB in either Azure or locally and have never split them like you are doing... Why do you want to do it this way? If the app is running in Azure, I assume you need at least a secure tunnel to your local database so the app can access the DB directly?

Av: Arild Eik 9. aug 2021

RE: Mirroring through Azure App (Certificate hosting?)

Hi Johan,

I too would be interested to know what you mean by "SO Login nuget", as there is no need to perform any login with regards to Database Mirroring. 

There is only a need to validate the request sent by SuperOffice. As Arild has shared, you can override certificate lookup and loading using the SuperOffice.Crm.Online.Core package. There is an example that demonstrates that override in the Database Mirroring github repo.

Hope this helps!

Av: Tony Yates 9. aug 2021