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

相关推荐
IT_Octopus1 小时前
JSON 日志里的 `{“$ref“:“$.xxx“}`:从 fastjson 兼容包到原生 fastjson2 的迁移实录
开发语言·python·json
数据狐(Datafox)6 小时前
mercadolibre.item_get 工程实战:美客多商品详情API技术解析与落地应用
java·人工智能·mysql·json
Fcy6487 小时前
Linux下 应⽤层⾃定义协议与序列化(JSON方法)
linux·json
roamingcode1 天前
4.5 小时,从一句话需求到可安装的 Chrome 插件:一次 AI 结对开发的完整复盘
前端·人工智能·chrome·claude·codex
半亩码田1 天前
C#转Python第4.4篇:JSON 处理:json 模块 vs System.Text.Json
python·c#·json
清水白石0082 天前
Python 类型设计深度解析:TypedDict 能否替代 dataclass?从 JSON 数据边界到 API 设计的最佳实践
java·python·json
DevOpenClub2 天前
网页采集如何稳定输出结构化数据:JSON、链接与快照三阶段流水线
数据库·json·api
大连好光景2 天前
【AI Agent案例开发项目01解读】
chrome·python·langchain
霸道流氓气质2 天前
Spring AI 结构化输出:JSON Mode 与 BeanOutputConverter
人工智能·spring·json
SelectDB3 天前
StarRocks 适合做日志分析吗?
数据分析·json·自动化运维