Hi all,
I am in the process to setup Oracle Key Vault (KMIP 1.1 compliant) as KMS for pg_tde
The documentation at KMIP Configuration - Percona Transparent Data Encryption for PostgreSQL has an error in the sequence of parameters for pg_tde_add_global_key_provider_kmip as the server certificate should be the last parameter as documented in Functions - Percona Transparent Data Encryption for PostgreSQL
That task is completed:
test=# SELECT pg_tde_add_database_key_provider_kmip(
‘OKV’,
‘10.0.0.107’,
5696,
‘/var/lib/pgsql/pg_okv/ssl/cert.pem’,
‘/var/lib/pgsql/pg_okv/ssl/key.pem’,
‘/var/lib/pgsql/pg_okv/ssl/CA.pem’
);
SELECT pg_tde_add_global_key_provider_kmip(
‘OKV’,
‘10.0.0.107’,
5696,
‘/var/lib/pgsql/pg_okv/ssl/cert.pem’,
‘/var/lib/pgsql/pg_okv/ssl/key.pem’,
‘/var/lib/pgsql/pg_okv/ssl/CA.pem’
);
pg_tde_add_database_key_provider_kmip
(1 row)
pg_tde_add_global_key_provider_kmip
(1 row)
Next step would be to create/use a key but this fails and in the trace of Key Vault I can only see a locate happening and nothing else.
First I tried (before creating a symmetric key in OKV to run
test=# SELECT pg_tde_create_key_using_database_key_provider(
‘percona-key’,
‘OKV’
);
ERROR: KMIP server reported error on register symmetric key: -1
In OKV I only see a “locate” happening and no attempt to create a key.
Next I created a key named in OKV and then when I run “set key” I see this:
test=# SELECT pg_tde_set_key_using_database_key_provider(
‘percona’,
‘OKV’
);
WARNING: KMIP server LOCATEd key, but GET failed with -2
ERROR: could not successfully query key provider “OKV”
And again in the OKV side only a LOCATE can be found.
Am I missing a step?
How can I debug this on the pg_tde side?
Kind regards,
Frank van der Borden