The current 'Rule based" Authorization plugin dates back to 2015 (). At that time in 5.x Solr was transitioning from a security posture of "don't let anyone you don't trust make requests to Solr" to "We will support authentication and authorization". Solr sorely needed an authorization implementation that it cold ship and for over a decade the Rule Based Authorization Framework has filled that need. However, over the last decade some of the shortcomings of that implementation have become clear.

Rule Based Design

Note: This is based on Jason's excellent talk at Activate 2019, we need to identify to what extent the tweaks to the code may have changed/violated this, but it generally represents the underlying design

Shortcomings

More Common: User>Role>Permission Design 

By way of contrast the following is a more common design for authorization of user activities in applications

Benefits of User>Role>Permission

Conclusion

The current system can  secure Solr, if the author of the security configuration is careful, and maintainers are diligent about not providing alternate request paths to dangerous code but it's a major departure from the way most users expect security systems to work, and the benefits of this departure are unclear.

Status 

Current state: Under Discussion

Discussion thread: https://lists.apache.org/thread/44ndpjo7s1mr88h8g17z298p7fmt2v76

JIRA: here (<- link to https://issues.apache.org/jira/browse/SOLR-XXXX)

Released: <Solr Version>

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast). Confluence supports inline comments that can also be used.

Motivation

Security that is difficult to understand or implement is security that will be unused, or worse yet used with a false sense of safety. The goal is to provide a new alternative that is

Public Interfaces

Coming Soon

Proposed Changes

Work In Progress 

Add a new plugin based on Apache Shiro that is

More details to come example permissions above subject to change, possibly 4 sections, or different sections.

Additionally Solr should refuse all requests if the security.json fails to parse, or is otherwise broken. We need to take the position that a breach is far worse than downtime, because once data is exposed on the internet, it can NEVER be hidden again.

Sun-setting the existing rule based system can happen if this plugin is well adopted, but need not be tied to this implementation.

Compatibility, Deprecation, and Migration Plan

Security considerations

This will likely involve careful review of our plugin architecture and possibly some tweaking of existing code where it hard-codes dependence on the existing rule based system to make such code more pluggable. 

Test Plan

Describe in few sentences how the SIP will be tested. We are mostly interested in system tests (since unit-tests are specific to implementation details). How will we know that the implementation works as expected? How will we know nothing broke?

Rejected Alternatives

Apache Ranger

There is an Apache Ranger plugin for Solr,  but it only supports 8.x and has now fallen 2 major releases behind.

Apache Sentry

The Apache Sentry project was moved to the attic in 2021

Path-Based or URL-Based Authorization

Path based authorization is reasonable for static web sites full of pages because they are fundamentally tree structures and URL based authorization is viable for simple REST apis providing data access without significant logical processing. Systems with significant logic that were designed from the start to use path or url based auth schemes can also work, but Solr spent 4 major versions being developed and enhanced with zero thought for authorization, and there are often many way to run the same code, so any URL based approach will be fraught with peril at this point.