You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Allow setting the root password through the Secret store CSI driver #485
I had searched in the issues and found no similar issues.
Description
I recently read through the English guide on setting the initial root password for an Apache Doris cluster and personally had some doubts about the security of the ways described there to set the root password. I'm not sure if this is the place to discuss those concerns, hence I will not post those here directly.
Instead, I would like to propose a new mechanism to provide the root password to the Doris Frontend container(s): The Kubernetes Secret Store CSI Driver. The great advantages of this method are:
Secrets by default always come from a place where they are stored securely, and access is well audited, as the system relies on external secret stores like OpenBAO/Vault or various or various Public Cloud secret managers
These secrets are never stored in ETCD but only in the external secret store, and made available to Linux pods as tmpfs volumes, which are cleaned up the moment a pod is deleted.
For an overview on how to apply this mechanism see this page, perhaps it could be combined with first pattern mentioned, by providing the frontend config file as a secret mounted through the Secret Store CSI Driver.
Use case
I believe adding the above mechanism will ensure the admin account password is much better protected (and audited) than in the current methods. A comprised admin password can cause data leaks and other damage, so I suggest setting up secure from the start, and for sure setting one by default (secure by default).
@benvdh hi,Thanks for the detailed write-up and the well-thought-out solution! 🎉
We've added this to our feature backlog. Since you've clearly already done the hard thinking here — the approach looks solid — this seems like a great opportunity to bring it to life yourself. Your PR would be very welcome, and we'd love to see your name in the contributors list! 🙌
No pressure of course, but the door is wide open. 😄
@catpineapple Thank you for your kind words. At the moment I have a rather large workload on my shoulders already, so I think implementing this would be a bit too much for me.
Even though, I have done a basic GoLang course a while ago, and have Kubernetes experience as a user, I have no experience with the internals of Kubernetes operators. So for now the best I can offer would be functional advice and thinking along about the design.
When I develop #557, I found that this feature is not easy for this case.
Operator need the secret to connect to FE. When vault stored it as sha1 twice. Operator can't use this sha1ed value to connect FE.
There's another approach: the Operator mounts the plaintext secret, and when needed, it reads the plaintext password directly from the mounted volume. Meanwhile, the FE only mounts the SHA-hashed value. This does seem a bit cumbersome, though. However, once that PR is merged, we can simply mount a similar plaintext secret for the Operator to make it work.
@jiuker thx for making an attempt to implement this. I'm not part of the Doris team, but I am the author of this feature request. However, your PR does not really implement the functionality I actually requested above. Your PR mostly implements general volume mounts through CSI, but it does not utilize the CSI Secret Store driver, and an accompanying Secret Store provider to provide the secret.
A design that implements support for the CSI Secret Store Provider should meet the following requirements:
Is mutually exclusive with other ways to provide the root password at deployment time
Would allow the Doris-operator to accept a SecretProviderClass as input that follows the same structure as the ordinary K8S secret) (see section: Using Secret on that page).
Ensures the operator utilizes that SecretProviderClass to mount it as a CSI Secret Store volume. See this PR that I created that implements similar functionality on the GitLab Agent Helm chart.
Do note that the following 3 things already need to be present on your Kubernetes cluster in order to utilize this functionality in the operator:
The general CSI Secret Store Driver should be installed on the K8S cluster
A specific CSI Secret Store Provider should be installed and configured. For example, for OpenBAO, you can find instructions here. A full list of providers can be found here
You should have a SecretProviderClass CRD deployed that maps the data in your secret store to specific fields required for the volume mount. For an example on how to implement such a CRD for OpenBAO, see here.
I hope that clears up some confusion (especially that CSI Volume != CSI SecretProviderClass), and if you have further questions I'm happy to point you in the right direction, as by now I have gained some practical experience with the CSI Secret Store provider.
Activity
CalvinKirs commentedon Apr 14, 2026
@catpineapple PTAL
catpineapple commentedon Apr 14, 2026
@benvdh hi,Thanks for the detailed write-up and the well-thought-out solution! 🎉
We've added this to our feature backlog. Since you've clearly already done the hard thinking here — the approach looks solid — this seems like a great opportunity to bring it to life yourself. Your PR would be very welcome, and we'd love to see your name in the contributors list! 🙌
No pressure of course, but the door is wide open. 😄
benvdh commentedon Apr 15, 2026
@catpineapple Thank you for your kind words. At the moment I have a rather large workload on my shoulders already, so I think implementing this would be a bit too much for me.
Even though, I have done a basic GoLang course a while ago, and have Kubernetes experience as a user, I have no experience with the internals of Kubernetes operators. So for now the best I can offer would be functional advice and thinking along about the design.
jiuker commentedon Nov 21, 2026
When I develop #557, I found that this feature is not easy for this case.
Operator need the secret to connect to FE. When vault stored it as sha1 twice. Operator can't use this sha1ed value to connect FE.
There's another approach: the Operator mounts the plaintext secret, and when needed, it reads the plaintext password directly from the mounted volume. Meanwhile, the FE only mounts the SHA-hashed value. This does seem a bit cumbersome, though. However, once that PR is merged, we can simply mount a similar plaintext secret for the Operator to make it work.
jiuker commentedon Nov 21, 2026
https://github.com/apache/doris-operator/blob/master/pkg/controller/sub_controller/fe/prepare_modify.go#L106-L190
jiuker commentedon Nov 21, 2026
@Al-assad What's your idea here?
benvdh commentedon Nov 21, 2026
@jiuker thx for making an attempt to implement this. I'm not part of the Doris team, but I am the author of this feature request. However, your PR does not really implement the functionality I actually requested above. Your PR mostly implements general volume mounts through CSI, but it does not utilize the CSI Secret Store driver, and an accompanying Secret Store provider to provide the secret.
A design that implements support for the CSI Secret Store Provider should meet the following requirements:
SecretProviderClassas input that follows the same structure as the ordinary K8S secret) (see section:Using Secreton that page).SecretProviderClassto mount it as a CSI Secret Store volume. See this PR that I created that implements similar functionality on the GitLab Agent Helm chart.Do note that the following 3 things already need to be present on your Kubernetes cluster in order to utilize this functionality in the operator:
I hope that clears up some confusion (especially that CSI Volume != CSI SecretProviderClass), and if you have further questions I'm happy to point you in the right direction, as by now I have gained some practical experience with the CSI Secret Store provider.