PHPackages                             keboola/azure-key-vault-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. keboola/azure-key-vault-client

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

keboola/azure-key-vault-client
==============================

Client for Azure Key Vault

4.2.1(1y ago)141.1k↓28.6%61MITPHPPHP &gt;=8.2

Since May 25Pushed 1y ago15 watchersCompare

[ Source](https://github.com/keboola/azure-key-vault-php-client)[ Packagist](https://packagist.org/packages/keboola/azure-key-vault-client)[ RSS](/packages/keboola-azure-key-vault-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (11)Versions (15)Used By (1)

Azure Key Vault PHP Client [![Build Status](https://camo.githubusercontent.com/69667b54c418771c3622c4f90836982ef34a6c0db8e71856f2e8d85f1cd25987/68747470733a2f2f6465762e617a7572652e636f6d2f6b65626f6f6c612d6465762f617a7572652d6b65792d7661756c742d7068702d636c69656e742f5f617069732f6275696c642f7374617475732f6b65626f6f6c612e617a7572652d6b65792d7661756c742d7068702d636c69656e743f6272616e63684e616d653d6d6173746572)](https://dev.azure.com/keboola-dev/azure-key-vault-php-client/_build/latest?definitionId=12&branchName=master) [![Maintainability](https://camo.githubusercontent.com/8d8429cad0f9fc5a5846c62b525a7af142ac749fac106a64eacb644fdd2c8729/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f66653938333830336562376437316138376133342f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/keboola/azure-key-vault-php-client/maintainability) [![Test Coverage](https://camo.githubusercontent.com/26a5dae00595ba9b0488731dbd00b9b9eda1cd009ebd66900e88d027423d162d/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f66653938333830336562376437316138376133342f746573745f636f766572616765)](https://codeclimate.com/github/keboola/azure-key-vault-php-client/test_coverage)
====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#azure-key-vault-php-client---)

PHP client for [Azure Key Vault](https://docs.microsoft.com/en-us/rest/api/keyvault/).

Supports the following [authentication methods](https://docs.microsoft.com/en-us/azure/developer/go/azure-sdk-authorization):

- **Client credentials** supplied in `AZURE_TENANT_ID`, `AZURE_CLIENT_ID` and `AZURE_CLIENT_SECRET` environment variables
- **Managed identity** picked automatically if client credentials not specified and [Azure Instance Metadata](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service) is available.

Only key encrypt and decrypt methods are currently implemented.

Installation
------------

[](#installation)

```
composer require keboola/azure-key-vault-client

```

Usage
-----

[](#usage)

Create client instance and encrypt data:

```
$client = new Client(
    new GuzzleClientFactory($logger),
    new AuthenticatorFactory(),
    'https://my-test-vault.vault.azure.net'
);

$result = $client->encrypt(
    new EncryptRequest(EncryptRequest::RSA_OAEP_256, 'test'),
    'my-test-key',
    'abcabcabcabcabcabcabcabcabcabcab'
);
```

Development
-----------

[](#development)

Run tests with:

```
docker compose run --rm testsXX

```

where XX is PHP version (56 - 74), e.g.:

```
docker compose run --rm tests70

```

### Resources Setup

[](#resources-setup)

Create a resource group:

```
az group create --name testing-azure-key-vault-php-client --location "East US"

```

Create a service principal:

```
az ad sp create-for-rbac --name testing-azure-key-vault-php-client

```

Use the response to set values `TEST_CLIENT_ID`, `TEST_CLIENT_SECRET` and `TEST_TENANT_ID` in the `.env.` file:

```
{
  "appId": "268a6f05-xxxxxxxxxxxxxxxxxxxxxxxxxxx", //-> TEST_CLIENT_ID
  "displayName": "testing-azure-key-vault-php-client",
  "name": "http://testing-azure-key-vault-php-client",
  "password": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", //-> TEST_CLIENT_SECRET
  "tenant": "9b85ee6f-xxxxxxxxxxxxxxxxxxxxxxxxxxx" //-> TEST_TENANT_ID
}
```

Get ID of the service principal:

```
az ad sp list --filter "displayname eq 'testing-azure-key-vault-php-client'" --query [].objectId

```

Get ID of a group to which the current user belongs (e.g. "Developers"):

```
az ad group list --filter "displayname eq 'Developers'" --query [].objectId

```

Deploy the key vault, provide tentant ID, service principal ID and group ID from the previous commands:

```
az deployment group create --resource-group testing-azure-key-vault-php-client --template-file arm-template.json --parameters vault_name=testing-key-vault-client tenant_id=9b85ee6f-xxxxxxxxxxxxxxxxxxxxxxxxxxx service_principal_object_id=7f7a8a4c-xxxxxxxxxxxxxxxxxxxxxxxxxxx group_object_id=a1e8da73-xxxxxxxxxxxxxxxxxxxxxxxxxxx

```

Create key:

```
az keyvault key create --name test-key --vault-name testing-key-vault-client --query key.kid

```

returns e.g. `https://testing-key-vault-client.vault.azure.net/keys/test-key/b7c28xxxxxxxxxxxxxxxxxxxxxxxxxxx`, use this to set values in `.env` file:

- `TEST_KEY_VAULT_URL` -
- `TEST_KEY_NAME` - test-key
- `TEST_KEY_VERSION` - b7c28xxxxxxxxxxxxxxxxxxxxxxxxxxx

License
-------

[](#license)

MIT licensed, see [LICENSE](./LICENSE) file.

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance47

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 63.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~138 days

Recently: every ~236 days

Total

14

Last Release

389d ago

Major Versions

0.2.0 → 1.0.02020-07-31

1.2.0 → 2.0.02022-06-08

2.1.0 → 3.0.02022-09-21

3.0.0 → 4.0.02025-02-03

PHP version history (3 changes)0.1.0PHP &gt;=5.6

2.0.0PHP &gt;=7.4

4.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/101dbf2551a0709ddab522f97669f13a2c4cc2d0a1e8d009f3af6ba80accb1a9?d=identicon)[Keboola](/maintainers/Keboola)

---

Top Contributors

[![odinuv](https://avatars.githubusercontent.com/u/4319320?v=4)](https://github.com/odinuv "odinuv (67 commits)")[![ondrajodas](https://avatars.githubusercontent.com/u/12143866?v=4)](https://github.com/ondrajodas "ondrajodas (12 commits)")[![pepamartinec](https://avatars.githubusercontent.com/u/271753?v=4)](https://github.com/pepamartinec "pepamartinec (7 commits)")[![romantmb](https://avatars.githubusercontent.com/u/228957?v=4)](https://github.com/romantmb "romantmb (6 commits)")[![ondrejhlavacek](https://avatars.githubusercontent.com/u/497675?v=4)](https://github.com/ondrejhlavacek "ondrejhlavacek (5 commits)")[![ErikZigo](https://avatars.githubusercontent.com/u/1726727?v=4)](https://github.com/ErikZigo "ErikZigo (4 commits)")[![CurlyBytes](https://avatars.githubusercontent.com/u/55616292?v=4)](https://github.com/CurlyBytes "CurlyBytes (3 commits)")[![stimms](https://avatars.githubusercontent.com/u/153912?v=4)](https://github.com/stimms "stimms (1 commits)")[![ujovlado](https://avatars.githubusercontent.com/u/419849?v=4)](https://github.com/ujovlado "ujovlado (1 commits)")

---

Tags

clientazurekeboolakey vault

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/keboola-azure-key-vault-client/health.svg)

```
[![Health](https://phpackages.com/badges/keboola-azure-key-vault-client/health.svg)](https://phpackages.com/packages/keboola-azure-key-vault-client)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

310107.9k1](/packages/cognesy-instructor-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
