pueteam / datasource-plugin-solr

Solr Datasource for Grafana
Apache License 2.0
22 stars 11 forks source link

Working source in Kerberized Solr #2

Open chronoacuma opened 6 years ago

chronoacuma commented 6 years ago

Hi! In our deploy we have enabled Kerberos and Sentry in Solr. When i set up connection: [{"id":1,"orgId":1,"name":"test","type":"pue-solr-datasource","typeLogoUrl":"public/plugins/pue-solr-datasource/images/solr.svg","access":"proxy","url":"http://cdh-data-01.ru:8983","password":"","user":"","database":"","basicAuth":false,"isDefault":true,"jsonData":{"keepCookies":[],"solrCollection":"","tlsSkipVerify":true},"readOnly":false}] I get following response, when i try to add table to dashboard: _t=2018-03-28T18:24:36+0300 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/datasources/proxy/1/solr/admin/collections status=401 remote_addr=10.116.204.175 timems=4 size=997 referer="http://cdh-edge-03.ru:3000/d/ILWMmwkiz/tt1?panelId=2&fullscreen&edit&orgId=1"

This datasource support Kerberized Solr? Or i have missconfig? Thanks

ishtartec commented 6 years ago

Hi @chronoacuma!, The kerberos source is supported if LDAP is enabled and configured in Solr. If you are using Cloudera Manager, go to Solr Service --> Configuration --> Category, select Security --> Enable LDAP Authentication

With this, you can provide user and password credentials in the data source plugin configuration. If you don't have the chance to enable LDAP authentication in Solr, then you'll have to provide the kerberos credentials somehow. This is something I'll try by myself. If you use proxy mode, the request is done by Grafana server, so the kerberos credentials need to be sent by Grafana. If you use direct mode, then your browser will have to be pre-authenticated. Let me try that anyway.