Skip to content
Français

createOnePasswordSecretSource

import { createOnePasswordSecretSource } from "@elie-laloum/outpost/secrets/onepassword";

Create a reader using the caller’s authenticated 1Password SDK client. Resolve only selected environment-name mappings to explicit op:// references, validate the complete selection before any read and retain caller ownership of the client. Cancellation through fromSecrets stops waiting, but does not cancel an in-flight SDK request.

Complete example and detailed rules.

  • optionsRequired
    OnePasswordSecretSourceOptions
    Host client or connection configuration and explicit secret selection for the OnePassword adapter.
  • options.clientRequired
    { readonly secrets: Pick<Client["secrets"], "resolve">; }
    Caller-authenticated host client exposing secrets.resolve, such as the official 1Password SDK with service-account authentication. It remains caller-owned; no desktop login or system keychain lookup is selected by Outpost.
  • options.secretsRequired
    Readonly<Record<string, string>>
    Mapping of environment identifiers to explicit op://vault/item/field or op://vault/item/section/field references; only selected mappings are resolved, with no vault/item enumeration.

SecretSource

export declare function createOnePasswordSecretSource(
  options: OnePasswordSecretSourceOptions,
): SecretSource;