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
  • 1.  Getting the original URL that triggered the step-up authentication

    Posted Sun February 23, 2025 09:15 PM

    I have an InfoMap mapping rule and template that is used inside an InfoMap policy.  That policy is used for internal response-redirect in reverse proxy config file to process the step-up authentication.  Is there a way to capture the original URL that triggered the step-up authentication?  E.g.

    /objectA - requires level 2 pop

    /objectB - requires level 3 pop

    reverse proxy entry:

    enable-local-response-redirect = yes

    local-response-redirect-uri = [stepup] /mga/sps/authsvc/policy/myInfoMapPolicy

    How can I access the original path (/objectA vs objectB) in my template or mapping rule that supports myInfoMapPolicy?  Is there a macro available (please share a sample) or any other techniques for getting this runtime value?

    Thanks,

    Narayan



    ------------------------------
    Narayan
    ------------------------------


  • 2.  RE: Getting the original URL that triggered the step-up authentication

    Posted Mon February 24, 2025 03:09 AM

    Hi Narayan,

    When the user will be redirect to the LRR-uri, ISVA should automatically add a "URL" query param that will contain the original path:

    /mga/sps/authsvc/policy/myInfoMapPolicy?TAM_OP=stepup&URL=/xxxxxx/myOriginalURL



    ------------------------------
    André Leruitte
    Security Architect
    POST Luxembourg
    Luxembourg
    ------------------------------



  • 3.  RE: Getting the original URL that triggered the step-up authentication

    Posted Mon February 24, 2025 06:21 AM

    Hi Andre, In my case I only see the TAM_OP=stepup querystring parameter but not the URL part.  Is it governed by any configuration entry?

    Thanks,

    Narayan



    ------------------------------
    Narayan
    ------------------------------



  • 4.  RE: Getting the original URL that triggered the step-up authentication

    Posted Mon February 24, 2025 06:50 AM
    Edited by Narayan Verma Mon February 24, 2025 06:50 AM

    I actually got the URL part working and received URL and AUTHNLEVEL in the query string e.g. &URL=%2Ficons%2FHRMISMain.gif&AUTHNLEVEL=4 by uncommenting URL and AUTHNLEVEL macros in the [local-response-macros] stanza.  My next question is how do I access these values as macros in the template?  When I use @URL@ or @AUTHNLEVEL@ in the template they are still blank.

    Thanks,



    ------------------------------
    Narayan
    ------------------------------



  • 5.  RE: Getting the original URL that triggered the step-up authentication

    Posted Mon February 24, 2025 07:08 AM

    Hi Naryayan,

    To set a macro in an infomap you have to insert code like this:

    var url="https://...."
    macros.put("@URL@", url);

    By default, certain characters will be escaped.

    If you don't want them to be escaped, you have to define your macro in the advanced property sps.page.notEscapedMacros

    Kind regards



    ------------------------------
    Laurent LA Asselborn
    ------------------------------



  • 6.  RE: Getting the original URL that triggered the step-up authentication

    Posted Mon February 24, 2025 07:23 AM
    Edited by Narayan Verma Mon February 24, 2025 07:32 AM

    Is this the code that needs to go in my mapping rule?  Also, how do I get the dynamic value of URL from the querystring in my mapping rule code?

    Thanks,



    ------------------------------
    Narayan
    ------------------------------



  • 7.  RE: Getting the original URL that triggered the step-up authentication
    Best Answer

    Posted Mon February 24, 2025 07:48 AM

    You can get a parameter (from the URL or from the POST body) by using this code:

    var myparam = ''+context.get(Scope.REQUEST, "urn:ibm:security:asf:request:parameter", "myParam");



    ------------------------------
    Laurent LA Asselborn
    ------------------------------



  • 8.  RE: Getting the original URL that triggered the step-up authentication

    Posted Mon February 24, 2025 07:52 AM

    yup, I think I got that to work now.

    Thanks Andre and Laurent!



    ------------------------------
    Narayan
    ------------------------------