# Ingest Password-Protected Files

To process password-protected files you must provide CFS with the passwords.

To specify the passwords for password-protected files

1. Create a credentials file to contain the passwords for your password-protected files:

   1. Open a text editor and create a new text file.

   2. Create an `[ImportService]` section in the file.

   3. In the `ImportService` section, set the following parameter:

      `ImportCredentialCount` | The total number of file name and password combinations specified in the credentials file.

      For example:

          [ImportService]
          ImportCredentialCount=1

   4. Create a new section in the file, named `[CredentialN]`, where N is the number of the file name/password combination, starting from 0.

      In the new section, set the following parameters:

      `FileSpec` | The name of the password protected file(s). You can use the `*` wildcard to match the file name(s).
      `Password` | The password for the file(s). You can encrypt the password using the password encryption utility. For information about how to do this, see Encrypt Passwords.
      `UserName` | The user name to use to open the file(s). Set this parameter if a user name is required to access the file.
      `NotesIDFile` | The path of the ID file. Set this parameter for `.nsf` files only.

      For example, the following settings could be used to specify a single password for all ZIP files:

          [ImportService]
          ImportCredentialCount=1

          [Credential0]
          FileSpec=*.zip
          Password=9t3M3t7awt/J8A

   5. To specify further file name and password combinations, repeat steps c and d.
   6. Save the file to a suitable location.

2. Specify the location of the credentials file. There are several ways to do this:

   - To use the credentials file you created for all ingested documents, set the CFS configuration parameter `ImportCredentialFile` to the path of the file. For more information about this parameter, refer to the Connector Framework Server Reference.
   - To use the credentials file that you created to process a single document, set the document field `AUTN_CREDENTIALS`. This field accepts either the path to the credentials file, or the credentials file content. You can encrypt the text using the password encryption utility. The `AUTN_CREDENTIALS` field is removed from all documents before they are indexed. When you send an `ingest` action to CFS, you can set this field using the `xmlmetadata` element in the `adds` or `updates` action parameter. For more information about the ingest action, refer to the Connector Framework Server Reference.

_FT_HTML5_bannerTitle.htm