java - Could someone explain Spring Security BasePermission.Create? -
i working on project involves spring security acl , came across create permission basepermission.create
. please explain how supposed work or allows do?
it understanding each object has acl, , each acl has many ace's, , each ace has sid , permission. how can grant permission on object create it, if must created in order attach acl it?
spring security grants permissions on domain objects indirectly via objectidentity interface.
as mention, far usual case create or obtain domain object first, , construct objectidentityimpl
domain object:
mydomainobject secured = new mydomainobject(); objectidentity securedidentity = new objectidentityimpl(secured);
you use objectidentity
instance retrieve acl using spring security framework.
however, not way use object identity. can pass reference objectidentity not actual business object, has means of identifying it, if created.
for example, imagine wanted secure files. create objectitentity java.io.file
instance being secured. file
object in identity reference file - no actual file - file may not exist, yet have objectidentity can reason security , fetch acls for.
this pattern can applied kind of domain object. create domainobjectprototype
implementation describes domain object in terms of domain features needed secure it, doesn't need reference domain object. can think of details needed service create domain object.
ps: let me confess i've never used spring security, design pattern seems pretty clear me after looking @ example.
edit: i've updated make clearer - it's not necessary create implementations of objectidentity originaly wrote.
Comments
Post a Comment