Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
A lightweight server clone of Azure Blob, Queue, and Table Storage that simulates most of the commands supported by it with minimal dependencies.
Azurite is an open-source Azure Storage API compatible server (emulator). It provides a local environment for testing and development of applications that use Azure Storage services, including Blob, Queue, and Table storage.
Blob Storage
This code snippet demonstrates how to start the Azurite Blob service on port 10000. Blob storage is used for storing large amounts of unstructured data such as text or binary data.
const azurite = require('azurite');
azurite().blob().listen(10000, () => {
console.log('Azurite Blob service is running on port 10000');
});
Queue Storage
This code snippet demonstrates how to start the Azurite Queue service on port 10001. Queue storage is used for storing large numbers of messages that can be accessed from anywhere via authenticated calls.
const azurite = require('azurite');
azurite().queue().listen(10001, () => {
console.log('Azurite Queue service is running on port 10001');
});
Table Storage
This code snippet demonstrates how to start the Azurite Table service on port 10002. Table storage is used for storing structured NoSQL data.
const azurite = require('azurite');
azurite().table().listen(10002, () => {
console.log('Azurite Table service is running on port 10002');
});
LocalStack is a fully functional local AWS cloud stack. It provides a local testing environment for AWS services, including S3, DynamoDB, and SQS. Unlike Azurite, which focuses on Azure Storage services, LocalStack emulates a wide range of AWS services.
MinIO is a high-performance, S3-compatible object storage system. It is designed to be used for large-scale data infrastructure. While Azurite emulates Azure Blob storage, MinIO provides an alternative for S3-compatible object storage.
Fake S3 is a lightweight server that emulates the S3 API. It is useful for testing S3 interactions locally. Unlike Azurite, which emulates Azure Storage services, Fake S3 focuses solely on the S3 API.
A lightweight server clone of Azure Blob, Queue, and Table Storage that simulates most of the commands supported by it with minimal dependencies.
In order to run Azurite you need Node.js >= 6.0 installed on your system. Azurite works cross-platform on Windows, Linux, and OS X.
After installation you can install Azurite simply with npm
which is Node.js package management tool and which is included with every Node.js installation.
$ npm install -g azurite
Then simply start it with the following command:
$ azurite -l path/to/localfolder
This tells Azurite to store all data in a particular directory. If the -l
option is ommitted it will use the current working directory. This also will start both blob storage and queue storage emulation in two different processes.
You can also selectively start the different storage emulators.
For Blob Storage Emulator only:
$ azurite-blob -l path/to/azurite/workspace
For Queue Storage Emulator only:
$ azurite-queue
For Table Storage Emulator only:
$ azurite-table -l path/to/azurite/workspace
Azurite is also available as Nuget package at https://www.nuget.org/packages/Azurite/. You can install it via the Package Manager Console with the following command:
PM> Install-Package Azurite
This will install Azurite to your current project and also immediately start it in a dedicated console window. Note that you do not need to install Node.js since Azurite is packaged into a single self-contained executable, thanks to pkg.
Every release of Azurite starting with version 0.9.7 is available at Docker Hub and ready to be pulled with:
$ docker pull arafato/azurite
Please note that the latest
tag will always refer to the latest release.
To build the Docker image yourself, execute the following:
$ docker build -t arafato/azurite .
To run the Docker image, execute the following command:
$ docker run -d -t -p 10000:10000 -p 10001:10001 -v /path/to/folder:/opt/azurite/folder arafato/azurite
By default, the container starts all services available (currently blob, queue, and table).
Using the environment variable executable
, specific executables can be specifed:
blob
Start the Blob Storage Emulator onlyqueue
Start the Azure Queue Storage Emulator onlytable
Start the Azure Table Storage Emulator only$ docker run -e executable=blob -d -t -p 10000:10000 -v /path/to/folder:/opt/azurite/folder arafato/azurite
To perform blob storage operations using the 2.0 Azure cross-platform CLI, you need to operate with the appropriate connection string. The values within are based on the hardcoded Azure Storage Emulator values.
Example command to create a container:
$ az storage container create --name 'test' --connection-string 'DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;'
{
"created": true
}
If you are interested in making a code contribution and would like to learn more about the technologies that we use, check out the list below.
The current status of Azurite's support of the Official Blob Storage REST API Specification is listed in below section API Support. Features that are still unimplemented are marked with [TODO]
. Features that are currently being worked on are marked with [IN-PROGRESS]
.
Current bugs that need to be fixed are listed at our issues site on Github and tagged with a red label bug
.
Never made an open source contribution before? Wondering how contributions work in Azurite? Here's a quick rundown!
Find an issue that you are interested in addressing or a feature that you would like to add.
Fork the Azurite repository to your local GitHub organization. This means that you will have a copy of the repository under your-GitHub-username/azurite
.
Clone the repository to your local machine using git clone https://github.com/github-username/azurite.git
.
Create a new branch for your fix using git checkout -b branch-name-here
.
Make the appropriate changes for the issue you are trying to address or the feature that you want to add.
Use git add insert-paths-of-changed-files-here
to add the file contents of the changed files to the "snapshot" git uses to manage the state of the project, also known as the index.
Use git commit -m "Insert a short message of the changes made here"
to store the contents of the index with a descriptive message.
Push the changes to the remote repository using git push origin branch-name-here
.
Submit a pull request to the upstream repository. Title the pull request with a short description of the changes made and the issue or bug number associated with your change. For example, you can title an issue like so "Added more log outputting to resolve #4352". In the description of the pull request, explain the changes that you made, any issues you think exist with the pull request you made, and any questions you have for the maintainer. It's OK if your pull request is not perfect (no pull request is), the reviewer will be able to help you fix any problems and improve it!
Wait for the pull request to be reviewed by a maintainer. Make changes to the pull request if the reviewing maintainer recommends them.
Celebrate your success after your pull request is merged!
If you need help, you can ask questions directly at our issues site on Github.
Currently, Azurite only supports the Blob Storage APIs, the Queue Storage API, and the Table Storage API. Support for Azure Storage Files is planned, but currently not available.
The Standard Emulator Connection String is the same as required by Microsoft's Official Storage Emulator:
BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;
QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;
TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;
All DONE except:
Account SAS Support [TODO]
See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas for specification
Get Blob Service Stats [TODO]
Retrieves statistics related to replication for the Blob service. This operation is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the storage account.
Set Blob Tier [TODO] The Set Blob Tier operation sets the tier on a blob.
All DONE.
ALL DONE except:
FAQs
An open source Azure Storage API compatible server
The npm package azurite receives a total of 444,241 weekly downloads. As such, azurite popularity was classified as popular.
We found that azurite demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.