---
title: Custom policies for self-registration and password reset
description: IDM defines policies for usernames and passwords, in the openidm/bin/defaults/script/policy.js file. To enforce these policies for user self-registration and password reset, add the following objects to your conf/policy.json file, under resources:
component: pingidm
version: 7.5
page_id: pingidm:self-service-reference:uss-policy-json
canonical_url: https://docs.pingidentity.com/pingidm/7.5/self-service-reference/uss-policy-json.html
keywords: ["JSON", "Policy", "Configuration", "Authentication", "Self-Service", "User Self-Service"]
---

# Custom policies for self-registration and password reset

IDM defines [policies](../objects-guide/policies.html) for usernames and passwords, in the `openidm/bin/defaults/script/policy.js` file. To enforce these policies for user self-registration and password reset, add the following objects to your `conf/policy.json` file, under `resources`:

```json
{
    "resource" : "selfservice/registration",
    "calculatedProperties" : {
        "type" : "text/javascript",
        "source" : "require('selfServicePolicies').getRegistrationProperties()"
    }
},
{
    "resource" : "selfservice/reset",
    "calculatedProperties" : {
        "type" : "text/javascript",
        "source" : "require('selfServicePolicies').getResetProperties()"
    }
},
```
