title
stringlengths 3
46
| content
stringlengths 0
1.6k
|
---|---|
2:341 | Claims-based, where you can define values that must be received during the authentication to indicate that the user is authorized. |
2:342 | Policy-based, in which there is a policy established to define the access in that Controller. |
2:343 | |
2:344 | You may also define a controller or method in a class as being fully accessible to any user by defining the [AllowAnonymous] attribute. Be sure this kind of implementation will not cause any vulnerabilities in the system you are designing. |
2:345 | The model you decide to use will define exactly what each user will be able to do in the application. |
2:346 | Sensitive data |
2:347 | While designing, you, as a software architect, will have to decide which part of the data you store is sensitive, and it will need to be protected. By connecting to Azure, your web app will be able to store protected data in components such as Azure Storage and Azure Key Vault. Storage in Azure will be discussed in Chapter 12, Choosing Your Data Storage in the Cloud. |
2:348 | |
2:349 | It is highly recommended to check the Data Protection Framework that your solution will need to deal with, considering where it will be placed. |
2:350 | |
2:351 | It is worth mentioning that Azure Key Vault is used to protect secrets your app may have. Consider using this solution when you have this kind of requirement. |
2:352 | Web security |
2:353 | It is totally unacceptable to have a production solution deployed without the HTTPS protocol enabled. Azure Web Apps and ASP.NET Core solutions have various options to not only use but enforce the usage of this security protocol. |
2:354 | There are many known attacks and malicious patterns, such as cross-site request forgery, open redirect, and cross-site scripting. ASP.NET Core provides APIs to solve them. You need to find the ones that are useful for your solution. |
2:355 | Good programming practices, such as avoiding SQL injection by using parameters in your queries, is another important goal to achieve. |
2:356 | |
2:357 | You may find cloud architecture security patterns at https://docs.microsoft.com/en-us/azure/architecture/patterns/category/security. |
2:358 | |
2:359 | To finish, it is worth mentioning that security needs to be treated using the onion approach, which means that there are many layers of security to be implemented. You must have determined a policy to guarantee a process to access the data, including physical access for people who use the system you are developing. In addition, you also must develop a disaster recovery solution in case the system is attacked. The disaster recovery solution will depend on your cloud solution. We will discuss this later, in Chapter 10, Deciding on the Best Cloud-Based Solution. |
2:360 | Summary |
2:361 | Functional requirements that describe system behavior must be complemented with non-functional requirements that constrain system performance, scalability, availability, resilience, interoperability, usability, and security. |
2:362 | Performance requirements come from response time and system load requirements. As a software architect, you should ensure you have the required performance at the minimum cost, building efficient algorithms and taking full advantage of the available hardware resources with multithreading. |
2:363 | Scalability is the ability of a system to be adapted to an increasing load. Systems can be scaled vertically by providing more powerful hardware or horizontally by replicating and load balancing the same hardware, which increases the availability. The cloud, in general, and Azure can help us implement strategies dynamically, with no need to stop your application. |
2:364 | Tools such as .NET 8 that run on several platforms can ensure interoperability, that is, the capability of your software to run on different target machines and with different operating systems (Windows, Linux, macOS, Android, and so on). |
2:365 | Usability is ensured by taking care of input field order, the effectiveness of the item selection logic, and how easy your system is to learn. |
2:366 | Besides, the more complex your solution is, the better resilience it should have. The idea of resilience is not to guarantee that the solution does not fail. Instead, the idea is to guarantee that the solution has an action defined when each part of the software fails. |
2:367 | As a software architect, you must consider security from the very beginning of the design. Following the guidelines to determine the correct patterns and having a security specialist on your team is the best way to comply with all the current regulations we have. |
2:368 | In the next chapter, you will learn how Azure DevOps and GitHub can help us when it comes to collecting, defining, and documenting our requirements. |
2:369 | Questions |
2:370 | |
2:371 | What are the two conceptual ways to scale a system? |
2:372 | Can you deploy your web app automatically from Visual Studio to Azure? |
2:373 | What is multithreading useful for? |
2:374 | What are the main advantages of the asynchronous pattern over other multithreading techniques? |
2:375 | Why is the order of input fields so important? |
2:376 | Why is the Path class so important for interoperability? |
2:377 | What is the advantage of a .NET standard class library? |
2:378 | List the most-used types of .NET Visual Studio projects. |
2:379 | |
2:380 | Further reading |
2:381 | The following are some books and links you may consider reading to gather more information in relation to this chapter: |
2:382 | |
2:383 | Cloud computing models |
2:384 | https://docs.microsoft.com/en-us/azure/architecture/best-practices/auto-scaling |
2:385 | https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/azure-apps/ |
2:386 | |
2:387 | |
2:388 | Parallel programming |
2:389 | https://docs.microsoft.com/en-us/dotnet/standard/parallel-processing-and-concurrency |
2:390 | https://docs.microsoft.com/en-us/dotnet/standard/parallel-programming/ |
2:391 | |
2:392 | |
2:393 | Performance improvements in .NET |
2:394 | https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-8/ |
2:395 | https://benchmarkdotnet.org/ |
2:396 | |
2:397 | |
2:398 | Security aspects |
2:399 | https://docs.microsoft.com/en-us/aspnet/core/security/ |
2:400 | https://cheatsheetseries.owasp.org/cheatsheets/DotNet_Security_Cheat_Sheet.html |
2:401 | https://docs.microsoft.com/en-us/aspnet/core/security/gdpr |
2:402 | https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-overview |
2:403 | |
2:404 | |
2:405 | Service consistency aspects |
2:406 | https://docs.microsoft.com/en-us/azure/architecture/patterns/category/resiliency |
2:407 | https://docs.microsoft.com/en-us/azure/architecture/patterns/category/availability |
2:408 | |
2:409 | |
2:410 | Dotnet support |
2:411 | https://dotnet.microsoft.com/platform/support/policy |
2:412 | |
2:413 | |
2:414 | |
2:415 | Learn more on Discord |
2:416 | To join the Discord community for this book – where you can share feedback, ask questions to the authors, and learn about new releases – follow the QR code below: |
2:417 | https://packt.link/SoftwareArchitectureCSharp12Dotnet8 |
2:418 | |
2:419 | |
2:420 | |
3:1 | Managing Requirements |
3:2 | Based on what we covered in Chapters 1 and 2, the first steps of software development will direct you to create a software project. When it comes to software projects, the biggest challenge is how to organize them in a way where every single participant will understand what is needed. The best way to do so is to organize its requirements. But more than that, connecting these requirements to a code repository will deliver to everybody a fast and more collaborative view of the project that is being worked on. For years, Microsoft has invested in tools to help us to do this. Team Foundation Server and Visual Studio Teams Services are examples. Today, there are two good approaches we can use that we will discuss in this chapter: Azure DevOps and GitHub. Azure DevOps is an evolution of Visual Studio Team Services, and it offers a variety of new features that can help developers document and organize their software. GitHub is well known as an online code repository, but since Microsoft acquired it, a bunch of great tools for application lifecycle management have been integrated into it. For this reason, we can now find many different ways of using GitHub. |
3:3 | The following topics will be covered in this chapter: |
3:4 | |
3:5 | Creating a DevOps project using your Azure account |
3:6 | Understanding the functionalities offered by Azure DevOps and GitHub to organize your project |
3:7 | Organizing and managing requirements using Azure DevOps and GitHub |
3:8 | |
3:9 | The first two sections of this chapter summarize all the functionalities offered by these tools, while the remaining sections focus specifically on the tools for documenting requirements and supporting the overall development process. Most of the functionality introduced in the first two sections will be analyzed in more detail in other chapters. |
3:10 | Technical requirements |
3:11 | This chapter requires you to create a new free Azure account or use an existing one. The Creating an Azure account section in Chapter 1, Understanding the Importance of Software Architecture, explains how to create one. |
3:12 | Introducing Azure DevOps |
3:13 | Azure DevOps is a Microsoft Software-as-a-Service (SaaS) platform that enables you to deliver continuous value to your customers. By creating an account there, you will be able to easily plan your project, store your code safely, test it, publish the solution to a staging environment, and then publish the solution to the actual production infrastructure. |
3:14 | The automation of all the steps involved in software production ensures the continuous enhancement and improvement of an existing solution to adapt it to market needs. |
3:15 | You can start the process by accessing https://dev.azure.com. There, you will be able to sign up using a new account or even sign in using your GitHub account. Once you have access to it, you will be asked to create an organization, as you can see in the following figure. |
3:16 | |
3:17 | Figure 3.1: Creating an Azure DevOps organization |
3:18 | After the organization is created, you will be able to create a new project, as we can see in the following screenshot. |
3:19 | |
3:20 | Figure 3.2: Creating a project using Azure DevOps |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.