---
title: "Google 金鑰管理服務"
url: "/docs/secret_managers/google_kms"
canonical_url: "https://docs.litellm.ai/docs/secret_managers/google_kms"
type: "docs"
last_updated: "2026-10-08"
related:
  - "/docs/secret_managers/google_secret_manager"
  - "/docs/secret_managers/hashicorp_vault"
---
# Google 金鑰管理服務

> Index of all LiteLLM docs: https://docs.litellm.ai/llms.txt


> **LiteLLM Enterprise feature.** Requires an Enterprise license (`LITELLM_LICENSE`). Talk to sales: https://www.litellm.ai/enterprise#talk-to-sales

在 proxy 上使用來自 Google KMS 的加密金鑰

步驟 1. 將金鑰加入 env 
```
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/credentials.json"
export GOOGLE_KMS_RESOURCE_NAME="projects/*/locations/*/keyRings/*/cryptoKeys/*"
export PROXY_DATABASE_URL_ENCRYPTED=b'\n$\x00D\xac\xb4/\x8e\xc...'
```

步驟 2: 更新設定

```yaml
general_settings:
  key_management_system: "google_kms"
  database_url: "os.environ/PROXY_DATABASE_URL_ENCRYPTED"
  master_key: os.environ/LITELLM_MASTER_KEY
```

步驟 3: 啟動 + 測試 proxy

```
$ litellm --config /path/to/config.yaml
```

並在另一個終端機中
```
$ litellm --test 
```

[快速測試 Proxy](../proxy/user_keys)

## Related pages

- [Google Secret Manager](https://docs.litellm.ai/docs/secret_managers/google_secret_manager.md)
- [Hashicorp Vault](https://docs.litellm.ai/docs/secret_managers/hashicorp_vault.md)
