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

相关推荐
远方160917 小时前
16-Oracle 23 ai-JSON-Relational Duality-知识准备
数据库·oracle·json
sc写算法20 小时前
基于nlohmann/json 实现 从C++对象转换成JSON数据格式
开发语言·c++·json
集成显卡1 天前
PlayWright | 初识微软出品的 WEB 应用自动化测试框架
前端·chrome·测试工具·microsoft·自动化·edge浏览器
酷爱码1 天前
Spring Boot项目中JSON解析库的深度解析与应用实践
spring boot·后端·json
不惑_1 天前
用 PyQt5 打造一个可视化 JSON 数据解析工具
开发语言·qt·json
前端掘金者H1 天前
Chrome插件实现WebPush推送通知的功能
前端·chrome
HEX9CF1 天前
【Linux】awk 命令详解及使用示例:结构化文本数据处理工具
linux·chrome·算法
会飞的鱼先生2 天前
javascript中Cookie、BOM、DOM的使用
前端·javascript·chrome
漫游者Nova2 天前
PDF转Markdown/JSON软件MinerU最新1.3.12版整合包下载
pdf·json·markdown·mineru
全栈陈序员2 天前
前端文件下载常用方式详解
前端·javascript·chrome·ajax·css3·html5·safari