如何更改druid管理员默认密码?

发布于 2025-01-13 06:30:47 字数 566 浏览 0 评论 0原文

我使用默认的基本身份验证器

我的配置如下

druid.auth.authenticatorChain=["MyBasicMetadataAuthenticator"]
druid.auth.authenticator.MyBasicMetadataAuthenticator.type=basic
druid.auth.authenticator.MyBasicMetadataAuthenticator.initialAdminPassword=password1
druid.auth.authenticator.MyBasicMetadataAuthenticator.initialInternalClientPassword=password2
druid.auth.authenticator.MyBasicMetadataAuthenticator.credentialsValidator.type=metadata

在德鲁伊中,如果我将管理员密码从password1更改为另一个, 。它没有反映在德鲁伊控制台上! 它给出了一个错误!

那么如何修改Druid的管理员密码呢?

In Druid I am using default basic authenticator

My config look like this

druid.auth.authenticatorChain=["MyBasicMetadataAuthenticator"]
druid.auth.authenticator.MyBasicMetadataAuthenticator.type=basic
druid.auth.authenticator.MyBasicMetadataAuthenticator.initialAdminPassword=password1
druid.auth.authenticator.MyBasicMetadataAuthenticator.initialInternalClientPassword=password2
druid.auth.authenticator.MyBasicMetadataAuthenticator.credentialsValidator.type=metadata

If I change admin password from password1 to another. it is not reflecting on druid console!
It gives an error!

So how to change admin password in Druid?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

人疚 2025-01-20 06:30:47

如果之前已创建用户并且您更改了initialAdminPassword 属性,则该属性不会产生任何影响,因为它存储在元数据中。

https://druid.apache.org/docs/latest/development/extensions-core/druid-basic-security.html#properties-for-druid-metadata-store-user-authentication

你应该能够使用初始 admin:password1 向协调器领导者发送 POST 来更改管理员密码。请务必将其保存在某个地方,因为我无法恢复丢失的密码。

curl -XPOST --header "Content-Type: application/json" --user admin:password1 <coordinator_leader_ip:port>/druid-ext/basic-security/authentication/db/{authenticatorName}/users/{userName}/credentials --data '{ "password": "newPassword2" }'

在您的情况下:

{authenticatorName} = basic

{userName} = admin

如果您安装了协调器,通常是 http://localhost:8081/

https://druid.apache.org/docs/latest/development/extensions-core/druid-basic-security.html#usercredential-management

If the user has been previously created and you change the initialAdminPassword property it will have no affect as it is stored in the metadata.

https://druid.apache.org/docs/latest/development/extensions-core/druid-basic-security.html#properties-for-druid-metadata-store-user-authentication

You should be able to send a POST to the coordinator leader with the initial admin:password1 to change the admin password. Make sure to save it somewhere as I have been unable to recover lost passwords.

curl -XPOST --header "Content-Type: application/json" --user admin:password1 <coordinator_leader_ip:port>/druid-ext/basic-security/authentication/db/{authenticatorName}/users/{userName}/credentials --data '{ "password": "newPassword2" }'

In your case:

{authenticatorName} = basic

{userName} = admin

<coordinator_leader_ip:port> is often times http://localhost:8081/ if you have mounted the coordinator

https://druid.apache.org/docs/latest/development/extensions-core/druid-basic-security.html#usercredential-management

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文