Skip to content
tomblanchard312 edited this page Oct 18, 2023 · 1 revision

Project Overview

Welcome to the NetCoreAzureBlobServiceAPI project! This project is designed to help developers connect to Azure Blob Storage, Azure Key Vault, and implement file encryption, making it a valuable resource for those working with cloud-based file storage and security.

Purpose

The primary goal of this project is to simplify the process of connecting to Azure services, securing sensitive data, and managing files in Azure Blob Storage. Whether you're a developer exploring cloud-based storage or looking to enhance your file management capabilities, this project provides essential tools and samples.

Getting Started

This project is intentionally set up for ease of use and testing. By default, it does not connect to Azure Key Vault (AKV) to allow for straightforward setup and testing with a sample configuration. However, it is fully capable of connecting to AKV for enhanced security.

When working with the sample code, the following considerations are important:

  1. ClientId and ClientSecret: While it is recommended to use AKV for security, the code is configured to accept these parameters. To test the application without AKV, you can simply provide placeholder values, such as "ABC" for ClientId and "DEF" for ClientSecret. The application checks that these values are not null.

  2. Blob Container Creation: The ClientId parameter is used to create a blob container where files will be stored. For example, if you use "ABC" as the ClientId, a container named "abcblobcontainer" is created if it does not already exist. Subsequently, files are stored in this container.

  3. Consistency: To use other methods in the application, it's essential to maintain consistency with the same ClientId. This ensures that the application accesses the correct container for your files.

Samples Included

Sample 1: Uploading and Downloading Files

You can use this sample to upload files to Azure Blob Storage and retrieve them. The project provides a practical example of file management in cloud storage.

Sample 2: Using Azure Key Vault

This sample demonstrates how to enhance security by integrating with Azure Key Vault. It allows you to validate client information, retrieve secrets from the vault, and ensure secure communication.

Sample 3: Using DPAPI for Encryption/Decryption

The project supports data encryption using DPAPI (Data Protection API). This sample illustrates how to encrypt and decrypt data for enhanced security. The code for encryption and decryption with AKV is commented out by default. You can uncomment and configure it to use the secret stored in AKV for enhanced encryption.