2016-07-27 18 views
0

Ich versuche, die Probe Travelocity.com auf meinem Tomcat Webserver ausführen und WSO2 Identity Server als Identity-Provider (IdP) verwenden. Ich entfalteten travelocity.com.war auf meinem lokalen tomcat und zugegriffen, um die Anwendung mit http://localhost:8080/travelocity.com, wurde es zu https://localhost:9443/samlsso zu WSO2 Identitätsserver umgeleitet und gab Fehler alsNicht in der Lage, Probe sso Beispiel travelocity.com auf WSo2 Identity Server

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

Der Fehler in meiner catalina.log Datei in lokalen tomcat ist

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 

Wurden keine Änderungen an travelocity.properties Datei vorgenommen, die mit Probe Krieg erzeugt wurde und ist standardmäßig ein

# 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 

Die Service-Provider-Einstellungen bei WSO2 Identitätsserver Standard ist und wie in dem Artikel gefragt

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

Ich habe zwei Fragen (1) Was ist der Grund für Fehler ausgelöst beim Laufen und accesing Probe travelocity.com Anwendung mit SAML SSO (2) Wenn ich das SAMl-SSO mithilfe des WSO2-Identitätsservers in meiner bereits laufenden Java-Anwendung implementieren muss (ohne Single Sign-On), müssen die Änderungen an meinem Anwendungsende vorgenommen werden. denn hier können wir sehen, dass es eine Datei travelocity.properties und einige Codierungen (etwa 4 Dateien: - ForwardingServlet.java, SampleAttributesRequestor.java, SampleContextEventListener.java, SSOAgentSampleFilter.java) gibt, um die erste Anfrage an den Identity-Provider umzuleiten Was sich ändert muss ich an meinem Bewerbungsende machen.

+0

Hallo und willkommen zu Stackoverflow! Bitte nehmen Sie sich eine Minute und lesen Sie dieses Tutorial für bessere Fragen, besonders Beispiele für gute und schlechte Titel: stackoverflow.com/help/how-to-ask - alles andere sieht gut aus! – Jurik

+0

Haben Sie den Fang gefunden? Ich bekomme das gleiche Problem. Folgte der Dokumentation und den Blogs. – Sushil

Antwort

0

Bitte folgen Sie der WSO2 documentation, um die Travelocity.com Web App zu konfigurieren. Zuerst müssen Sie sich beim WSO2 IS 5.1.0 anmelden und dann den Service Provider in SAML 2.0 für die web-App "travelocity.com" erstellen. Weitere Informationen finden Sie in der Link-Dokumentation.