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

相关推荐
一颗小行星-20 小时前
为什么有的JSON可以带注释?
json
leoZ2312 天前
记忆系统与 Agent 定制完全指南(四):自定义 Agent 开发(一)
前端·chrome
leoZ2312 天前
记忆系统与 Agent 定制完全指南(三):记忆的检索与使用
前端·chrome
CedarQR2 天前
万字长文:从零在 RK3588 上部署 PaddleSpeech 中文 TTS 全流程(FastSpeech2 + HiFiGAN)
开发语言·c++·嵌入式硬件·ubuntu·json
Geoking.3 天前
JSON vs JSONL:从数据格式到 AI Agent 的工程实践
人工智能·深度学习·json
ID_180079054733 天前
京东商品详情API能力解析与标准化应用方案(含JSON返回示例)
json
caimouse3 天前
Chrome V49 (49.0.2623.112) 在 ReactOS 上运行所需的系统依赖
chrome·reactos
灯澜忆梦4 天前
Go 语言 _JSON---序列化与反序列化
开发语言·golang·json
MengMeng_10234 天前
soc平台告警分析思路及chrome插件
前端·chrome·安全威胁分析
caimouse4 天前
Chrome V49 SxS 加载问题分析与修复
chrome·reactos