Skip to content

[Feature] Allow setting the root password through the Secret store CSI driver #485

Open

Description

@benvdh

Search before asking

  • 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:

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).

Related issues

Not that I know of...

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. CalvinKirs commented on Apr 14, 2026

    @CalvinKirs
    Member
  2. added
    Featurethe feature will prompt the available or effect to operator.
    on Apr 14, 2026
  3. catpineapple commented on Apr 14, 2026

    @catpineapple
    Member

    @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. 😄

  4. benvdh commented on Apr 15, 2026

    @benvdh
    Author

    @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.

  5. jiuker commented on Nov 21, 2026

    @jiuker

    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.

  6. jiuker commented on Nov 21, 2026

    @jiuker
    image This is my local test. Added mounts and volumesMounts would work. And for operator need plaintext secret here.

    https://github.com/apache/doris-operator/blob/master/pkg/controller/sub_controller/fe/prepare_modify.go#L106-L190

  7. jiuker commented on Nov 21, 2026

    @jiuker

    @Al-assad What's your idea here?

  8. benvdh commented on Nov 21, 2026

    @benvdh
    Author

    @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:

    1. Is mutually exclusive with other ways to provide the root password at deployment time
    2. 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).
    3. 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:

    1. The general CSI Secret Store Driver should be installed on the K8S cluster
    2. 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
    3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Featurethe feature will prompt the available or effect to operator.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions