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

相关推荐
herogus丶6 小时前
【Chrome】‘Good助手‘ 扩展程序使用介绍
前端·chrome
旷世奇才李先生9 小时前
XML DOM 安装使用教程
xml·前端·chrome
yjb.gz10 小时前
Oracle函数JSON_TABLE使用
数据库·oracle·json
GuokLiu13 小时前
250708-通过两块硬盘拷贝DeepSeek两个满血版模型的bash脚本
开发语言·chrome·bash
典学长编程2 天前
Linux操作系统从入门到精通!第二天(命令行)
linux·运维·chrome
百锦再2 天前
.Net配置文件appsetting.json的几种读取方法
chrome·json·.net·依赖注入·appsetting·web.config
大猫会长2 天前
mac中创建 .command 文件,执行node服务
前端·chrome
未来之窗软件服务2 天前
chrome webdrive异常处理-session not created falled opening key——仙盟创梦IDE
前端·人工智能·chrome·仙盟创梦ide·东方仙盟·数据调式
涛哥码咖3 天前
chrome安装AXURE插件后无效
前端·chrome·axure
Joker`s smile3 天前
Chrome安装老版本、不同版本,自制便携版本用于前端调试
前端·chrome