在德鲁伊设置基本身份验证

问题描述 投票:1回答:1

我想为Druid设置身份验证。我按照这个例子从http://druid.io/docs/latest/tutorials/quickstart.html建立了德鲁伊

完成后,我按照此文档设置身份验证:http://druid.io/docs/latest/development/extensions-core/druid-basic-security.html

这些是common.runtime.properties文件中的以下更改

# Basic authentication
# Basic authentication: Authenticator settings
druid.auth.authenticatorChain=["MyBasicAuthenticator"]
druid.auth.authenticator.MyBasicAuthenticator.type=basic
druid.auth.authenticator.MyBasicAuthenticator.initialAdminPassword=password1
druid.auth.authenticator.MyBasicAuthenticator.initialInternalClientPassword=password2
druid.auth.authenticator.MyBasicAuthenticator.authorizerName=MyBasicAuthorizer


druid.auth.authorizers=["MyBasicAuthorizer"]
druid.auth.authorizer.MyBasicAuthorizer.type=basic

当我向网址发出POST请求时:http://localhost:8082/druid/v2/?pretty

与身体:

{
  "queryType" : "topN",
  "dataSource" : "wikiticker",
  "intervals" : ["2015-09-12/2015-09-13"],
  "granularity" : "all",
  "dimension" : "page",
  "metric" : "edits",
  "threshold" : 25,
  "aggregations" : [
    {
      "type" : "longSum",
      "name" : "edits",
      "fieldName" : "count"
    }
  ]
}

用户名为:druid_system,密码为:password2

我收到以下错误:

io.druid.java.util.common.IAE: No authenticator found with prefix: [MyBasicAuthenticator]

有没有人对它有任何想法?

pivot-table olap druid
1个回答
0
投票

您的配置缺少escalator

添加以下内容:

# Escalator for the internal client that is used for the internal druid communication
druid.escalator.type=basic
druid.escalator.internalClientUsername=druid_system
druid.escalator.internalClientPassword=password2
druid.escalator.authorizerName=BasicAuthorizer
© www.soinside.com 2019 - 2024. All rights reserved.