For example
Application layerBlue & Green circles
In the application layer, weWe implement how actors are authenticated (a way for them to prove they are who they claim to be and be electable to use the application) and authorized (a way to regulate the interaction based on rules or policies).
 The Role of the user is set at this level. For example, there can be different types of accounts (Admin, Customer, Provider, Guest, ...).
This gets more complicated if accounts support multi-tenancy (multiple users per account).
Business layer
 In this layer, we start speaking aboutThe CustomerRole and concepts like tenancy (data ownership) and business rules (or policies) that enact an additional layer of securitythe user can be implemented at this level too. For example, the business filters the data by its tenantthere can be different types of accounts (Admin, so outer layers are agnostic to data belonging to other tenantsCustomer, Provider, Guest). To make this seamless
If roles (accountabilities and responsibilities) are intrinsic to the application layerdomain or business, the application layer MUST identify the userwe implement these and retrieve the customer IDrules associated from the security contextin inner circles exclusively(red, yellow).
Domain layerRed circle
At the domain layerHere, we evaluate (among other rules or policies) the security is a bit blurredtenancy (data ownership). For example, in this layer,
- CancelOrderuse case evaluates- OrderTenantcyPolicyand- ConfirmationPolicyto validate the tenancy and evaluate the confirmation.
- ListCustomerOrdersuse case applies- OrderTenantcyPolicyto retrieve a very specific subset of orders.
Yellow circle
Here we might find the abstractionabstractions (ports) of those policies and business rules I mentioned previously. The concrete implementation Concrete implementations (adapters or use cases) can be located somewhere in theare left to outer layers (business, application, infrastructure, ...).
 We don't make them concrete at this level because business rules and policies can change rapidlycircles for reasons unrelated to the domain. For examplecustomization and extensibility, we may need to add (or change) policies because we have implemented a new typebut the evaluation of Account (or Role). Or we want to make security more astringent, so we need to implement a new security policy handler (adapter) to solve howthese policies stack with others. This sort of changeand rules is unlikely to be caused by changes in the domain (what we do); the reasons are commonly associated with business changes (how we do it from now on)executed here.
| Action | Scope/Layer | 
|---|---|
| Authentication | AppBlue & Green | 
| Authorize user to list "My Orders"execute CustomerOrderListuse case | AppBlue & Green | 
| Retrieve orders by accountExecute use case security policies and rules | BusinessRed & Yellow | 
| Authorize user to execute CancelOrderuse case | AppBlue & Green | 
| Execute cancel orderuse case security policies and rules | BusinessRed & Yellow |