Skip to main content

Accessing Geocortex Essentials Rest End Point Secured Site from python or similar tool

Comments

6 comments

  • Kevin Penner
    Hi Claudia,

     

    The biggest issue is having a valid token at the time the python code wants to access it. It would likely not be trivial for the python code to fake a user login to obtain a token.

     

    For other customers with similar requirements, we have built custom security providers that allow access to certain non-user based systems. The security provider can identify and allow access to the python requests based on a number of different criteria of your choosing. Once the provider was deployed, you would allow access through the sites permissions tab to this new 'identity' exactly how is done for users currently.

     

    For more details, you can contact your account manager and they can put you intouch with a project manager here. Depending on the requrements, the provider would require a low level of effort from our end.

     

    -Kevin

     

     
    0
  • Tom Neer
    @Claudia. We haven't played with this yet, but you may try using the Requests and Cookielib libraries. 
    0
  • Permanently deleted user
    Thanks Kevin and Tom for your quick responses.

     

    @Kevin, I would like to know what the Geocortex is offering in the standard suite. If I need to issue a token just like ArcGIS Server then what service / url can I call, provide the authorization parameters and get the required type of token which can be session or IP based. Is there any URL that we can call just like ArcGIS Server as per this link 'http://server.arcgis.com/en/server/latest/administer/linux/acquiring-arcgis-tokens.htm'?

     

    @Tom, thanks for pointing me to the python libraries. Let me accept that I am not that proficient with them, but I tried experimenting with Requests and configuring it and getting information from geocortex rest site with windows authentication enabled is not an easy task for me. I tried to configure the ntlm and kerberos extension libs but ended up with stupid missing dependencies.

     

     
    0
  • Tom Neer
    Yes and you need to be sure that when you install requests that you also install requests[security]. But I think your issue is with the cookies that LG uses. You will need to request one and store it for each session. At least that is how we handle authenication with our data scrapers.
    0
  • Permanently deleted user
    I installed it as well now and tried but could not get success. Our environment is setup with Kerberos protocol and when I tried installing requests_kerberos lib then am getting following error.

     

      C:\app\Python27\Scripts>pip install requests_kerberos Requirement already satisfied (use --upgrade to upgrade): requests_kerberos in c :\app\python27\lib\site-packages\requests_kerberos-0.10.0-py2.7.egg Requirement already satisfied (use --upgrade to upgrade): requests>=1.1.0 in c:\ app\python27\lib\site-packages (from requests_kerberos) Requirement already satisfied (use --upgrade to upgrade): kerberos-sspi>=0.2 in c:\app\python27\lib\site-packages\kerberos_sspi-0.2-py2.7.egg (from requests_ker beros) Collecting pywin32 (from kerberos-sspi>=0.2->requests_kerberos) Could not find a version that satisfies the requirement pywin32 (from kerberos -sspi>=0.2->requests_kerberos) (from versions: ) No matching distribution found for pywin32 (from kerberos-sspi>=0.2->requests_ke rberos) I even tried the manual install but this error is always haunting me 'No matching distribution found for pywin32'. Googling didn't give me an easy solution to fix it so for the time being gave up on it because of the urgency of some other priorities.

     

     
    0
  • Permanently deleted user
    Dear all, thanks for your kind support and time. We created a support ticket with Geocortex to see if we can access the secured Geocortex resources / rest end point information in the current implementation and it was concluded that currently it doesn't support it. We would see if the product is extended in future and secured resources and functionalities are exposed just like ArcGIS Server if possible.
    0

Please sign in to leave a comment.