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

相关推荐
愤怒的山羊8 小时前
jetcache List 缓存, json 序列化 泛型解析成了 JsonObject 处理
缓存·json·list
奇舞精选9 小时前
我用 Chrome 扩展验证了 MCP 的安全风险,结果发现
chrome·mcp
2***d88512 小时前
使用 MySQL 从 JSON 字符串提取数据
mysql·oracle·json
TDengine (老段)1 天前
TDengine 转换函数 TO_JSON 用户手册
android·大数据·数据库·json·时序数据库·tdengine·涛思数据
wow_DG1 天前
【Python✨】VS Code 秒开 Python 类型检查:一招 mypy + settings.json 让你的 Bug 原地现形!
python·json·bug
spencer_tseng2 天前
Chrome settings for opening new tags
chrome
ToDetect2 天前
主流Chrome、Edge、Firefox 浏览器 User-Agent 解析完整操作指南
chrome·todetect·浏览器指纹检测·user-agent 解析
守城小轩2 天前
Chromium 140 编译指南 macOS 篇:基础环境准备(一)
chrome·macos·chrome devtools·指纹浏览器·浏览器开发·超级浏览器
二哈喇子!2 天前
在 Chrome 里通过 ZeroOmega 插件,接入亮数据的数据中心代理 IP
chrome·ai·代理ip·zeroomega插件·亮数据的数据中心代理方案
代码的乐趣2 天前
支持selenium的chrome driver更新到142.0.7444.175
chrome·python·selenium