Anyone have any luck with passing a user name and password the the Poll an External Website for XML?

5936
4
04-02-2015 06:16 AM
JacobBoyle
Occasional Contributor III

I've been trying to create a connection to an XML site that requires a user name and password. 

The URL structure I've been attempting is:

https://user@domain.com:password@app.site.com/feeds/assets.xml//user@domain.com:password@app.site.com/feeds/assets.xml

This URL has worked when I use it in a browser, but GeoEvent is having issues with it.  Cs soon as it hits the first @ it reads the rest as the URL

Error creating the URL: https://user@domain.com:password@app.site.com///user@domain.com:password@app.site.com/ Error: Stream handler unavailable due to: For input string: password@app.site.com/".

I'm using ArcGIS Server 10.3 and GeoEvent 10.3

Tags (3)
0 Kudos
4 Replies
RJSunderman
Esri Regular Contributor

Hello Jacob -

You should be able to specify a URL parameter which includes embedded username and password credentials when configuring a Poll an External Website for XML inbound connector. However, you should be aware that doing poses a security risk, potentially exposing your credentials as the URL parameter is readable by anyone able to access your Server's REST endpoints ... specifically the GeoEvent endpoints on port 6180 (e.g. http://MyServer.MyDomain:6180/geoevent/rest).

The better approach would be to configure a new inbound connector using the HTTP‑BasicAuthentication transport and XML adapter. The transport and adapter are both available out of the box. Configuring a new connector does not require any SDK development. From within GeoEvent Manager, navigate to Site > GeoEvent > Connectors and click Create Connector. In a separate tab/window you can click to open any of the existing connectors to see how they have been configured and use them as an example.

If you do decide to use the out-of-the-box Poll an External Website for XML inbound connector, you may find that you need to URL encode the credentials you are embedding in the connector’s URL property.

The correct syntax, I believe, is https://<user>:<password>@app.site.com/

So, for example, you would URL encode your string as follows:

I tend to use http://meyerweb.com/eric/tools/dencoder/ when I need to interactively encode / decode URL strings.

Looking at the examples you posted … you may also find that you need to drop the @domain.com suffix from the URL. I am less sure about this than recommending you URL encode the value however. It may be that if you URL encode the value then you’ll be able to specify the fully-qualified credentials:  user@domain.com:password@app.site.com

Hope this information helps -

RJ

JacobBoyle
Occasional Contributor III

The issue is, the server I am trying to access is 3rd party, and the only allowed logins have a@domain.com requirement from the company.  I am reaching out to the admin to see if I can get a login without @.

0 Kudos
KDeVogelaere
Occasional Contributor

Jacob, we have had success polling an external website for JSON, see screenshot below for a configuration sample setup in GeoEvent 10.2.2-

Sample.png

DikshaBandil1
New Contributor

Hi, all

I have tried this same method with 10.5.1 version but I am not able to access data. please help how to use url with basic authentication with geoevent manager.

have a look how i have given my service.

 

0 Kudos