使用 Geronimo 构建安全的企业基础设施

Geronimo 健壮的安全特性的实际演示

返回文章

清单 2. 配置 SQL 登录模块
<gbean name="workdev-sql-login" class="org.apache.geronimo.security.jaas.LoginModuleGBean">
    <attribute name="loginModuleClass">org.apache.geronimo.security.realm.providers.SQLLoginModule</attribute>
    <attribute name="serverSide">true</attribute>
    <attribute name="options" type="java.util.Properties">
               jdbcUser=
               jdbcPassword=
               jdbcDriver=org.apache.derby.jdbc.EmbeddedDriver
               userSelect=SELECT USER_NAME, PASSWORD FROM USERS
    		groupSelect=SELECT g.GROUP_NAME AS groupname, u.USER_NAME AS username FROM USERS u, GROUPS g WHERE u.GROUP_ID = g.GROUP_ID
              jdbcURL=jdbc:derby:WorkingDevelopersDB
    </attribute>
    <attribute name="loginDomainName">WorkdevRealm</attribute>
</gbean>

返回文章