Acegi with acl



Witam,

I wolud like use acl with acegi, my project look like:


Authorization process use LDAP, run fine. Access control for url look
like :

<bean id="filterInvocationInterceptor"
class="org.acegisecurity.intercept.web.FilterSecurityInterceptor">
<property name="authenticationManager"
ref="authenticationManager"/>
<property name="accessDecisionManager"
ref="accessDecisionManager"/>
<property name="objectDefinitionSource">
<value>
PATTERN_TYPE_APACHE_ANT
<!--Admin Links-->
<!--/mainMenu.html/**=user
/editProfile.html/**=user
itp.......



Now I would like use acl. What I do (earlier I turn off access control
which I use ):

in xml file :

<bean id="aclManager"
class="org.acegisecurity.acl.AclProviderManager">
<property name="providers">
<list>
<ref local="basicAclProvider"/>
</list>
</property>
</bean>

<bean id="basicAclProvider"
class="org.acegisecurity.acl.basic.BasicAclProvider">
<property name="basicAclDao">
<ref local="basicAclExtendedDao"/>
</property>
</bean>

<bean id="basicAclExtendedDao"
class="org.acegisecurity.acl.basic.jdbc.JdbcExtendedDaoImpl">
<property name="dataSource">
<ref bean="dataSource"/>
</property>
</bean>


create table :

CREATE TABLE acl_object_identity (
id BIGINT NOT NULL PRIMARY KEY,
object_identity nvarchar(250) NOT NULL,
parent_object BIGINT,
acl_class nvarchar(250) NOT NULL,
);

ALTER TABLE acl_object_identity
ADD CONSTRAINT unique_object_identity
FOREIGN KEY (parent_object)
REFERENCES acl_object_identity(id)


CREATE TABLE acl_permission (
id BIGINT NOT NULL PRIMARY KEY,
acl_object_identity BIGINT NOT NULL,
recipient nvarchar(100) NOT NULL,
mask int NOT NULL,
);

ALTER TABLE acl_permission
ADD CONSTRAINT unique_recipient
FOREIGN KEY (acl_object_identity)
REFERENCES acl_object_identity(id)

What kind of data i put into this table:

table acl_object_identity

id object_identity
parent_object acl_class

7 pl.tk.tdfs.*:1 NULL
org.acegisecurity.acl.basic.SimpleAclEntry
8 processInstances.html NULL
org.acegisecurity.acl.basic.SimpleAclEntry
9 processInstances.html/ NULL
org.acegisecurity.acl.basic.SimpleAclEntry
10 /processInstances.html/ NULL
org.acegisecurity.acl.basic.SimpleAclEntry



table acl_permission :

id acl_object_identity
recipient mask
3 7 tkulej
0
6 7 domainName\tkulej 0
13 8 domainName\tkulej 0
14 8
tkulej 0
15 9 domainName\tkulej 0
16 9
tkulej 0
17 10 domainName\tkulej 0
18 10
tkulej 0


So for user tkulej I turn off all permissions. I do this for two
way`s. The first is put all pacage`s into table acl_object_identity.
The second is put some url in table acl_object_identity (in this
example I also try for different way`s). The main problem is that the
acl isn`t run good, when I log as tkulej I have permission for url and
all object`s.


The Tomcat`a log`s :


DEBUG: 09:08:06,257 [main] Class:
org.springframework.jdbc.object.RdbmsOperation Message:
RdbmsOperation with SQL [SELECT RECIPIENT, MASK FROM acl_permission
WHERE acl_object_identity = ?] compiled
DEBUG: 09:08:06,257 [main] Class:
org.springframework.jdbc.object.RdbmsOperation Message:
RdbmsOperation with SQL [SELECT CHILD.ID, CHILD.OBJECT_IDENTITY,
CHILD.ACL_CLASS, PARENT.OBJECT_IDENTITY as PARENT_OBJECT_IDENTITY FROM
acl_object_identity as CHILD LEFT OUTER JOIN acl_object_identity as
PARENT ON CHILD.parent_object=PARENT.id WHERE CHILD.object_identity
= ?] compiled

....... so acl work (I`am not sure ?).

So if somebady know hot to configure acegi+acl I will wait for
respone, thank`s for help.

.



Relevant Pages

  • Re: setting group perms on a reg entry
    ... see this functions in MSDN: ... "The SetEntriesInAcl function creates a new access control list ... into an existing ACL structure" ... I am somewhat lost either way actually. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: setting group perms on a reg entry
    ... see this functions in MSDN: ... "The SetEntriesInAcl function creates a new access control list ... into an existing ACL structure" ...
    (microsoft.public.win32.programmer.kernel)
  • Re: folder security XP Home
    ... of ACL (Access Control Listing). ... Is this shared resource on the ... changes to the Folder ACL is limited to a "Safe Mode" session. ...
    (microsoft.public.windowsxp.general)
  • Re: DCOM and anonymous access on XP/Vista
    ... wide via "Edit limits" the servers settings always seem to be ignored. ... The order of an Access Control Entry within an Access Control List is important. ... The security check evaluates the ACL from top to bottm and stops as soon as access is either fully granted or even partially denied. ...
    (microsoft.public.win32.programmer.ole)
  • Can Excel Join tables using a primary key
    ... Can Excel Join files using a primary key? ... I know how to do this in Access and in ACL - am I just dreaming or is there a way to join tables based on a primary key and with only using Excel? ...
    (microsoft.public.mac.office.excel)