[keycloak-user] [External] Re: IDP SAML Processing Error

Yildirim, Suleyman suleyman.yildirim at accenture.com
Fri Aug 17 09:57:43 EDT 2018


Thanks a lot Dmitry,

It works! When I use my application link, I can successfully get SAML response from MS ADFS and redirected to application back. Use case is as below. 

However, my client wanted to test directly on their MS ADFS using their url (https://client_adfs_link/adfs/ls/idpinitiatedsignon.aspx). I think it is IDP initiated SSO. He wrote his credentials on login page of MS ADFS clicked sign in. I am redirected to Keycloak IDP https://myapplication/auth/realms/springboot-quickstart/broker/myIDPAlias/endpoint and get the Internal Server Error again but with different error (attached file). I wonder if I need to change any Keycloak settings to enable that. 

Use case: 
1.	The user visits the http://myapplication:8443 application.
2.	https-client(open_id) finds the user is not authenticated and generates an XML authentication request document. It is redirected to the Keycloak Identity Provider, of which Single Sign-On Service URL is configured as https://client_adfs/adfs/ls/
3.	The ADFS server extracts the XML auth request document and verifies the signature. Then, user is redirected to the SAML client in Keycloak server. 
4.	The user enters the credentials to be authenticated.
5.	After authentication, the Identity Provider generates an XML authentication response document, which contains a SAML assertion that holds metadata about the user like name and email. User is redirected to the http://myapplication:8443 application.

Regards,
Suleyman

-----Original Message-----
From: Dmitry Telegin <dt at acutus.pro> 
Sent: 17 August 2018 00:49
To: Yildirim, Suleyman <suleyman.yildirim at accenture.com>; keycloak-user at lists.jboss.org
Subject: [External] Re: [keycloak-user] IDP SAML Processing Error

Hi Suleyman,

You're right, the contents of the Validating X509 Certificates box is invalid, your stacktrace tells that unambiguously. The field is pre- populated once you import FederationMetadata.xml, and you shouldn't change it afterwards.

To avoid recreating the whole IdP, open your FederationMetadata.xml, find the <ds:X509Certificate> element and copy its value to the box verbatim.

Good luck!
Dmitry Telegin
CTO, Acutus s.r.o.
Keycloak Consulting and Training

Pod lipami street 339/52, 130 00 Prague 3, Czech Republic
+42 (022) 888-30-71
E-mail: info at acutus.pro

On Thu, 2018-08-16 at 17:19 +0000, Yildirim, Suleyman wrote:
> Hi,
> 
> I have a "Uncaught server error: org.keycloak.broker.provider.IdentityBrokerException: Could not process response from SAML identity provider" when get response from MS ADFS server. The route cause of the error is Caused by: java.io.IOException: Short read of DER length. So I suspect that Validating X509 Certificates input box doesn't work as expected in Keycloak: "Certificates must be in PEM format and multiple certificates can be entered by comma (,) ". I have to use Public key and the certificates of the realm separated by comma but I get 500 - Internal Server Error from MS ADFS server and the  error in Keycloak (Attached file: IDP_error.txt). If I only use realm certificate, I get invalid requester error. Any idea of how I can proceed?
> 
> Details
> 
> When I use dummy IDP of Keycloak server, I use https://urldefense.proofpoint.com/v2/url?u=https-3A__myapplicationurl_auth_realms_springboot-2Dquickstart_protocol_saml&d=DwIDaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=W6co1eMBjqBh4emCmcok5fidBI1eOf715bxeMRmm3-g&m=-8fNnCezquRNyr7Io0tF57v6RXFvwaZ-DKyKnOYEQyo&s=x6wk6gvgqtVRyOfMPb1wegC1CZGmu21auzX3iFU-85g&e= as SSO url, "email" as "NameID Policy Format" (Attached file: dummyIDPSettings.png). As for real ADFS integration, I setup everything according to that blog https://urldefense.proofpoint.com/v2/url?u=http-3A__blog.keycloak.org_2017_03_how-2Dto-2Dsetup-2Dms-2Dad-2Dfs-2D30-2Das-2Dbrokered.html&d=DwIDaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=W6co1eMBjqBh4emCmcok5fidBI1eOf715bxeMRmm3-g&m=-8fNnCezquRNyr7Io0tF57v6RXFvwaZ-DKyKnOYEQyo&s=X9S93qI_kOVUhIWAq4qzd6DkJBfFb5lVIIiFzin9ixg&e= and use the client's SSO url (Attached file: ADFSIDPSettings.png). I think I did everything right. Keycloak endpoints, SSL keystore and truststore files are at the right locations and places.
> 
> Regards,
> Suleyman
> 
> 
> ________________________________
> 
> This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. Your privacy is important to us. Accenture uses your personal data only in compliance with data protection laws. For further information on how Accenture processes your personal data, please see our privacy statement at https://www.accenture.com/us-en/privacy-policy.
> ______________________________________________________________________
> ________________
> 
> www.accenture.com
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.jboss.org_m
> ailman_listinfo_keycloak-2Duser&d=DwIDaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8n
> OHrUK8IrwNKOtkVU&r=W6co1eMBjqBh4emCmcok5fidBI1eOf715bxeMRmm3-g&m=-8fNn
> CezquRNyr7Io0tF57v6RXFvwaZ-DKyKnOYEQyo&s=WX8gpk0AMQYxSW_IQGR_SxG69Wocm
> nmEIzqruzVr9Gg&e=
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: idpinitiatedsso.txt
Url: http://lists.jboss.org/pipermail/keycloak-user/attachments/20180817/ba4c066f/attachment-0001.txt 


More information about the keycloak-user mailing list