Hi Community,
i’m currently testing postgresql extension PG_TDE with HashiCorp Vault.
I managed to declare a key provider with vault using an access token.
select pg_tde_add_key_provider_vault_v2(‘vault’, ‘token’, ‘https://vault-hostname’, ‘secret/WPG/BUILD/secrets/masterkey’, ‘’);
pg_tde_add_key_provider_vault_v2
1
(1 row)
But setting a master key returns an error :
SELECT pg_tde_set_master_key(‘my-master-key’,‘vault’);
WARNING: HTTP(S) request to keyring provider “vault” returned invalid response 403
ERROR: failed to retrieve master key from keyring provider :“vault”
DETAIL: Error code: 5
In the Vault logs, it says that PG_TDE is trying to read a key that doesn’t exist instead of writing a new key. Here an extract of the logs :
“operation”:“read”,“path”:“secret/WPG/BUILD/secrets/masterkey/data/my-master-key_1”
Has anyone encountered this problem or knows where to find any documentation about this ?
Thanks
Best regards.