Security
Last updated
Was this helpful?
Last updated
Was this helpful?
Authentication is a process in which a user provides credentials that are then compared to those stored in an operating system, database, app or resource. If they match, users authenticate successfully, and can then perform actions that they're authorized for, during an authorization process. The Authorization refers to the process that determines what a user is allowed to do.
Authentication is the process of determining a user's identity.
Authorization is the process of determining whether a user has access to a resource.
role-based authorization
policy-based authorization
claims-based authorization
Is not a security feature, CORS relaxes security. An API is not safer by allowing CORS.
There are three ways to enable CORS:
In middleware using a named policy or default policy.
Using endpoint routing.
With the [EnableCors]
attribute.
When you implement IValidateObject
, which language feature processes over the individual properties being validated?
C# Generator/Yield pattern
Cross-Origin Resource Sharing is an -header based mechanism that allows a server to indicate any origins (domain, scheme, or port) other than its own from which a browser should permit loading resources.
Using the attribute with a named policy provides the finest control in limiting endpoints that support CORS.