Maximo

 View Only
  • 1.  Not able to connect to external system using OAuth

    Posted 11 days ago

    Hi All,

    We are replacing our authorization method for integration to OAuth. The working of integration is, it connects to external system, fetches the data using endpoints and the insert the data into Maximo using end point. All this happens in automation script. We are replacing traditional way to connect to external system with OAuth.

    I am having an automation script which calls the external system endpoint as below

    handler = Router.getHandler("EXTSYSEPOAUTH")
    extServResp = invokeExtEndpoint(handler,map)

    In End Point application for mentioned end point I defined below properties 

    HTTPMETHOD : GET

    OAUTHCLIENT : Oauth2

    URL : https://xxxx-xxxx.xxxx/xxx/xxxx

    Here are the details of OAuth client (Oauth2)

    name: Oauth2

    Clent ID : xxxxxx

    Grant Type: refresh token

    Token Url : https://xxxxxx/1xxx0/oauth2/v2.0/token

    Clent Secret: xxxx

    Scope: api://xxxx/.xxx

    Refresh Token: xxxxxxx

    Now when I try to run this integration get below message

    BMXAA1477E - The connection to the HTTP handler for the endpoint failed. Review the error and server log files to determine the cause of the issue, for example, incorrect properties in the DefaultHTTPExit.java handler class.
    com.ibm.jsse2.util.j: PKIX path building failed: com.ibm.security.cert.IBMCertPathBuilderException: unable to find valid certification path to requested target

    When I run it while changing grant type to client credentials get below message

    BMXAA1481E - Cannot deliver the message to the endpoint.
    null

    I tried another way where I chose handler for end point as OAUTH and provided property values. In this case I get below message

    BMXAA8341E - An error was encountered while attempting to retrieve a resource at URI https://****/xxxx/xxxxxx using the OAuth protocol. There might be an error in the OAuth end point, the resource URI might not be valid, or you might not have permission to access the resource. Verify that the OAuth end point for the provider is configured properly, that the resource URI is valid, and that you have permission to access the resouce.
    null

    What am I missing or doing wrong? Any input on this is most welcome. 

    Thanks in advance.



    ------------------------------
    Anil Raghuvanshi
    ------------------------------


  • 2.  RE: Not able to connect to external system using OAuth

    Posted 11 days ago

    Hi Anil,

    it looks like you're doing it right. 
    This independent blog entry explains it step by step. Perhaps you would like to doublecheck your config.

    Furthermore the first exception (BMXAA1477E [...] PKIX path building failed: com.ibm.security.cert.IBMCertPathBuilderException: unable to find valid certification path to requested target) indicates issue with Java trust store.

    Depending if you're running Maximo EAM or MAS Manage you address this problem in a slightly different way. For details please refer to an excellent Adding a Trusted Certificate Authority (CA) blog post by @Jason VenHuizen which covers both cases.



    ------------------------------
    Andrzej Więcław
    Maximo Technical SME
    ZNAPZ B.V.
    Wrocław, Poland
    ------------------------------



  • 3.  RE: Not able to connect to external system using OAuth

    Posted 11 days ago

    Hi Anil,

    Your steps are correct. Launch the end point URL (   https://****/xxxx/xxxxxx) in a separate browser and export the certificate from the address bar. Import it to Maximo , rebuild and retry. It should work. 



    ------------------------------
    Kushal Desai
    Senior Consulting Manager
    Toronto ON
    ------------------------------



  • 4.  RE: Not able to connect to external system using OAuth

    Posted 7 days ago

    Hi Anil, I faced the same problem on connecting to external system - Publish channel. we need to collect the certificate from external party and upload it to trusted certificates into IBM Websphere (Maximo 7.6.1.x) or WAS Liberty (MAS) where Maximo is hosted. Please refer this one  SSL Certification Error.You can follow the steps suggested by other to upload the certificates. Thanks, Suren. 



    ------------------------------
    Surender Balasundaram
    Asset Data Coordinator
    Downer
    Sydney NSW
    ------------------------------