2012-03-20 100 views
0

我在使用代理模式運行CAS時遇到問題。 但是,在沒有代理模式的情況下運行CAS時,我沒有任何問題。 這裏是我的開發配置:CAS Tomcat SSLHandshakeException

  • 一個CAS服務器爲SSL使用keytool創建自簽名證書
  • Apache服務器與PHP和phpCAS

這裏是CAS服務器日誌:

2012-03-20 09:25:20,080 INFO [org.jasig.cas.util.AutowiringSchedulerFactoryBean] - Shutting down Quartz Scheduler 
2012-03-20 09:25:54,194 INFO [org.jasig.cas.services.DefaultServicesManagerImpl] - Loaded 4 services. 
2012-03-20 09:25:54,304 WARN [org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler] - org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler is only to be used in a testing environment. NEVER enable this in a production environment. 
2012-03-20 09:25:55,074 INFO [org.jasig.cas.util.AutowiringSchedulerFactoryBean] - Starting Quartz Scheduler now 
2012-03-20 09:26:13,865 INFO [org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner] - Beginning ticket cleanup. 
2012-03-20 09:26:13,865 INFO [org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner] - 0 tickets found to be removed. 
2012-03-20 09:26:13,866 INFO [org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner] - Finished ticket cleanup. 
2012-03-20 09:26:15,490 INFO [org.jasig.cas.web.flow.InitialFlowSetupAction] - Setting path for cookies to: /cas/ 
2012-03-20 09:26:15,490 INFO [org.jasig.cas.web.flow.InitialFlowSetupAction] - Setting path for cookies to: /cas/ 
2012-03-20 09:26:51,732 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - Audit trail record BEGIN 
============================================================= 
WHO: audit:unknown 
WHAT: https://myurl/mypage.php 
ACTION: SERVICE_TICKET_NOT_CREATED 
APPLICATION: CAS 
WHEN: Tue Mar 20 09:26:51 EDT 2012 
CLIENT IP ADDRESS: 192.168.56.1 
SERVER IP ADDRESS: 192.168.56.21 
============================================================= 


2012-03-20 09:26:54,661 INFO [org.jasig.cas.authentication.AuthenticationManagerImpl] - AuthenticationHandler: org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler successfully authenticated the user which provided the following credentials: [username: uday] 
2012-03-20 09:26:54,663 INFO [org.jasig.cas.authentication.AuthenticationManagerImpl] - Resolved principal uday 
2012-03-20 09:26:54,663 INFO [org.jasig.cas.authentication.AuthenticationManagerImpl] - Principal found: uday 
2012-03-20 09:26:54,666 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - Audit trail record BEGIN 
============================================================= 
WHO: [username: uday] 
WHAT: supplied credentials: [username: uday] 
ACTION: AUTHENTICATION_SUCCESS 
APPLICATION: CAS 
WHEN: Tue Mar 20 09:26:54 EDT 2012 
CLIENT IP ADDRESS: 192.168.56.1 
SERVER IP ADDRESS: 192.168.56.21 
============================================================= 


2012-03-20 09:26:54,671 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - Audit trail record BEGIN 
============================================================= 
WHO: [username: uday] 
WHAT: TGT-1-k6WfKXIbw0oA9xOHeDnDuF9lT1Jxa6Gxcf2KLrSMpPewhR5oL3-cas 
ACTION: TICKET_GRANTING_TICKET_CREATED 
APPLICATION: CAS 
WHEN: Tue Mar 20 09:26:54 EDT 2012 
CLIENT IP ADDRESS: 192.168.56.1 
SERVER IP ADDRESS: 192.168.56.21 
============================================================= 


2012-03-20 09:26:54,672 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - Audit trail record BEGIN 
============================================================= 
WHO: audit:unknown 
WHAT: TGT-1-e7IpmWoXBe0DZ1mriUtNnuyMA7Rd6zyiIueIXNH0DBY04NKVUn-cas 
ACTION: TICKET_GRANTING_TICKET_DESTROYED 
APPLICATION: CAS 
WHEN: Tue Mar 20 09:26:54 EDT 2012 
CLIENT IP ADDRESS: 192.168.56.1 
SERVER IP ADDRESS: 192.168.56.21 
============================================================= 


