- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我从 acegi 迁移到 spring-security-core 的过程很糟糕。当我尝试登录时,我不断收到以下错误:
The specified user domain class 'com.xxx.Person' is not a domain class
grails.plugins.springsecurity.userLookup.userDomainClassName = 'com.xxx.Person'
grails.plugins.springsecurity.userLookup.authorityJoinClassName = 'com.xxx.PersonRole'
grails.plugins.springsecurity.authority.className = 'com.xxx.Role'
grails.plugins.springsecurity.requestMap.className = 'com.xxx.Requestmap'
grails.plugins.springsecurity.securityConfigType = 'Requestmap'
grails.plugins.springsecurity.cacheUsers=false
grails.plugins.springsecurity.ui.register.defaultRoleNames=['ROLE_DEFAULT_USER']
grails.plugins.springsecurity.ui.register.emailFrom = 'xxx@example.com'
grails.plugins.springsecurity.useSecurityEventListener = true
debug 'org.springframework.security'
打开它得到以下信息:
2011-12-24 05:56:04,748 [http-8080-3] DEBUG web.FilterChainProxy - Converted URL to lowercase, from: '/web-inf/grails-app/views/layouts/login.gsp'; to: '/web-inf/grails-app/views/layouts/login.gsp'
2011-12-24 05:56:04,748 [http-8080-3] DEBUG web.FilterChainProxy - Candidate is: '/web-inf/grails-app/views/layouts/login.gsp'; pattern is /**; matched=true
2011-12-24 05:56:04,748 [http-8080-3] DEBUG web.FilterChainProxy - /WEB-INF/grails-app/views/layouts/login.gsp at position 1 of 8 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
2011-12-24 05:56:04,748 [http-8080-3] DEBUG web.FilterChainProxy - /WEB-INF/grails-app/views/layouts/login.gsp at position 2 of 8 in additional filter chain; firing Filter: 'MutableLogoutFilter'
2011-12-24 05:56:04,748 [http-8080-3] DEBUG web.FilterChainProxy - /WEB-INF/grails-app/views/layouts/login.gsp at position 3 of 8 in additional filter chain; firing Filter: 'RequestHolderAuthenticationFilter'
2011-12-24 05:56:04,748 [http-8080-3] DEBUG web.FilterChainProxy - /WEB-INF/grails-app/views/layouts/login.gsp at position 4 of 8 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
2011-12-24 05:56:04,748 [http-8080-3] DEBUG web.FilterChainProxy - /WEB-INF/grails-app/views/layouts/login.gsp at position 5 of 8 in additional filter chain; firing Filter: 'RememberMeAuthenticationFilter'
2011-12-24 05:56:04,748 [http-8080-3] DEBUG rememberme.RememberMeAuthenticationFilter - SecurityContextHolder not populated with remember-me token, as it already contained: 'org.springframework.security.authentication.AnonymousAuthenticationToken@6fa90ed4: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@fffc7f0c: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: 42FC01C857E346E77C619175E0C44927; Granted Authorities: ROLE_ANONYMOUS'
2011-12-24 05:56:04,748 [http-8080-3] DEBUG web.FilterChainProxy - /WEB-INF/grails-app/views/layouts/login.gsp at position 6 of 8 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'
2011-12-24 05:56:04,748 [http-8080-3] DEBUG authentication.AnonymousAuthenticationFilter - SecurityContextHolder not populated with anonymous token, as it already contained: 'org.springframework.security.authentication.AnonymousAuthenticationToken@6fa90ed4: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@fffc7f0c: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: 42FC01C857E346E77C619175E0C44927; Granted Authorities: ROLE_ANONYMOUS'
2011-12-24 05:56:04,748 [http-8080-3] DEBUG web.FilterChainProxy - /WEB-INF/grails-app/views/layouts/login.gsp at position 7 of 8 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'
2011-12-24 05:56:04,768 [http-8080-3] DEBUG web.FilterChainProxy - /WEB-INF/grails-app/views/layouts/login.gsp at position 8 of 8 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'
2011-12-24 05:56:04,768 [http-8080-3] DEBUG web.FilterChainProxy - /WEB-INF/grails-app/views/layouts/login.gsp reached end of additional filter chain; proceeding with original chain
2011-12-24 05:56:04,776 [http-8080-3] DEBUG access.ExceptionTranslationFilter - Chain processed normally
2011-12-24 05:56:04,777 [http-8080-3] DEBUG access.ExceptionTranslationFilter - Chain processed normally
2011-12-24 05:56:04,777 [http-8080-3] DEBUG context.HttpSessionSecurityContextRepository - SecurityContext is empty or anonymous - context will not be stored in HttpSession.
2011-12-24 05:56:04,777 [http-8080-3] DEBUG context.SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed
2011-12-24 05:56:13,946 [http-8080-3] DEBUG web.FilterChainProxy - Converted URL to lowercase, from: '/j_spring_security_check'; to: '/j_spring_security_check'
2011-12-24 05:56:13,946 [http-8080-3] DEBUG web.FilterChainProxy - Candidate is: '/j_spring_security_check'; pattern is /**; matched=true
2011-12-24 05:56:13,946 [http-8080-3] DEBUG web.FilterChainProxy - /j_spring_security_check at position 1 of 8 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
2011-12-24 05:56:13,946 [http-8080-3] DEBUG context.HttpSessionSecurityContextRepository - HttpSession returned null object for SPRING_SECURITY_CONTEXT
2011-12-24 05:56:13,946 [http-8080-3] DEBUG context.HttpSessionSecurityContextRepository - No SecurityContext was available from the HttpSession: org.apache.catalina.session.StandardSessionFacade@7450fd85. A new one will be created.
2011-12-24 05:56:13,946 [http-8080-3] DEBUG web.FilterChainProxy - /j_spring_security_check at position 2 of 8 in additional filter chain; firing Filter: 'MutableLogoutFilter'
2011-12-24 05:56:13,946 [http-8080-3] DEBUG web.FilterChainProxy - /j_spring_security_check at position 3 of 8 in additional filter chain; firing Filter: 'RequestHolderAuthenticationFilter'
2011-12-24 05:56:13,947 [http-8080-3] DEBUG authentication.ProviderManager - Authentication attempt using org.springframework.security.authentication.dao.DaoAuthenticationProvider
2011-12-24 05:56:13,959 [http-8080-3] DEBUG context.HttpSessionSecurityContextRepository - SecurityContext is empty or anonymous - context will not be stored in HttpSession.
2011-12-24 05:56:13,959 [http-8080-3] DEBUG context.SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed
2011-12-24 05:56:13,961 [http-8080-3] ERROR [/xxx].[default] - Servlet.service() for servlet default threw exception
java.lang.RuntimeException: The specified user domain class 'com.xxx.Person' is not a domain class
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:71)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:81)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:198)
at org.codehaus.groovy.grails.plugins.springsecurity.GormUserDetailsService.loadUserByUsername(GormUserDetailsService.groovy:53)
at org.codehaus.groovy.grails.plugins.springsecurity.GrailsUserDetailsService$loadUserByUsername.callCurrent(Unknown Source)
at org.codehaus.groovy.grails.plugins.springsecurity.GormUserDetailsService.loadUserByUsername(GormUserDetailsService.groovy:76)
at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:86)
at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:129)
at org.springframework.security.authentication.ProviderManager.doAuthentication(ProviderManager.java:130)
at org.springframework.security.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:48)
at org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:97)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
at org.codehaus.groovy.grails.plugins.springsecurity.RequestHolderAuthenticationFilter.doFilter(RequestHolderAuthenticationFilter.java:40)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.codehaus.groovy.grails.plugins.springsecurity.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:79)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:381)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:168)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:65)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:185)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:159)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:722)
2011-12-24 05:56:14,151 [http-8080-3] DEBUG web.FilterChainProxy - Converted URL to lowercase, from: '/grails-errorhandler'; to: '/grails-errorhandler'
2011-12-24 05:56:14,151 [http-8080-3] DEBUG web.FilterChainProxy - Candidate is: '/grails-errorhandler'; pattern is /**; matched=true
2011-12-24 05:56:14,151 [http-8080-3] DEBUG web.FilterChainProxy - /grails-errorhandler at position 1 of 8 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
2011-12-24 05:56:14,152 [http-8080-3] DEBUG context.HttpSessionSecurityContextRepository - HttpSession returned null object for SPRING_SECURITY_CONTEXT
2011-12-24 05:56:14,152 [http-8080-3] DEBUG context.HttpSessionSecurityContextRepository - No SecurityContext was available from the HttpSession: org.apache.catalina.session.StandardSessionFacade@7450fd85. A new one will be created.
2011-12-24 05:56:14,152 [http-8080-3] DEBUG web.FilterChainProxy - /grails-errorhandler at position 2 of 8 in additional filter chain; firing Filter: 'MutableLogoutFilter'
2011-12-24 05:56:14,152 [http-8080-3] DEBUG web.FilterChainProxy - /grails-errorhandler at position 3 of 8 in additional filter chain; firing Filter: 'RequestHolderAuthenticationFilter'
2011-12-24 05:56:14,152 [http-8080-3] DEBUG web.FilterChainProxy - /grails-errorhandler at position 4 of 8 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
2011-12-24 05:56:14,152 [http-8080-3] DEBUG web.FilterChainProxy - /grails-errorhandler at position 5 of 8 in additional filter chain; firing Filter: 'RememberMeAuthenticationFilter'
2011-12-24 05:56:14,152 [http-8080-3] DEBUG web.FilterChainProxy - /grails-errorhandler at position 6 of 8 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'
2011-12-24 05:56:14,152 [http-8080-3] DEBUG authentication.AnonymousAuthenticationFilter - Populated SecurityContextHolder with anonymous token: 'org.springframework.security.authentication.AnonymousAuthenticationToken@6fa90ed4: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@fffc7f0c: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: 42FC01C857E346E77C619175E0C44927; Granted Authorities: ROLE_ANONYMOUS'
2011-12-24 05:56:14,152 [http-8080-3] DEBUG web.FilterChainProxy - /grails-errorhandler at position 7 of 8 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'
2011-12-24 05:56:14,153 [http-8080-3] DEBUG web.FilterChainProxy - /grails-errorhandler at position 8 of 8 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'
2011-12-24 05:56:14,153 [http-8080-3] DEBUG intercept.FilterSecurityInterceptor - Public object - authentication not attempted
2011-12-24 05:56:14,153 [http-8080-3] DEBUG web.FilterChainProxy - /grails-errorhandler reached end of additional filter chain; proceeding with original chain
2011-12-24 05:56:14,212 [http-8080-3] DEBUG access.ExceptionTranslationFilter - Chain processed normally
2011-12-24 05:56:14,212 [http-8080-3] DEBUG context.HttpSessionSecurityContextRepository - SecurityContext is empty or anonymous - context will not be stored in HttpSession.
2011-12-24 05:56:14,212 [http-8080-3] DEBUG context.SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed
grails.plugins.springsecurity.userLookup.userDomainClassName
无法实现 java 接口(interface) :(。当我删除接口(interface)时,一切正常。
最佳答案
问题是我的 Person 类实现了一个接口(interface)(IPerson)。我已经删除了界面并且它可以工作。
关于grails acegi 迁移到 spring-security-core,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8624091/
我正在开始新项目。客户端界面基于 GWT(和 GXT),我没有说它是预先确定的。但是,我可以选择服务器端,这样我就可以玩得开心,并希望在这个过程中学到一些新东西。一些要求是: 与服务器的交换将通过使用
spring Acegi security 可以用于社交网络应用程序,用户可以设置他们的安全首选项以仅与他们的 friend 共享他们的数据吗? Acegi 教程的常见场景是您希望为每个用户角色授权操
谷歌搜索后,我发现引用表明 acegi 安全约束在前进时不受支持。 我在我的应用程序中对其进行了测试,我可以确认我遇到了这个问题。 有谁知道在推荐的 spring security 插件中是否发现了同
我正在寻找使用 Grails 的 Acegi 插件实现密码检索过程的方法...Google 失败了... 最佳答案 恕我直言,这目前不是 Acegi 插件的一部分。我已将忘记密码操作添加到 Login
我有一个使用 ldap acegi-security-1.0.2.jar 的应用程序。我能够使用 Activity 目录对用户进行身份验证。我想为我的应用程序添加 NTLM 自动登录功能。我可以知道我
我看过其他问题并查看了文档,但没有找到明确的示例或答案。 1)我需要一个新的userDetailsService类 2)我是否需要一个新的userDetailsService类和GrailsD
我们正在使用Grails Acegi插件0.5.1进行身份验证以及验证码功能。关于输入验证错误,我想生成一个新的Captcha值。我正在使用用户 Controller 中的render方法来向模板显示
我继承了一个Grails应用程序,该应用程序使用Acegi 0.5.3插件。 可以通过两个完全不同的URL(例如app.domainone.com和app.domaintwo.com)访问该应用程序。
这是this question的一个分支。之所以分支出去,是因为该问题的初衷是其他目的。 我正在寻找检查密码是否过期的最简单方法。如果密码的时间超过N天,则密码将过期,其中N是存储在另一个表中的值。
我在Grails应用中使用了Acegi(又名Spring Security)插件。在SecurityConfig.groovy中,我添加了这一行 userName = 'email' 以便将电子邮件字
我有一个使用 Acegi Security 的旧版 Java Web 应用程序。我正在尝试从 jsp 页面中删除所有 java scriplet。是否有任何 ACEGI 标签可用于替换以下表达式: S
我是 Acegi 的新手。我让它以最简单的形式工作。我必须登录才能访问 protected 页面(我遵循了他们的教程)。 现在我想获得每次成功登录的数据库日志。有没有一种简单的方法可以做到这一点?每次
我想更改 Acegi - 插件使用的身份验证过程。它应该是一个完全定制的过程。自定义登录表单 + 自定义身份验证方法。 显然,关于这个主题的文档很少。 在 The Definitive Guide t
我正在开发一个基于 Grails 的 Web 应用程序,我需要选择这两个框架之一进行身份验证。在您看来,选择 Acegi 的标准是什么,选择 Apache Shiro 的标准是什么? 最佳答案 我还要
引用 http://www.grails.org/AcegiSecurity+Plugin+-+Basic+Tutorial 如果我需要自定义字段,例如我需要性别、年龄等。 怎么做? 最佳答案 只需修
我现有的 Java 应用程序正在使用 Acegi 进行身份验证/授权。我们的新 Web 界面最好用 Django 编写。我希望 Django 维护用户 - 注册等。Django 将共享或更新 Aceg
我从 acegi 迁移到 spring-security-core 的过程很糟糕。当我尝试登录时,我不断收到以下错误: The specified user domain class 'com.xxx
我正在做一个 grails 遗留项目。存在一个名为 User 的域类。它包含密码、用户名、角色等。 本项目使用 Spring Security 进行角色管理。我想添加凭据到期(强制用户更新其密码)。
我正在从grails 1.3.9 / acegi升级到grails 2.4.2 / spring security。 在acegi中,我有一个声明的getAuthoritiesMethod方法。此方法
使用此登录代码是否有类似的注销逻辑: // login account def autht = new AuthToken(username, password) def authtoken = da
我是一名优秀的程序员,十分优秀!