A job reads storage credentials by matching its file URL to a configured base URL. Prepare the YAML file on each On-Demand Encoder server before creating jobs that need authenticated remote storage.

## Define storage entries

Use `/etc/mediakind/mkp/charts/customer-values.yaml`. Each entry under `credentials` needs a storage base `url` and a credential `type`.

<table>
  <thead>
    <tr>
      <th style="text-align: left">Type</th>
      <th style="text-align: left">Required credential fields</th>
      <th style="text-align: left">Storage</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left"><code>user</code></td>
      <td style="text-align: left"><code>username</code>, <code>password</code></td>
      <td style="text-align: left">FTP or SFTP</td>
    </tr>
    <tr>
      <td style="text-align: left"><code>azureSasToken</code></td>
      <td style="text-align: left"><code>sasToken</code></td>
      <td style="text-align: left">Azure Blob storage with the URL and token supplied for the container</td>
    </tr>
    <tr>
      <td style="text-align: left"><code>s3</code></td>
      <td style="text-align: left"><code>accessKeyId</code>, <code>secretAccessKey</code></td>
      <td style="text-align: left">S3 object storage using an access key</td>
    </tr>
  </tbody>
</table>

To configure multiple locations, add an entry for each one. Replace the placeholders with your storage URLs and credentials.

```yaml
credentials:
  - type: user
    url: "sftp://storage.example/share"
    username: "<STORAGE_USERNAME>"
    password: "<STORAGE_PASSWORD>"
  - type: azureSasToken
    url: "https://<ACCOUNT>.blob.core.windows.net/<CONTAINER>"
    sasToken: "<SAS_TOKEN>"
  - type: s3
    url: "<S3_BASE_URL>"
    accessKeyId: "<ACCESS_KEY_ID>"
    secretAccessKey: "<SECRET_ACCESS_KEY>"
```

For example, when a job reads `sftp://storage.example/share/video.ts`, its URL matches the first entry and the job uses that entry’s credentials.

## Apply the configuration

The script for applying changes to the configuration file is:

```bash
/etc/mediakind/mkp/charts/apply_customer_values.sh
```

The settings persist across a product update. If a value is omitted or removed, the installer defaults apply. The high-level job logs record which credential configuration was selected.