2012-03-20 09:26:54,674 INFO [org.jasig.cas.CentralAuthenticationServiceImpl] - Granted service ticket [ST-1-51JadzMUuXlQUBAOzNIB-cas] for service [https://myurl/mypage.php] for user [uday] 
2012-03-20 09:26:54,675 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - Audit trail record BEGIN 
============================================================= 
WHO: uday 
WHAT: ST-1-51JadzMUuXlQUBAOzNIB-cas for https://myurl/mypage.php 
ACTION: SERVICE_TICKET_CREATED 
APPLICATION: CAS 
WHEN: Tue Mar 20 09:26:54 EDT 2012 
CLIENT IP ADDRESS: 192.168.56.1 
SERVER IP ADDRESS: 192.168.56.21 
============================================================= 


2012-03-20 09:26:54,861 ERROR [org.jasig.cas.util.HttpClient] - sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) 
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1697) 
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:258) 
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:252) 
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1165) 
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:154) 
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:610) 
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:546) 
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:945) 
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1190) 
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1217) 
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1201) 
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:423) 
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) 
    at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2030) 
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1334) 
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:397) 
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338) 
    at org.jasig.cas.util.HttpClient.isValidEndPoint_aroundBody4(HttpClient.java:111) 
    at org.jasig.cas.util.HttpClient.isValidEndPoint_aroundBody5$advice(HttpClient.java:44) 
    at org.jasig.cas.util.HttpClient.isValidEndPoint(HttpClient.java:1) 
    at org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler.authenticate_aroundBody0(HttpBasedServiceCredentialsAuthenticationHandler.java:59) 
    at org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler.authenticate_aroundBody1$advice(HttpBasedServiceCredentialsAuthenticationHandler.java:44) 
    at org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler.authenticate(HttpBasedServiceCredentialsAuthenticationHandler.java:1) 
    at org.jasig.cas.authentication.AuthenticationManagerImpl.authenticateAndObtainPrincipal(AuthenticationManagerImpl.java:84) 
    at org.jasig.cas.authentication.AbstractAuthenticationManager.authenticate_aroundBody0(AbstractAuthenticationManager.java:41) 
    at org.jasig.cas.authentication.AbstractAuthenticationManager.authenticate_aroundBody1$advice(AbstractAuthenticationManager.java:44) 
    at org.jasig.cas.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:1) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:616) 
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) 
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) 
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) 
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80) 
    at com.github.inspektr.audit.AuditTrailManagementAspect.handleAuditTrail(AuditTrailManagementAspect.java:126) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:616) 
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) 
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) 
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65) 
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) 
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) 
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) 
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) 
    at $Proxy17.authenticate(Unknown Source) 
    at org.jasig.cas.CentralAuthenticationServiceImpl.delegateTicketGrantingTicket_aroundBody6(CentralAuthenticationServiceImpl.java:272) 
    at org.jasig.cas.CentralAuthenticationServiceImpl.delegateTicketGrantingTicket_aroundBody7$advice(CentralAuthenticationServiceImpl.java:44) 
    at org.jasig.cas.CentralAuthenticationServiceImpl.delegateTicketGrantingTicket(CentralAuthenticationServiceImpl.java:1) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:616) 
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) 
    [...] 
    at org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody2(SafeDispatcherServlet.java:115) 
    at org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody3$advice(SafeDispatcherServlet.java:44) 
    at org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherServlet.java:1) 
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
    at com.github.inspektr.common.web.ClientInfoThreadLocalFilter.doFilter(ClientInfoThreadLocalFilter.java:63) 
    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.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:127) 
    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:859) 
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) 
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) 
    at java.lang.Thread.run(Thread.java:636) 
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:302) 
    at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:205) 
    at sun.security.validator.Validator.validate(Validator.java:235) 
    at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:147) 
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:230) 
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:270) 
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1144) 
    ... 113 more 
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 
    at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:197) 
    at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:255) 
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:297) 
    ... 119 more 
