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

相关推荐
AI周红伟8 小时前
周红伟:长鑫科技(CXMT)财务全景分析
前端·chrome·科技
shuye21610 小时前
google chrome 离线下载地址
前端·chrome
HackTwoHub14 小时前
AI赋能Chrome MCP × JS逆向Skill自动化JS逆向挖洞
javascript·人工智能·chrome·安全·web安全·网络安全·自动化
jieyucx15 小时前
Go 语言 JSON 序列化与反序列化
开发语言·golang·json·序列化
xwjalyf15 小时前
javascript数组 forEach,filter,some,every,map,find,reduce的用法与区别
开发语言·javascript·json·ecmascript
自律懒人16 小时前
当AI智能体学会了操控浏览器:Chrome CDP + 自动化Agent实战
人工智能·chrome·自动化
吾爱测试16 小时前
LZCCB_CREDIT_DEMO.json
json
AI周红伟17 小时前
Agent Skills生产级Skills 案例实操-周红伟
前端·chrome·react.js·langchain
Chengbei1119 小时前
AI赋能Chrome MCP × JS逆向Skill自动化JS逆向助力挖洞与绕过实战(小白也能学会)
javascript·人工智能·chrome·网络安全·自动化·系统安全·安全架构
菜鸟是大神2 天前
09-Claude Code 中的Skill基础和创建
前端·chrome·chatgpt·文心一言·ai编程