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

Ability to use predefined values in InfoMap templates

  • 1.  Ability to use predefined values in InfoMap templates

    Posted Tue August 20, 2024 03:53 PM

    Hi, is there a way to reuse pre-defined string values like %PKMSPUBLIC% or %CREDATTR{tagvalue_session_index}% in an InfoMap templates?  I have seen these being available in login.html/certlogin.html/stepuplogin.html but is there a way to access them in an InfoMap template like just like the pre-defined or custom defined macros can be used?

    Please advise.



    ------------------------------
    Narayan Verma
    ------------------------------


  • 2.  RE: Ability to use predefined values in InfoMap templates

    Posted Wed August 21, 2024 04:26 PM

    Any pointers on this? Specifically I am trying to access the macros listed at https://www.ibm.com/docs/en/sva/10.0.7?topic=modification-macro-resources-customizing-response-pages in a InfoMap template file either directly or by accessing it's value from a mapping rules and sending it to the template.  Is that possible and what's the recommended approach?

    Thanks,

    Narayan



    ------------------------------
    Narayan Verma
    ------------------------------



  • 3.  RE: Ability to use predefined values in InfoMap templates

    Posted Wed August 21, 2024 04:37 PM

    Hello Narayan,

    Those macros are only available in Reverse Proxy management pages.

    They are not available in an Infomap context.



    ------------------------------
    JACK YARBOROUGH
    ------------------------------



  • 4.  RE: Ability to use predefined values in InfoMap templates

    Posted Wed August 21, 2024 04:47 PM

    Thank you Jack!  Are there any alternatives or workarounds to getting the equivalent values for use in InfoMap templates?



    ------------------------------
    Thanks,
    Narayan
    ------------------------------



  • 5.  RE: Ability to use predefined values in InfoMap templates

    Posted Thu August 22, 2024 08:43 AM

    Hi Narayan, 

    I think you're looking to read attributes out of the credential, you can do that in an authenticated session in an infomap using this method:
    This won't work for an authenticated Reverse Proxy Session, ie, if you haven't completed the login flow - and the Reverse Proxy hasn't build the credential. 

    var result = context.get(Scope.REQUEST,"urn:ibm:security:asf:request:token:attribute", "AUTHENTICATION_LEVEL");


    This would extract the value "AUTHENTICATION_LEVEL" into a variable, which you can then use the standard Macro setting in a custom HTML Page.

    You can use the cred viewer local-app to find the attribute name you want. 



    ------------------------------
    Philip Nye
    Senior Product Manager - IBM Verify
    ------------------------------



  • 6.  RE: Ability to use predefined values in InfoMap templates

    Posted Sun August 25, 2024 02:42 PM

    Thank you Phillip!

    Is there a way to get the user's LDAP attributes like CN, mobile, email etc as well?  They don't seem to be populated in the context at all.

    Thanks,

    Narayan



    ------------------------------
    Thanks,
    Narayan
    ------------------------------



  • 7.  RE: Ability to use predefined values in InfoMap templates

    Posted Mon August 26, 2024 01:48 AM

    Hey Narayan, 

    Its very dependent on whether they are in the credential already. 
    Are they in there? 
    Use the Credential Viewer, to see whats in the authenticated credential . 

    https://philipnye.com/2024/08/15/quick-demo-junction-and-credential-viewer/
    (Second part of the article). 

    If you authenticate natively in the reverse proxy, or you've completed a FULL authentication service flow, then the Reverse Proxy will have collected these extra attributes and they will be in the request token. 


    Alternatively, I think you can also find them in the context if you've used the U/P mechanism in the same flow, but you'll note in the mechanisms configuration, it puts it in a different spot. 


    You might need to check a different scope though. 
    var dest = context.get(Scope.SESSION, Attribute Namespace, Attribute ID);

    Let me know how you go



    ------------------------------
    Philip Nye
    Senior Product Manager - IBM Verify
    ------------------------------



  • 8.  RE: Ability to use predefined values in InfoMap templates

    Posted Mon August 26, 2024 08:32 AM

    These values are available on the creds/ivcreds page as below:

    All these calls register null in the logs with the REQUEST scope as well as SESSION scope:

    debugLog("cn: " + context.get(Scope.REQUEST, "urn:ibm:security:asf:response:attribute", "cn"));
    debugLog("mobileNumber: " + context.get(Scope.REQUEST, "urn:ibm:security:asf:response:attribute", "mobileNumber"));
    debugLog("mobile: " + context.get(Scope.REQUEST, "urn:ibm:security:asf:response:attribute", "mobile"));
    debugLog("emailAddress: " + context.get(Scope.REQUEST, "urn:ibm:security:asf:response:attribute", "emailAddress"));
    debugLog("mail: " + context.get(Scope.REQUEST, "urn:ibm:security:asf:response:attribute", "mail"));

    debugLog("tagvalue_cn: " + context.get(Scope.REQUEST, "urn:ibm:security:asf:response:attribute", "tagvalue_cn"));
    debugLog("tagvalue_mail: " + context.get(Scope.REQUEST, "urn:ibm:security:asf:response:attribute", "narayan_verma@ao.uscourts.gov"));
    debugLog("mobileNumber: " + context.get(Scope.REQUEST, "urn:ibm:security:asf:response:attribute", "mobileNumber"));
    User is authenticated first by U/P and then stepped up using a certificate.
    My reverse proxy config file entries are listed below:
    [TAM_CRED_ATTRS_SVC:eperson]
    #original values
    emailAddress = mail
    mobileNumber = mobile
    #original values
    #new values
    tagvalue_mail = mail
    tagvalue_uniqueidentifier = uniqueidentifier
    tagvalue_sn = sn
    tagvalue_givenName = givenName
    tagvalue_displayName = displayName
    tagvalue_telephoneNumber = telephoneNumber
    tagvalue_cn = cn
    voicePhone = voicePhone
    textPhone = textPhone
    #new values


    ------------------------------
    Thanks,
    Narayan
    ------------------------------



  • 9.  RE: Ability to use predefined values in InfoMap templates
    Best Answer

    Posted Mon August 26, 2024 09:26 PM

    You need to make sure you're looking in the right namespace:

    urn:ibm:security:asf:request:token:attribute

    In your code above, you're looking in the response:token:attribute. 



    ------------------------------
    Philip Nye
    Senior Product Manager - IBM Verify
    ------------------------------



  • 10.  RE: Ability to use predefined values in InfoMap templates

    Posted Tue August 27, 2024 12:03 PM

    Thank you Philip! I was able to get mobileNumber, emailAddress, and tagvalue_cn attributes for users authenticating with either the u/p or Kerberos mechanisms after using the above namespace.



    ------------------------------
    Thanks,
    Narayan
    ------------------------------