{"id":3883,"date":"2026-03-01T19:01:34","date_gmt":"2026-03-01T18:01:34","guid":{"rendered":"https:\/\/kudzia.eu\/b\/?p=3883"},"modified":"2026-03-01T19:02:42","modified_gmt":"2026-03-01T18:02:42","slug":"thales-ciphertrust-manager-setting-up-kms-access","status":"publish","type":"post","link":"https:\/\/kudzia.eu\/b\/2026\/03\/thales-ciphertrust-manager-setting-up-kms-access\/","title":{"rendered":"Thales CipherTrust Manager &#8211; setting up KMS access"},"content":{"rendered":"\n<p>this is reminder, mostly for myself, how to issue certificates that later can be used with PostgreSQL, MySQL to access Key Management Service [KMS] via Key Management Interoperability Protocol [KMIP] to store &amp; retrieve encryption keys used in Table Data Encryption [TDE].<\/p>\n\n\n\n<p>whenever i refer to PostgreSQL or MySQL in this post &#8211; i actually refer to <a href=\"https:\/\/www.percona.com\/mysql\/software\/percona-server-for-mysql\">Percona Server for MySQL<\/a> 8.4.6 and <a href=\"https:\/\/www.percona.com\/postgresql\/software\">Percona Server for PostgreSQL<\/a> 17.7 + <a href=\"https:\/\/docs.percona.com\/pg-tde\/\">pg_tde<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">why + problems i have with this<\/h2>\n\n\n\n<p>i had to implement TDE for MySQL, PostgreSQL; for databases that are already stored on fully encrypted drives. i feel that in my particular context TDE was an overkill &#8211; introducing unnecessary complication and risk, without giving any significant security benefits. <\/p>\n\n\n\n<p>TDE protects data in scenario where attacked has access to disk level data from given database server.<\/p>\n\n\n\n<p>TDE does not protect against scenarios in which attacker:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>gains logical access to a running database server &#8211; then they can dump encryption keys from memory, or use local commands like pg_dump, mysqldump to extract decrypted data,<\/li>\n\n\n\n<li>gets hold of valid database credentials and can access server over the network &#8211; then they can use database clients or dump tools to extract the sensitive data.<\/li>\n<\/ul>\n\n\n\n<p>nevertheless &#8211; i had to implement it anyway. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">architecture<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"591\" height=\"211\" src=\"https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/kmip-client-server-1.png\" alt=\"\" class=\"wp-image-3875\" srcset=\"https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/kmip-client-server-1.png 591w, https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/kmip-client-server-1-300x107.png 300w\" sizes=\"auto, (max-width: 591px) 100vw, 591px\" \/><\/figure>\n\n\n\n<p>MySQL or PostgreSQL with the pg_tde extension can act as KMIP clients and communicate with the KMS:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>use two way TLS &#8211; authenticate, using locally available client certificate, client key files towards the KMS, at the same time ensure it&#8217;s the real KMS talking to us by checking response against certificate authority certificate file,<\/li>\n\n\n\n<li>initially store, later retrieve the secret from KMS; use that secret to decrypt\/encrypt database files stored in the local file system,<\/li>\n\n\n\n<li>periodically rotate keys &#8211; store a new secret in KMS<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Thales CipherTrust Manager &#8211; setting up access for KMIP client<\/h2>\n\n\n\n<p>disclaimer: based on instruction i&#8217;ve received from 3rd party company supplying the KMS service. i don&#8217;t know exact &#8216;whys&#8217; behind those steps.<\/p>\n\n\n\n<p>for every server \/ service that will act as KMIP client do those steps:<\/p>\n\n\n\n<p>1. from the front page of the Thales CipherTrust Manager &#8211; go to <em>access management<\/em> &gt;<em> users<\/em>, click <em>+ add user<\/em> and create a new account. provide:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>username &#8211; i&#8217;ve used naming <em>nameofserver-nameofservice<\/em> e.g. <em>swedb5-mysql<\/em><\/li>\n\n\n\n<li>complex password; in practice unused<\/li>\n\n\n\n<li>un-tick all types of access &#8211; <\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1781\" height=\"844\" src=\"https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/image.png\" alt=\"\" class=\"wp-image-3876\" srcset=\"https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/image.png 1781w, https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/image-300x142.png 300w, https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/image-1024x485.png 1024w, https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/image-768x364.png 768w, https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/image-1536x728.png 1536w\" sizes=\"auto, (max-width: 1781px) 100vw, 1781px\" \/><\/figure>\n\n\n\n<p>2. go to <em>access management <\/em>&gt; <em>users<\/em>, find the newly created user, click on it and select <em>group membership<\/em>, click <em>add group<\/em> and add <em>key users<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1790\" height=\"645\" src=\"https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/image-1.png\" alt=\"\" class=\"wp-image-3877\" srcset=\"https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/image-1.png 1790w, https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/image-1-300x108.png 300w, https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/image-1-1024x369.png 1024w, https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/image-1-768x277.png 768w, https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/image-1-1536x553.png 1536w\" sizes=\"auto, (max-width: 1790px) 100vw, 1790px\" \/><\/figure>\n\n\n\n<p>3. go to the root of the <em>CipherTrust Manager <\/em>&gt; <em>KMIP<\/em>, <em>client profile<\/em> and click <em>add profile<\/em>. provide:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><em>profile name<\/em> &#8211; i&#8217;ve used the same naming convention as in point 1, although this time its profile name and not user name<\/li>\n\n\n\n<li><em>certificate duration <\/em>expressed in days; assign it to the desired KMIP certificate rotation frequency. let&#8217;s say 365 days, <\/li>\n\n\n\n<li><em>certificate details<\/em> &#8211; <em>common name<\/em> &#8211; this one is complex. i was told to use name in format <em>{name-of-cmt-domain}|{name-of-cmt-domain}||name-of-profile<\/em>; for domain called <em>c1234-kms567<\/em> and profile <em>swedb5-mysql<\/em> &#8211; it&#8217;ll be <em>c1234-kms567|c1234-kms567||swedb5-mysql<\/em><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1222\" height=\"1152\" src=\"https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/image-2.png\" alt=\"\" class=\"wp-image-3878\" srcset=\"https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/image-2.png 1222w, https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/image-2-300x283.png 300w, https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/image-2-1024x965.png 1024w, https:\/\/kudzia.eu\/b\/wp-content\/uploads\/2026\/03\/image-2-768x724.png 768w\" sizes=\"auto, (max-width: 1222px) 100vw, 1222px\" \/><\/figure>\n\n\n\n<p>4. go to <em>CipherTrust Manager <\/em>&gt; <em>KMIP<\/em> &gt; <em>Registration token<\/em>, click <em>new registration token <\/em>and click through the wizard:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>name prefix &#8211; i got one from KMS provider <em>c1234, <\/em>rest unchanged, select ca<\/li>\n\n\n\n<li>select ca &#8211; in my case it was CA provided by the KMS supplier,<\/li>\n\n\n\n<li>client profile &#8211; select one created in the step #3 above<\/li>\n\n\n\n<li>click <em>create token<\/em>, copy token to the clipboard<\/li>\n<\/ul>\n\n\n\n<p>5. go to the <em>CipherTrust Manager <\/em>&gt; <em>KMIP<\/em> <em>&gt;<\/em> <em>registered clients<\/em>, click <em>add client<\/em> and provide:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>name &#8211; same as user name in the step #1, for me <em>swedb5-mysql<\/em><\/li>\n\n\n\n<li>registration token &#8211; copied at the end of the step #4<\/li>\n\n\n\n<li>click <em>save<\/em>, fetch the certificate &#8211; <em>client.crt<\/em>, private key &#8211; <em>client.key<\/em>; we&#8217;ve got <em>ca.crt<\/em> provided by the 3rd party selling us KMS service.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>this is reminder, mostly for myself, how to issue certificates that later can be used with PostgreSQL, MySQL to access Key Management Service [KMS] via Key Management Interoperability Protocol [KMIP] to store &amp; retrieve encryption keys used in Table Data Encryption [TDE]. whenever i refer to PostgreSQL or MySQL in this post &#8211; i actually [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[138,139],"class_list":["post-3883","post","type-post","status-publish","format-standard","hentry","category-tech","tag-kmip","tag-kms"],"_links":{"self":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/3883","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/comments?post=3883"}],"version-history":[{"count":3,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/3883\/revisions"}],"predecessor-version":[{"id":3887,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/3883\/revisions\/3887"}],"wp:attachment":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/media?parent=3883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/categories?post=3883"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/tags?post=3883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}