From 6c75e3eaa77e1d19d7a0db4f95ec2836fa8a05d4 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 13 Nov 2024 21:03:34 -0800 Subject: [PATCH] docs AWS secret manager --- docs/my-website/docs/secret.md | 46 ++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/docs/my-website/docs/secret.md b/docs/my-website/docs/secret.md index db5ec6910..15480ea3d 100644 --- a/docs/my-website/docs/secret.md +++ b/docs/my-website/docs/secret.md @@ -1,3 +1,6 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + # Secret Manager LiteLLM supports reading secrets from Azure Key Vault, Google Secret Manager @@ -59,14 +62,35 @@ os.environ["AWS_REGION_NAME"] = "" # us-east-1, us-east-2, us-west-1, us-west-2 ``` 2. Enable AWS Secret Manager in config. + + + + ```yaml general_settings: master_key: os.environ/litellm_master_key key_management_system: "aws_secret_manager" # 👈 KEY CHANGE key_management_settings: hosted_keys: ["litellm_master_key"] # 👈 Specify which env keys you stored on AWS + ``` + + + + +This will only store virtual keys in AWS Secret Manager. No keys will be read from AWS Secret Manager. + +```yaml +general_settings: + key_management_system: "aws_secret_manager" # 👈 KEY CHANGE + key_management_settings: + store_virtual_keys: true + access_mode: "write_only" # Literal["read_only", "write_only", "read_and_write"] +``` + + + 3. Run proxy ```bash @@ -181,16 +205,14 @@ litellm --config /path/to/config.yaml Use encrypted keys from Google KMS on the proxy -### Usage with LiteLLM Proxy Server - -## Step 1. Add keys to env +Step 1. Add keys to 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...' ``` -## Step 2: Update Config +Step 2: Update Config ```yaml general_settings: @@ -199,7 +221,7 @@ general_settings: master_key: sk-1234 ``` -## Step 3: Start + test proxy +Step 3: Start + test proxy ``` $ litellm --config /path/to/config.yaml @@ -215,3 +237,17 @@ $ litellm --test + + +## All Secret Manager Settings + +All settings related to secret management + +```yaml +general_settings: + key_management_system: "aws_secret_manager" # REQUIRED + key_management_settings: + store_virtual_keys: true # OPTIONAL. Defaults to False, when True will store virtual keys in secret manager + access_mode: "write_only" # OPTIONAL. Literal["read_only", "write_only", "read_and_write"]. Defaults to "read_only" + hosted_keys: ["litellm_master_key"] # OPTIONAL. Specify which env keys you stored on AWS +``` \ No newline at end of file