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-e3384f9df e72/1e3911dc-3237-4aee-ba56- 07de530e00f7; KC_RESTART=eyJhbGciOiJIUzI1NiJ 9.eyJjcyI6ImI1M2QxOGJiLWQ3ODIt NDZhNS04YjY5LWQxM2IxMDVhMTc4NS IsImNpZCI6Imh0dHBzOi8vc2FtbC5z YWxlc2ZvcmNlLmNvbSIsInB0eSI6In NhbWwiLCJydXJpIjoiaHR0cHM6Ly9y YXNobWk3ODktZGV2LWVkLm15LnNhbG VzZm9yY2UuY29tP3NvPTAwRDQxMDAw MDAwNUwxNCIsImFjdCI6IkFVVEhFTl RJQ0FURSIsIm5vdGVzIjp7ImFjdGlv bl9rZXkiOiJmNDBmYTJmYi01YTM0LT RmZDQtYTc2NC0xZDI5NWVlZDFmODIi LCJSZWxheVN0YXRlIjoiLyIsIlNBTU xfUkVRVUVTVF9JRCI6Il8yQ0FBQUFW ZEZCal9tTUU4d05ERXdNREF3TURBMF F6azJBQUFBeWszaE1mODBfdTJ5cGVp SXpjVWNkQUtJWUFkeF9vNmN2Y0ZoMT E4QkcxWnFVRVQtREZJY29Wb1BqLUNh eWZFV2FHLXRCLUo3YXhHUEhGaWdWbm V3MEREQUVlTTdJR21KcURuMmpU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ergrid={} 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 Mon, Aug 22, 2016 at 7:54 PM, Rashmi Singh <singhrasster@gmail.com> wrote: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-e3384f9df e72/1e3911dc-3237-4aee-ba56- 07de530e00f7; KC_RESTART=eyJhbGciOiJIUzI1NiJ 9.eyJjcyI6ImI1M2QxOGJiLWQ3ODIt NDZhNS04YjY5LWQxM2IxMDVhMTc4NS IsImNpZCI6Imh0dHBzOi8vc2FtbC5z YWxlc2ZvcmNlLmNvbSIsInB0eSI6In NhbWwiLCJydXJpIjoiaHR0cHM6Ly9y YXNobWk3ODktZGV2LWVkLm15LnNhbG VzZm9yY2UuY29tP3NvPTAwRDQxMDAw MDAwNUwxNCIsImFjdCI6IkFVVEhFTl RJQ0FURSIsIm5vdGVzIjp7ImFjdGlv bl9rZXkiOiJmNDBmYTJmYi01YTM0LT RmZDQt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wYaZ0ySxm-l-gUsCkveVzTPRM S98ekuTMlc-1fPI4h1tCRrVawW5zOg H7zc-a03KK0WZJ6b3iuU49PGsDXmei Nb6aqG-BIrmSkfsjfXr4zB69PcY0EF 3sse0jlOkZXYBcmbH46b_fWm-p4hpy t6QnGvxanKOc2jtavkUPSo5UrQxmQ3 -ahfxqZOFAvRbeHys5RdUUHs5BBefj kE4p8teCeG0nNzpgJfgPHgMNsnjELr TSafTcq1AM-yV2UOWrYeh0sA; 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