Migration from glassfish 4.0 to Glassfish 4.1.1 -

2019-01-09 18:21发布

I have this security configuration in Glassfish domain.xml which works for 4.0 but fail in 4.1.1 can someone help to identify what is wrong. The only difference is the class package "ee"

GF 4.0 (with extra ee)

<auth-realm classname="com.sun.enterprise.security.ee.auth.realm.jdbc.JDBCRealm" name="authentication-realm">
<property name="jaas-context" value="jdbcRealm"></property>
<property name="password-column" value="password"></property>
<property name="datasource-jndi" value="jdbc/SomeDS"></property>
<property name="group-table" value="v_user_role"></property>
<property name="charset" value="UTF-8"></property>
<property name="user-table" value="v_user_role"></property>
<property name="group-name-column" value="rolename"></property>
<property name="digest-algorithm" value="SHA-256"></property>
<property name="user-name-column" value="username"></property>
<property name="digestrealm-password-enc-algorithm" value="SHA-256"></property>
<property name="encoding" value="Base64"></property>
</auth-realm>

GF 4.1.1

<auth-realm classname="com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm" name="authentication-realm">
<property name="jaas-context" value="jdbcRealm"></property>
<property name="password-column" value="password"></property>
<property name="datasource-jndi" value="jdbc/SomeDS"></property>
<property name="group-table" value="v_user_role"></property>
<property name="charset" value="UTF-8"></property>
<property name="user-table" value="v_user_role"></property>
<property name="group-name-column" value="rolename"></property>
<property name="digest-algorithm" value="SHA-256"></property>
<property name="user-name-column" value="username"></property>
<property name="digestrealm-password-enc-algorithm" value="SHA-256"></property>
<property name="encoding" value="Base64"></property>
</auth-realm>

1条回答
劳资没心,怎么记你
2楼-- · 2019-01-09 19:13

The problem happened because I copy-pasted the JBDC resource from glassfish 4.0 to glassfish 4.1.1 domain.xml. The problem was resolved after reverting the JDBC resource manually and re-create using admin console or command line.

查看更多
登录 后发表回答