Classes · @purista/azure-secret-store

AzureSecretStore

Secret store backed by Azure Key Vault.

Signature

AzureSecretStore.ts typescript
class AzureSecretStore

Examples

example-1.ts typescript
const store = new AzureSecretStore({
  vaultUrl: 'https:___PH0___
  cacheTtl: 30_000,
})

await store.setSecret('acme-prod-payments-api-token', 'placeholder-secret')
const secret = await store.getSecret('acme-prod-payments-api-token')

Constructors

1 entry

constructor

Constructor

Source
constructor.ts typescript
new constructor(config: { allowInsecureConnection: boolean; cacheTtl: number; enableCache: boolean; enableGet: boolean; enableRemove: boolean; enableSet: boolean; ... })

Creates an Azure Key Vault-backed secret store.

Properties

5 entries

cache

Property

cache.ts typescript
cache: SecretStoreCacheMap

Optional in-memory cache of secret values.

client

Property

Source
client.ts typescript
client: SecretClient

Azure Key Vault client used for secret operations.

config

Property

config.ts typescript
config: { allowInsecureConnection: boolean; cacheTtl: number; enableCache: boolean; enableGet: boolean; enableRemove: boolean; enableSet: boolean; ... }

Store configuration including operation toggles and cache settings.

logger

Property

logger.ts typescript
logger: Logger

Child logger scoped to the store name.

name

Property

name.ts typescript
name: string

Store name used in logs and diagnostics.

Methods

7 entries

destroy

Method

destroy.ts typescript
destroy(): Promise<void>

Shutdown hook for store adapters.

getSecret

Method

getSecret.ts typescript
getSecret<SecretNames>(...secretNames: SecretNames): Promise<ObjectWithKeysFromStringArray<SecretNames, string | undefined>>

Get one or more secrets by name.

getSecretImpl

Method

Source
getSecretImpl.ts typescript
getSecretImpl<SecretNames>(...secretNames: SecretNames): Promise<ObjectWithKeysFromStringArray<SecretNames, string | undefined>>

Adapter-specific secret lookup implementation.

removeSecret

Method

removeSecret.ts typescript
removeSecret(secretName: string): Promise<void>

Remove one secret by name.

removeSecretImpl

Method

Source
removeSecretImpl.ts typescript
removeSecretImpl(secretName: string): Promise<void>

Adapter-specific secret removal implementation.

setSecret

Method

setSecret.ts typescript
setSecret(secretName: string, secretValue: string): Promise<void>

Store or replace one secret value.

setSecretImpl

Method

Source
setSecretImpl.ts typescript
setSecretImpl(secretName: string, secretValue: string): Promise<void>

Adapter-specific secret write implementation.