John, On keycloak logs, I only see this error:2016-08-23 00:49:24,648 WARN [org.keycloak.events] (default task-6) type=LOGIN_ERROR, realmId=saml-demo, clientId=null, userId=null, ipAddress=192.168.99.1, error=invalid_tokenThis is a generic error and does not give any clue.I used SAML tracer with firefox and there I see the following request in RED:Here are the contents for this request from SAML tracer (but its not giving me any clue on what is wrong):Host: rashmiidp.cloud.com:9990User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*; q=0.8 Accept-Language: fr,en;q=0.8,nl-BE;q=0.7,es;q=0.5,es-ES;q=0.3,en-US;q=0.2 Accept-Encoding: gzip, deflateCookie: KEYCLOAK_SESSION=saml-demo/6d25a0c6-7bb8-4cfc-b918- e3384f9dfe72/1e3911dc-3237- 4aee-ba56-07de530e00f7; KC_RESTART= eyJhbGciOiJIUzI1NiJ9. eyJjcyI6ImI1M2QxOGJiLWQ3ODItND ZhNS04YjY5LWQxM2IxMDVhMTc4NSIs ImNpZCI6Imh0dHBzOi8vc2FtbC5zYW xlc2ZvcmNlLmNvbSIsInB0eSI6InNh bWwiLCJydXJpIjoiaHR0cHM6Ly9yYX NobWk3ODktZGV2LWVkLm15LnNhbGVz Zm9yY2UuY29tP3NvPTAwRDQxMDAwMD AwNUwxNCIsImFjdCI6IkFVVEhFTlRJ Q0FURSIsIm5vdGVzIjp7ImFjdGlvbl 9rZXkiOiJmNDBmYTJmYi01YTM0LTRm ZDQtYTc2NC0xZDI5NWVlZDFmODIiLC JSZWxheVN0YXRlIjoiLyIsIlNBTUxf UkVRVUVTVF9JRCI6Il8yQ0FBQUFWZE ZCal9tTUU4d05ERXdNREF3TURBMFF6 azJBQUFBeWszaE1mODBfdTJ5cGVpSX pjVWNkQUtJWUFkeF9vNmN2Y0ZoMTE4 QkcxWnFVRVQtREZJY29Wb1BqLUNheW ZFV2FHLXRCLUo3YXhHUEhGaWdWbmV3 MEREQUVlTTdJR21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2UOWrYeh0sA; testusergrid={} HTTP/?.? 500 Internal Server ErrorCache-Control: no-store, must-revalidate, max-age=0X-Powered-By: Undertow/1Server: WildFly/10X-Frame-Options: SAMEORIGINcontent-security-policy: frame-src 'self'Date: Tue, 23 Aug 2016 00:37:56 GMTConnection: keep-aliveX-Content-Type-Options: nosniffContent-Type: text/html;charset=utf-8Content-Length: 2906Does this give you any idea? Do you have any more suggestions?On Fri, Aug 19, 2016 at 7:52 AM, John Dennis <jdennis@redhat.com> wrote:On 08/18/2016 10:06 PM, Rashmi Singh wrote:
Hi,
I have setup a Salesforce Saml SP in keycloak. So, I basically created a
new client from keycloak admin console for salesforce. This is how my SP
url looks like:
rashmi789-dev-ed.my.salesforce.com
<http://rashmi789-dev-ed.my.salesforce.com >
I edited the salesforce configuration settings to point it to the
keycloak IDP. So, when I access the SP:
http://rashmi789-dev-ed.my.salesforce.com
I am successfully taken to the keycloak IDP page (where I have
configured my Authenticator). I enter my credentials there and am able
to login. But, now when I try to logout, I get the following error on
the web page:
We're sorry ...
Invalid Request
Is logout supported on both ends (i.e. SP and IdP)? The definition of support is in the metadata of each entity. Is there a SingleLogoutService binding with a valid location URL in each metadata? The vast majority of SAML problems are directly attributable to the metadata because that is what drives the conversation between the SP and IdP. You have access to both metadata because it was necessary to load the metadata in each party.
If the problem is not the absence of SingleLogoutService then I would try tracing the flow. That is easy with the Firefox browser and the SAMLTracer add-on. That will let you see the exchange of messages and identify who the offending party is.
So, single sign out does not seem to be working for me. What is the
issue? Is it a problem with the IDP logout url that I have configured?
What I have is:
http://rashmiidp.cloud.com:9990/auth/realms/saml-demo/protoc ol/saml
my IDP Login URL is:
http://rashmiidp.cloud.com:9990/auth/realms/saml-demo/protoc ol/saml
and that seem to be perfectly fine as I am able to login without any
issue. what is the issue with the logout I am seeing above when using a
Salesforce SP with keycloak? Please let me know if you need me to
provide more details.
This suggests the problem is not with the IdP. Keycloak uses the same URL for all services (don't assume this is always the case, it's just one implementation choice). If login to the same URL works a valid LogoutRequest to the same URL should also work, provided of course it a valid SAML Request. Are there any errors in the Keycloak log concerning invalid requests.
Once again. using SAMLTracer will help nail down who is generating the error and what the content of the message was that induced it.
Also, once this issue is resolved and I am able to logout successfully,
could you give some insights on how to customize the logout page?
_______________________________________________
keycloak-dev mailing list
keycloak-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-dev
--
John