dify icon indicating copy to clipboard operation
dify copied to clipboard

Feature: Add Multiple Authentication Methods for Azure Blob Storage

Open kenwoodjw opened this issue 1 month ago • 0 comments

Self Checks

  • [X] I have searched for existing issues search for existing issues, including closed ones.
  • [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [X] Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

Background

Currently, Dify only supports Account Key authentication for Azure Blob Storage. However, Azure provides several authentication methods that are more secure and flexible, such as Service Principal (SP), SAS Token, and Managed Identity (MSI). Adding support for these authentication methods will enhance security and provide more deployment options.

Objectives

  • Add support for multiple Azure Blob Storage authentication methods:
    • Service Principal (SP)
    • SAS Token
    • Managed Identity (MSI)
  • Maintain backward compatibility with existing Account Key authentication
  • Provide clear documentation for configuration

Proposed Changes

1. Configuration Changes

Add new environment variables:

# Azure Blob Storage Auth Type:account_key, sas_token, service_principal, managed_identity
AZURE_BLOB_AUTH_TYPE=account_key

# Service Principal auth
AZURE_BLOB_CLIENT_ID=<client-id>
AZURE_BLOB_CLIENT_SECRET=<client-secret>
AZURE_BLOB_TENANT_ID=<tenant-id>

# SAS Token auth
AZURE_BLOB_SAS_TOKEN=<sas-token>

2. Additional context or comments

No response

3. Can you help us with this feature?

  • [X] I am interested in contributing to this feature.

kenwoodjw avatar Jan 07 '25 08:01 kenwoodjw