首页 文章

无法在WSo2身份服务器上运行示例sso示例travelocity.com

提问于
浏览
0

我试图在我的tomcat web服务器上运行示例travelocity.com,并使用WSO2身份服务器作为身份提供者(IdP) . 我在我的本地tomcat上部署了travelocity.com.war并使用 http://localhost:8080/travelocity.com 访问了该应用程序,它被重定向到WSo2身份服务器到 https://localhost:9443/samlsso ,并给出了错误

"SAML 2.0 based Single Sign-On
    Error when processing the authentication request!
    Please try login again."

我在本地tomcat中的catalina.log文件中的错误是

INFO: Deployment of web application directory C:\Users\258155\Desktop\Tomcat\webapps\SAMLTestTool has finished in 359 ms
Jul 27, 2016 3:22:39 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jul 27, 2016 3:22:39 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jul 27, 2016 3:22:39 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 28075 ms
Jul 27, 2016 3:36:50 PM org.wso2.sample.is.sso.agent.SSOAgentSampleFilter doFilter
INFO: SAML2 HTTP Binding not found in request. Defaulting to HTTP-POST

没有对使用样本战生成的travelocity.properties文件进行任何更改,并且是默认的

#  Copyright (c) WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
#  WSO2 Inc. licenses this file to you under the Apache License,
#  Version 2.0 (the "License"); you may not use this file except
#  in compliance with the License.
#  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing,
#  software distributed under the License is distributed on an
#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
#  KIND, either express or implied.  See the License for the
#  specific language governing permissions and limitations
#  under the License.


EnableSAML2SSOLogin=true
EnableOpenIDLogin=true
EnableOAuth2SAML2Grant=false

#Url to do send SAML2 SSO AuthnRequest
SAML2SSOURL=samlsso

#Url to do initiate OAuth2 SAML2 Grant Request
OAuth2SAML2GrantURL=token

#Url to initiate OpenID Authentication Request
OpenIdURL=openid

#URIs to skip SSOAgentFilter; comma separated values
SkipURIs=/travelocity.com/index.jsp

#A unique identifier for this SAML 2.0 Service Provider application
SAML2.SPEntityId=travelocity.com

#The URL of the SAML 2.0 Assertion Consumer
SAML2.AssertionConsumerURL=http://localhost:8080/travelocity.com/home.jsp

#A unique identifier for this SAML 2.0 Service Provider application
SAML2.IdPEntityId=localhost

#The URL of the SAML 2.0 Identity Provider
SAML2.IdPURL=https://localhost:9443/samlsso

#Identifier given for the Service Provider for SAML 2.0 attributes 
#exchange
#SAML2.AttributeConsumingServiceIndex=1701087467

#Specify if SingleLogout is enabled/disabled
SAML2.EnableSLO=true

#This is the URL that is used for SLO
SAML2.SLOURL=logout

#Specify if SAMLResponse element is signed
SAML2.EnableResponseSigning=true

#Specify if SAMLAssertion element is signed
SAML2.EnableAssertionSigning=true

#Specify if SAMLAssertion element is encrypted
SAML2.EnableAssertionEncryption=false

#Specify if AuthnRequests and LogoutRequests should be signed
SAML2.EnableRequestSigning=true

#Password of the KeyStore for SAML and OpenID
KeyStorePassword=wso2carbon

#Alias of the IdP's public certificate
IdPPublicCertAlias=wso2carbon

#Alias of the SP's private key 
PrivateKeyAlias=wso2carbon

#Private key password to retrieve the private key used to sign 
#AuthnRequest and LogoutRequest messages
PrivateKeyPassword=wso2carbon

#OAuth2 token endpoint URL
OAuth2.TokenURL=https://localhost:9443/oauth2/token

#OAuth2 Client ID
OAuth2.ClientId=Qn5DQHCYfshxeZh6R9SL1HM2lsMa

#OAuth2 Client Secret
OAuth2.ClientSecret=cbkAs1gajdwPAMbrSR54hPAIcz0a

#OpenId Provider Url
OpenId.ProviderURL=https://localhost:9443/openid/

#openid.return_to parameter
OpenId.ReturnToURL=http://localhost:8080/travelocity.com/home.jsp

#Custom SAML post binding request page
#SAML.PostBinding.RequestPage=path/to/the/html

#Additional request parameters
#QueryParams=tenantDomain=-1234

#SAML2.IsForceAuthn=true

#Specify whether the consumer requests user attributes from the provider
OpenId.EnableAttributeExchange=true

#Specify whether the consumer runs in dumb mode
OpenId.EnableDumbMode=false

WSo2身份服务器上的服务提供商设置是默认的,并且正如文章中所要求的那样

https://docs.wso2.com/display/IS500/Configuring+Single+Sign-On+with+SAML+2.0

我有两个问题(1)使用SAMl SSO运行和访问示例travelocity.com应用程序时抛出错误的原因是什么(2)如果我必须在我已经运行的java应用程序中使用WSO2身份服务器实现SAMl SSO(没有单个)登录),在我的应用程序结束时必须进行哪些更改 . 因为在这里我们可以看到有travelocity.properties文件和一些编码(大约4个文件: - ForwardingServlet.java,SampleAttributesRequestor.java,SampleContextEventListener.java,SSOAgentSampleFilter.java)将第一个请求重定向到身份提供者https://localhost:9443/samlsso我会有什么变化在我的申请结束时做 .

2 回答

相关问题