You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudberry.apache.org by "wsg314 (via GitHub)" <gi...@apache.org> on 2025/09/10 08:17:32 UTC

[D] How to rotate KEK in cloudberry cluster? [cloudberry]

GitHub user wsg314 created a discussion: How to rotate KEK in cloudberry cluster?

I have a cloudberry cluster including 1 master and 2 segments. And I enable TDE function. 
I want to alter KEK in all cluster node. What do I need to do? 


GitHub link: https://github.com/apache/cloudberry/discussions/1352

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org


Re: [D] How to rotate KEK in cloudberry cluster? [cloudberry]

Posted by "wsg314 (via GitHub)" <gi...@apache.org>.
GitHub user wsg314 added a comment to the discussion: How to rotate KEK in cloudberry cluster?

  <para>
   Cluster file encryption uses two levels of encryption &mdash; an upper
   key which encrypts lower-level keys.  The upper-level key is often
   referred to as a Key Encryption Key (<acronym>KEK</acronym>).  This key
   is <emphasis>not</emphasis> stored in the file system, but provided at
   <command>initdb</command> time and each time the server is started.  This
   key can be easily changed via <command>pg_alterckey</command> without
   requiring any changes to the the data files or <command>WAL</command>
   files.
  </para> 
from   datebase-encryption.sgml

Can we support to rorate KEK by using pg_alterckey ?
I have read the code of pg_alterckey, it can only change KEK in one node(master or segment). 
Is there any way to change KEK in whole cluster ? 




GitHub link: https://github.com/apache/cloudberry/discussions/1352#discussioncomment-14360787

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org


Re: [D] How to rotate KEK in cloudberry cluster? [cloudberry]

Posted by "kongfanshen-0801 (via GitHub)" <gi...@apache.org>.
GitHub user kongfanshen-0801 added a comment to the discussion: How to rotate KEK in cloudberry cluster?

Do you want to alter Master key or DEK (Data Encryption Key)?
Now we don't support  alter Master key  and DEK (Data Encryption Key) if the cluster is running.
And master key is hard code . If you want to change it, need to rebuild it.
The master key define in source code.
src/include/common/kmgr_utils.h
The relative code :
```
/*generate by cmd "echo cloudberry | sha256sum | cut -d' ' -f1 " */
#define DEFAULT_CLUSTER_KEY_COMMAND "echo 6f1c78b6722ae3f3b65e038a30f087d22e2a47f84578d5913e06ef5c871ae4c6"
```


GitHub link: https://github.com/apache/cloudberry/discussions/1352#discussioncomment-14360403

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org


Re: [D] How to rotate KEK in cloudberry cluster? [cloudberry]

Posted by "kongfanshen-0801 (via GitHub)" <gi...@apache.org>.
GitHub user kongfanshen-0801 edited a comment on the discussion: How to rotate KEK in cloudberry cluster?


Do you want to alter Master key or DEK (Data Encryption Key)?
We don't support rotate key.

Now we don't support  alter Master key  and DEK (Data Encryption Key) if the cluster is running.
And master key is hard code . If you want to change it, need to rebuild it.
The master key define in source code.
src/include/common/kmgr_utils.h
The relative code :
```
/*generate by cmd "echo cloudberry | sha256sum | cut -d' ' -f1 " */
#define DEFAULT_CLUSTER_KEY_COMMAND "echo 6f1c78b6722ae3f3b65e038a30f087d22e2a47f84578d5913e06ef5c871ae4c6"
```


GitHub link: https://github.com/apache/cloudberry/discussions/1352#discussioncomment-14360403

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org


Re: [D] How to rotate KEK in cloudberry cluster? [cloudberry]

Posted by "wsg314 (via GitHub)" <gi...@apache.org>.
GitHub user wsg314 added a comment to the discussion: How to rotate KEK in cloudberry cluster?

ok, i understand. thank you

GitHub link: https://github.com/apache/cloudberry/discussions/1352#discussioncomment-14361222

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org


Re: [D] How to rotate KEK in cloudberry cluster? [cloudberry]

Posted by "kongfanshen-0801 (via GitHub)" <gi...@apache.org>.
GitHub user kongfanshen-0801 added a comment to the discussion: How to rotate KEK in cloudberry cluster?

 Initially, we designed to use pg_alterckey for rotating the key. However, rotating the KEK using pg_alterckey is an unfinished feature, and we haven't do any tests on it. It probably won't work.


GitHub link: https://github.com/apache/cloudberry/discussions/1352#discussioncomment-14361037

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org


Re: [D] How to rotate KEK in cloudberry cluster? [cloudberry]

Posted by "wsg314 (via GitHub)" <gi...@apache.org>.
GitHub user wsg314 closed a discussion: How to rotate KEK in cloudberry cluster?

I have a cloudberry cluster including 1 master and 2 segments. And I enable TDE function. 
I want to alter KEK in all cluster node. What do I need to do? 


GitHub link: https://github.com/apache/cloudberry/discussions/1352

----
This is an automatically sent email for dev@cloudberry.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@cloudberry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: dev-help@cloudberry.apache.org