Hey Guys,

I started using Apache Solr about a month ago.
I was assigned to doing the installation and integration of Apache Solr  for some of our sites. After much trial and error with much research, I finally got the security.json to work with my site without making the server unavailable or unreachable.


*##Configurations*

Server: CentOS 7.9
Apache Solr: 9.5.0

*## Security.Json Settings*

{
    "authentication": {
        "blockUnknown": true,
        "class": "solr.BasicAuthPlugin",
        "credentials": {
            "cnm_solr_admin": <"">,
            "cnm_solr_dev": <"">,
            "solr": <"">
         },
        "realm": "CNM Solr Users",
        "fowardCredentials": false
    },
    "authorization": {
       "class": "solr.RuleBasedAuthorizationPlugin",
       "user-role": {
           "cnm_solr_admin": "admin",
           "cnm_solr_dev": "dev",
           "solr": ["users"]
        },
       "permissions": [
            {
                "name": "core",
                "collection": "rcore",
                "role": ["admin", "dev", "users"]

            },
            {
                "name": "all-cores",
                "role": "*",
                "collection": "*",
                "path": ["/admin/luke", "/admin/system","/admin/mbeans", "/admin/file"]
            },
            {
                "name": "server-ping",
                "collection": null,
                "path": "/admin/info/system",
                "role": "*"
            },
            {
                "name": "health",
                "role": null
            },
            {
                "name": "logs",
                "role": ["admin", "dev"],
                "collection": null,
                "path": ["/admin/info/logging"]
            },
            {
                "name": "metrics",
                "role": ["admin", "dev", "users"],
                "collection": null,
                "path": ["/admin/metrics"]
            },
            {
                "name": "ping",
                "role": ["admin", "dev", "users"],
                "collection": null,
                "path": ["/rcore/admin/ping"]
            },
            {
                "name":"read",
                "role": ["admin", "dev", "users"]
            },
            {
                "name": "core-admin-read",
                "role": ["admin", "dev"]
            },
            {
                "name":"update",
                "role": ["admin", "dev", "users"]
            },
            {
                "name":"security-edit",
                "role": ["admin"]
            },
            {
                "name":"security-read",
                "role": ["admin", "dev"]
            },
            {
                "name":"all",
                "role": ["admin"]
            }

        ]
    },
    "auditlogging": {
      "class": "solr.SolrLogAuditLoggerPlugin",
      "async": true,
      "blockAsync": false,
      "numThreads": 2,
      "queueSize": 4096,
      "eventTypes": ["AUTHENTICATED", "REJECTED", "ANONYMOUS", "AUTHORIZED",  "ANONYMOUS_REJECTED", "UNAUTHORIZED", "COMPLETED", "ERROR"]
    }
}

*## Issue*

 * In the Apache Solr UI under logging a I get an error:
     o
       *Level*
        *Logger*
        *Message*
       Error False
        RulebasedAuthorizationPluginBase        Invalid Permission

     o I can't figure which of the permissions is wrong.


Can someone please help?
I have to eventually need to enable SSL, already had a failed attempt. Will create an issue for this if needs be but I wanna get the security.json right first.

I will appreciate any extra advice from 1 sentence to paragraphs.
Anything on setting this up with multiple websites and cores and with SSL enabled.


Thanks,

Lee Daniel
Developer and Assistant System Admin
Caribbean New Media

Reply via email to