Using Python to access SecureX Remote target for HTTPS API Call
Hi, I'm not sure if this is feasible so just checking if someone from the community may have an answer to this.
We have some on-premise API endpoints that I would like to query using the orchestration module so we have gone ahead and setup the Secure Remote.
This works when we are using the HTTP service module in Orchestration but it appear to be fairly limited to the size of response from the API. So for this reason we are thinking if using Python module and calling it from within the script would work around the size issue.
However I am having difficulty in making it work although I have set the Orchestration Workflow to use remote target. Any idea if additional code/configuration is required here?
hi @jh.liew , I am currently doing some research for you if this is possible. Could you light some more context into why the regular HTTP action does not work for you? You mention it is fairly limited in the response size? Can't you do some kind of pagination with a loop? Thanks!
Hi @chrivand I have tried querying the API with various parameters, when a large result is returned which take more than 10 secs or so (based on observation), the HTTP action would just timed out instead. This only happen when the API call is made over SecureX remote towards on-premise hosted API endpoint.
Pagination would be possible I guess but will require some additional work, this is what I'm currently exploring in parallel. Thanks.
P/S: The API is CyberVision's by the way. Using Postman to perform manual query test it is able to return large dataset without issue.
Hi @chrivand, I found out what the actual issue now after working with the workflow development in the past few days. It's not the HTTP service timing out but to do with passing an output of that API call exceeding the limit of Python module to accept as input via system arguments.
While we can use pagination, we were looking at processing the data and merge the result - this proof to be too big for Python module to do in a single pass. If we use looping to run Python module multiple times, each of the Python runtime appear to be in its own sandbox and we're back to the same problem - limitation of using system argument to pass data around.
It would be easier if SecureX has some kind of temporary storage area where HTTP service can save into and allow Python module to read directly from.
Listen: https://smarturl.it/CCRS8E42Follow us: twitter.com/CiscoChampion
APIClarity is an open source, cloud-native visibility tool for APIs. It utilizes a Service Mesh framework to capture and analyze API traffic and identify potential risks.
Hi there, I have downloaded a Python script to find the duplicates on Cisco AMP for Endpoints dashboard from the following URL: https://github.com/CiscoSecurity/amp-04-find-duplicate-guids When I'm running the Python script, I'm getti...
Hi, I'm testing some python code to pull user information / account statuses from ISE which is using Active Directory as an External Source. I've successfully used some of the other ISE ERS AD functions to get Admin users, Get Join Point and Get join...
Are you ready for Cisco Live, Melbourne? Either way, join us for the first ever #CiscoChat LIVE! from Australia. We’ve gathered up a fantastic cast of characters to chat with you about security, wireless, mobility, 49ers, Vegemite, and security. Mostly se...