{"id":37017356,"url":"https://github.com/solr-cool/solr-forward-authentication-plugin","last_synced_at":"2026-01-14T02:00:35.464Z","repository":{"id":37928371,"uuid":"431590765","full_name":"solr-cool/solr-forward-authentication-plugin","owner":"solr-cool","description":"A simple forward authentication plugin for Solr","archived":false,"fork":false,"pushed_at":"2023-07-24T05:21:08.000Z","size":74,"stargazers_count":4,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-22T13:52:15.869Z","etag":null,"topics":["authentication","search","solr","solr-plugin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solr-cool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-24T18:32:54.000Z","updated_at":"2023-03-12T20:14:18.000Z","dependencies_parsed_at":"2023-02-16T04:05:28.368Z","dependency_job_id":null,"html_url":"https://github.com/solr-cool/solr-forward-authentication-plugin","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/solr-cool/solr-forward-authentication-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solr-cool%2Fsolr-forward-authentication-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solr-cool%2Fsolr-forward-authentication-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solr-cool%2Fsolr-forward-authentication-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solr-cool%2Fsolr-forward-authentication-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solr-cool","download_url":"https://codeload.github.com/solr-cool/solr-forward-authentication-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solr-cool%2Fsolr-forward-authentication-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","search","solr","solr-plugin"],"created_at":"2026-01-14T02:00:24.501Z","updated_at":"2026-01-14T02:00:35.383Z","avatar_url":"https://github.com/solr-cool.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Solr Forward Authentication Plugin\n\n[![continuous integration](https://github.com/solr-cool/solr-forward-authentication-plugin/actions/workflows/ci.yaml/badge.svg)](https://github.com/solr-cool/solr-forward-authentication-plugin/actions/workflows/ci.yaml)\n[![Maven Central](https://img.shields.io/maven-central/v/cool.solr/solr-forward-authentication-plugin)](https://search.maven.org/artifact/cool.solr/solr-forward-authentication-plugin/)\n\n\nA simple forward authentication plugin for Solr. _Forward authentication_ moves\nthe authentication process out of Solr into a reverse proxy like\n[Traefik](https://doc.traefik.io/traefik/middlewares/http/forwardauth/) or\n[Nginx](https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-subrequest-authentication/) running in front of Solr.\n\nAfter authentication, the authenticated user is sent to Solr via a HTTP header.\nThis plugins lets Solr accept this header and set the authenticated user\naccordingly.\n\n\n![Forward Authentication](https://doc.traefik.io/traefik/assets/img/middleware/authforward.png)\n\n## How to use the plugin\n\n\u003e Before using the plugin, please be familiar with\n\u003e [Solr authentication and authorization](https://solr.apache.org/guide/8_11/authentication-and-authorization-plugins.html).\n\nTo use the plugin, drop the\n[release jar](https://github.com/solr-cool/solr-forward-authentication-plugin/releases)\ninto the [library directory of your Solr installation](https://solr.apache.org/guide/8_11/libs.html).\n\n### Configure authentication \u0026 authorization\n\nTo activate authentication \u0026 authorization, place a `security.json`\nin your Zookeeper root.\n\nTo activate forward __authentication__ in Solr, use the\n`ForwardAuthPlugin` class as authentication class.\n\n\u003e The `httpUserHeader` is an optional configuration.\n\n```json\n{\n    \"authentication\": {\n        \"class\": \"cool.solr.security.ForwardAuthPlugin\",\n        \"httpUserHeader\": \"X-Forwarded-User\"\n    },\n    \"authorization\": {\n        \"class\": \"cool.solr.security.DefaultRuleBasedAuthorizationPlugin\",\n        \"defaultRole\": \"admin\",\n        \"permissions\": [\n            {\n                \"name\": \"all\",\n                \"role\": \"admin\"\n            }\n        ]\n    }\n}\n```\n\nFor __authorization__, the `DefaultRuleBasedAuthorizationPlugin` extends\nthe [`RuleBasedAuthorizationPlugin`](https://solr.apache.org/guide/8_11/rule-based-authorization-plugin.html#example-for-rulebasedauthorizationplugin-and-basicauth) by assigning\nusers without an explicit `user-role` mapping a `defaultRole`.\n\n### Example\n\nThe [`examples`](examples/) folder contains a simple Docker Compose ensemble.\nFrom inside the directory, launch the Solr/Zookeeper ensemble:\n\n```shell\n$ docker-compose up\n\n# Test connectivity (should return 200 OK)\n$ curl -s \"http://localhost:8983/api/node/system\" | jq .security\n{\n  \"tls\": false\n}\n\n# Activate security\n$ docker exec -it solr solr zk cp file:/opt/solr/server/solr/security.json zk:/security.json -z zookeeper:2181\n\n# Test security (should return no data as we are not authorized)\n$ curl \"http://localhost:8983/api/node/system\"\n\n# Fake forward authentication (should return 200)\n$ curl -sH \"X-Forwarded-User: alice\" \"http://localhost:8983/api/node/system\" \\\n    | jq .security\n{\n  \"authenticationPlugin\": \"cool.solr.security.ForwardAuthPlugin\",\n  \"authorizationPlugin\": \"cool.solr.security.DefaultRuleBasedAuthorizationPlugin\",\n  \"username\": \"alice\",\n  \"roles\": [\n    \"admin\"\n  ],\n  \"tls\": false\n}\n```\n\n## Building the project\n\nThis should install the current version into your local repository\n\n    $ ./mvn clean verify\n\n## License\n\nThis project is licensed under the [Apache License, Version 2](http://www.apache.org/licenses/LICENSE-2.0.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolr-cool%2Fsolr-forward-authentication-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolr-cool%2Fsolr-forward-authentication-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolr-cool%2Fsolr-forward-authentication-plugin/lists"}