API Connect

API Connect

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


#API Connect
#Applicationintegration
#APIConnect
 View Only
  • 1.  Get Tls profile certificate in gatewayscript

    Posted 08/22/23 09:34 AM

    I am working of getting TLS PROFILE certificate on gateway-script. Is their any way to getting certificate on gateway-script.



    ------------------------------
    Shah Wajahat
    ------------------------------


  • 2.  RE: Get Tls profile certificate in gatewayscript

    Posted 08/24/23 02:27 PM

    Hi Shah,
    What certificate are you trying to retrieve? If a TLS Mutual Authentication request, the client side certificate information should be available in the API Gateway context.  See https://www.ibm.com/docs/en/api-connect/10.0.5.x_lts?topic=reference-api-connect-context-variables#rapim_context_var__cert-variables.  These are populated when you enable application authentication in your API, see https://www.ibm.com/docs/en/api-connect/10.0.5.x_lts?topic=definition-configuring-application-authentication-api.
    Best Regards,

    Steve Linn



    ------------------------------
    Steve Linn
    Senior Consulting I/T Specialist
    IBM
    ------------------------------



  • 3.  RE: Get Tls profile certificate in gatewayscript

    Posted 08/25/23 08:27 AM

    Hi Steve:

    Thanks for your response. Actually my problem is that I am working on encryption and decryption for this work I need to certificate for encrypt the key 
    here the function 

    dp:encrypt-key(sessionKey, recipient, keyTransportAlgorithm)

    in recipient string that identifies the public key of the recipient. This key can be in a certificate.
    This is used on xslt  that's why i need this key on xslt 



    ------------------------------
    Shah Wajahat
    ------------------------------



  • 4.  RE: Get Tls profile certificate in gatewayscript

    Posted 08/30/23 05:01 PM

    Hi Shah,
    I've not tried this in API Connect, but this has worked for me in a MPGW so it is worth a try

    <xsl:variable name="client-cert" select="normalize-space(dp:auth-info('ssl-client-cert'))"/>

    See https://www.ibm.com/docs/en/datapower-gateway/10.5.0?topic=functions-dpauth-info

    Best Regards,

    Steve Linn



    ------------------------------
    Steve Linn
    Senior Consulting I/T Specialist
    IBM
    ------------------------------