# Access Policies

Steps to create a new Resource Access Policy in TrustLogix. This specific policy targets the "Finance" module and returns detailed response context (User city, Department, and Sub-module information) when the action View is performed, provided the resource's department is set to Finance.

***

### Initiate Policy Creation

Navigate to the Access Policies management section within your application to begin the registration.

* Navigate to: Application Module
* Click the "Create policy" button.

### Define Policy Details

Provide the basic identification details for your new policy.

* Name: Enter a unique name (e.g., "FinanceModule").
* Description: Provide a summary of the policy's purpose.
* Click "Next" to proceed to resource selection.

### Resource Selection and Actions

Specify which resources this policy protects and what operations are governed.

* Resource Source: Select RESOURCE from the dropdown.
* Resources: Select the specific resource (e.g., Finance).
* Actions allowed: Select View from the available operations.
* Click "Next" to define conditions.

### Set Policy Conditions

Configure the logic that determines when this policy is applied.

* Select Attribute Type: Choose Resource Attributes.
* Select Attribute: Select Department.
* Operator: Choose Equals.
* Value: Enter Finance.

***Note: Policies condition can contain user attribute (created under Attribute Management section) or Request Attributes (which can be send in authorization request payload)***

### Configure Response Context

Define the additional information that will be returned in the policy evaluation response.

* User Attributes: Select city to include the user's city of residence in the response.
* Resource Attributes: Select Department to echo the resource's department.
* Custom Attributes: Add a new custom field:
* Name: Enter Sub Module.
* Value: Enter Plan, Budget.

### Deploy the policy

Complete the policy creation and push it to the authentication service.

* Save: Click the "Save" button to store the configuration.

Deploy: Click "Deploy" in the "Generating Policy" dialog to move the policy into the Auth Service.
