Hey Michael
First, thanks for checking Yosai out and considering it for your work. I am open to constructive feedback but would prefer that discussion leads to pull requests. I see this project as having reached its first milestone on my own effort but it will reach the next milestone based on collective effort.
When I ported Apache Shiro, I honored its interface-driven architecture, at least a lightweight version of it, by porting interfaces to abstract base classes and declaring abstractmethods required of each API. Yosai_AlchemyStore is a quick-start extension, and one that helped with integration testing. To replace it, you'd follow the same api as defined in the AccountStore abc. Note that I've defined *two* "interfaces" -- one for credentials and another for authorization, in case a single AccountStore doesn't offer both. It's a simple API.
Note that ABC's are staying in, for now. If anything, I may enforce their use more strictly. The python community doesn't have a consensus about how to implement them (abc's, zope.interfaces, raising notimplementederror). Rather than add another dependency for zope.interfaces, I chose abc's. The intent of their use is to honor the inversion of control principle.
I suspect you may have come across a documentation bug, which will be fixed/clarified, but it seems you managed to understand the big picture any way.
DefaultPermission inherits from WildcardPermission. It names/labels the parts of a permission (domain , action, instance) , which later makes possible for indexed lookup of permissions. The more permissions a user has, the more items that would need to be iterated over to check for authorization. I reduce, or at least have tried to reduce, the overhead with indexing and keying on "domain":
http://bit.ly/1RNKBu1
Thanks regarding the dynamic permission design. It's based on sage advice solicited from Graham Dumpleton, who is a decorator jedi master.
Resolvers are straight from the Shiro playbook. It's a design pattern where a class need not know what type of class to use. Their definition trickles down from the SecurityManager, as do all other objects shared across classes:
http://bit.ly/1MWDazAI'm not committed to keeping them if they present themselves as boilerplate, replacing resolvers with their hard coded classes that I've defined as their defaults. I was hesitant to remove them as I ported a 10+ year battle tested project and they may serve good use in practice.
If I run sphinx on all of this source code, it will create a mountain of documentation. Is this kind of documentation useful -- would you actually go through it like that?