How to check if the SAML Assertion Response from the IdP reaches the SP in Ping Federate? - saml-2.0

The SAML Response will be posted to the following url:
https://domain/sp/ACS.SAML2
But when I try to hit the url, I am not able to see the response.
Anything wrong in my approach?
Thanks & Regards,
Aswini J

A few things assuming you are setting up SAML 2.0 Web SSO Profile -
What do you mean you can't "see" the Response? Are you successfully logging into the IDP and having it redirect the Browser to the PF ACS URL?
With PingFederate, the application and protocol end-points are case sensitive. You should use http(s)://www.server.com:<PF runtime port>/sp/ACS.saml2. If you simply request this value from your browser with a GET request and no SAML data, PingFed will show you a generic error template page.
If you have successfully POST'd the SAMLResponse to the right endpoint, you will see the actual SAMLResponse logged in the /pingfederate/log/server.log.

Related

Username Get back to calling point after successful SAML authentication

I want to get the SAML response back to the calling service when I am calling using from other web API.
I want to further validate the user in database where I am struggling any hint?
Try various redirect options but not getting how to return back to the point from where I have left with the user details.
The IdP should redirect back to the endpoint configured in the IdP. Where you can do a new redirect to the returnUrl, please se the sample:
https://github.com/ITfoxtec/ITfoxtec.Identity.Saml2/blob/master/test/TestWebAppCore/Controllers/AuthController.cs#L31
https://github.com/ITfoxtec/ITfoxtec.Identity.Saml2/blob/master/test/TestWebAppCore/Controllers/AuthController.cs#L62

Processing saml signed response using idp meta data ? saml +adfs + idp

I am doing saml2.0 authentication as a service provider. after authenticating to my IP(identity provider) I am getting a response
like bellow
https://localhost:4200/map?SAMLResponse=pVRNj5swEP0riDvfkIDFIqXJJVK3u0pWe9hL5dhDQwUYecx2f35tKMmySmmrnvA8zbx5nnkmR9rUHTkAdqJFsPa7O%2fsrZEkcrCPmxFkcOXFaRk56iksnjJI0CU808GlgW88gsRLtnR26vm3tEXvYt6hoqzTkh4Hjp04QPgUJSRIS%2bO46SV9saweoqpaqofKsVIfE82rBaH0WqEgc%2br7X0M62tkaP4eplSwTFCklLG0CiGDlu7j8T3ZawMYn0LXbAqrICbltvTd0iGS62XN1JoQQTtV3kg3w5li4XUUSQRr5dGPlavenkNjXl6DZVy2vxrWIu7TqP8hI9nf1aMUBPyR5V7o2dinwc%2fFFR1eM82goO1jOte1hWgkM2OfZM06NteUXuzVk3k9ZxrzwrgzKJuZNR8J2Yw9rJIh3GdO2nCZyyVZT83SbXLx%2f3%2f2%2bT%2bzXv%2f5vgsT99B6YuB%2b2YspLN4C3rHtRZ8D%2b4pyEnoBKkfZNjRxW1vgj10D7ITalAzqexIr5%2f9fVB26%2brBsMuudrs6EarK1rkGueVAdE0%2fwSlkPC7Pax05yWF7%2fK0G3quBTLQj13Jio19J7CYVHN4%2fbAELTz3LnnX44zHu8o2pOrcGhNCoydiDeFNRwXED0icuqssGhXqRE2k4E3No22t3XOAslg0GCPM5Gn4UX9%2bCMkf9RPXUwX%2bJKn%2bRwipjP4bvHN4Ci93MMBk38szm%2f6axU8%3d&Signature=vY2pfmvhiy%2fhUmh1Gngn9WntOYU30sxjSU6JhSVLEWOVj6Y0bZM73eI6Ad%2fXRdOUwfqTx2vjtpVRqZJfe9I9%2fM0SkyQ90bGdHUpK%2bMdrrm6KuXoC1SR1MRZAV1ebRcKwlLOcK4KO39TC%2bQs0jVGtvBeO9w4ypPzWRp1OOFQybbd%2bE7Q7xj6DcRlhiyli5S5TfGnK%2f5D9nj3ZEiZWPjn9FFKVfAWpuqMyDPbeDibktl3jLmvih8B1mbOLx%2fRyQZe8Klx381BqZd7Bg8NzHoEvqRvdfrqEslnjZSuF5vCpSKFdKhZ7KQGazj66SnQbVUXB9UvT480tWlwjhwkraXY58Q%3d%3d&SigAlg=http%3a%2f%2fwww.w3.org%2f2001%2f04%2fxmldsig-more%23rsa-sha256 >>
Instead of xml response am getting like above and my question is how to process it ?
To see the response, plug the below into e.g. this.
pVRNj5swEP0riDvfkIDFIqXJJVK3u0pWe9hL5dhDQwUYecx2f35tKMmySmmrnvA8zbx5nnkmR9rUHTkAdqJFsPa7O%2fsrZEkcrCPmxFkcOXFaRk56iksnjJI0CU808GlgW88gsRLtnR26vm3tEXvYt6hoqzTkh4Hjp04QPgUJSRIS%2bO46SV9saweoqpaqofKsVIfE82rBaH0WqEgc%2br7X0M62tkaP4eplSwTFCklLG0CiGDlu7j8T3ZawMYn0LXbAqrICbltvTd0iGS62XN1JoQQTtV3kg3w5li4XUUSQRr5dGPlavenkNjXl6DZVy2vxrWIu7TqP8hI9nf1aMUBPyR5V7o2dinwc%2fFFR1eM82goO1jOte1hWgkM2OfZM06NteUXuzVk3k9ZxrzwrgzKJuZNR8J2Yw9rJIh3GdO2nCZyyVZT83SbXLx%2f3%2f2%2bT%2bzXv%2f5vgsT99B6YuB%2b2YspLN4C3rHtRZ8D%2b4pyEnoBKkfZNjRxW1vgj10D7ITalAzqexIr5%2f9fVB26%2brBsMuudrs6EarK1rkGueVAdE0%2fwSlkPC7Pax05yWF7%2fK0G3quBTLQj13Jio19J7CYVHN4%2fbAELTz3LnnX44zHu8o2pOrcGhNCoydiDeFNRwXED0icuqssGhXqRE2k4E3No22t3XOAslg0GCPM5Gn4UX9%2bCMkf9RPXUwX%2bJKn%2bRwipjP4bvHN4Ci93MMBk38szm%2f6axU8%3d
You'll see the response.
Programmatically, use a library e.g. this.

