Symantec Access Management

Expand all | Collapse all

How to generate SAML AuthnRequest at Siteminder SP end

  • 1.  How to generate SAML AuthnRequest at Siteminder SP end

    Posted Apr 24, 2014 09:17 AM

    Hi All,

    I have created a federation setup and I am trying to act as siteminder service provider. For this, I have created SAML 2.0 AuthScheme wherein I have mentioned target URL ( protected in domain with SAML 2.0 AuthScheme). I have also mentioned IDP SSO Url as well in AuthScheme. Other details like IDPID and SPID have also been configured.

    My setup works where I initiate the journey from IDP end, creation smsession and post the assertion to siteminder assertion service url "https://dns/affwebservices/public/saml2assertionconsumer" and assertion is validated through saml authscheme. This setup works fine.

    For SP initated setup, I am accessing the url "http://SP-DNS/test.html" page which I think should generate an AuthnRequest and send it to IDP SSO URL for initial login. However, upon accessing I get 500 server error.

    I want to understand what all configurations are required for Siteminder SP to generated AuthnRequest and send it to IDP. Do we have to hard code sometihng for "saml2authreqeust" service to initiate? I found an article on CA blog which explains hard-coding the links but not very sure about this.

    https://comm.support.ca.com/?legacyid=TEC533388

    Would anyone be able to help me here please?

    Regards,
    Neeraj Tati <neeraj.tati@bt.com>

     



  • 2.  RE: [CA SiteMinder General Discussion] How to generate SAML AuthnRequest at

    Broadcom Employee
    Posted Apr 24, 2014 12:28 PM
    Hello Neeraj,

    Few key concepts to keep in mind are:

    1) saml2assertionconsumer service is only responsible for consuming the assertion and does not handle the AuthNRequest or the SP initiated request.
    2) For starting SP initiated request from SiteMinder Federation SP, you would need to use the SAML2AuthNRequest service.
    3) Clicking the SAMl 2.0 authscheme protected TARGET URL would not generate or start SP initiated transaction and a 500 error is expected in this case
    4) In your use case you need to kick off the SP initiated transaction with an URL like this: http://SP-DNS/affwebservcies/public/saml2authnrequest?ProviderID=<use<http://SP-DNS/affwebservcies/public/saml2authnrequest?ProviderID=%3cuse> yourIDPID>&RelayState=<URL encoded value of your TARGET>

    From the bookshelf:


    Specifies the target at the Service Provider. You can use the RelayState query parameter to indicate the target destination; however, this method is optional because there may be a configuration mechanism at the Service Provider itself to indicate the target.

    You should URL-encode the RelayState value.

    Example

    http://ca.sp.com:90/affwebservices/public/saml2authnrequest?ProviderID=http%3A%2F%2Ffedsrv.acme.com%2Fsmidp2for90&RelayState=http%3A%2F%2Fwww.spdemo.com%2Fapps%2Fapp.jsp


    Hope this helps.

    Thanks & Regards,
    ------ Manjari

    From: CA Security Global User CommunityMessage Boards [mailto:CommunityAdmin@communities-mail.ca.com]
    Sent: Thursday, April 24, 2014 8:17 AM
    To: mb_message.2253364.114122668@myca-email.ca.com
    Subject: [CA SiteMinder General Discussion] How to generate SAML AuthnRequest at Siteminder SP end


    Hi All,

    I have created a federation setup and I am trying to act as siteminder service provider. For this, I have created SAML 2.0 AuthScheme wherein I have mentioned target URL ( protected in domain with SAML 2.0 AuthScheme). I have also mentioned IDP SSO Url as well in AuthScheme. Other details like IDPID and SPID have also been configured.

    My setup works where I initiate the journey from IDP end, creation smsession and post the assertion to siteminder assertion service url "https://dns/affwebservices/public/saml2assertionconsumer" and assertion is validated through saml authscheme. This setup works fine.

    For SP initated setup, I am accessing the url "http://SP-DNS/test.html" page which I think should generate an AuthnRequest and send it to IDP SSO URL for initial login. However, upon accessing I get 500 server error.

    I want to understand what all configurations are required for Siteminder SP to generated AuthnRequest and send it to IDP. Do we have to hard code sometihng for "saml2authreqeust" service to initiate? I found an article on CA blog which explains hard-coding the links but not very sure about this.

    https://comm.support.ca.com/?legacyid=TEC533388

    Would anyone be able to help me here please?

    Regards,
    Neeraj Tati <neeraj.tati@bt.com<mailto:neeraj.tati@bt.com>>


    Posted by:b55
    --
    CA Communities Message Boards
    114125208
    mb_message.2253364.114122668@myca-email.ca.com<mailto:mb_message.2253364.114122668@myca-email.ca.com>
    https://communities.ca.com


  • 3.  RE: [CA SiteMinder General Discussion] How to generate SAML AuthnRequest at

    Posted Apr 29, 2014 03:13 PM
    Hi Manjari, Thanks for the detailed explanation. I can see authnrequest is getting generated for me which redirects the user to IDP end. User is authenticated at IDP end and assertion is posted back to siteminder assertion consumer service. I want to understand more about target parameter in auth scheme.Have few queries: 1. Is it mandatory for target parameter to be protected with SAML auth scheme. 2. Once assertion is consumed at SP end and user is redirected to a target Url having siteminder agent. Should that agent create a new SMSESSION for SP end session management? 3. Do we do any additional configuration for the webagent protecting the target Url with saml authscheme to generate SMSESSION at SP end? 4. Is the agent treated as affiliate agent if it protects the target Url with SAML authscheme? Any confugurations spectic to affiliate agent? I have all these questions because I have tested two scenarios. 1. I generate an authnrequest and post assertion validation redirect to target url protected with saml authscheme, redirection fails because agent on target Url does not find any smsession. 2. If I repeat the same test in a way that I generate smsession for the domain in which target Url is present and test the journey, redirection happens becoz agent found smsession in the browser. Can you please review my post and help me with the concepts so that I can implement it. :) Thanks for your help. Regards, Neeraj.


  • 4.  RE: [CA SiteMinder General Discussion] RE: [CA SiteMinder General Discussio

    Broadcom Employee
    Posted Apr 29, 2014 04:12 PM
    Hello Neeraj,

    My answers are as below:

    1. Is it mandatory for target parameter to be protected with SAML auth scheme.

    --->TARGET is required to be protected with SAML auth-scheme in the Legacy Federation. If you use the Partnership Model this detail is hidden.

    2. Once assertion is consumed at SP end and user is redirected to a target Url having siteminder agent. Should that agent create a new SMSESSION for SP end session management?
    ---> During the process of Assertion Consumption, SAML auth-scheme is invoked or rather SAML auth-scheme facilitates the SAML assertion consumption. Yes, SMSESSION would be set for the SP domain after asseetion is successfully consumed at the SP.

    3. Do we do any additional configuration for the webagent protecting the target Url with saml authscheme to generate SMSESSION at SP end?
    ----->SAML auth-scheme conifg is the main config step at the SP side. You could also consider and use partnership model since what we are discussing here is Legacy Federation and as of r12.5 version onwards, we do have partnership model of Federation config available.

    4. Is the agent treated as affiliate agent if it protects the target Url with SAML authscheme? ---> Nope, it’s any regular Web Agent
    Any confugurations spectic to affiliate agent? --->Affiliate Agent is EOS now, so not sure if you still have it and if so just know Affiliate Agent only supports and works with SAML 1.0 Artifact Binding
    I have all these questions because I have tested two scenarios.

    1. I generate an authnrequest and post assertion validation redirect to target url protected with saml authscheme, redirection fails because agent on target Url does not find any smsession.
    ---> hmmm, yes that is something I would suggest to be followed through a support ticket and please provide fiddler traces, WA traces, FWS traces ald the Wa log and affwebserv log upfront to showcase the problem. There must be either SMSESSION not being returned by the browser for seom reason or possibly set for a different domain.

    2. If I repeat the same test in a way that I generate smsession for the domain in which target Url is present and test the journey, redirection happens becoz agent found smsession in the browser.
    ---> What is the TARGET domain and domain of the FWS/WAOP?


    Thanks & Regards,
    ------ Manjari

    From: CA Security Global User CommunityMessage Boards [mailto:CommunityAdmin@communities-mail.ca.com]
    Sent: Tuesday, April 29, 2014 2:14 PM
    To: mb_message.2253364.114703691@myca-email.ca.com
    Subject: [CA SiteMinder General Discussion] RE: [CA SiteMinder General Discussion] How to generate SAML AuthnRequest at

    Hi Manjari, Thanks for the detailed explanation. I can see authnrequest is getting generated for me which redirects the user to IDP end. User is authenticated at IDP end and assertion is posted back to siteminder assertion consumer service. I want to understand more about target parameter in auth scheme.Have few queries: 1. Is it mandatory for target parameter to be protected with SAML auth scheme. 2. Once assertion is consumed at SP end and user is redirected to a target Url having siteminder agent. Should that agent create a new SMSESSION for SP end session management? 3. Do we do any additional configuration for the webagent protecting the target Url with saml authscheme to generate SMSESSION at SP end? 4. Is the agent treated as affiliate agent if it protects the target Url with SAML authscheme? Any confugurations spectic to affiliate agent? I have all these questions because I have tested two scenarios. 1. I generate an authnrequest and post assertion validation redirect to target url protected with saml authscheme, redirection fails because agent on target Url does not find any smsession. 2. If I repeat the same test in a way that I generate smsession for the domain in which target Url is present and test the journey, redirection happens becoz agent found smsession in the browser. Can you please review my post and help me with the concepts so that I can implement it. :) Thanks for your help. Regards, Neeraj. Posted by:b55
    --
    CA Communities Message Boards
    114706231
    mb_message.2253364.114703691@myca-email.ca.com<mailto:mb_message.2253364.114703691@myca-email.ca.com>
    https://communities.ca.com


  • 5.  Re: How to generate SAML AuthnRequest at Siteminder SP end

    Posted Mar 22, 2015 01:09 PM

    Hi,

     

    We have a similar setup where we want to configure SP initiated SSO. IDP works fine. The problem is once the user reaches idle timeout session and tries to log back in, they are being directed to the page specified in the target which is the landing page of the application. The users now want to have deep link facility and want to end up in the page they clicked on the SP side. In our configuration, we have an internal resource protected by form authentication and the target page is an ASP redirect to the internal application protected by SAML 2.0 authentication. Can you please let me know what we would need to specify in the target section of SAML 2.0 auth settings for SP initiated SSO to work? I tried with selecting Relay State overrides target but it does not seem to work.

     

    Any help is highly appreciated.



  • 6.  Re: How to generate SAML AuthnRequest at Siteminder SP end

    Posted Mar 23, 2015 12:08 PM

    pbiswas

     

    Could you elaborate this statement with an example please (I tried with selecting RelayState overrides target but it does not seem to work)?

     

    Using RelayState overrides Target is the only way by which we could redirect User's request to desired Target URLs. Especially if you'd want to send the user off to the same location from where his re-authentication journey was triggered (due to Session Timeout).

     

    The TARGET defined within SAML 2.0 Authentication Settings is a single (default) TARGET URL. Cannot specify multiple TARGET in this field that is provided in the UI. Therefore we use RelayState Overrides Target setting in SAML 2.0 Authentication Scheme and ensure that when SAML 2.0 AuthnRequest URL is constructed on SP Side, we embedded a Query Parameter as "RelayState=************" to the SAML 2.0 AuthnRequest.

     

    The RelayState=xxxxxxxxxx can be any arbitrary value OR a URL, which the SP Side end application understands; then takes necessary action to route the Users request to desired location.

     

    Capture.JPG

     

     

    Regards

     

    Hubert



  • 7.  Re: How to generate SAML AuthnRequest at Siteminder SP end

    Posted Mar 23, 2015 12:22 PM

    Hi Hubert,

     

    Now it makes sense. Please ignore my previous statement.. I have not made a SAML 2.0 AuthnRequest URL at the SP end. Where do I make this and what do I specify? Can you kindly let me know with an example?

     

    my federation server: https://federation.xyz.com

    Service Provider: abc

     

     

    Thanks again



  • 8.  Re: How to generate SAML AuthnRequest at Siteminder SP end

    Posted Mar 23, 2015 01:34 PM

    pbiswas

     

    Here's what I don't know about your environment? What is used on SP Side, is it CA Single Sign On or any other SAML compliant toolkit / product?

     

    Irrespective of the whatever is present on SP Side the Application would need to generate / build the SAML AuthnRequest URL and send it to the SAML Compliant toolkit / product on SP Side to invoke a AuthnRequest to be issued to IdP.

     

    Assuming it is CA Single Sign On on SP Side. The Application would need to build URL to call the SAML AuthnRequest Service hosted by CA Single Sign On.

    Example : https://abc.sp.com/affwebservices/public/saml2authnrequest?ProviderID=xyz.com&RelayState=*********************

     

    This would now allow the SAML2 AuthnRequest Service hosted on CA Single Sign On (SP Side) to generate / issue an authnrequest to IdP with RelayState as query parameter (Assuming Redirect binding was used issuance of AuthnRequest to IdP).

     

    The IdP would challenge / authentication the User and return a SAML Assertion with RelayState (as it is, as it received from SP). Now SP CA Single Sign on would validate the Assertion and post successful disambiguation of User, would issue a redirect to whatever location is defined in RelayState.

     

     

    Regards

     

    Hubert



  • 9.  Re: How to generate SAML AuthnRequest at Siteminder SP end

    Posted Mar 23, 2015 01:51 PM

    Hi Hubert,

     

    Both IDP and SP side is SiteMinder/CA Single Sign On. I am the service provider (SP) here. The end application is just a classic asp application protected by SiteMinder. Should I just create a static unprotected page with the URL format you sent and have the IDP users hit the page to check if the authnrequest is being generated? Here is more information on the config

     

    SP Side

     

    Federation URL: https://federation.xyz.com/affwebservices/public/saml2authnrequest

    ProviderID = IDP id = xyz.com

    Application URL (End Application) protected by SiteMinder Realm: https://internalapp.xyz.com

     

    I have generated the following URL https://federation.xyz.com/affwebservices/public/saml2authnrequest?ProviderID=xyz.com&RelayState=https%3A%2F%2Finternalapp.xyz.com and am using this as a link in a static unprotected page.

     

    Would this work?



  • 10.  Re: How to generate SAML AuthnRequest at Siteminder SP end
    Best Answer

    Posted Mar 23, 2015 02:00 PM

    Yes it would work, as long as https://federation.xyz.com is SP Side WAOP URL.

     

    Am getting confused by your ProviderID i.e. xyz.com? Is that the IdP ID for IdP; I thought xyz.com was SP based on your federation URL on SP Side. Just a word of caution to use correct nomenclatures to identify correct IdP IDs and SP IDs.

     

     

    Regards

     

    Hubert



  • 11.  Re: How to generate SAML AuthnRequest at Siteminder SP end

    Posted Mar 23, 2015 02:03 PM

    Ah sorry!!! My bad. It should be the IDP id = idp.com. Here is the new Config and thank you for your quick response and guidance.

     

    SP Side

     

    Federation URL: https://federation.xyz.com/affwebservices/public/saml2authnrequest

    ProviderID = IDP id = idp.com

    Application URL (End Application) protected by SiteMinder Realm: https://internalapp.xyz.com

     

    SP Initiated SSOURL

     

    https://federation.xyz.com/affwebservices/public/saml2authnrequest?ProviderID=idp.com&RelayState=https%3A%2F%2Finternalapp.xyz.com



  • 12.  Re: How to generate SAML AuthnRequest at Siteminder SP end

    Posted Apr 14, 2015 02:43 PM

    Hi Hubert,

     

    So far SP initiated SSO works fine. However, here is what the users are complaining about. Suppose if they were working on a link inside the application and then there was an idle timeout, when they log back in they dont get to that link and instead lands up in the dashboard of the application. I have RelayState specified as RelayState=https%3A%2F%2Finternalapp.xyz.com which when accessed separately in a browser lands up on the dashboard of the app. How do I get the users to land to the page they were working on? Do I need to generate RelayState dynamically?Is that possible? Can you kindly help?



  • 13.  Re: How to generate SAML AuthnRequest at Siteminder SP end

    Posted Apr 15, 2015 08:54 AM

    pbiswas

     

    Kindly open a new thread for a new query, as it keeps the records cleans and easier for wider peers in the community to search incase they have the same issues.

     

     

    Having said that, you have the following options (However note this is beyond the remits of CA Single Sign On).

     

    Option-1 : Using a Page Indicator on Application Pages. Then when building RelayState, append that to Relay State. This would helps the application code detect where exactly the user need to be redirected to using page-1. If no page id then defaults to dashboard. This approach only can be used for routing. We cannot use this to preserve any application level data.

    Example : RelayState=https://internalapp.xyz.com/?pageid-1.

     

    Option-2 : Use a secure encrypted cookie. Encrypt the landing URL and data on page in a secure application cookie before issuing a SAMLAuthnRequest. This cookie could be decrypted only by the application. Then once the request returns to dashboard page, decrypt the cookie and pull the URL + Data out. The redirect user to correct page. If cookie does not exist OR has been tampered. Then defaults to dashboard page.

     

     

    Hence these are application level solution. Therefore application owners need to best adjudicate the solution after considering the security risk and what inputs to be considered (i.e. only URL or URL + Data).

     

     

     

    Regards

     

    Hubert



  • 14.  Re: How to generate SAML AuthnRequest at Siteminder SP end

    Posted Apr 15, 2015 09:16 AM

    Sorry about that. I will post any new questions on a new thread. Thanks for the detailed information



  • 15.  Re: How to generate SAML AuthnRequest at Siteminder SP end

    Posted Jun 21, 2017 06:21 PM

    I don't know if it helps. In my case, when I got this error, the SP signing certificate was CA Signed.

     

    I didn't have this intermediate CA Signing cert. So it was throwing this error.