@@ -40,14 +40,47 @@ export default buildConfig({
4040})
4141```
4242
43+ ### Authentication methods
44+
45+ Azure Blob Storage supports different authentication methods. Choose the one that best fits your deployment environment.
46+
47+ #### Connection string
48+
49+ Use Azure Storage connection string for straightforward authentication:
50+
51+ ``` ts
52+ azureStorage ({
53+ baseURL: process .env .AZURE_STORAGE_ACCOUNT_BASEURL ,
54+ connectionString: process .env .AZURE_STORAGE_CONNECTION_STRING ,
55+ containerName: process .env .AZURE_STORAGE_CONTAINER_NAME ,
56+ })
57+ ```
58+
59+ #### Azure credentials
60+
61+ Use Azure Identity credentials for enhanced security with managed identities:
62+
63+ ``` ts
64+ import { DefaultAzureCredential } from ' @azure/identity'
65+
66+ azureStorage ({
67+ baseURL: process .env .AZURE_STORAGE_ACCOUNT_BASEURL ,
68+ credentials: new DefaultAzureCredential (),
69+ containerName: process .env .AZURE_STORAGE_CONTAINER_NAME ,
70+ })
71+ ```
72+
73+ ** Note:** When using User Managed Identity, set the ` AZURE_CLIENT_ID ` environment variable with your managed identity's client ID.
74+
4375### Configuration Options
4476
45- | Option | Description | Default |
46- | ---------------------- | ------------------------------------------------------------------------ | ------- |
47- | ` enabled ` | Whether or not to enable the plugin | ` true ` |
48- | ` collections ` | Collections to apply the Azure Blob adapter to | |
49- | ` allowContainerCreate ` | Whether or not to allow the container to be created if it does not exist | ` false ` |
50- | ` baseURL ` | Base URL for the Azure Blob storage account | |
51- | ` connectionString ` | Azure Blob storage connection string | |
52- | ` containerName ` | Azure Blob storage container name | |
53- | ` clientUploads ` | Do uploads directly on the client to bypass limits on Vercel. | |
77+ | Option | Description | Default |
78+ | ---------------------- | -------------------------------------------------------------------------------------------------------- | ------- |
79+ | ` enabled ` | Whether or not to enable the plugin | ` true ` |
80+ | ` collections ` | Collections to apply the Azure Blob adapter to | |
81+ | ` allowContainerCreate ` | Whether or not to allow the container to be created if it does not exist | ` false ` |
82+ | ` baseURL ` | Base URL for the Azure Blob storage account (required when using credentials) | |
83+ | ` connectionString ` | Azure Blob storage connection string (alternative to credentials + baseURL) | |
84+ | ` credentials ` | Azure TokenCredential for authentication (e.g., DefaultAzureCredential). Alternative to connectionString | |
85+ | ` containerName ` | Azure Blob storage container name | |
86+ | ` clientUploads ` | Do uploads directly on the client to bypass limits on Vercel. | |
0 commit comments