@thesis{Schmitz2023, author = {Schmitz, Michael}, title = {Design of a SaaS cloud platform for a medium-sized company with focus on multi-instance support}, publisher = {Technische Hochschule Ingolstadt}, address = {Ingolstadt}, url = {http://nbn-resolving.de/urn:nbn:de:bvb:573-36106}, pages = {74}, school = {Technische Hochschule Ingolstadt}, year = {2023}, abstract = {This thesis describes a concept for implementing a multi-instance multi-tenant SaaS. As base of this thesis a single-tenant solution is transformed, which was implemented without multi-tenancy in mind. Thus, tenant specific integrations are tightly coupled with other aspects like authentication, which restricts further development. To reduce coupling and allowing for reuse of business logic across multiple tenants, the conceptual solution aims to provide a uniform codebase for multiple tenants, while separating them at runtime and allowing different behavior and endpoints. The concept is evaluated by a reference proof of concept implementation. Following the arc42 template, this concept describes different viewing angles. Starting with an overview of the complete solution, it is zoomed in until a single service of the solution is exactly described in detail. After this the deployment and runtime are further elaborated. The concept takes the following aspects into consideration: • Authentication and authorization • Storing secrets securely • Differentiate tenants at runtime (and multiple sites per tenant) • Allowing different behavior or even endpoints per tenant • Guarantee the infrastructure state at all times • Ensure conventions defined in the concept are followed by developers • Documentation and service metadata collection These aspects are solved by utilizing interfaces, for which implementations are registered at runtime, conditionally loading controllers based on their namespace, storing secrets in the cloud with Azure Key Vault and using authentication middleware. The infrastructure state is ensured (at least partially) by leveraging Infrastructure as Code (IaC) with Microsoft's Bicep language. Conventions like name patterns for namespaces are ensured by analyzers, which show warnings and errors for not followed conventions. Lastly, the documentation is done based on code comments and C4 diagrams (generated by PlantUML). For customers an OpenAPI specification is generated based on the code comments on the REST endpoints.}, language = {en} }