DataSourceSecurityFilter Eclipse Scout

时间:2013-01-21 14:22:02

标签: eclipse jaas eclipse-scout

我正在使用Eclipse Scout框架开发服务器客户端程序。我有Java经验,但我对Tomcat的表现并不存在。

我想写一个请求我的登录信息的应用程序。使用DataSourceSecurityFilter我想在程序中对用户进行autherise(从数据库中读取他的用户名和密码)。我的服务器config.ini如下所示:

### Service Runtime Configuration


org.eclipse.scout.rt.server.services.common.file.RemoteFileService#rootPath=/Users/wgvanveen/Documents/workspace/ledenbeheer.server/j2ee/ear/war/WEB-INF/remotefiles

### Servlet Filter Runtime Configuration
org.eclipse.scout.http.servletfilter.security.BasicSecurityFilter#active=false
org.eclipse.scout.http.servletfilter.security.BasicSecurityFilter#realm=ledenbeheer Development
org.eclipse.scout.http.servletfilter.security.BasicSecurityFilter#users=admin\=manager,allen\=allen,blake\=blake
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#active=false
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#realm=TEST APPLICATION
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#jdbcDriverName=com.mysql.jdbc.Driver
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#jdbcMappingName=jdbc:mysql://localhost/Leden 
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#jdbcUsername=root
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#jdbcPassword=root
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#selectUserPass=SELECT LOWER(Gebruikersnaam) FROM Gebruikers WHERE LOWER(gebruikersnaam)=? AND PASSWORD=?
org.eclipse.scout.http.servletfilter.security.AnonymousSecurityFilter#active=true

我在服务器插件中添加了以下内容:

<filter
            aliases="/process"
            class="org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter"
            ranking="40">
      </filter>

我不知道为什么这不起作用。我已按照以下说明进行操作:http://wiki.eclipse.org/Scout/Concepts/Security

我正在使用Scout 3.8运行Eclipse Juno

1 个答案:

答案 0 :(得分:0)

看起来错误的过滤器处于活动状态。

org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#活性=假 org.eclipse.scout.http.servletfilter.security.AnonymousSecurityFilter#活性=真

尝试激活数据源过滤器并停用匿名过滤器。如果它不起作用,我建议你在http://www.eclipse.org/forums/index.php?t=thread&frm_id=174的官方侦察论坛上发布这个问题。