基于区块链的毕业设计eth-key-vault: Ethereum KMS built on Azure – eth密钥库:构建在Azure上的以太坊KMS

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计eth-key-vault: Ethereum KMS built on Azure – eth密钥库:构建在Azure上的以太坊KMS 是一篇很好的国外资料

eth-key-vault: Ethereum KMS built on Azure

   ______  __     __ __           _   __          ____    / __/ /_/ /    / //_/__ __ __  | | / /__ ___ __/ / /_  / _// __/ _   / ,< / -_) // /  | |/ / _ `/ // / / __/ /___/__/_//_/ /_/|_|__/_, /   |___/_,_/_,_/_/__/                          /___/                            

This package provides a Key Management System (KMS) for Ethereum P-256K Private Keys using the Azure Key Vault service. Azure Key Vaults only accepts private keys in the standard Json Web Key (JWK) format.

This package provides functionality to store any Ethereum PK in an Azure Key Vault and retrieve it for usage in your applications later on. When storing, keys are accepted as an input string or .txt/.pem file(s), then converted into JWK format and exported to the configured Azure Key Vault. Keys are retrieved by querying the Key Vault for the associated Ethereum address or any matching tags added to the key.

Advantages

  • Durabilability: Azure Key Vaults are a durable, managed cloud storage medium, meaning that your keys are not lost in the event of system failure. Storing private keys on local disk space presents the risk of machine failure, while storing keys physically risks losing the storage medium altogether.
  • Scalability: Quickly and easily access any Ethereum account you want by making a call through the APIs. Keys can be accessed individually by address or in groups.
  • Security: Azure Key Vaults is equipped with fully customizable IAM access control, supporting both client secret and role-based authentication methods.
  • Cost-Efficient: Costs of running an Azure Key Vault are minimal and only reflect actual usage. If you use a vault simply for key storage, you will be charged almost nothing. If you make requests for this key, you incur a very reasonable overhead. More info on pricing here.

Setup

In order to use this package, you must have an active Azure Account Subscription and Key Vault set up. Refer to the below steps to get everything set up:

  1. Sign up for a free Azure Account: https://azure.microsoft.com/en-ca/free/
  2. Setup an Azure Key Vault in your Microsoft Azure account.
  • Portal Setup: https://docs.microsoft.com/en-us/azure/key-vault/general/quick-create-portal
  • CLI Setup: https://docs.microsoft.com/en-us/azure/key-vault/general/quick-create-cli
  1. Add an IAM role to the Key Vault to allow your application to perform the necessary operations.
  • Client Secret: https://docs.microsoft.com/en-us/azure/key-vault/general/assign-access-policy-portal
  • Role-Based: https://docs.microsoft.com/en-us/azure/key-vault/general/rbac-guide

Usage

This package offers a CLI for standalone use and an API for usage as a dependency in your application.

Command Line Interface (CLI)

  1. Install the package globally via NPM.
npm install -g eth-key-vault 
  1. Configure the necessary environment variables by running the commands below with your information:
export AZURE_CLIENT_ID="<azure-client-id>" export AZURE_CLIENT_SECRET="<azure-client-secret>" export AZURE_TENANT_ID="<azure-tenant-id>" export AZURE_KEY_VAULT="<azure-key-vault-https-endpoint>" 
  1. Run the CLI command to start the app. You will be prompted to sign into Azure if you are not authenticated.
eth-key-vault-cli 

Dependency

  1. Install this package as a dependency via npm or yarn:
npm install eth-key-vault yarn add eth-key-vault 
  1. Install dotenv and create a .env file at the root of your project with authentication variables required by Azure and the target key vault. Add the following variables to your current .env file if you already use dotenv.
# Installing dotenv npm install dotenv  # .env AZURE_CLIENT_ID=<azure-client-id> AZURE_CLIENT_SECRET=<azure-client-secret> AZURE_TENANT_ID=<azure-tenant-id> AZURE_KEY_VAULT=<azure-key-vault-https-endpoint> 
  1. Import the functions for use
