Spring Security的BasicLookupStrategy中使用的SQL语句是否正确?

时间:2012-07-24 17:34:45

标签: spring-security

在调试使用Spring Security ACL遇到的一些问题时,我查看了“BasicLookupStrategy”使用的SQL语句。我在这里复制它以供参考:

public final static String DEFAULT_SELECT_CLAUSE = "select acl_object_identity.object_id_identity, "
    + "acl_entry.ace_order,  "
    + "acl_object_identity.id as acl_id, "
    + "acl_object_identity.parent_object, "
    + "acl_object_identity.entries_inheriting, "
    + "acl_entry.id as ace_id, "
    + "acl_entry.mask,  "
    + "acl_entry.granting,  "
    + "acl_entry.audit_success, "
    + "acl_entry.audit_failure,  "
    + "acl_sid.principal as ace_principal, "
    + "acl_sid.sid as ace_sid,  "
    + "acli_sid.principal as acl_principal, "
    + "acli_sid.sid as acl_sid, "
    + "acl_class.class "
    + "from acl_object_identity "
    + "left join acl_sid acli_sid on acli_sid.id = acl_object_identity.owner_sid "
    + "left join acl_class on acl_class.id = acl_object_identity.object_id_class   "
    + "left join acl_entry on acl_object_identity.id = acl_entry.acl_object_identity "
    + "left join acl_sid on acl_entry.sid = acl_sid.id  "
    + "where ( ";

我的问题是关于上述声明中表“acli_sid”的用法。 AFAICT,Spring安全ACL不需要任何具有该名称的表,所以我想知道这里是否有我遗漏的东西。非常感谢任何帮助。

谢谢, Raghu

1 个答案:

答案 0 :(得分:0)

该表名为acl_sid。您发布的SQL查询使用acli_sid作为别名:

left join acl_sid acli_sid on acli_sid.id

您可以通过运行示例应用程序轻松检查它是否适用于ACL数据库架构。