2012-03-20 09:26:54,873 INFO [org.jasig.cas.authentication.AuthenticationManagerImpl] - AuthenticationHandler: org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler failed to authenticate the user which provided the following credentials: [callbackUrl: https://myurl/mypage.php] 
2012-03-20 09:26:54,876 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - Audit trail record BEGIN 
============================================================= 
WHO: [callbackUrl: https://myurl/mypage.php] 
WHAT: supplied credentials: [callbackUrl: https://myurl/mypage.php] 
ACTION: AUTHENTICATION_FAILED 
APPLICATION: CAS 
WHEN: Tue Mar 20 09:26:54 EDT 2012 
CLIENT IP ADDRESS: 192.168.56.20 
SERVER IP ADDRESS: 192.168.56.21 
============================================================= 


2012-03-20 09:26:54,879 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - Audit trail record BEGIN 
============================================================= 
WHO: uday 
WHAT: error.authentication.credentials.bad 
ACTION: PROXY_GRANTING_TICKET_NOT_CREATED 
APPLICATION: CAS 
WHEN: Tue Mar 20 09:26:54 EDT 2012 
CLIENT IP ADDRESS: 192.168.56.20 
SERVER IP ADDRESS: 192.168.56.21 
============================================================= 


2012-03-20 09:26:54,879 ERROR [org.jasig.cas.web.ServiceValidateController] - TicketException generating ticket for: [callbackUrl: https://myurl/mypage.php] 
org.jasig.cas.ticket.TicketCreationException: error.authentication.credentials.bad 
    at org.jasig.cas.CentralAuthenticationServiceImpl.delegateTicketGrantingTicket_aroundBody6(CentralAuthenticationServiceImpl.java:300) 
    at org.jasig.cas.CentralAuthenticationServiceImpl.delegateTicketGrantingTicket_aroundBody7$advice(CentralAuthenticationServiceImpl.java:44) 
    at org.jasig.cas.CentralAuthenticationServiceImpl.delegateTicketGrantingTicket(CentralAuthenticationServiceImpl.java:1) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:616) 
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) 
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) 
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) 
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80) 
    at org.perf4j.aop.AbstractTimingAspect$1.proceed(AbstractTimingAspect.java:47) 
    at org.perf4j.aop.AgnosticTimingAspect.runProfiledMethod(AgnosticTimingAspect.java:53) 
    at org.perf4j.aop.AbstractTimingAspect.doPerfLogging(AbstractTimingAspect.java:45) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:616) 
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) 
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) 
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65) 
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) 
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80) 
    at com.github.inspektr.audit.AuditTrailManagementAspect.handleAuditTrail(AuditTrailManagementAspect.java:126) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:616) 
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) 
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) 
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65) 
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) 
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) 
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) 
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) 
    at $Proxy18.delegateTicketGrantingTicket(Unknown Source) 
    at org.jasig.cas.web.ServiceValidateController.handleRequestInternal(ServiceValidateController.java:125) 
    at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) 
    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) 
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) 
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) 
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) 
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
    at org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody2(SafeDispatcherServlet.java:115) 
    at org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody3$advice(SafeDispatcherServlet.java:44) 
    at org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherServlet.java:1) 
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
    at com.github.inspektr.common.web.ClientInfoThreadLocalFilter.doFilter(ClientInfoThreadLocalFilter.java:63) 
    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.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:127) 
    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:859) 
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) 
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) 
    at java.lang.Thread.run(Thread.java:636) 
Caused by: error.authentication.credentials.bad 
    at org.jasig.cas.authentication.handler.BadCredentialsAuthenticationException.<clinit>(BadCredentialsAuthenticationException.java:25) 
    at org.jasig.cas.authentication.AuthenticationManagerImpl.authenticateAndObtainPrincipal(AuthenticationManagerImpl.java:112) 
    at org.jasig.cas.authentication.AbstractAuthenticationManager.authenticate_aroundBody0(AbstractAuthenticationManager.java:41) 
    at org.jasig.cas.authentication.AbstractAuthenticationManager.authenticate_aroundBody1$advice(AbstractAuthenticationManager.java:44) 
    at org.jasig.cas.authentication.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:1) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:616) 
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) 
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) 
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) 
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80) 
    at com.github.inspektr.audit.AuditTrailManagementAspect.handleAuditTrail(AuditTrailManagementAspect.java:126) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:616) 
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) 
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) 
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65) 
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) 
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) 
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) 
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) 
    at $Proxy17.authenticate(Unknown Source) 
    at org.jasig.cas.CentralAuthenticationServiceImpl.delegateTicketGrantingTicket_aroundBody6(CentralAuthenticationServiceImpl.java:272) 
    ... 68 more 
