I am trying to develop an automation script that could override an HTTP Endpoint and allow me to do OAUTH2.0. I am able to do this in postman by doing a POST against an initial URL and passing a body including a
grant_type,
client_id,
client_secret and
resource to this URL:
https://login.microsoftonline.com/abctenant/oauth2/tokenThis will then return a bearer access token in the JSON. I am then able to grab that access token, pass it as Authorization in the header and then do a GET or POST against our URI:
https://devabc123.cloudax.dynamics.com/data/Customers
My plan is that I could do this in the automation script code and grab that initial access token and then pass that along so the endpoint can use it in normal integration. We only need to send outbound data from Maximo. This will be for material receiving transactions and they will be triggered via the event listeners in Maximo.
1) I cannot understand where in chain of events I would be able to override the HTTP endpoint. In most of the examples on here, people are manually invoking the endpoint. In my case, I want the event listener to initiate my publish channel which will then send to the connected HTTP endpoint. How do I interject my code so when that receiving event triggers my publish channel, the HTTP endpoint can grab that access token and then everything will continue as normal?
2) As a simple test, I tried setting up an HTTP endpoint and manually passing the Authorization token via the headers in the endpoint parameters. I ran into a certification error below, is this a problem with WebSphere? Or do we actually need a valid certificate imported into WebSphere for this endpoint? See below for our system information.
psdi.util.MXSystemException: BMXAA1477E - The connection failed to the HTTP handler for the endpoint. Review the error and server log flies for information to indicate the cause of the issue, for example, incorrect properties in the DefaultHTTPExit.java handler class.
com.ibm.jsse2.util.h: PKIX path building failed: com.ibm.security.cert.IBMCertPathBuilderException: unable to find valid certification path to requested target
at psdi.iface.router.HTTPHandler.invoke(HTTPHandler.java:475)
Version Info:
App Server IBM WebSphere Application Server 9.0.5.2Version Tivoli's process automation engine 7.6.1.1-IFIX20200624-1103 Build 20190514-1348 DB Build V7611-365 HFDB Build HF7611-26IBM Maximo Asset Management Work Centers 7.6.0.4 Build $build$ DB Build V7604-119IBM Maximo Enterprise Adapter for Oracle Applications 7.6.0.0-20190923-1157 Build 20150804-1717 DB Build V7600-05 HFDB Build HF7600-02IBM Maximo Asset Management Scheduler 7.6.7.3 Build 20190514-1348 DB Build V7673-78 HFDB Build HF7673-12IBM Tpae Integration Framework 7.6.1.1 Build 20190419-2330 DB Build V7611-01IBM Maximo Asset Management 7.6.1.1 Build 20190514-1348 DB Build V7611-01IoT Connection Utility 7.6.0.2 Build 20190426-2206 DB Build V7602-07Server OS Windows Server 2016 10.0Server DB Microsoft SQL Server 13.0 (13.00.4259)------------------------------
Daniel Gruszka
------------------------------
#Maximo#AssetandFacilitiesManagement