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

相关推荐
weixin_416667969 小时前
银河麒麟V10看门狗试验-1
网络·chrome·python
ha_lydms15 小时前
MaxCompute中JSON函数
大数据·数据库·阿里云·json·dataworks·maxcompute·odps
Frag0ut16 小时前
Edge 与 Chrome 实验性功能对比:AI、标签页、跨设备与开发者工具
chrome·edge·dev·beta·实验功能·canary
web打印社区17 小时前
汽修 / 4S 店:维修工单、结算单网页怎么静默出纸
开发语言·前端·javascript·chrome·ecmascript
LeoCrawls1 天前
Python 读取 JSON 常见报错排查,附完整处理函数
python·json·php
皓月盈江2 天前
Linux Debian系统安装Google Chrome谷歌浏览器教程
linux·chrome·debian·谷歌浏览器
星河耀银海2 天前
数据解析:AI返回JSON数据在HTML5中的渲染方法
人工智能·json·html5
Frag0ut2 天前
除了谷歌服务,Chrome和其他Chromium浏览器有什么与众不同?
chrome·edge·浏览器·chromium·隐私保护·brave·ungoogled
三8442 天前
Fastjson 漏洞 · 01 · 认识 Fastjson 与序列化基础
json·fastjson·反序列化
一直在努力的小宁3 天前
【阅读笔记】具身操作的数采方案概览
后端·json·restful·具身智能·vla·vlm