dan-niles commented on issue #681: URL: https://github.com/apache/solr-operator/issues/681#issuecomment-1912419883
@sgauchan88 The password in your security.json should be a sha256(password+salt) hash. You can try using this [online encryption tool](https://clemente-biondo.github.io/) to generate a password. I tested out the security.json given below and it worked for me. I added some other endpoints in the permissions list and set the `blockUnknown` option as **false**. If you really want to secure all your endpoints (Including the probes) you can set `probesRequireAuth:true` in the security config and use the following security.json to setup Solr. After the setup you can use the Solr UI or the [Authorization API](https://solr.apache.org/guide/solr/latest/deployment-guide/rule-based-authorization-plugin.html#authorization-api) to update the permission for the probes. ```json { "authentication": { "blockUnknown": false, "class": "solr.BasicAuthPlugin", "credentials": { "sandip": "kOPO6E/MScdL8KTc9nmFey0/JpJwZGRdo0RJQO+O4+w= ZnNibnR0Z2NzeG4wN2Jt" }, "realm": "Solr Basic Auth", "forwardCredentials": false }, "authorization": { "class": "solr.RuleBasedAuthorizationPlugin", "user-role": { "sandip": ["admin"] }, "permissions": [ { "name": "k8s-probe-0", "role": null, "collection": null, "path": "/admin/info/health" }, { "name": "k8s-probe-1", "role": null, "collection": null, "path": "/admin/info/system" }, { "name": "k8s-status", "role": "admin", "collection": null, "path": "/admin/collections" }, { "name": "k8s-metrics", "role": "admin", "collection": null, "path": "/admin/metrics" }, { "name": "k8s-zk", "role": "admin", "collection": null, "path": "/admin/zookeeper/status" }, { "name": "k8s-ping", "role": "admin", "collection": "*", "path": "/admin/ping" }, { "name": "read", "role": ["admin"] }, { "name": "update", "role": ["admin"] }, { "name": "security-read", "role": ["admin"] }, { "name": "security-edit", "role": ["admin"] }, { "name": "all", "role": ["admin"] } ] } } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
