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

相关推荐
谙弆悕博士5 小时前
快速学C语言——第16章:预处理
c语言·开发语言·chrome·笔记·创业创新·预处理·业界资讯
NiceCloud喜云9 小时前
IntelliJ IDEA 保姆级安装 + ClaudeAPI 配置教程
java·开发语言·前端·ide·chrome·docker·intellij-idea
不懂的浪漫12 小时前
用 Codex Chrome 插件重构工作流:从 OA 工时填报到可复用 Skill 的自动化实践
chrome·ai·重构·自动化·codex·skill
原来是猿14 小时前
网络计算器:理解序列化与反序列化(下)
linux·开发语言·网络·网络协议·json·php
SelectDB技术团队14 小时前
强行拍平?全表扫描? AI Agent 动态 JSON 的观测分析
数据库·人工智能·json·apache doris
码农学院18 小时前
JSON 里是一个空字符串 ““,Newtonsoft.Json 无法直接把字符串转成列表
json
ShyanZh18 小时前
【Claude基础】多代理协作:Agent Teams 与编排模式
前端·chrome·ai
下载居18 小时前
Google Chrome(谷歌浏览器64位) 148.0.7778
前端·chrome
c1s2d3n4cs1 天前
Qt模仿nlohmann::json进行序列化和反序列化
开发语言·qt·json
一只很酸de橘子1 天前
PostgreSQL 生成 JSON 字符串
postgresql·json