- Remove the usage of the word Principal
- Rename AuthenticationInfo to Account
- Realm refactoring
- Split shiro-core into modules
- Event-driven design
- Subject PrincipalCollection
- Component Names
- Authorization ANTLR Grammar
- Reinforce customization via OO Delegation (composition over inheritance)
- Multi-Stage Authentication via request/response
- Captcha Support
- Configuration per filter instance and no path matching
- Web module repackaging.
There is currently no timeline for a version 2, but this space represents any brainstorming efforts that the community wishes to address that may be major feature enhancements that can't be backwards compatible. Typically discussions from the dev list resulting in some form of consensus will probably make it into this page. Actionable items will go into Jira, potentially referencing this page for clarity.
- (I know this isn't a feature but its equally is not more important) Deeper and more accessible documentation and how-tos.
- management system for long lived hashes
- token/ticket system
- more generalized way to handle unauthorized exceptions
- lower level crypto toolkit to facilitate customizations
- unauthorizedUrl per path filter
Remove the usage of the word Principal
Unfortunately, the word 'principal' has different meanings depending on your background in security and what security projects or products you might have used. Shiro has participated in this mix by defining Principal to mean any identifying attribute. Instead of perpetuating this potentially-confusing term further (within Shiro at least), we might want to drop the word 'principal' in favor of 'attribute', since Shiro only ever refers to principals as identifying attributes.
For example, this would imply renaming (or more likely, deprecating)
PrincipalCollection to be
AttributeCollection. Or even more likely
AttributeMap (see Subject PrincipalCollection section below).
This would imply things like:
Rename AuthenticationInfo to Account
AuthenticationInfo name is less intuitive and is essentially the same thing.
Most Realms differ little in their implementations - mostly by the protocols they use. Create a 'DefaultRealm' implementation (or something similar) that allows pluggable AccountResolver and AuthorizationResolver interfaces that abstract away interaction with the data stores and the rest of the internal Realm logic (e.g. authc and authz caching, etc) can be shared by most Realm implementation.
Split shiro-core into modules
Maybe shiro-core should be split up into separate modules (e.g. shiro-crypto, shiro-authc, shiro-authz, etc) if possible. This may or may not be possible due to the tight integration of APIs (e.g. Shiro authentication depends on shiro hashing (crypto) etc). A cursory investigation should be made if possible.
This can be in 1.3+ as these would be all new packages/classes and do not require signature changes to existing code
Utilize events significantly and more effectively. Base on Akka's event model and Guava's EventBus. This enables ideal loose coupling/high cohesion plugins/integration/customization.
An EventBus can be created based on Publisher + SubscriberRegistry:
Convert this to be a sub-interface of Map with additional per-Realm utility methods.
See the PrincipalMap concept for ideas (experimental, not referenced in Shiro 1.x at the moment).
Maybe rename this to 'attributes'? i.e.
Change classes named FooDAO to FooStore instead.
Authorization ANTLR Grammar
Ideally, we can have a single annotation:
Where the 'authz expression here' is authorization assertion statement backed by an ANTLR lexer/parser, for example:
This would translate the expression into the relevant hasRole/isPermitted calls.
Employing the same grammar as mentioned above, instead of multiple subject.isPermitted/hasRole calls, the same thing could be achieved with an AuthorizationRequest/Response scheme. For example:
Reinforce customization via OO Delegation (composition over inheritance)
- Any of the features provided by PathMatchingFilter would be provided for any configured filter via a proxy mechanism. The proxy would likely support the PathMatchingFilter features, setting request attributes as necessary for the wrapped filter to react to. This eliminates the need to subclass PathMatchingFilter to utilize these features.
- The same principal would be probably be applied for realms. A DefaultRealm could be created that delegates to an AuthenticationInfoAccessor and AuthorizationInfoAccessor (or whatever we want to call them) that performs the same behavior as AuthenticatingRealm#doGetAuthenticationInfo and AuthorizingRealm#doGetAuthorizationInfo. The end result is no more subclassing realms for 95% of use cases, and instead providing accessors.
Multi-Stage Authentication via request/response
In applications that need to authenticate via multiple mechanisms (e.g. multi-factor authentication), a Request/Response protocol for login would probably be easier to use to support such workflows. For example:
Additionally probably change the Authenticator signature to be as follows:
Captcha support would assist in human being verification (during login, during form submission, etc).
Configuration per filter instance and no path matching
Web module repackaging.
The Web module is largely Servlet-specific at the moment. As such, its packaging should reflect this, in the same way that all other support modules are named, e.g.