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

相关推荐
PixelBai7 小时前
JSON差异比较对比指南
json
珺毅同学7 小时前
YOLO生成预测json标签迁移问题
python·yolo·json
无限进步_16 小时前
从零实现一个迷你Shell——深入理解Linux命令行解释器
linux·运维·服务器·开发语言·c++·chrome
PixelBai19 小时前
JSON差异比较集成指南与工作流自动化
运维·自动化·json
琹箐19 小时前
chrome 插件下载安装;Manifest file is missing or unreadable
前端·chrome
PixelBai21 小时前
JSON差异比较性能评测与优化建议
json
星栈独行21 小时前
用 Rust + Makepad 做一个 JSON 查看器:从零到能用的全过程
开发语言·程序人生·ui·rust·json
嵌入式小站21 小时前
STM32 零基础可移植教程 26:SPI Flash 保存参数,做一个掉电不丢的配置结构体
chrome·stm32·嵌入式硬件
2601_961845421 天前
高考真题下载|2025高考全科真题网盘分类整理
搜索引擎·中文分词·solr·lucene·sphinx·高考