如何更改druid管理员默认密码?
我使用默认的基本身份验证器
我的配置如下
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果之前已创建用户并且您更改了initialAdminPassword 属性,则该属性不会产生任何影响,因为它存储在元数据中。
https://druid.apache.org/docs/latest/development/extensions-core/druid-basic-security.html#properties-for-druid-metadata-store-user-authentication
你应该能够使用初始 admin:password1 向协调器领导者发送 POST 来更改管理员密码。请务必将其保存在某个地方,因为我无法恢复丢失的密码。
在您的情况下:
{authenticatorName} = basic
{userName} = admin
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.
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