> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/keeperpam/secrets-manager/integrations/oracle-key-vault.md). Agents can also search and read this documentation through its [MCP server](https://docs.keeper.io/~gitbook/mcp).

# OneCLI External Vault

Connect Keeper Security to OneCLI with a Secrets Manager application. Agents resolve secrets at runtime via keeper:// references, and credentials stay in your vault.

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FkOzsDKzy9lRLDXD7pMx9%2FKeeper%2BOneCLI.png?alt=media&amp;token=29e4a4bb-7de3-4912-9a3f-134f0f6d65cd" alt=""><figcaption></figcaption></figure>

Connect your Keeper vault to OneCLI so agents can authenticate to APIs and services using secrets stored in Keeper. Credentials are resolved at runtime using Keeper Secrets Manager and `keeper://` references ([Keeper notation](https://docs.keeper.io/keeperpam/secrets-manager/about/keeper-notation.md)).

{% hint style="info" %}
This integration is in beta. Setup and behavior may change between releases.
{% endhint %}

## Prerequisites

* OneCLI running locally or via Docker
* A Keeper account with [Secrets Manager](https://docs.keeper.io/en/keeperpam/secrets-manager/about) enabled
* The Keeper records that hold the secrets you want agents to use (e.g. a record with an API key in its password field)

## Setup

{% stepper %}
{% step %}

### **Create a Secrets Manager application**

In Keeper Vault, go to **Secrets Manager** and create a new application for OneCLI. Share the records your agents need with the application (read-only access is enough), then add a device to it and copy the **One-Time Access Token** / **Configuration method** value. You'll paste it in the next step.

{% hint style="info" %}
Use a dedicated application for OneCLI so you can revoke its access independently without affecting other integrations. A one-time token can only be used once, so generate it right before you connect.
{% endhint %}
{% endstep %}

{% step %}

### **Connect in the dashboard**

Open the OneCLI dashboard, go to **Connections** > **Vaults**, and click **Connect** on the **Keeper Security** card. Choose how you want to connect, paste the value, and click **Connect Keeper Security**:

| Configuration method  | What to paste                                                                                                      |
| --------------------- | ------------------------------------------------------------------------------------------------------------------ |
| One-time access token | The `US:...` token from step 1                                                                                     |
| Base64 string         | An existing Secrets Manager configuration, base64-encoded                                                          |
| JSON configuration    | An existing Secrets Manager configuration as JSON (must include `hostname`, `clientId`, `privateKey` and `appKey`) |

OneCLI validates the connection with Keeper, encrypts the configuration (AES-256-GCM), and stores it. A one-time token is single-use: OneCLI binds it to a reusable configuration, stores only that configuration, and discards the token. The plain-text configuration is never written to disk.
{% endstep %}

{% step %}

### **Add hostname mappings**

Go to **Connections** and create a secret (on the **Custom** or **LLMs** tab). For the value, click the **Keeper** button, then pick a record and a field. OneCLI builds the `keeper://` reference for you. (You can also choose **Enter a reference manually**.) Then attach the secret to your agent as you would any other secret.

| Host                | Keeper reference                             |
| ------------------- | -------------------------------------------- |
| `api.anthropic.com` | `keeper://<record-uid>/field/password`       |
| `api.openai.com`    | `keeper://<record-uid>/field/password`       |
| `api.example.com`   | `keeper://<record-uid>/custom_field/API Key` |

To point an existing secret at a different field, edit it and click **Change**.
{% endstep %}

{% step %}

### **Test it**

Make a request through the gateway with your agent's access token:

```bash
curl -x http://x:YOUR_AGENT_TOKEN@localhost:10255 https://api.anthropic.com/v1/messages \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-sonnet-4-20250514", "max_tokens": 1, "messages": [{"role": "user", "content": "hi"}]}'
```

The gateway resolves the secret's `keeper://` reference from Keeper and injects it as the `x-api-key` header. Your agent never sees the key.
{% endstep %}
{% endstepper %}

## How credentials are resolved

Keeper is not a hostname-matched fallback. It supplies the value for secrets you explicitly point at it:

```
Agent ──► Gateway ──► Secret Store (secret matches the host)
                │
                │  secret's value comes from Keeper
                ▼
          Keeper (resolve keeper:// reference via Secrets Manager)
                │
                ▼
          Gateway ──► External Service (inject + forward)
```

1. The gateway finds the secrets attached to the agent that match the target host
2. For each Keeper-backed secret, the `keeper://` reference is resolved through Keeper Secrets Manager using the stored configuration
3. The resolved value is injected as set on the secret and the request is forwarded to the service
4. Resolved values are cached in memory for 60 seconds, then discarded. A failed lookup is cached for about 30 seconds. Values are never written to the database.

If a reference can't be resolved (wrong record or field, record not shared, Keeper unreachable), the gateway skips that secret and sends the request without a credential. It never falls back to another value.

How the value is injected depends on the secret:

| Secret                                    | Header              | Format           |
| ----------------------------------------- | ------------------- | ---------------- |
| Anthropic (LLMs tab)                      | `x-api-key`         | Raw value        |
| Custom, **Bearer token**                  | `Authorization`     | `Bearer <value>` |
| Custom, **Custom header**                 | The header you name | Raw value        |
| Custom, **URL parameter** or **URL path** | n/a                 | Added to the URL |

## keeper:// reference format

Keeper references follow the pattern:

```
keeper://<record-uid>/<selector>/<name>
```

For example:

* `keeper://<record-uid>/field/password` reads a standard field (here, the password field)
* `keeper://<record-uid>/custom_field/<label>` reads a custom field by its label
* `keeper://<record-uid>/field/keyPair[0][privateKey]` reads one property of an object field

The field picker handles this for you. It lists the records shared with the application, with their folder path, and builds a reference that is unique within the record. Only titles, labels and references leave the server; field values never do. File, record-reference and one-time-code fields aren't offered.

{% hint style="warning" %}
When typing a reference by hand, use the record UID from Keeper, not the title. Titles aren't unique, and the record must be shared with the Secrets Manager application.
{% endhint %}

## Multiple secrets for one host

Each secret points at one Keeper field. To send more than one credential to the same host, create one secret (custom connection) for each, and make each write to a different place: a different header, URL parameter, or one **Bearer token** plus one **Custom header**. All of them are resolved and injected in the same request. Two secrets that write to the same header, parameter or path conflict, and only one is used.

Keeper secrets are workspace-scoped.

## Connection status

The Keeper Security page re-checks the connection every minute while it is open, and when you return to the tab.

| Status                | Meaning                                                                 |
| --------------------- | ----------------------------------------------------------------------- |
| **Connected**         | Keeper accepted the configuration                                       |
| **Can't connect**     | OneCLI can't use the connection. See the details shown below the badge. |
| **No records shared** | Keeper accepts the application, but nothing is shared with it           |

If Keeper sets an expiry on the application's access, the page shows the date and warns within a week of it.

## Troubleshooting

<details>

<summary>Connecting fails with 'could not be bound'</summary>

A one-time token can only be used once and expires quickly. Generate a new token for the application in Keeper and connect again.

</details>

<details>

<summary>Connecting fails with 'invalid keepersecurity KSM config'</summary>

Make sure the **Configuration method** matches what you pasted: a JSON configuration for JSON, a base64 string for base64. A JSON configuration must include `hostname`, `clientId`, `privateKey` and `appKey`.

</details>

<details>

<summary>The page shows 'Can't connect'</summary>

OneCLI can't tell why Keeper isn't reachable: the application's access may have expired or been revoked, its device may have been removed, or Keeper may be unreachable from the OneCLI server. The details are shown below the badge. If it persists, disconnect and connect again with a new configuration.

</details>

<details>

<summary>The page shows 'No records shared'</summary>

Keeper accepts the application, but no records are shared with it. Share the records with the Secrets Manager application in Keeper, then refresh the page. You don't need to reconnect.

</details>

<details>

<summary> A secret isn't injected, or the request fails with an authentication error</summary>

Check that the record is still shared with the application and that the field in the `keeper://` reference exists. The reason is in the gateway log, which records the reference and never the value. The Keeper page also shows the last reference that failed.

</details>

<details>

<summary>Credentials not updated after rotating a secret in Keeper</summary>

Resolved values are cached for 60 seconds. Wait for the cache to expire, or restart the gateway to force a fresh lookup.

</details>

<details>

<summary>Token decryption failed; re-pair to fix</summary>

The stored configuration can no longer be decrypted, usually because `SECRET_ENCRYPTION_KEY` changed. Disconnect and connect again with a new configuration.

</details>

<details>

<summary>Keeper is rate-limiting requests from OneCLI</summary>

Keeper is throttling the application. Try again shortly. OneCLI doesn't retry within the same request, so the affected secret is skipped until the next attempt.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.keeper.io/keeperpam/secrets-manager/integrations/oracle-key-vault.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
