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.3.0(3mo ago)143.5k↓23.3%61MITPHPPHP &gt;=8.2CI failing

Since May 25Pushed 3mo 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 2d ago

READMEChangelog (10)Dependencies (23)Versions (16)Used By (1)

Azure Key Vault PHP Client [![Build Status](https://github.com/keboola/azure-key-vault-php-client/actions/workflows/ci.yml/badge.svg)](https://github.com/keboola/azure-key-vault-php-client/actions/workflows/ci.yml)
======================================================================================================================================================================================================================

[](#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 tests

```

### 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

57

—

FairBetter than 98% of packages

Maintenance82

Actively maintained with recent releases

Popularity33

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 ~152 days

Recently: every ~105 days

Total

15

Last Release

93d 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

ajdaclientazurekeboolakey 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.5k5.9M738](/packages/sylius-sylius)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[shopware/platform

The Shopware e-commerce core

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

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

751291.4k43](/packages/civicrm-civicrm-core)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)

PHPackages © 2026

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