# KMIP configuration

> Configure a KMIP endpoint, client credentials, and key provider.

---

LLMS index: [llms.txt](/llms.txt)

---

> This is the Percona pg_tde 2.3.0 manual. For the paired build, backup tools and major upgrades, see [PG TDE on Mimus](/docs/tde/).

> [!NOTE] Editorial correction
> This overview retains an older qualification of Vault KMIP. The 2.2.2 release notes explicitly announce Vault Enterprise KMIP support; consult those notes for the version-specific status. See [site errata](/docs/tde/upstream/site/errata/).

To use a Key Management Interoperability Protocol (KMIP) server with `pg_tde`, you must configure it as a global key provider. This setup enables `pg_tde` to securely fetch and manage encryption keys from a centralized key management appliance.

> [!IMPORTANT]
> When using HashiCorp Vault as a KMIP server, this configuration is not a validated deployment model for `pg_tde` and is not recommended for production use.
>
> For Vault-based key management, use the [KV v2 integration](/docs/tde/upstream/global-key-provider-configuration/vault/) instead.

> [!NOTE]
> You need the root certificate of the KMIP server and a client key/certificate pair with permissions to create and read keys on the server.

For testing purposes, you can use a Eviden KMS server, which enables easy certificate generation and basic KMIP behavior. If you're using a production-grade KMIP server, ensure you obtain valid, trusted certificates from the key management appliance.

## Example usage {#example-usage}

```sql
SELECT pg_tde_add_global_key_provider_kmip(
    'provider-name',
    'kmip-IP', 
    `port`,
    '/path_to/server_certificate.pem', 
    '/path_to/client_cert.pem',
    '/path_to/client_key.pem'
);
```

## Parameter descriptions {#parameter-descriptions}

* `provider-name` is the name of the provider. You can specify any name, it's for you to identify the provider
* `kmip-IP` is the IP address of a domain name of the KMIP server
* `port` is the port to communicate with the KMIP server. Typically used port is 5696
* `server-certificate` is the path to the certificate file for the KMIP server
* `client_cert` is the path to the client certificate.
* `client_key` is the path to the client key.

The following example is for testing purposes only.

```sql
SELECT pg_tde_add_global_key_provider_kmip(
    'kmip','127.0.0.1', 
    5696, 
    '/tmp/server_certificate.pem', 
    '/tmp/client_cert_jane_doe.pem',
    '/tmp/client_key_jane_doe.pem'
);
```

For more information on related functions, see the link below:

[Percona pg_tde Function Reference](/docs/tde/upstream/functions/)

## Next steps {#next-steps}

[Global Principal Key Configuration ](/docs/tde/upstream/global-key-provider-configuration/set-principal-key/)

[PG.CENTER edition](https://github.com/pgsty/doc.pg.center/blob/4410c32dc9186a22859008303f474b72a779f583/content/percona/global-key-provider-configuration/kmip-server.md) · [Upstream source](https://github.com/percona/pg_tde/blob/5dd7a9e4e3599d88546f5de67ff0f4ef3fe51a9a/documentation/docs/global-key-provider-configuration/kmip-server.md)

---

Backlinks:

- [FAQ](/docs/tde/upstream/faq/)
- [Choose a provider](/docs/tde/upstream/global-key-provider-configuration/overview/)
