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

相关推荐
谢小飞2 天前
如何让AI用一个下午开发上架Chrome插件助我摸鱼
前端·chrome
小溪彼岸3 天前
谷歌发布Gemini in Chrome,Chrome正式成为AI浏览器
chrome·google
小溪彼岸3 天前
谷歌上线Gemini in Chrome,想免费使用还需打怪升级
chrome·google
fthux4 天前
大道至简 - Juejin Notifier - 掘金消息通知小助手
chrome
简离12 天前
前端调试实战:基于 chrome://webrtc-internals/ 高效排查WebRTC问题
前端·chrome·webrtc
Ai老司机13 天前
Chrome浏览器驱动(ChromeDriver)官方下载 - 全平台高速镜像站 | chromedrive.cn
前端·chrome
电商API_1800790524713 天前
如何将小红书评论数据封装到API实现自动化分析?测试API实战指南
运维·chrome·自动化
~远在太平洋~13 天前
debian系统已安装python3.12却无法执行python命令
chrome·python·debian
阿珊和她的猫13 天前
浏览器跨页签数据共享方案
前端·javascript·vue.js·chrome
上海合宙LuatOS13 天前
LuatOS核心库API——【json 】json 生成和解析库
java·前端·网络·单片机·嵌入式硬件·物联网·json