2016-07-27 2 views
0

Я пытаюсь запустить образец travelocity.com на моем веб-сервере tomcat и использовать сервер удостоверений WSO2 как поставщик удостоверений (IdP). Я развертываюсь travelocity.com.war на моем локальном кот и доступ приложения с http://localhost:8080/travelocity.com, он получил перенаправлен на сервер идентичности WSO2 к https://localhost:9443/samlsso и дал ошибку вНе удалось запустить образец sso example travelocity.com на сервере идентификации WSo2

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

Ошибка в моем файле 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) Что является причиной ошибки выброшены во время работы и экранным образец приложения travelocity.com с помощью SAML SSO (2) Если мне нужно реализовать SAMl SSO с использованием сервера идентификации WSO2 в уже запущенном Java-приложении (без единого входа), какие изменения должны быть выполнены в конце моего приложения. потому что здесь мы видим, что есть файл travelocity.properties и некоторая кодировка (около 4 файлов: - ForwardingServlet.java, SampleAttributesRequestor.java, SampleContextEventListener.java, SSOAgentSampleFilter.java) для перенаправления первого запроса на поставщика удостоверений https://localhost:9443/samlsso Какие изменения я буду должны делать в конце моего приложения.

+0

Привет и добро пожаловать в Переполнение! Пожалуйста, уделите минутку и прочитайте этот учебник для получения более качественных вопросов, особенно примеров хороших и плохих названий: stackoverflow.com/help/how-to-ask - все остальное выглядит хорошо! – Jurik

+0

Вы нашли улов. Я тоже получаю ту же проблему. Затем следили за документацией и блогами. – Sushil

ответ

0

Следуйте за WSO2 documentation, чтобы настроить веб-приложение travelocity.com. Сначала вам нужно войти в систему WSO2 IS 5.1.0, а затем создать веб-приложение travelocity.com в SAML 2.0 для поставщика услуг. Подробнее см. Документацию по ссылке.

Смежные вопросы