import { storeKey, retrieveKey } from 'eth-key-vault' ... const address = await storeKey(MY_PRIVATE_KEY) ... const key = await retrieveKey(ETH_ADDRESS) 

Additional Resources

  • Json Web Key RFC: https://self-issued.info/docs/draft-ietf-jose-json-web-key.html
  • Azure Key Vault NodeJS API Reference: https://docs.microsoft.com/en-us/rest/api/keyvault
  • Azure Key Vault NodeJS Quickstart: https://docs.microsoft.com/en-us/azure/key-vault/secrets/quick-create-node

Like this project? Buy me a coffee: ETH – 0xB33F3DDd63439f0EdBBee2952Ac3204113554Fd8

We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products. Learn more.

Initialize w/ store and retrieve functionality


eth密钥库:基于Azure构建的以太坊ethKMS的优势,这意味着你的钥匙不会在系统发生故障时丢失。在本地磁盘空间存储私钥会带来机器故障的风险,而在物理上存储密钥则可能会完全丢失存储介质。
  • 可伸缩性:通过API进行呼叫,快速、轻松地访问您想要的任何以太坊eth帐户。密钥可以按地址单独访问,也可以分组访问。
  • 安全性:Azure密钥库配备了完全可自定义的IAM访问控制,支持客户端机密和基于角色的身份验证方法。
  • 经济高效:运行Azure密钥保险库的成本很低,仅反映实际使用情况。如果你使用保险库只是为了储存钥匙,你几乎不收取任何费用。如果您请求此密钥,则会产生非常合理的开销。有关定价的更多信息请点击此处。
  • 注册免费Azure帐户:https://azure.microsoft.com/en-ca/free/
  • 在Microsoft Azure帐户中设置Azure密钥保管库。
  • 门户设置:https://docs.microsoft.com/en-us/azure/key-vault/general/quick-create-portal
  • CLI设置:https://docs.microsoft.com/en-us/azure/key-vault/general/quick-create-cli
  • 将IAM角色添加到密钥保管库,以允许应用程序执行必要的操作。
  • 客户机密:https://docs.microsoft.com/en-us/azure/key-vault/general/assign-access-policy-portal
  • 基于角色:https://docs.microsoft.com/en-us/azure/key-vault/general/rbac-guide
  • 通过NPM全局安装包。
  • 通过运行包含您的信息的以下命令来配置必要的环境变量:
  • 运行CLI命令以启动应用程序。如果您未通过身份验证,系统将提示您登录Azure。
  • 通过npm或yarn将此包作为依赖项安装:
  • 安装dotenv并在项目根目录创建一个.env文件,其中包含Azure和目标密钥保险库所需的身份验证变量。如果已经使用dotenv,请将以下变量添加到当前的.env文件中。
  • 导入要使用的函数https://self-issued.info/docs/draft-ietf-jose-json-web-key.html
  • Azure Key Vault NodeJS API参考:https://docs.microsoft.com/en-us/rest/api/keyvault
  • Azure密钥保险库NodeJS快速启动:https://docs.microsoft.com/en-us/azure/key-vault/secrets/quick-create-node在
  •    ______  __     __ __           _   __          ____    / __/ /_/ /    / //_/__ __ __  | | / /__ ___ __/ / /_  / _// __/ _   / ,< / -_) // /  | |/ / _ `/ // / / __/ /___/__/_//_/ /_/|_|__/_, /   |___/_,_/_,_/_/__/                          /___/                            

    此软件包使用Azure密钥保险库服务为以太坊ethp-256K私钥提供密钥管理系统(KMS)。Azure密钥库仅接受标准Json Web密钥(JWK)格式的私钥。

    此软件包提供将任何以太坊ethPK存储在Azure密钥库中的功能,并检索它以供以后在应用程序中使用。存储时,密钥被接受为输入字符串或.txt/.pem文件,然后转换为JWK格式并导出到配置的Azure密钥库。通过在密钥库中查询相关的以太坊eth地址或添加到密钥中的任何匹配标记来检索密钥。

    Advantages

    • 可伸缩性:通过API进行呼叫,快速、轻松地访问您想要的任何以太坊eth帐户。密钥可以按地址单独访问,也可以分组访问。
    • 安全性:Azure密钥库配备了完全可自定义的IAM访问控制,支持客户端机密和基于角色的身份验证方法。
    • 经济高效:运行Azure密钥保险库的成本很低,仅反映实际使用情况。如果你使用保险库只是为了储存钥匙,你几乎不收取任何费用。如果您请求此密钥,则会产生非常合理的开销。有关定价的更多信息请点击此处。
    • 注册免费Azure帐户:https://azure.microsoft.com/en-ca/free/

    Setup

    要使用此包,必须设置活动的Azure帐户订阅和密钥保管库。请参阅以下步骤以设置所有设置:

    1. 在Microsoft Azure帐户中设置Azure密钥保管库。
    2. 门户设置:https://docs.microsoft.com/en-us/azure/key-vault/general/quick-create-portal
    • CLI设置:https://docs.microsoft.com/en-us/azure/key-vault/general/quick-create-cli
    • 将IAM角色添加到密钥保管库,以允许应用程序执行必要的操作。
    1. 客户机密:https://docs.microsoft.com/en-us/azure/key-vault/general/assign-access-policy-portal
    • 基于角色:https://docs.microsoft.com/en-us/azure/key-vault/general/rbac-guide
    • 通过NPM全局安装包。

    Usage

    此软件包提供了一个用于独立使用的CLI和一个API,用于作为应用程序中的依赖项使用。

    命令行界面(CLI)

    1. 通过运行包含您的信息的以下命令来配置必要的环境变量:
    npm install -g eth-key-vault 
    1. 运行CLI命令以启动应用程序。如果您未通过身份验证,系统将提示您登录Azure。
    export AZURE_CLIENT_ID="<azure-client-id>" export AZURE_CLIENT_SECRET="<azure-client-secret>" export AZURE_TENANT_ID="<azure-tenant-id>" export AZURE_KEY_VAULT="<azure-key-vault-https-endpoint>" 
    1. 通过npm或yarn将此包作为依赖项安装:
    eth-key-vault-cli 

    依赖性

    1. 安装dotenv并在项目根目录创建一个.env文件,其中包含Azure和目标密钥保险库所需的身份验证变量。如果已经使用dotenv,请将以下变量添加到当前的.env文件中。
    npm install eth-key-vault yarn add eth-key-vault 
    1. 导入要使用的函数https://self-issued.info/docs/draft-ietf-jose-json-web-key.html
    # Installing dotenv npm install dotenv  # .env AZURE_CLIENT_ID=<azure-client-id> AZURE_CLIENT_SECRET=<azure-client-secret> AZURE_TENANT_ID=<azure-tenant-id> AZURE_KEY_VAULT=<azure-key-vault-https-endpoint> 
    1. Azure Key Vault NodeJS API参考:https://docs.microsoft.com/en-us/rest/api/keyvault
    import { storeKey, retrieveKey } from 'eth-key-vault' ... const address = await storeKey(MY_PRIVATE_KEY) ... const key = await retrieveKey(ETH_ADDRESS) 

    Additional Resources

    • Azure密钥保险库NodeJS快速启动:https://docs.microsoft.com/en-us/azure/key-vault/secrets/quick-create-node在
    • Azure Key Vault NodeJS API Reference: https://docs.microsoft.com/en-us/rest/api/keyvault
    • Azure Key Vault NodeJS Quickstart: https://docs.microsoft.com/en-us/azure/key-vault/secrets/quick-create-node

    喜欢这个项目吗?给我买杯咖啡:ETH-0xb33f3ddd63439f0edbbee2952ac320413554fd8

    我们使用可选的第三方分析cookies来了解您如何使用GitHub.com网站所以我们可以制造更好的产品。了解更多。

    Initialize w/ store and retrieve functionality

    部分转自网络,侵权联系删除区块链源码网

    www.interchains.cc

    https://www.interchains.cc/19064.html

    区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
    区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计eth-key-vault: Ethereum KMS built on Azure – eth密钥库:构建在Azure上的以太坊KMS

    提供最优质的资源集合

    立即查看 了解详情