Re: [Acegisecurity-developer] Two proposals on acls

2007-03-05 Thread Jin Peng
In my project, I need more than 100 permissions for some secure objects, I 
simply use Hash table to store the permission and its value.

For example, PERM_reboot has value allow or deny, PERM_patch has value allow 
or deny

All you need is to implement your own AccessDecisionVoter so that it knows how 
to resolve the current secure object ( or domain object), then base on the 
prefix PERM_, you know it is asking for Access Control decision specific to 
the secure object.

I actually hook in the Sun Access Manager 7.0 to centralize the authorization 
decision making.

I can not directly send the code until my company clears the way, but the idea 
is pretty straightforward.

Hope this helps,

Jin



- Original Message 
From: Giles, Bear [EMAIL PROTECTED]
To: acegisecurity-developer@lists.sourceforge.net
Sent: Tuesday, February 27, 2007 11:26:32 AM
Subject: [Acegisecurity-developer] Two proposals on acls




 
 

!--

 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:Times New Roman;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{
font-family:Arial;
color:windowtext;}
 _filtered {
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{}
 _filtered {

}
 _filtered {


text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--






Two proposals on ACLs.  Both straightforward, but I don’t
know if my employer would be happy with me sending actual patches.
 

  
 

1) AclImpl#isGranted()
should use Permission#equals(Object) instead of explicitly comparing bit masks. 
The latter quietly ties the standard impl to specific Permission classes.
 

  
 

2) There can be
an additional standard Permission, one that contains both a bit mask and a
class (or classname).  BasePermission gives you a set of global permissions,
this new permission gives you a set of per-class permissions.  Our project
requires more than 32 permissions, but no individual class should ever require
close to that number.
 

  
 

Bear
 




-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Home: http://acegisecurity.org
Acegisecurity-developer mailing list
Acegisecurity-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer






__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com -
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Home: http://acegisecurity.org
Acegisecurity-developer mailing list
Acegisecurity-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer


[Acegisecurity-developer] Two proposals on acls

2007-02-27 Thread Giles, Bear
Two proposals on ACLs.  Both straightforward, but I don't know if my
employer would be happy with me sending actual patches.

 

1) AclImpl#isGranted() should use Permission#equals(Object) instead
of explicitly comparing bit masks.  The latter quietly ties the standard
impl to specific Permission classes.

 

2) There can be an additional standard Permission, one that contains
both a bit mask and a class (or classname).  BasePermission gives you a
set of global permissions, this new permission gives you a set of
per-class permissions.  Our project requires more than 32 permissions,
but no individual class should ever require close to that number.

 

Bear

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Home: http://acegisecurity.org
Acegisecurity-developer mailing list
Acegisecurity-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer