solr8加鉴权

1:拷贝security.json到目录webapps/solr_home/下,security.json的内容如下:

{

"authentication":{

"blockUnknown":true,

"class":"solr.BasicAuthPlugin",

"credentials":{

"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="

},

"":{"v":0}},

"authorization":{

"class":"solr.RuleBasedAuthorizationPlugin",

"permissions":[{

"name":"security-edit",

"role":"admin"}],

"user-role":{"solr":"admin"}}}

###以上代表solr的用户名和密码为: solr/SolrRocks

2: 启动solr

3: 修改用户名密码(需要借助curl工具)

##修改solr登录密码

curl --user solr:SolrRocks http://192.168.1.176:9081/solr/admin/authentication -H "Content-type:application/json" -d "{\"set-user\": {\"king\" : \"123456\"}}"

##删除solr用户

curl --user solr:SolrRocks http://192.168.1.176:9081/solr/admin/authentication -H "Content-type:application/json" -d "{\"delete-user\": [\"solr\"]}"

##查看权限

http://192.168.1.176:9081/solr/admin/authentication

相关推荐
铅笔小新z14 小时前
【Linux】进程控制(下)
linux·运维·chrome
SuperEugene16 小时前
Vue3 配置驱动弹窗:JSON配置弹窗内容/按钮,避免重复开发弹窗|配置驱动开发实战篇
前端·javascript·vue.js·前端框架·json
恁这是弄啥咧17 小时前
美国地址生成器网站 做SEO再也不愁了,谷歌浏览器Chrome重要升级,结合了Gemini!
chrome·gemini
五仁火烧18 小时前
前端最常用的两种请求数据格式application/json 和 multipart/form-data 完全解析
前端·javascript·vue.js·json
吹个口哨写代码19 小时前
h5/小程序直接读本地/在线的json文件数据
前端·小程序·json
DevOpenClub1 天前
文章抽取信息化 JSON API 接口
json
电商API&Tina1 天前
1688 拍立淘接口(item_search_img)测试与接入实战心得
java·大数据·前端·物联网·oracle·json
Thomas21432 天前
chrome cdp 三种方案对比
前端·chrome
别叫我->学废了->lol在线等2 天前
claudecode的agent定义
前端·chrome·github
ZC跨境爬虫2 天前
海南大学交友平台开发实战 day11(实现性别图标渲染与后端数据关联+Debug复盘)
前端·python·sqlite·html·json