2012-03-20 09:26:54,890 INFO [com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - Audit trail record BEGIN 
============================================================= 
WHO: audit:unknown 
WHAT: ST-1-51JadzMUuXlQUBAOzNIB-cas 
ACTION: SERVICE_TICKET_VALIDATED 
APPLICATION: CAS 
WHEN: Tue Mar 20 09:26:54 EDT 2012 
CLIENT IP ADDRESS: 192.168.56.20 
SERVER IP ADDRESS: 192.168.56.21 
============================================================= 

我看着troubleshooting,發現我的錯誤,但我無法解決它。

我在tomcat密鑰庫中導入了https://myurl/的自簽名證書並重新啓動了tomcat,但我仍然收到此錯誤。

我做錯了什麼?

感謝您的幫助。

編輯: 這是我的密鑰庫和信任(由密鑰工具-v -list -keystore /路徑/到/密鑰庫中列出)的含量:

Type Keystore : JKS 
Fournisseur Keystore : SUN 

Votre Keystore contient 3 entrée(s) 

Nom d'alias : tomcat 
Date de création : 2012-03-08 
Type dentrée : {0} 
Longueur de chaîne du certificat : 1 
Certificat[1]: 
Propriétaire : CN=cas, OU=Company, O=Company, L=City, ST=Province, C=PR 
Émetteur : CN=cas, OU=Company, O=Company, L=City, ST=Province, C=PR 
Numéro de série : 4f58d082 
Valide du : Thu Mar 08 10:30:10 EST 2012 au : Wed Jun 06 11:30:10 EDT 2012 
Empreintes du certificat : 
    MD5 : F7:8D:3D:A0:24:31:B8:75:5E:AB:56:2B:80:66:1E:D8 
    SHA1 : 74:44:47:AD:CE:0A:00:DB:F4:F0:5B:0C:48:38:37:4A:A3:2F:E5:C2 
    Nom de lalgorithme de signature : {7} 
    Version : {8} 


******************************************* 
******************************************* 
Nom d'alias : myurl 
Date de création : 2012-03-21 
Type d'entrée : trustedCertEntry 

Propriétaire : CN=myurl 
Émetteur : CN=myurl 
Numéro de série : fc657300d50bdecd 
Valide du : Wed Mar 21 13:09:15 EDT 2012 au : Sat Mar 19 13:09:15 EDT 2022 
Empreintes du certificat : 
    MD5 : 9C:0B:3F:F8:AE:02:AD:63:D8:17:6D:60:84:90:69:AE 
    SHA1 : 7B:FF:1C:14:D7:36:36:5A:B0:A3:89:4E:F9:C7:8C:B0:75:B8:62:24 
    Nom de lalgorithme de signature : {7} 
    Version : {8} 


******************************************* 
******************************************* 

編輯2: 這裏是我的tomcat連接器:

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" 
      maxThreads="150" scheme="https" secure="true" 
      clientAuth="false" sslProtocol="TLS" keyAlias="tomcat" 
      keystoreFile="/home/keystore" 
      keystorePass="changeit" truststoreFile="/home/keystore" 
      truststorePass="changeit"/> 

/home/keystore是上述文件的路徑。 我需要提供信任別名嗎? 如果是,那個別名的屬性名稱是什麼?

回答

0

我終於通過使用來自StartSSL的免費ssl證書解決了我的問題。

0

您需要將自簽證書導入您的信任庫。你做到了嗎?

+0

我在tomcat密鑰庫中導入了apache的自簽名證書(https:// myurl /)。你是這個意思嗎?如果不是,我應該導入哪個證書(tomcat(https:// cas /)one或apache(https:// myurl /))?我應該在哪裏導入它?謝謝。 – glcp 2012-03-21 12:20:52

+0

有兩個密鑰庫 - 身份和信任。你提到你創建了一個「ssl的自簽名證書」;這是身份密鑰庫。您需要取得該密鑰並將其導入您的信任商店。 – bubbly 2012-03-21 16:16:42

+0

我已經完成了這項工作,但我仍然遇到同樣的錯誤。我編輯了我的答案,向您展示了我的密鑰庫和可信任內容。你能告訴我什麼是錯的嗎? – glcp 2012-03-21 17:53:00