If you're using Secret Manager to store and pass your Amazon S3 or
Microsoft Azure credentials, you can additionally use a
[customer-managed encryption key](https://docs.cloud.google.com/kms/docs/cmek.md.txt) (CMEK) to encrypt those credentials at
rest.

See [Enable Customer-Managed Encryption Keys for Secret Manager](https://docs.cloud.google.com/secret-manager/docs/cmek.md.txt)
for instructions.

## Enforce CMEK with organization policy

To enforce the use of CMEK through an [organizational policy](https://docs.cloud.google.com/resource-manager/docs/organization-policy/overview),
add Storage Transfer Service and Secret Manager to the
`constraints/gcp.restrictNonCmekServices` deny list. Specifically, add:

- `secretmanager.googleapis.com`
- `storagetransfer.googleapis.com`

See [Creating and managing organization policies](https://docs.cloud.google.com/resource-manager/docs/organization-policy/creating-managing-policies) for
instructions.

Storage Transfer Service checks for and enforces this restriction at job creation and
update. Existing transfer jobs are not affected.