Rapidly Build SaaS apps on ASP.NET/ServiceStack based on zero-trust security
aspsecuritykit.net
aspsecuritykit.net
Looks interesting though.
0: https://docs.microsoft.com/en-us/azure/cognitive-services/sp...
On the other hand, ASPSecurityKit works on zero-trust principle, which means by default users have access to nothing, and gain access to only those resources you explicitly grant. The best part is that you don't have to write any code for this protection in most cases; your code remains crisp and clean throughout.
0: https://aspsecuritykit.net/guides/aspnet-policy-authorizatio...
Additionally, the problems of your auth code mixing with action body, and hard-coded checks of roles/privileges and extensive testing for changes are always there.
While with ASPSecurityKit's ADA, it's always unobtrusive and kinda automated authorization once you've setup the convention in the beginning of the project (which is fairly simple, one line of code usually as shown in the video). If you forget something, the default is with ADA to deny access (zero-trust), and not pass-through.
HOpe it made sense - happy to give more examples. You can also go through the guide https://aspsecuritykit.net/guides/aspnet-policy-authorizatio...
> The zero-trust security model assumes breach as the default phenomenon and therefore, it advocates verifying every request with all possible options available to ensure the legitimacy of the request. It also emphasizes following the principle of least privilege access to limit access to the system for only the functions requested even though the elevated privilege might be available for the caller.
> Zero-trust and least privilege access are fundemental principles to ASPSecurityKit design. Few examples:
> 1. As you apply ASPSecurityKit’s ProtectAttribute on the base controller (or the base service in ServiceStack) or as a global filter, it instantly begins guarding all operations of your web application with a multi-stage security pipeline that involves, among other things, XSS validation, authentication, multi-factor, authorization. All these checks are necessary unless you disable one or more for specific operations.
> 2. Following the same principles, activity-based, data-aware authorization components enforce that to execute an operation, the caller must possess its corresponding permissionCode, and any existing data being referred for the operation must also have been permitted. You can selectively exclude operations and data from these checks, but the default is to guard everything. The user verification, user suspension and entity suspension checks are designed to block every incoming requests if the corresponding check fails, and give you tools and control to explicitly exclude certain operations (of your choice) from the check.
...
https://aspsecuritykit.net/docs/article/introduction/#zero-t...
Additionally, even if you're using an auth service, the automatic data authorization feature that ASK provides through its ADA feature [0] and [1], is something you've to still build in your app, as authorization of input data depends on the domain model of your application and not something generic like user model. ASK can make it automatic because it lets you define convention once (and comes with default conventions based on best practices btw), and takes care of applying them throughout your requests, obviously working with you wherever you need to override something.
0: data authorization in design guide https://aspsecuritykit.net/guides/designing-activity-based-d...
1: data authorization in implementation guide: https://aspsecuritykit.net/docs/article/how-to-perform-activ...
It's the job of the application to prompt caller for 2FA input and verify it using the provider/device of your choice.
But to save you time even with that implementation, ASPSecurityKit has a category of products called source packages, which provide full implementation of several commonly needed functionality, including 2FA workflow [1], installed right into your project as source code, so you can switch to any MFA provider easily by modifying the code that sends MFA token to the device.
0: https://aspsecuritykit.net/docs/article/the-security-pipelin...
1: https://aspsecuritykit.net/docs/article/source-packages/?pac...
Jokes aside, i dont know that much how is it today, but years ago i had to run some asp.net apps in production, it was a nightmare...
ASP.NET is really just a foundation layer for a whole bunch of different web frameworks including WebAPI, MVC, RazorPages, Blazor, WCF and WebForms. I'd blame WebForms in particular for a lot of the bad apps: it basically tries to make the web act like stateful Windows Forms apps (literally with controls that have "server-side events" and maintain state across several HTTP requests). As a result, lots of Windows Forms developers could build apps without actually understanding a lot of the complexity of the web and especially its security implications.
Probably more than I'd think...
More info here: https://aspsecuritykit.net/docs/article/introduction/#suppor...