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.

 View Only
Expand all | Collapse all

Get certificate of application in Developer Portal API Connect v10

  • 1.  Get certificate of application in Developer Portal API Connect v10

    Posted Thu February 15, 2024 09:12 AM
    Edited by Sergey Paponov Mon February 19, 2024 01:42 AM

    Hi.

    How can I get certificate of application in  API Connect v10 (not v5 compatible).

    And can I to validate Thumbprint of certificate by javascript code and not by xslt.

    Thanks,

    Sergey



    ------------------------------
    Sergey Paponov
    ------------------------------



  • 2.  RE: Get certificate of application in Developer Portal API Connect v10

    Posted Fri February 16, 2024 01:24 AM

    Hi Sergey

    As per my knowledge we can't access the certificate added by consumer of the application.

    To validate the Thumbprint you have to write/create the UDP in gatewayscript.



    ------------------------------
    SHUBHAM RUDRAWAR
    ------------------------------



  • 3.  RE: Get certificate of application in Developer Portal API Connect v10

    Posted Sun February 18, 2024 08:33 AM

    Hi Shubham.

    Thank you for participating and answer.

    This is exactly what I want to do. 

    I just trying to get certification of application in runtime of request to validate

    Reqards,

    Sergey



    ------------------------------
    Sergey Paponov
    ------------------------------



  • 4.  RE: Get certificate of application in Developer Portal API Connect v10

    Posted Fri February 16, 2024 01:35 AM

    Hi Sergey,

    See this link context variables in IBM API connect. You may want to use it for validating client certs/thumbprints etc.



    ------------------------------
    Ajitabh Sharma
    ------------------------------



  • 5.  RE: Get certificate of application in Developer Portal API Connect v10

    Posted Sun February 18, 2024 08:40 AM

    Hi Ajitabh,

    Thank you for your answer.

    I don't know how to get this variables, I've tried - context.get('application.certificate.XXXXX') and just application.certificate.xxxx but this not work for me while another context variables are available .

    Regards,

    Sergey



    ------------------------------
    Sergey Paponov
    ------------------------------



  • 6.  RE: Get certificate of application in Developer Portal API Connect v10

    Posted Mon February 19, 2024 01:56 AM

    Hi Sergey,

    The certificate for any APP can be retrieved by using the REST APIs. This one could work: 

    https://apic-api.apiconnect.ibmcloud.com/v10/10.0.5.5.html#/IBMAPIConnectPlatformConsumerAPI_200/operation/%2Fapps%2F{org}%2F{app}/get. 



    ------------------------------
    Rosh
    ------------------------------



  • 7.  RE: Get certificate of application in Developer Portal API Connect v10

    Posted Mon February 19, 2024 02:11 AM

    Hi Rosh,

    Thank you so much for reminding me this approach!

    I will try it , but it will required additional "invoke" in assemble.

    I want to add certificate validation in the Native OAuth server in v10, so do you think this approach will  be good ?

    Thanks,

    Sergey



    ------------------------------
    Sergey Paponov
    ------------------------------



  • 8.  RE: Get certificate of application in Developer Portal API Connect v10

    Posted Mon February 19, 2024 01:43 PM

    As @Ajitabh Sharma mentioned using the context variables.

    context.get('application.certificate');



    ------------------------------
    Mahmoud Abedalqader
    ------------------------------



  • 9.  RE: Get certificate of application in Developer Portal API Connect v10

    Posted Tue February 20, 2024 01:50 AM

    Hi Mahmoud,

    Thank you. But unfortunately it didn't work for me.



    ------------------------------
    Sergey Paponov
    ------------------------------



  • 10.  RE: Get certificate of application in Developer Portal API Connect v10

    Posted Tue February 20, 2024 02:38 AM

    Hi Sergey,

    Sorry I forget to mention that the variable will be available only when application authentication is enabled on your API, check documentation.  

    application authentication 



    ------------------------------
    Mahmoud Abedalqader
    ------------------------------



  • 11.  RE: Get certificate of application in Developer Portal API Connect v10

    Posted Wed February 28, 2024 05:28 AM

    Thank you Mahmoud!



    ------------------------------
    Sergey Paponov
    ------------------------------