SEC-1308: Jdbc[Mutable]AclService can allow (all) sql statements to be configured #1527

spring-issuemaster opened this Issue Nov 24, 2009 · 2 comments


None yet

1 participant


Tim (Migrated from SEC-1308) said:

I'm providing a candidate patch for consideration. It's an enhancement to jdbc acl service that allows all sql statement strings to be configured by via spring. Please review and incorporate if desired.

The attached patch contains:
1) Interface for AclSQLSource (not sure if setters should really be part of this or not. I decided to include them.)
2) DefaultAclSQLSource - contains the usual Postgres SQL statements and setters for Spring configuration. Additional constructor takes a map with property and sql map entries.
3) Changes to JdbcAclService and JdbcMutableAclService to read statements from the AclSQLSource.

Sample configuration:

<bean id="sqlSource"
            <entry key="classIdentityQuery" value="SELECT ACL_CLASS_ID_SEQ.CURRVAL FROM DUAL" />
            <entry key="sidIdentityQuery" value="SELECT ACL_SID_ID_SEQ.CURRVAL FROM DUAL" />
            <entry key="selectSidPrimaryKey"
                value="select id from acl_sid where principal=DECODE(?,'TRUE','1','Y','1','1','1','FALSE','0','N','0','0','0') and sid=?" />
            <entry key="insertSid"
                value="insert into acl_sid (principal, sid) values (DECODE(?,'TRUE','1','Y','1','1','1','FALSE','0','N','0','0','0'), ?)" />

<bean id="aclService"
    <constructor-arg ref="secDataSource" index="0"/>
    <constructor-arg ref="lookupStrategy" index="1"/>
    <constructor-arg ref="aclCache" index="2"/>
    <constructor-arg ref="sqlSource" index="3"/>


Luke Taylor said:

I believe this has already been done as part of SEC-925,SEC-1224.

@spring-issuemaster spring-issuemaster added this to the 3.0.0.RC2 milestone Feb 5, 2016

This issue duplicates #1178

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment