Step 1: Create your Policy

You’ll need to create an authentication policy. Basically, your authentication policy will contain all the sensitive data that should not be stored in the repo. It’s a new CaC resource, which can then be linked to a security-config.json file in the site repo.

  1. Navigate to the Admin Console (Developer > Admin Console)
  2. In the top right, click Add Resource
  3. In the Add Resource modal, select Pages
  4. Select authentication-policy
  5. Enter your file name. Remember the name you give your policy as you will need it for the next step. You could do something like: example-password-authentication-policy.json
  6. Create a new resource containing the following information and click Apply when done:

    {
      "$id": "example-password-authentication-policy",
      "$schema": "https://schema.yext.com/config/pages/authentication-policy/v1",
      "name": "my-example-policy",
      "authentication" : {
        "password" : {
          "passwordValue" : "abc",  
        }
      }
    }

See the optional “Add Secure API Tokens” step of this guide if you would like to add Secure API Tokens here.

light bulb
Note
The client secret value becomes hidden upon policy creation. This means that as soon as you apply your resources to the account, only the policy creator and the system will have knowledge of the client secret value. This value is not stored in any repository and will never be visible in the Configuration as Code once the policy is applied and the page is refreshed.
Feedback