mefistobaal/azurekeyvault 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mefistobaal/azurekeyvault

最新稳定版本:v0.2

Composer 安装命令:

composer require mefistobaal/azurekeyvault

包简介

A simple wrapper for the Azure RM Key Vault API.

README 文档

README

Overview

A simple Proof Of Concept wrapper for the Azure RM API making it easy to comsume Azure Key Vault Secrets and Encrypt\DeCrypt strings with a Key.

More information about Azure Key Vault can be found here: https://docs.microsoft.com/en-us/azure/key-vault/

No tests implemented.

Usage

  1. Create an Azure AD application with access to the key vault you want to interact with.
  2. Install the project via composer.
  3. Follow one of the examples.

Requirements

  • PHP 8+

Example

More examples can be found in the examples folder.

require_once '../../vendor/autoload.php';

use Vault\Azure\Authorization\Token as azureAuthorisation;
use Vault\Azure\Keyvault\Secret as keyVaultSecret;

$keyVault = new keyVaultSecret(
    [
        'accessToken'  => azureAuthorisation::getKeyVaultToken(
            [
                'appTenantDomainName' => 'contoso.onmicrosoft.com',
                'clientId'            => '00000000-0000-0000-0000-000000000000',
                'clientSecret'        => '5Ki1PHwjbCuDqPQ2f/AAydhjdfhdsdndks7887jhjhs='
            ]
        ),
        'keyVaultName' => 'keyVaultName'
    ]
);

// get the latest value for the secret
var_dump($keyVault->get('T1'));

Contributors

  • Ben Taylor
  • MefistoBaal

统计信息

  • 总下载量: 6.45k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-07-16