Forums

 
ForumForumMainstream Foru...Mainstream Foru...General Discuss...General Discuss...Multi-tenantMulti-tenant
Previous Previous
 
Next Next
New Post
 9/17/2020 1:15 PM
 
While your approach will keep things simple, it is usually best to obfuscate so as to make it a little harder for hackers to understand your architecture. Also, by having separate connection strings, it allows us to use separate SQL user logins as an additional layer of security. Our Professional and Enterprise products allow the upload of a report with a custom SQL query, we wanted to make sure that each database had a separate login to prevent cross database hacking.
New Post
 9/17/2020 2:45 PM
 
Thanks for the reply. I understand the concern about hacking.

With our SurPaaS archetecture, we use the subdomain name to look up in tables we maintain that point to the proper database, which may or may not = the actual name of the DB.

For our SaaS customers, we use wildcard subdomain so that the users have a simple, contextual url by which to access their application.

https://tenantname/company.com is easy to remember. IT is true, if the tenant name is known, others can access the logon. That is why we set the default password to "must change"

What we are doing now with your method:
In the Spendid_hosting_sites view, we are setting "Connection_String" Initial Catalog with "tenantname", same as the end-user url subdomain. This works fine.

I would like to just skip the step of creating an IIS host for each tenant, and maintain another table.

Accepting all the disclaimers, I would like to add another factory that declares the subdomain as the database name as an option. I am looking for the best way to do this without changing too much SplendidCRM code.
New Post
 12/14/2020 10:13 AM
 
Ok, we have SplendidCRM setup working using the HOSTINGDATABASE.

We are now trying to move to Azure SQL, which seems to work fine with single tenant. I am running into a problem with mutitenant. For some reason, the app is not looking up the sites (SPENDID_HOSTING_SITES), and if so, is not pointing to the correct tenant database.

I know Azure SQL does not support [use] to switch between databases in a single session and this could be the problem.

Can you provide guidance on using Azure SQL with HOSTINGDATABASE config?
New Post
 12/27/2020 3:18 AM
 
We don't use the hosting database solution with our Azure system. Instead, we have created SplendidCRM Ultimate Edition to dynamically create new VM and SQL instances for each customer.

I'm not sure why you would have a problem connecting to 2 separate databases inside an Azure VM. I would expect the problems you are having to do with the fierwalls being used by SQL Azure.

.NET System.Data.SqlClient object should be able to connect to any number of separate databases. I would suggest that you use PowerShell to test connections to the various databases.
Previous Previous
 
Next Next
ForumForumMainstream Foru...Mainstream Foru...General Discuss...General Discuss...Multi-tenantMulti-tenant