OKTA Logout SAML App

I have setup an Application that's is using OKTA as IDP. The app is SAML Based.This part is working fine.
But I am unable to log out. For this we have
1. Enabled Single Logout
2. Set the Single Log out URL (I received this from Metadata of IDP under header Identity Provider Single Logout URL)
3.Sp Issues (I received this from Metadata of IDP under header Identity Provider Issuer )
4. Signature Certificate (This is the certificate of IDP)
Now when I call the Logout URL I am receiving 403. On checking the Logs of OKTA I see the (User Single Sign out from App Failure:- Malformed Request)
Can any one please help me how to fix it.
I am assuming that I just need to call the logout URL and the session will kill off. Is my understanding correct?
Reviving a very old thread, check that you have a ?ReturnTo=<path> at the end of the logout URL.
Okta requires strictly post binding requests for logout. Please make sure you are making POST requests for logout and you are using correct entity Id in request.
I think the setting values below need to be set for sp side.
Set the Single Log out URL
Sp Issues
Signature Certificate
It is not on idp side.

SAML consumer URL

We are implementing SAML integration and I am the service provider and my identity provider is asking me to send "SAML Consumer URL" and "RelayState"
I would need help to understand what is SAML consumer URL & RelayState and how do I get/generate it for my application.
Thank you for your time and help!
TLDR, AssertionConsumerUrl (ACS) endpoint is SAML protocol endpoint, RelayState is like cross-domain cookie, used to coordinate messages and actions of IdPs and SPs.
In 5.1.Web Browser SSO Profile of SAML 2.0 Technical Review, it will give you a general understanding of how the flow goes.
Down to the SSO implementation, for example Shibboleth, this FlowAndConfig doc details the SSO flow pretty well.
In 2. SP Determines IdP and Issues Authentication Request:
Cookie Set by SP
During this step, the SP will preserve the original
resource requested by the browser using a "relay state" mechanism,
which is configured by a relayState property on the <SessionInitiator>
element. The default mechanism does not rely on a cookie any longer,
but many systems do, and send a state management cookie containing the
resource URL to the client along with the request prepared for the IdP
or DS/WAYF.
In 5. Back to the SP:
The browser delivers the response from the IdP to an Assertion Consumer Service endpoint at the SP.
relay state info returned from IdP to SP
Cookie Read by SP
The "relay state" information returned by the IdP, if any, will have
been created by the SP and if using a cookie, will point to a
specially named cookie that should accompany the authentication
response supplied to the ACS endpoint in this step. This is the cookie
set in Step 2 above. If this cookie is missing (or if no relay state
exists at all), the associated application's homeURL property is
substituted as a fall back.
Also, Shibboleth has some wiki for those two terms as well.
AssertionConsumerService concept
RelayState concept
Hope it helps!

Can you use Okta REST API to login a user and get SAML2 response back

We have a successful implementation of SSO with Okta as the IdP and an external PHP site as a SP. We are currently utilizing the Okta Sign On Widget which sends our PHP SP a SAML2 Token.
Question is, can we now change from the widget to the API and still get the SAML 2 token on successful login via the API?
So, Since posting this I figured out that - 'yes you can'. I don't know if this is the cleanest/best way but it works and here is how to do it in case anyone else gets stuck looking into this issue...
Already having SAML2 communication working between Okta as IdP and
PHP site as SP.
Create an API access token in Okta.
Use the access token to post a request for a one-time use token from
the API for a specific user you want to login as:
http://developer.okta.com/docs/api/resources/sessions.html
Redirect the user with the retrieved one-time session token to your
App's embed link with the one-time session token:
http://developer.okta.com/docs/examples/session_cookie.html#retrieving-a-session-cookie-by-visiting-an-application-embed-link
This will log the user into Okta to get a proper session we can then
use to send to our PHP end-point to get the SAML2 token we want but
while utilizing the full customization benefits of the API.

Resources