LogoLogo
API ReferenceGitHubSlackService StatusLogin
v3.9.16
v3.9.16
  • 🏠Deep Lake Docs
  • List of ML Datasets
  • 🏗️SETUP
    • Installation
    • User Authentication
      • Workload Identities (Azure Only)
    • Storage and Credentials
      • Storage Options
      • Setting up Deep Lake in Your Cloud
        • Microsoft Azure
          • Configure Azure SSO on Activeloop
          • Provisioning Federated Credentials
          • Enabling CORS
        • Google Cloud
          • Provisioning Federated Credentials
          • Enabling CORS
        • Amazon Web Services
          • Provisioning Role-Based Access
          • Enabling CORS
  • 📚Examples
    • Deep Learning
      • Deep Learning Quickstart
      • Deep Learning Guide
        • Step 1: Hello World
        • Step 2: Creating Deep Lake Datasets
        • Step 3: Understanding Compression
        • Step 4: Accessing and Updating Data
        • Step 5: Visualizing Datasets
        • Step 6: Using Activeloop Storage
        • Step 7: Connecting Deep Lake Datasets to ML Frameworks
        • Step 8: Parallel Computing
        • Step 9: Dataset Version Control
        • Step 10: Dataset Filtering
      • Deep Learning Tutorials
        • Creating Datasets
          • Creating Complex Datasets
          • Creating Object Detection Datasets
          • Creating Time-Series Datasets
          • Creating Datasets with Sequences
          • Creating Video Datasets
        • Training Models
          • Splitting Datasets for Training
          • Training an Image Classification Model in PyTorch
          • Training Models Using MMDetection
          • Training Models Using PyTorch Lightning
          • Training on AWS SageMaker
          • Training an Object Detection and Segmentation Model in PyTorch
        • Updating Datasets
        • Data Processing Using Parallel Computing
      • Deep Learning Playbooks
        • Querying, Training and Editing Datasets with Data Lineage
        • Evaluating Model Performance
        • Training Reproducibility Using Deep Lake and Weights & Biases
        • Working with Videos
      • Deep Lake Dataloaders
      • API Summary
    • RAG
      • RAG Quickstart
      • RAG Tutorials
        • Vector Store Basics
        • Vector Search Options
          • LangChain API
          • Deep Lake Vector Store API
          • Managed Database REST API
        • Customizing Your Vector Store
        • Image Similarity Search
        • Improving Search Accuracy using Deep Memory
      • LangChain Integration
      • LlamaIndex Integration
      • Managed Tensor Database
        • REST API
        • Migrating Datasets to the Tensor Database
      • Deep Memory
        • How it Works
    • Tensor Query Language (TQL)
      • TQL Syntax
      • Index for ANN Search
        • Caching and Optimization
      • Sampling Datasets
  • 🔬Technical Details
    • Best Practices
      • Creating Datasets at Scale
      • Training Models at Scale
      • Storage Synchronization and "with" Context
      • Restoring Corrupted Datasets
      • Concurrent Writes
        • Concurrency Using Zookeeper Locks
    • Deep Lake Data Format
      • Tensor Relationships
      • Version Control and Querying
    • Dataset Visualization
      • Visualizer Integration
    • Shuffling in Dataloaders
    • How to Contribute
Powered by GitBook
On this page
  • Authenticating Using Workload Identities Instead of User Credentials
  • Step 1: Define the workload identity in Azure
  • Step 2: Attached the Azure Managed Identity to your workload (Example below is for Azure ML)
  • Step 3: Create a Deep Lake Workload Identity using the Azure Managed Identity
  • Step 4: Run the workload

Was this helpful?

Edit on GitHub
  1. SETUP
  2. User Authentication

Workload Identities (Azure Only)

How to authenticate using workload identities instead of user credentials.

PreviousUser AuthenticationNextStorage and Credentials

Was this helpful?

Authenticating Using Workload Identities Instead of User Credentials

Workload identities enable you to define a cloud workload that will have access to your Deep Lake organization without authenticating using Deep Lake user tokens. This enables users to manage and define Deep Lake permissions for jobs that many not be attributed to a specific user.

Set up a Workload Identity using the following steps:

  1. Define an Azure Managed Identity in your cloud

  2. Attached the Azure Managed Identity to your workload

  3. Create a Deep Lake Workload Identity using the Azure Managed Identity

  4. Run the workload in Azure

Step 1: Define the workload identity in Azure

  1. Navigate to Managed Identities in Azure

  1. Click Create a Managed Identity

  1. Select the Subscription and Resource Group containing the workload, and give the Managed Identity a Name. Click Review + Create.

Step 2: Attached the Azure Managed Identity to your workload (Example below is for Azure ML)

When creating or updating a resource that will serve as the Client running Deep Lake, assign the Managed Identity from Step 1 to this resource.

For example, in Azure Machine Learning Studio, when creating a compute instance, toggle Assign Identity and select the Managed Identity from Step 1.

Step 3: Create a Deep Lake Workload Identity using the Azure Managed Identity

  1. Specify a Display Name, Client ID (for the Managed Identity), and Tenant ID. The Client ID can be found in the main page for the Managed Identity, and the Tenant ID can be found in Tenant Properties in Azure. Click Add.

Step 4: Run the workload

Specify the environmental variables below in the Deep Lake client and run other Deep APIs as normal.

Note: the CLIENT_ID below is for the compute instance, not the Managed Identity.

#### THIS IS THE CLIENT_ID FOR THE COMPUTE, NOT THE MANAGED IDENTITY #####
os.environ["AZURE_CLIENT_ID"] = <azure_client_id>

os.environ["ACTIVELOOP_AUTH_PROVIDER"] = "azure" 

Specifying the AZURE_CLIENT_ID is not necessary in some environments because the correct value may automatically be set.

For a compute instance in the Azure Machine Learning Studio, the Client ID can be found in instance settings below:

Navigate to the Permissions tab for your organization in the , locate the Workload Identities, and select Add.

🏗️
Deep Lake App