IBM Verify

IBM Verify

Join this online user group to communicate across Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Sending lang=ar in HTTP Request to IDP

  • 1.  Sending lang=ar in HTTP Request to IDP

    Posted 12/12/19 12:34 AM
    Hi,

    ISAM is service Provider. IDP has English and Arabic Login Pages.

    IDP team requirement is to send the lang=ar in HTTP request so that they can display the login page in that language.


    thanks,
    rahil

    ------------------------------
    Rahil Anwar
    ------------------------------


  • 2.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 12/12/19 03:00 AM
    Hi Rahil,

    A few questions:
      1) What SSO Protocol (I assume SAML 2.0)?
      2) How is SSO request sent to IdP?  HTTP Request, HTTP Post?
      3) Is the SSO request signed?
      4) Where does the IdP want to receive the lang=ar information?  HTTP Header, Query String, some specific part of SSO Request message?

    Thanks... Jon.

    ------------------------------
    Jon Harry
    Consulting IT Security Specialist
    IBM
    ------------------------------



  • 3.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 12/15/19 04:38 AM
    Hi Jon,

    Firstly thanks a bunch for your response.

    1) What SSO Protocol (I assume SAML 2.0)?
    Rahil: Yes, its SAML 2.0
      2) How is SSO request sent to IdP?  HTTP Request, HTTP Post?
    Rahil:  The end user accessing link contains RequestBinding=HTTPPost ; where as in Federation definition under IDP its redirect 
      3) Is the SSO request signed?
    Rahil: Require outgoing SAML authentication requests to be signed. Its checked
      4) Where does the IdP want to receive the lang=ar information?  HTTP Header, Query String, some specific part of SSO Request message?
    Rahil: 

    The language consistency will be maintained during the authentication. "lang" HTTP attribute will be sent from the service provider to IAM as part of the Authentication Request (as additional parameter). The SAML2 response is sent from IAM back to the service provider including the "lang" as SAML2 attribute.

    Here ISAM Is service provider. 

    Thanks,
    Rahil



    ------------------------------
    Rahil Anwar
    ------------------------------



  • 4.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 12/16/19 02:23 AM
    Hi Jon,

    Good morning,

    I have an update. Tried to insert/send the lang using SAML Extension still users are getting Login page in English. mean, IDP is not designed or ready to accept in SAML Authentication Request.

    The remaining two ways either Query or HTTP Header.

    I tried below

    While we define the IDP as partner in ISAM SP under SAML Partner definition --> Single Sign On Setting section appended ?lang=ar

    binding : redirect
    URL: https://idp/samlsso?lang=ar

    IDP Is displaying the login page in arabic -->User enters creds --> But users destination/target app is not displayed. Checked with IDP team and understood IDP is rejecting. The lang=ar should be at the end of the destination url. 

    From SAML Tracer below non working (Where ISAM is SP) case SAML Req
    https://idp/samlsso?lang=ar&SAMLRequest=lZNdb5swFIb%2FCvI9H0Zr1ljARJtWi9RuLEl7sZvKwCG1ZGzmY5L239cmW5PuItPu0OE55%2F2QnCHv5cDK0T6rFfwaAW3w0kuFzP%2FIyWgU0xwFMsV7QGYbti7v71gaJYwjgrFCK3KyMpzfGYy2utGSBOWf7WutcOzBrMHsRAMPq7ucPFs7IItjcMzOOlNR32C01bsIeSycTowDxm6GQ%2BxV0ySWeiuck4WDheL%2B8PHMfr%2BPBO%2F9sqcR9RfJ1TbnhgS32jQw5c9JxyUCCZaLnNwu71c3P57ay7Tu6EWY0FkX0k9dG9bzWR1eUprO6zlA2iWOx8p1IXZwvIA4wlKh5crmJE3oPKRpSGeb5DNLKKPJTxJUv6u4EqoVzszZ3uoDhOzrZlOF1ff1hgSPYHCK6QBSZD4Zm4SND9Vze%2F6kn4g27CaUgbLCvpLi%2F5vP4hPlg42B3bxYUN4dFpmvuuAmi6ePA%2F6ROEy%2BOUPLRaWlaF6DUkq9vzbA7bHVf6WiEf07Vc%2BFLNvWACJ5lz4Veh%2BePoHiDQ%3D%3D&RelayState=uuidd82bf12-016f-1d78-80d2-81129b9ee2f0&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=mfdCzKjw7idVkYHnFGAZWIfnncaXGnneOBe%2FURbRS9fSAyoBu5BuGhEI%2FVIv1nk2bMetXhxEZwev2H3QXpkX55V9ChWEWt1TrpwVVC3d3sdXqZAUU65tmBDhyZTgZKRjBd0u6vOPHbLgz36YkeKkOf5ElyjY%2F4Dg2jtorYdMAVJ%2BT3YxzhDPyQcIcvCZXnRqab8aaJ9DydppNBaGOT997K%2FrLZAFaay%2B39UQWkwgyYlItQ6jJQend8Vz%2B3yyt2vcR8jEeB%2FNkn480uQYIpFgrtaO%2BAqehruA2RaOsDmzLSRWP5Zpj%2B71Fg5xI515usydXqDhnLL3q6q%2Bb6RVEhys8g%3D%3D

    Spoke with IDP team by taking a reference of working case (other SP) and understood the way they want is to lang=ar should be appending at last as in below from working SP

    https://idp/samlsso?SAMLRequest=fVLbSgMxEH0X%2FIeQ9%2B6l6mpDWygtQsEbXfXBt5hMNbBJ1sysq39vst4qSMlDYHLOyZkzM0Vpm3ErFh09uw28dIDE3mzjUHy%2BzHgXnPASDQonLaAgJerF5YUYZ4VogyevfMN3OfspEhECGe84W69m3OiyqEqtj4qJPn48VpPTid5CVZ2V2yoeXQFn9xAwEmY88iMLsYO1Q5KOYqkoJ6NyPCqr2%2BJUFIU4OnngbBXbME7SwHomalHked%2F3mZE2Q5knn4ies8W3m6V32FkINYRXo%2BBuc%2FFLjEiKgplVmD351yRQ19e3qVQbgjyF98XDfKGQzw8PGJsOYYjBbpgnrX%2Blpvkf3C%2BzFVcxvPXqxjdGvbNzH6yk%2FdmmitGj7QAVbYoNCRzFPpvG98sAkmDGKXQx1fzPX1%2BzBz1sQkyD4I3Y0ttWBoMpRmucsZ39bO6nvV34sonD3cB2vnf%2BSqiEi%2BWbePU%2B6O8I%2FtUaTOb7XEbID2B3j%2Bcf&RelayState=4HJJpMAHJeueSnTMBVnXbQOgfD40Iflm7Pw634vjLS3ixC30iiyn0KSU&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=TBpNF9ogK0ttQDG%2BbKAxwDfZhiYhycCK7zZBsKmhwo%2Bf7SMJKn%2FXufzHaqtAsV5TvI0TUs3ac7TPOP9%2FUvbRB3xc3V7vYh6Dl7xOXhYWAAgGefQuk8KBsm6iUke%2BGGe2ahYRPEFZA5wvQXyO23kYmGYzZeZauQeToBMfNh7%2BzjQJ0ud6waarmokXFVoD9xMrVfg0GrgugmP2217SUt7G5Fy7WAQFgyRJjiat%2Byliqe7VQzEwkh4u0IHvkb7YcpQh%2FKn5FpvoB3tRpkIMSYHpAI7r2TseK4aoQAgJphTd4m0Yf3MWhVzIjqCsZ5DxjvouxC3pZ1pQNAMF%2FeO7xt%2BP%2BA%3D%3D&lang=ar


    Can you please provide me the way to supply this 


    Thank,
    Rahil

    ------------------------------
    Rahil Anwar
    ------------------------------



  • 5.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 12/16/19 05:46 AM
    Edited by Jon Harry 12/16/19 09:29 AM
    Hi Rahil,

    It seems strange that IdP would require Query String attributes in a particular order - but I assume they are not willing to be more flexible.

    I can think of two approaches:

    1) Use an HTTP Transformation Rule to modify the "Location" header of the 302 redirect generated by Federated Runtime.  It should be pretty simple to add fixed string "&lang=ar" to the end.

    Something like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:strip-space elements="*" />

    <xsl:template match="/">

    <HTTPResponseChange>
    <xsl:apply-templates />
    </HTTPResponseChange>
    </xsl:template>

    <xsl:template match="//HTTPResponse/Headers">

    <xsl:apply-templates select="//HTTPResponse/Headers/Header" />
    </xsl:template>

    <xsl:template match="//HTTPResponse/Headers/Header">

    <xsl:choose>
    <xsl:when test="@name = 'location'">
    <xsl:variable name="output">
    <xsl:call-template name="append-lang">
    <xsl:with-param name="text" select="node()" />
    </xsl:call-template>
    </xsl:variable>
    <Header action="update" name="{@name}"><xsl:value-of select="$output" /></Header>
    </xsl:when>
    </xsl:choose>
    </xsl:template>

    <xsl:template name="append-lang">

    <xsl:param name="text" />
    <xsl:value-of select="concat($text,'&amp;lang=ar')"/>
    </xsl:template>

    </xsl:stylesheet>

    2) If the IdP doesn't require a signed request, you could simply craft the request to the IdP yourself.  Just redirect to that URL instead of redirecting to ISAM federation SP trigger.  If you set the relayState to the target URL, WebSEAL will redirect to that after authentication completes.

    Jon.

    ------------------------------
    Jon Harry
    Consulting IT Security Specialist
    IBM
    ------------------------------



  • 6.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 12/16/19 07:39 AM
    Hi Jon,

    Yes, IDP team is not flexible.

    Defined HTTP Transformation rule  (IAMLoginPage)  on webseal instance with above provided code.
    Defined POP with name IAM  and attached the ISAM SP url /WebSEAL/RP1/isam and extended attribute

    Select Name Value
    HTTPTransformation Response=IAMLoginPage


    In webseald.conf file under stanza 
    [http-transformations]
    IAM = IAMLoginPage

    While restarting the webseal instance getting the below error. 

    9206 2019-12-16-07:34:28.342-05:00I----- 0x1005B3B5 webseald ERROR acl authzn HTTPTransformationRule.cpp 97 0x7fc097eb0840 -- HPDAC0949E Validation of the rule text for rule object "/var/pdweb/shared/xslt/http-transformation/IAMLoginPage" failed. Error code 0xfffffffe was returned along with error message "SAXParseException: Unterminated entity reference, 'lang' (/var/pdweb/shared/xslt/http-transformation/IAMLoginPage, line 31, column 6)".

    Is the process of defining the HTTP Transformation and calling it with POP is correct? please verify

    Thanks,
    Rahil

    ------------------------------
    Rahil Anwar
    ------------------------------



  • 7.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 12/16/19 09:39 AM
    Rahil,

    Sorry, the XSL I proposed was bad.  Looks like & requires escaping to &amp;.  I also found the newline added so I modified to use a concat statement.  I edited my previous post.

    I don't know if this will work - Hopefully ISAM will interpret the &amp; as & when rendering but I haven't tried it.

    For activating the Transformation rule, a POP can be used as you have done.  However, if you have defined the HTTP Transformation as:

    [http-transformations]
    IAM = IAMLoginPage

    Then your POP "HTTPTransformation" extended attribute value would need to be response=IAM

    Jon.

    ------------------------------
    Jon Harry
    Consulting IT Security Specialist
    IBM
    ------------------------------



  • 8.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 12/17/19 08:03 AM
    Hi Jon,

    Tried and getting error (Error while processing the authentication request!) from IDP. 

    review pdweb.http.transformation.log and found below that is &lang=ar is appended

    2019-12-17-07:27:35.160-05:00I----- thread(7) trace.pdweb.http.transformation:6 /build/isam/src/i4w/pdweb/webseald/http/transformation/XMLHTTPMessage.cpp:464: ENTER XMLHTTPMessage::processCookies (HTTP/1.1302Found<Header action="update" name="location">https://idp/samlsso?SAMLRequest=lVLNjtowEH6VyPfEOFlAtQhSCkVFgjYLtIe9VCaZgCXHTj1OKG9fB7YFbSWqvY6%2Ff3mColYNz1p31Bv42QK64FetNPL%2BISWt1dwIlMi1qAG5K%2Fg2W694HA24QATrpNHkjtI85jTWOFMYRYLsD3tmNLY12C3YThbwbbNKydG5Bjml4DFdCV1UFxgdTBehoNLbUGyQ%2Bhs2tDeNB1SZg%2FRB5r6A1KLXvamcTqdIiron92hEQ4KFsQVcaqekEgqBBMt5ShbL9ebT8w%2BWlEmVDEfhgI2qkJXDJNxXxSgUCdvHIKrxMH7yBMz9BrKDmwRiC0uNTmiXknjAPoQsDtl4x2Iej3kyfCFB%2FjrBR6lLqQ%2BP99pfQcg%2F73Z5mH%2Fd7kjwHSxe%2BnkAmU76SvxibPtWtXCPJfuLLMPqAuWgnXRnMn334hN6Z3xN0fAvXns5z42SxTnIlDKnmQXhbgP9LyCL2NuAtZAqK0sLiL4t%2Fdfo7%2FH%2BF09%2FAw%3D%3D&RelayState=uuid13d3f347-016f-1f97-a9e1-a31b2eaf7524&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=UrGLV%2FBovzRXR7HP2EQkpPiNNkb0IBB7soBzsfUSo2YcW5UpEcTu3TgtWbBIRuyaMv9WwmP3H%2FAo8tLl%2Bx1UhVDooEtUGKdMknuc89MXMrARsXMjwwTgrRLukDp3konEm9TnURzk7d03u5v4ZmFwMBce8dubMUZeOlHsTT3RFxRdf1v%2B6xt8KiZigudUYZlnuWcIL3Br7kj4jMv0DiH3eTg%2FyUBIVqsMMDdlcEfJO5yb1OYyP3zrwErChLGb7mVFKX866%2BXd%2BKfUka4B5Xw7RtUm7u57NVu2p4OOzPQeaNwNN6Ym2TvOk1xp0tpVf%2FoMWgW60wyGStfD1bNL%2B0dHcA%3D%3D&lang=ar</Header>0000XOrTS2v4tL4aq112K1zdobl:4a0234e4-de83-4a8b-9592-7584ad9b014c/01uuid13d3f347-016f-1f97-a9e1-a31b2eaf7524/00%2Fisam/00, 1262)

    The above url is same in Federation runtime trace logs also (But &lang=ar is not appended at the end). 

    [12/17/19 7:27:35:155 EST] 0004270a id=00000000 com.tivoli.am.fim.fedmgr2.msg.BrowserResponseImpl 3 logResponse Target URL:
    https://www.iam.sa/samlsso?SAMLRequest=lVLNjtowEH6VyPfEOFlAtQhSCkVFgjYLtIe9VCaZgCXHTj1OKG9fB7YFbSWqvY6%2Ff3mColYNz1p31Bv42QK64FetNPL%2BISWt1dwIlMi1qAG5K%2Fg2W694HA24QATrpNHkjtI85jTWOFMYRYLsD3tmNLY12C3YThbwbbNKydG5Bjml4DFdCV1UFxgdTBehoNLbUGyQ%2Bhs2tDeNB1SZg%2FRB5r6A1KLXvamcTqdIiron92hEQ4KFsQVcaqekEgqBBMt5ShbL9ebT8w%2BWlEmVDEfhgI2qkJXDJNxXxSgUCdvHIKrxMH7yBMz9BrKDmwRiC0uNTmiXknjAPoQsDtl4x2Iej3kyfCFB%2FjrBR6lLqQ%2BP99pfQcg%2F73Z5mH%2Fd7kjwHSxe%2BnkAmU76SvxibPtWtXCPJfuLLMPqAuWgnXRnMn334hN6Z3xN0fAvXns5z42SxTnIlDKnmQXhbgP9LyCL2NuAtZAqK0sLiL4t%2Fdfo7%2FH%2BF09%2FAw%3D%3D&RelayState=uuid13d3f347-016f-1f97-a9e1-a31b2eaf7524&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=UrGLV%2FBovzRXR7HP2EQkpPiNNkb0IBB7soBzsfUSo2YcW5UpEcTu3TgtWbBIRuyaMv9WwmP3H%2FAo8tLl%2Bx1UhVDooEtUGKdMknuc89MXMrARsXMjwwTgrRLukDp3konEm9TnURzk7d03u5v4ZmFwMBce8dubMUZeOlHsTT3RFxRdf1v%2B6xt8KiZigudUYZlnuWcIL3Br7kj4jMv0DiH3eTg%2FyUBIVqsMMDdlcEfJO5yb1OYyP3zrwErChLGb7mVFKX866%2BXd%2BKfUka4B5Xw7RtUm7u57NVu2p4OOzPQeaNwNN6Ym2TvOk1xp0tpVf%2FoMWgW60wyGStfD1bNL%2B0dHcA%3D%3D




    [12/17/19 7:27:35:156 EST] 0004270a id=00000000 com.tivoli.am.fim.fedmgr2.msg.BrowserResponseImpl > isNonURLAbsoluteURI ENTRY
    https://www.iam.sa/samlsso?SAMLRequest=lVLNjtowEH6VyPfEOFlAtQhSCkVFgjYLtIe9VCaZgCXHTj1OKG9fB7YFbSWqvY6%2Ff3mColYNz1p31Bv42QK64FetNPL%2BISWt1dwIlMi1qAG5K%2Fg2W694HA24QATrpNHkjtI85jTWOFMYRYLsD3tmNLY12C3YThbwbbNKydG5Bjml4DFdCV1UFxgdTBehoNLbUGyQ%2Bhs2tDeNB1SZg%2FRB5r6A1KLXvamcTqdIiron92hEQ4KFsQVcaqekEgqBBMt5ShbL9ebT8w%2BWlEmVDEfhgI2qkJXDJNxXxSgUCdvHIKrxMH7yBMz9BrKDmwRiC0uNTmiXknjAPoQsDtl4x2Iej3kyfCFB%2FjrBR6lLqQ%2BP99pfQcg%2F73Z5mH%2Fd7kjwHSxe%2BnkAmU76SvxibPtWtXCPJfuLLMPqAuWgnXRnMn334hN6Z3xN0fAvXns5z42SxTnIlDKnmQXhbgP9LyCL2NuAtZAqK0sLiL4t%2Fdfo7%2FH%2BF09%2FAw%3D%3D&RelayState=uuid13d3f347-016f-1f97-a9e1-a31b2eaf7524&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=UrGLV%2FBovzRXR7HP2EQkpPiNNkb0IBB7soBzsfUSo2YcW5UpEcTu3TgtWbBIRuyaMv9WwmP3H%2FAo8tLl%2Bx1UhVDooEtUGKdMknuc89MXMrARsXMjwwTgrRLukDp3konEm9TnURzk7d03u5v4ZmFwMBce8dubMUZeOlHsTT3RFxRdf1v%2B6xt8KiZigudUYZlnuWcIL3Br7kj4jMv0DiH3eTg%2FyUBIVqsMMDdlcEfJO5yb1OYyP3zrwErChLGb7mVFKX866%2BXd%2BKfUka4B5Xw7RtUm7u57NVu2p4OOzPQeaNwNN6Ym2TvOk1xp0tpVf%2FoMWgW60wyGStfD1bNL%2B0dHcA%3D%3D

    Where as from fiddler , if we see http GET of SAMLRequest value its different and incomplete 

    GET /samlsso?SAMLRequest=lVLNjtowEH6VyPfEOFlAtQhSCkVFgjYLtIe9VCaZgCXHTj1OKG9fB7YFbSWqvY6/f3mColYNz1p31Bv42QK64FetNPL+ISWt1dwIlMi1qAG5K/g2W694HA24QATrpNHkjtI85jTWOFMYRYLsD3tmNLY12C3YThbwbbNKydG5Bjml4DFdCV1UFxgdTBehoNLbUGyQ+hs2tDeNB1SZg/RB5r6A1KLXvamcTqdIiron92hEQ4KFsQVcaqekEgqBBMt5ShbL9ebT8w+WlEmVDEfhgI2qkJXDJNxXxSgUCdvHIKrxMH7yBMz9BrKDmwRiC0uNTmiXknjAPoQsDtl4x2Iej3kyfCFB/jrBR6lLqQ+P99pfQcg/73Z5mH/d7kjwHSxe+nkAmU76SvxibPtWtXCPJfuLLMPqAuWgnXRnMn334hN6Z3xN0fAvXns5z42SxTnIlDKnmQXhbgP9LyCL2NuAtZAqK0sLiL4t/dfo7/H+F09/Aw==&RelayState=uuid13d3f347-016f-1f97-a9e1-a31b2eaf7524&SigAlg=http://www.w3.org/2001/04/xmldsig-more HTTP/1.1


    Thanks,
    Rahil

    ------------------------------
    Rahil Anwar
    ------------------------------



  • 9.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 12/17/19 08:50 AM
    Hi Rahil,

    You won't see the &lang=ar in the Runtime trace - it is being added by the Reverse Proxy as the 302 redirect HTTP Response is flowing back to the client.

    I think you're now hitting an issue with truncation of the header in the Transformation engine due to its length.
    There is an APAR for this: https://www-01.ibm.com/support/docview.wss?uid=swg1IJ20633

    If you need a fix for this now, I suggest that you open a ticket with support.

    I'm sorry that it is proving difficult to get things working the way you need.

    Jon.

    ------------------------------
    Jon Harry
    Consulting IT Security Specialist
    IBM
    ------------------------------



  • 10.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 12/17/19 09:06 AM
    Thanks for your patience and all the support.

    Really appreciate and helpful.

    But, http transformation rule calculated/executed completely and we can see the URL is complete(as shared in previous post from http transformation logs ). Then,how come its http transformation engine issue !! can you please clarify . this is to make sure we are not miss anything. 


    From pdweb.debug below the 


    2019-12-17-07:27:35.160-05:00I----- thread(7) trace.pdweb.debug:2 /build/isam/src/i4w/pdweb/webseald/ras/trace/debug_log.cpp:220: ----------------- Browser <=== PD -----------------
    Thread 7; fd 259; local 192.168.12.12:443; remote 172.18.64.165:63307
    HTTP/1.1 302 Found
    content-language: en-US
    date: Tue, 17 Dec 2019 12:27:35 GMT
    location: https://www.iam.sa/samlsso?SAMLRequest=lVLNjtowEH6VyPfEOFlAtQhSCkVFgjYLtIe9VCaZgCXHTj1OKG9fB7YFbSWqvY6/f3mColYNz1p31Bv42QK64FetNPL+ISWt1dwIlMi1qAG5K/g2W694HA24QATrpNHkjtI85jTWOFMYRYLsD3tmNLY12C3YThbwbbNKydG5Bjml4DFdCV1UFxgdTBehoNLbUGyQ+hs2tDeNB1SZg/RB5r6A1KLXvamcTqdIiron92hEQ4KFsQVcaqekEgqBBMt5ShbL9ebT8w+WlEmVDEfhgI2qkJXDJNxXxSgUCdvHIKrxMH7yBMz9BrKDmwRiC0uNTmiXknjAPoQsDtl4x2Iej3kyfCFB/jrBR6lLqQ+P99pfQcg/73Z5mH/d7kjwHSxe+nkAmU76SvxibPtWtXCPJfuLLMPqAuWgnXRnMn334hN6Z3xN0fAvXns5z42SxTnIlDKnmQXhbgP9LyCL2NuAtZAqK0sLiL4t/dfo7/H+F09/Aw==&RelayState=uuid13d3f347-016f-1f97-a9e1-a31b2eaf7524&SigAlg=http://www.w3.org/2001/04/xmldsig-more#rsa-sha256&Signature=UrGLV/BovzRXR7HP2EQkpPiNNkb0IBB7soBzsfUSo2YcW5UpEcTu3TgtWbBIRuyaMv9WwmP3H/Ao8tLl+x1UhVDooEtUGKdMknuc89MXMrARsXMjwwTgrRLukDp3konEm9TnURzk7d03u5v4ZmFwMBce8dubMUZeOlHsTT3RFxRdf1v+6xt8KiZigudUYZlnuWcIL3Br7kj4jMv0DiH3eTg/yUBIVqsMMDdlcEfJO5yb1OYyP3zrwErChLGb7mVFKX866+Xd+KfUka4B5Xw7RtUm7u57NVu2p4OOzPQeaNwNN6Ym2TvOk1xp0tpVf/oMWgW60wyGStfD1bNL+0dHcA==&lang=ar
    p3p: CP="NON CUR OTPi OUR NOR UNI"
    transfer-encoding: chunked
    x-frame-options: SAMEORIGIN
    cache-control: no-cache, no-store
    expires: Thu, 01 Dec 1994 16:00:00 GMT
    strict-transport-security: max-age=31536000; includeSubDomains
    pragma: no-cache
    Set-Cookie: AMWEBJCT!%2Fisam!JSESSIONID=0000XOrTS2v4tL4aq112K1zdobl:4a0234e4-de83-4a8b-9592-7584ad9b014c; Path=/; HttpOnly
    Set-Cookie: AMWEBJCT!%2Fisam!https%3A%2F%2Feservdev.mcs.gov.sa%2Fisam%2Fsps%2Fmcssp%2Fsaml20FIMSAML20=uuid13d3f347-016f-1f97-a9e1-a31b2eaf7524; Path=/
    Set-Cookie: PD_STATEFUL_311f8898-5e90-11e9-9e2c-000c297322a9=%2Fisam; Path=/

    ---------------------------------------------------




    If above all is the case we are in and its due to http transformation engine limitation and nothing else can be done then there is a challenge. Because, its ISAM 9.0.6 deployed here and getting fix from IBM may take time.

    Thanks,
    Rahil


    ------------------------------
    Rahil Anwar
    ------------------------------



  • 11.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 12/17/19 09:55 AM
    Hi Rahil,

    Since you are seeing the full and correct location header in the pd.debug trace then perhaps you are not hitting the Transformation rule issue.  The reason I thought of this is because the Fiddler output you shared previously was showing a truncated location header.

    Maybe you could test with Firefox or Chrome and use their developer tools to capture either the 302 from ISAM or the subsequent GET which is generated when the 302 is processed.  That should show what is really arriving at the browser and being passed to the IdP.

    If the lang=ar header is being successfully sent, and the IdP is still giving an authentication error, I don't know what to suggest unless they can say what they don't like about the request.

    Jon.

    ------------------------------
    Jon Harry
    Consulting IT Security Specialist
    IBM
    ------------------------------



  • 12.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 12/18/19 03:33 AM
    Good morning Jon,

    Yes, tried in Google Chrome and below is the data

    Request URL: https://<isamsp>/isam/sps/mcssp/saml20/logininitial?RequestBinding=HTTPPost&PartnerId=https://<idp>/samlsso&NameIdFormat=Email&Target=https://<targetappprotectedbyisam>/Portal/ControlPanel
    Request Method: GET
    Status Code: 302 Found
    Remote Address: 192.168.12.12:443


    Location value before from Response Header tab in F12 output:
    https://<IDP>/samlsso?SAMLRequest=lVJbb9owFP4rkd8Tx1TcLIKUlqIhwZYB20NfKtc5oZYcO/Nxwvrv59C1oE5i6uvxd5dnKGrd8Lz1z2YLv1pAH/2utUHeP2SkdYZbgQq5ETUg95Lv8s2aD5KUC0RwXllDLijNdU7jrLfSahLlb+w7a7Ctwe3AdUrCj+06I8/eN8gphYDpSuiSWmJysF2CgqpgQ7FBGm7Y0N50kFJtDyoEWYQCyohe96xyPB4TJeqe3KMRLYmW1kk41c5IJTQCiVaLjCxXm+3990c2ruTNdCLjlI2qmI2eqngC5TiGcjSUqRyyyVgEAhZhA9XBWQKxhZVBL4zPyCBl05gNYjbZp2M+THl680Ci4u8Et8qUyhyu7/X0CkL+Zb8v4uLbbk+in+Dw1C8AyHzWV+InY9e3qoW/LtlfVBlXJygH45V/IfNPLz6jF8avKRr+NWivFoXVSr5Eudb2eOdA+PNA/wvIEvYxYC2UzsvSAWJoS/81ej9e/uL5Hw==&RelayState=uuid17fbe64b-016f-1ff5-90c4-ed65c0c5187a&SigAlg=http://www.w3.org/2001/04/xmldsig-more#rsa-sha256&Signature=rlR6JHLgKGbs9m9kzvHqLdlGxUzDI6VpQgoFUZk4BXQ7eYN2bFNLGmFBLT0J6G+p3lNNLSSKtGohSnXaWhEGwte9S2y+cuA7jBXGqAanC1Cmwm47psKHgQedlLI3032cNBAvZgItQmKsFYntBKcpz9FNxeivLOAHZ1MMLecIuoP6dArYCe/Jdul8salmQg85gltdOBbC0AI+BpKiNVA2JXN1C6xWAklUK3ZAnkcxR6nSISHz0njbwMJlNGeEvM7+9vDhemd8ZCsXhAJTjfiWklNgbGwohzY47KwipuwS62XvPcFBiEUKSnzN0uFfoatjk7BVVuIkpt/TK+FkYU2LkA==&lang=ar

    Till above or from above , we can say &lang=ar is appended in location header and total url is correct. This is the URL sent to Browser from PD. Correct?



    Request URL: https://<IDP>/samlsso?SAMLRequest=lVJbb9owFP4rkd8Tx1TcLIKUlqIhwZYB20NfKtc5oZYcO/Nxwvrv59C1oE5i6uvxd5dnKGrd8Lz1z2YLv1pAH/2utUHeP2SkdYZbgQq5ETUg95Lv8s2aD5KUC0RwXllDLijNdU7jrLfSahLlb+w7a7Ctwe3AdUrCj+06I8/eN8gphYDpSuiSWmJysF2CgqpgQ7FBGm7Y0N50kFJtDyoEWYQCyohe96xyPB4TJeqe3KMRLYmW1kk41c5IJTQCiVaLjCxXm+3990c2ruTNdCLjlI2qmI2eqngC5TiGcjSUqRyyyVgEAhZhA9XBWQKxhZVBL4zPyCBl05gNYjbZp2M+THl680Ci4u8Et8qUyhyu7/X0CkL+Zb8v4uLbbk+in+Dw1C8AyHzWV+InY9e3qoW/LtlfVBlXJygH45V/IfNPLz6jF8avKRr+NWivFoXVSr5Eudb2eOdA+PNA/wvIEvYxYC2UzsvSAWJoS/81ej9e/uL5Hw==&RelayState=uuid17fbe64b-016f-1ff5-90c4-ed65c0c5187a&SigAlg=http://www.w3.org/2001/04/xmldsig-more
    Request Method: GET
    Status Code: 302 Found
    Remote Address: 192.168.2.10:8080

    IMP NOTE: In above request url ; we find complete URL set in previous is missing. Mean, truncated. Who is doing this !!!

    Location value before from Response Header tab in F12 output:

    Location: https://www.iam.sa/authenticationendpoint/samlsso_notification.do?status=Error+when+processing+the+authentication+request%21&statusMsg=Please+try+login+again.&SAMLResponse=fZJNT8MwDIbv%2FIoo936lK%2BuitRMCJk1iFxg7cEFW622V2qTEKYV%2FT7oPAT3sEsnWa7%2BP7cwXX03NPtFQpVXGIz%2FkDFWhy0rtM%2F66WXopX%2BQ3c4KmFq18Rmq1ImSrh4y%2FI6KISxBlEYlJHIWJSCe3u2SH6aQoE4g5WxF1uFJkQdmMizCaeZHwonQTTmUSyjD2p%2FHsjbPtBUAMAA5JkTxZZrwzSmqgiqSCBknaQr7crZ%2Bkk8rWaKsLXfP8RCiPhoYttWnAXq8dMlXp7Y5SicpW9vuf9%2FVyIEJjHTTPD9a2JIOg73u%2FgsYnCIYGRHoe%2FMXKL2t8sWA7GoX3ukS2hbrD68Z0VJ9PUaLhwajRGolgj%2FmjMdqw%2FoCKuT0VLuuOyuwBGXTudQMXMAzADH50SPYMO24zSv%2FGl8%2BQ%2FwA%3D

    Query String Parameter
    SAMLRequest: lVJbb9owFP4rkd8Tx1TcLIKUlqIhwZYB20NfKtc5oZYcO/Nxwvrv59C1oE5i6uvxd5dnKGrd8Lz1z2YLv1pAH/2utUHeP2SkdYZbgQq5ETUg95Lv8s2aD5KUC0RwXllDLijNdU7jrLfSahLlb w7a7Ctwe3AdUrCj 06I8/eN8gphYDpSuiSWmJysF2CgqpgQ7FBGm7Y0N50kFJtDyoEWYQCyohe96xyPB4TJeqe3KMRLYmW1kk41c5IJTQCiVaLjCxXm 3990c2ruTNdCLjlI2qmI2eqngC5TiGcjSUqRyyyVgEAhZhA9XBWQKxhZVBL4zPyCBl05gNYjbZp2M THl680Ci4u8Et8qUyhyu7/X0CkL Zb8v4uLbbk in Dw1C8AyHzWV InY9e3qoW/LtlfVBlXJygH45V/IfNPLz6jF8avKRr NWivFoXVSr5Eudb2eOdA PNA/wvIEvYxYC2UzsvSAWJoS/81ej9e/uL5Hw==

    ------------------------------
    Rahil Anwar
    ------------------------------



  • 13.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 12/18/19 04:21 AM
    Hello Rahil,

    Looking at this again, I'm guessing that this has something to do with the # in the redirect.  A hash indicates the start of a "fragment" in the URL which browsers treat differently.  I imagine that is why everything after the # is being dropped at some point.

    Have you tried turning off the signature generation in ISAM for the SSO Request?  It may be that the IdP doesn't require a signature on the request anyway.

    If you do need the signature, I don't know what else I can suggest.  You should probably open a support case if you haven't already done so.  Perhaps there's another way to introduce the extra header that I don't know about.  Or perhaps a more complex transformation rule is needed to add lang=ar before the signature block (although you did say the IdP wanted the lang=ar at the END of the URL.

    Jon.
    ​​

    ------------------------------
    Jon Harry
    Consulting IT Security Specialist
    IBM
    ------------------------------



  • 14.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 12/18/19 09:44 AM
    Turn off the signature and see some difference


    GET /samlsso?SAMLRequest=lVLdbtowFH6VyPeJ49CxYRGktBQVCbYM2C56U7nOCbXk2JmPE9a3r0PXgjaJqbfH3788RdHolhedfzIb+NUB+uh3ow3y4SEnnTPcClTIjWgAuZd8W6xXPEtSLhDBeWUNOaO0lzmts95Kq0lUvLFvrMGuAbcF1ysJPzarnDx53yKnFAKmr6BPGonJ3vYJCqqCDcUWabhhSwfTLKXa7lUIMg8FlBGD7knlcDgkSjQDeUAjWhItrJNwrJ2TWmgEEi3nOVks15vb7w9sMgZZiyxO2biOWSrrWHwe1TGM5EjCo4CsmgQClmED1cNJArGDpUEvjM9JlrJJzLKYfdmxKz664p/SexKVfya4VqZSZn95r8dXEPK73a6My2/bHYl+gsNjvwAgs+lQiR+N3dCqEf6y5HBRVVwfoRyMV/6ZzD68+JSeGb+maPnXoL2cl1Yr+RwVWtvDjQPhTwP9LyBL2N8BG6F0UVUOEENb+q/R+/H8F89eAA==&RelayState=uuid196a043c-016f-146f-a9d9-8e787673b134&lang=ar HTTP/1.1


    Below is SAMLRequest value from fiddler:

    lVLdbtowFH6VyPeJ49CxYRGktBQVCbYM2C56U7nOCbXk2JmPE9a3r0PXgjaJqbfH3788RdHolhedfzIb NUB uh3ow3y4SEnnTPcClTIjWgAuZd8W6xXPEtSLhDBeWUNOaO0lzmts95Kq0lUvLFvrMGuAbcF1ysJPzarnDx53yKnFAKmr6BPGonJ3vYJCqqCDcUWabhhSwfTLKXa7lUIMg8FlBGD7knlcDgkSjQDeUAjWhItrJNwrJ2TWmgEEi3nOVks15vb7w9sMgZZiyxO2biOWSrrWHwe1TGM5EjCo4CsmgQClmED1cNJArGDpUEvjM9JlrJJzLKYfdmxKz664p/SexKVfya4VqZSZn95r8dXEPK73a6My2/bHYl gsNjvwAgs lQiR N3dCqEf6y5HBRVVwfoRyMV/6ZzD68 JSeGb maPnXoL2cl1Yr RwVWtvDjQPhTwP9LyBL2N8BG6F0UVUOEENb q/R /H8F89eAA==



    In fiddler there is an option to transform the above to DeflatedSAML. In working scenario its giving SAMRequest in XML where we can see all attributes like destination value target value IDP partnerID and etc. 

    in non working scenario SAMLRequest conversion giving "Error: Invalid length for a Base-64 char array or string."  I doubt SAMLRequest is corrupted from our end!!

    ------------------------------
    Rahil Anwar
    ------------------------------



  • 15.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 12/18/19 01:14 PM
    Rahil,

    It looks like there's a problem in ISAM - it appears to be removing URI-encoding from the Location header as it flows though the HTTP Transformation rule.  I believe that is what is causing both of the issues you've seen since enabling it.

    You should open a support case.   They may be able to fix this or suggest some other way to add the lang=ar to the response.

    Jon.

    ------------------------------
    Jon Harry
    Consulting IT Security Specialist
    IBM
    ------------------------------



  • 16.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 12/26/19 07:50 AM
    Hi Jon,

    We had a discussion with IDP and got from them that the &lang=ar need not to be at end of the URL. It can be anywhere. In this case also we will end up in uri-encoding.

    I got an idea, i.e. from below scenario which worked to some extend 

    While we define the IDP as partner in ISAM SP under SAML Partner definition --> Single Sign On Setting section appended ?lang=ar

    binding : redirect
    URL: https://idp/samlsso?lang=ar

    IDP Is displaying the login page in arabic -->User enters creds --> But users destination/target app is not displayed. Checked with IDP team and understood IDP is rejecting. The lang=ar should be at the end of the destination url. 

    From SAML Tracer below non working (Where ISAM is SP) case SAML Req
    https://idp/samlsso?lang=ar&SAMLRequest=lZNdb5swFIb%2FCvI9H0Zr1ljARJtWi9RuLEl7sZvKwCG1ZGzmY5L239cmW5PuItPu0OE55%2F2QnCHv5cDK0T6rFfwaAW3w0kuFzP%2FIyWgU0xwFMsV7QGYbti7v71gaJYwjgrFCK3KyMpzfGYy2utGSBOWf7WutcOzBrMHsRAMPq7ucPFs7IItjcMzOOlNR32C01bsIeSycTowDxm6GQ%2BxV0ySWeiuck4WDheL%2B8PHMfr%2BPBO%2F9sqcR9RfJ1TbnhgS32jQw5c9JxyUCCZaLnNwu71c3P57ay7Tu6EWY0FkX0k9dG9bzWR1eUprO6zlA2iWOx8p1IXZwvIA4wlKh5crmJE3oPKRpSGeb5DNLKKPJTxJUv6u4EqoVzszZ3uoDhOzrZlOF1ff1hgSPYHCK6QBSZD4Zm4SND9Vze%2F6kn4g27CaUgbLCvpLi%2F5vP4hPlg42B3bxYUN4dFpmvuuAmi6ePA%2F6ROEy%2BOUPLRaWlaF6DUkq9vzbA7bHVf6WiEf07Vc%2BFLNvWACJ5lz4Veh%2BePoHiDQ%3D%3D&RelayState=uuidd82bf12-016f-1d78-80d2-81129b9ee2f0&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=mfdCzKjw7idVkYHnFGAZWIfnncaXGnneOBe%2FURbRS9fSAyoBu5BuGhEI%2FVIv1nk2bMetXhxEZwev2H3QXpkX55V9ChWEWt1TrpwVVC3d3sdXqZAUU65tmBDhyZTgZKRjBd0u6vOPHbLgz36YkeKkOf5ElyjY%2F4Dg2jtorYdMAVJ%2BT3YxzhDPyQcIcvCZXnRqab8aaJ9DydppNBaGOT997K%2FrLZAFaay%2B39UQWkwgyYlItQ6jJQend8Vz%2B3yyt2vcR8jEeB%2FNkn480uQYIpFgrtaO%2BAqehruA2RaOsDmzLSRWP5Zpj%2B71Fg5xI515usydXqDhnLL3q6q%2Bb6RVEhys8g%3D%3D



    From above ; IDP is looking for destination url https://idp/samlsso only. Can we remove lang=ar after user is displayed the Arabic login page and authentication and ISAM send Response to 
    https://idp/samlsso?lang=ar&SAMLRequest=lZNdb5

    Can we remove ?lang=ar  and send to IDP so that it can trust and allow 


    ------------------------------
    Rahil Anwar
    ------------------------------



  • 17.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 12/27/19 06:20 AM
    Edited by HANS VANDEWEGHE 12/27/19 06:23 AM
    Hi Rahil,

    My 2 cents  (... in addition to the other cents given in the Support case ;-) ... )

    So it turns out that HTTP Transformation Rules are losing URI encoding.  I believe there is currently an open RFE (Request for Enhancement) with the ISAM Dev team to introduce the possibility to have URI encoding capabilities in Transformation Rules. 
    I suggest you also raise this as an RFE for your company. (this always helps with RFE prioritisation discussions)
    The reason why your IDP is rejecting the authentication request is (very likely) related to the change of the Partner definition, where you appended the ?lang=ar query string.
    Decoding your SAML Authentication request, shows indeed where I think the problem is:
    <samlp:AuthnRequest xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" AssertionConsumerServiceURL="https://eservtest.mcs.gov.sa/isam/sps/mcssp/saml20/login" Destination="https://www.iam.sa/samlsso?lang=ar" ForceAuthn="false" ID="FIMREQ_d82bf15-016f-14fd-b96b-81129b9ee2f0" IsPassive="false" IssueInstant="2019-12-16T07:01:10Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Version="2.0">
    The IDP likely does not expect Destination="https://www.iam.sa/samlsso?lang=ar"
    Manually changing this via HTTP Transformation Rules will likely result in 2 issues:
    (1) The signed message will not match
    (2) Again the problem of the URI encoding in HTTP Transformation Rules.
    Reading again your explanation of what the IDP expects:
    The language consistency will be maintained during the authentication. "lang" HTTP attribute will be sent from the service provider to IAM as part of the Authentication Request (as additional parameter). The SAML2 response is sent from IAM back to the service provider including the "lang" as SAML2 attribute.

    I believe your IDP also supports SAML HTTP Post binding is also a possible integration pattern for them?  (maybe needs to be agreed as part of the onboarding  or registration process...)
    Protocol: SAML 2 Web SSO Profile: with the following bindings:
    • Request: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-REDIRECT or
    urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST.
    • Response: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
    I believe this binding type might be easier to work with HTTP Transformation rules (since we don't need to modify the SAML AuthnRequest or other URI data where encoding is expected ... presumably.. ;-)
    Perhaps you could modify the action URL from the self-posting SAML form, to append  the ?lang=ar query string.  (of maybe using javascript you could add more logic to also distinguish between EN and AR)
    Including here an example of how you can try this approach.




    Lastly, but I believe you have already tried adding that (at least saw it in your decoded SAML Authrequest).  The (imho) correct way to meet this language consistency requirement, would be to pass this as part of the SAML:AuthnRequest content itself.  (so not as a query string parameter).  This can be done via SAML Message Extensions.  


    This of-course does require an IDP to be able to process this. 


    /*
    * This mapping rule is a special-purpose rule for injecting samlp:Extension elements into a SAMLMessage.
    *
    * Some SAML federation partners (particularly government-run or industry-specific require the use of these custom
    * extensions to relay additional data about a federation relationship or runtime parameter.
    * These extensions are all defined by the SAML specification.
    *
    * This example mapping rule shows how you can populate some locale information into the AuthnRequest as an extension.
    *
    * What we get as "input" in this mapping rule is a context. The context contains a bunch of information about
    * the current message that we can use to decide whether or not to even add extensions, and also use to determine
    * what extensions or values to add. For example we could use the value of a HTTP header from the current request
    * to select what language to ask the IDP to present a login form in.
    *
    * The "output" from the mapping rule is XML nodes populated into the output variable "extension_properties". This begins
    * as an empty java.util.List, and we populate it with one or more org.w3c.dom.Node objects.
    */
    importClass(Packages.com.tivoli.am.fim.trustserver.sts.utilities.IDMappingExtUtils);

    /**
    * This is really a debug/discovery function that logs everything we are allowed to get access to about
    * the current message. We could use any of this information to decide whether or not to add any
    * samlp:Extensions, and influence what those extensions might be.
    */
    function logAvailableContext() {
    var str = 'logAvailableContext';
    // url
    str += "\n Request URL: " + context.getUrl();

    // headers
    var headerList = context.getHeaderNames();
    for (var i = headerList.iterator(); i.hasNext(); ) {
    var n = i.next();
    var v = context.getHeader(n);
    str += "\n Header with name: " + n + " value: " + v;
    }

    // parameters
    var paramList = context.getParameterNames();
    for (var i = paramList.iterator(); i.hasNext(); ) {
    var n = i.next();
    var v = context.getParameter(n);
    str += "\n Parameter with name: " + n + " value: " + v;
    }

    // now the message "Info" keys and their values
    var keyList = context.getInfoKeys();
    for (var i = keyList.iterator(); i.hasNext(); ) {
    var n = i.next();
    var v = context.getInfoValue(n);
    str += "\n Info element with key: " + n + " value: " + v;
    }
    IDMappingExtUtils.traceString(str);
    }

    /**
    * This function builds the list of nodes that are to go within the samlp:Extensions object of a message.
    * You could do this based on information available in the request, or statically. Have a look at the output
    * of logAvailableContext to get an idea of what you can see and make decisions about.
    *
    * @returns nothing, but extension_properties will be updated with the nodes we want to add as children of
    * samlp:Extensions.
    */
    function buildSAMLExtensions() {
    var d = IDMappingExtUtils.newXMLDocument();
    var e = d.createElementNS("request", "lang");
    e.setTextContent("ar");

    extension_properties.add(e);
    }

    /**
    * This function returns true if this execution of the mapping rule should add samlp:Extensions nodes.
    * In the case of this example, we do that on any AuthnRequest.
    * @returns
    */
    function shouldAddExtensions() {
    var msgType = context.getInfoValue("MsgType");
    return (msgType != null && msgType.equals("AuthnRequest"));
    }

    // main logic starts here
    var debug = false;
    if (debug) {
    // To see this debug ensure you have the following trace component enabled:
    // com.tivoli.am.fim.trustserver.sts.utilities.*=ALL
    //
    // To see how to enable trace on ISAM see:
    // https://www.ibm.com/support/knowledgecenter/en/SSPREK_9.0.5/com.ibm.isam.doc/config/task/tsk_runtime_tuning.html
    logAvailableContext();
    }

    if (shouldAddExtensions()) {
    buildSAMLExtensions();
    }




    Hope it helps.

    Hans

    ------------------------------
    HANS VANDEWEGHE
    ------------------------------



  • 18.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 12/31/19 03:02 AM
    Hi Hans,

    Thanks for your detailed response. We tried the SAML Post option provided and its still no use. We checked with IDP team and they do not support HTTP-Post . Only HTTP-Redirect

    Seems the only option left is HTTP Transformation and add the lang=ar parameter in HTTP request as IDP expecting. And we have Limitation from our end in uri encoding. 

    Sad ending ;)

    Thanks,
    Rahil

    ------------------------------
    Rahil Anwar
    ------------------------------



  • 19.  RE: Sending lang=ar in HTTP Request to IDP

    Posted 01/02/20 12:24 PM
    Hello Rahil,

    Yes, I strongly recommend you raise an RFE (Request For Enhancement) with the ISAM Development team, to suggest implementing the possibility do to URI encoding in HTTP transformation rules. 
    https://www.ibm.com/support/pages/ibm-security-access-manager-web-request-enhancements

    I think at this point we've exhausted most routes to a solution...

    Do you have any component in your network that sits in front of the WebSEAL / Reverse Proxy servers?   Some load balancer where (where you terminate SSL) and that can rewrite headers for you?

    I'm including an example of how you might want to try that using the FELB (Front End Load Balancer) on an ISAM appliance. (although I understand this would have implications on overall network topology)

    So assuming you can terminate SSL at your load-balancer, you can use that to rewrite the location header.  In the case of the FELB on ISAM, you can set an advanced tuning parameter rspirep (https://www.haproxy.com/documentation/aloha/10-0/traffic-management/lb-layer7/http-rewrite/):


    Where your value for the rspirep parameter could be something like this:
    ^Location:\ https:\/\/www.myidp.ibm.com\/isam\/sps\/saml20idp\/saml20\/login\?SAMLRequest=([0-9A-Z%?.=&-]*)  Location:\ https:\/\/www.myidp.ibm.com\/isam\/sps\/saml20idp\/saml20\/login\?SAMLRequest=\1\&lang\=ar​


    I'm not that familiar with regex, so there might be a cleaner way to achieve this.... but the ([0-9A-Z%?.=&-]*) capture group could be used to match on the location header dynamic data (the SAML authentication request), and use that to build a new header, using \1 to print the capture group.  And use  \&lang\=ar  to append your required lang parameter.


    Most likely other Load Balancers have similar features... so you might want to check that with your LB team.

    Hope this provides you with some ideas or alternatives to still implement your requirement?

    ------------------------------
    HANS VANDEWEGHE
    ------------------------------