Download the PHP package bella-baxter/sdk without Composer
On this page you can find all versions of the php package bella-baxter/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bella-baxter/sdk
More information about bella-baxter/sdk
Files in bella-baxter/sdk
Package sdk
Short Description Official PHP SDK for the Bella Baxter secret management platform
License MIT
Homepage https://bella-baxter.io
Informations about the package sdk
Bella Baxter PHP SDK
Official PHP SDK for the Bella Baxter secret management platform.
Requirements
- PHP 8.1+
- Extensions:
ext-curl,ext-json,ext-openssl(all bundled by default)
Installation
Quick Start
End-to-End Encryption (E2EE)
E2EE is always on — there is no option to enable or disable it. Every client installs
E2EGuzzleMiddleware, which:
- Uses your device key (
privateKey, orBELLA_BAXTER_PRIVATE_KEY, both frombella auth setup) or, when none is configured, a fresh ephemeral P-256 key pair - Sends its public key as the
X-E2E-Public-Keyheader on every read that carries secret values — the seven envelope-required reads of the SDK contract (all secrets, both exports, the provider list, one secret, one secret version, the global list), whether issued bygetAllSecrets()or the Kiota client — and on nothing else - The server encrypts the response using ECDH-P256 + HKDF-SHA256 + AES-256-GCM
- The SDK decrypts the response transparently and hands on the server's own JSON for that read
Secret values are never visible in plaintext — not in server logs, proxies, or network captures.
Fail closed (#1050). Once the key has been presented on a read that carries secret values, an answer
that is not a decryptable envelope is refused with BellaBaxter\E2EEResponseException, never returned:
getErrorCode() is e2ee-plaintext-response for plain secrets (a header-stripping proxy or a server
regression) and e2ee-decryption-failed for an envelope that is malformed, tampered or encrypted to
another key. There is no plaintext fallback.
API
getAllSecrets(): array<string,string>
Fetches all secrets for the project + environment the API key is scoped to.
getSecretsVersion(): array
Lightweight change check — returns environmentSlug, version and lastModified, no values.
getKeyContext(): array
The project and environment the API key is scoped to (GET /api/v1/keys/me).
getClient() and getRequestAdapter() — the full API
getClient() is the Kiota-generated client for every other endpoint; its requests go through the same
signing and E2EE middleware. Each of the seven value-carrying reads declares the plaintext it returns in
the OpenAPI document (#1187), so the typed get() parses the decrypted answer; getRequestAdapter() reads the
same answer as a raw body:
Configuration
BaxterClientOptions constructor arguments (use named arguments):
| Option | Type | Default | Description |
|---|---|---|---|
baxterUrl |
string |
https://api.bella-baxter.io |
Base URL of the Baxter API |
apiKey |
string |
— (required) | Bella Baxter API key, bax-<keyId>-<secret> |
timeoutSeconds |
int |
10 |
HTTP request timeout |
privateKey |
?string |
null |
PKCS#8 PEM device key; falls back to BELLA_BAXTER_PRIVATE_KEY |
onWrappedDekReceived |
?callable |
null |
(string $wrappedDek, ?string $leaseExpires): void, called on X-Bella-Wrapped-Dek |
Laravel Integration
Symfony Integration
Typed Secret Code Generation
bella secrets generate php fetches the secrets manifest (key names + type hints, no values) from the Bella API and generates a typed AppSecrets class. Each method calls getenv() at runtime — no secret values are ever embedded in the generated file.
Generated AppSecrets.php:
Usage alongside the SDK
Because each method reads getenv() on every call, values updated between requests (or via bella watch) are always current.
Options
| Option | Default | Description |
|---|---|---|
-p, --project <slug> |
.bella context |
Project slug |
-e, --environment <slug> |
.bella context |
Environment slug |
--provider <slug> |
default |
Provider slug |
-o, --output <path> |
AppSecrets.php |
Output file path |
--class-name <name> |
AppSecrets |
Class name |
--dry-run |
— | Print to stdout without writing |
All versions of sdk with dependencies
ext-json Version *
ext-openssl Version *
microsoft/kiota-abstractions Version ^1.0
microsoft/kiota-http-guzzle Version ^1.0
microsoft/kiota-serialization-json Version ^1.0
microsoft/kiota-serialization-text Version ^1.0
microsoft/kiota-serialization-form Version ^1.0
microsoft/kiota-serialization-multipart Version ^1.0