Esri / geoportal-server-harvester

Metadata Harvester for Esri Geoportal Server
http://esri.github.io/geoportal-server/
Apache License 2.0
31 stars 24 forks source link

Map Services Authentication Fails #32

Open MapZombie opened 6 years ago

MapZombie commented 6 years ago

Our organization has Arcgis rest services at domain/arcgis/rest

It automatically authenticates with our Windows AD credentials when navigating to the page.

When I try to harvest Map services I am getting the following error: 08-Aug-2017 09:31:23.880 SEVERE [HARVESTING] com.esri.geoportal.harvester.support.ErrorLogger.logError Error processing task: PROCESS:: status: working, title: PROCESSOR: DEFAULT[], SOURCE: AGS[ags-host-url=http://ngismap/arcgis/rest/services, cred-username=DOMAIN\\username, cred-password=*****, ags-enable-layers=false], DESTINATIONS: [GPT[gpt-host-url=http://GEOPORTAL:8080, cred-username=gptadmin, cred-password=*****, gpt-index=metadata_v1, gpt-cleanup=false, gpt-accept-xml=true, gpt-accept-json=false]], INCREMENTAL: false, IGNOREROBOTSTXT: false | Error listing server content. com.esri.geoportal.harvester.api.ex.DataInputException: Error listing server content. at com.esri.geoportal.harvester.ags.AgsBroker.iterator(AgsBroker.java:135) at com.esri.geoportal.harvester.engine.defaults.DefaultProcessor$DefaultProcess.lambda$new$1(DefaultProcessor.java:131) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.http.client.HttpResponseException: Unauthorized at com.esri.geoportal.commons.ags.client.AgsClient.listContent(AgsClient.java:118) at com.esri.geoportal.harvester.ags.AgsBroker.listResponses(AgsBroker.java:152) at com.esri.geoportal.harvester.ags.AgsBroker.iterator(AgsBroker.java:132) ... 2 more

Ive setup the authentication in Harvester as: Username: DOMAIN\username also DOMAIN\username Password: ****

I've tried to edit Map services Broker, saved, then deleted the task and readded it. Then ran the task. This looks like a bug unless I'm missing something here. Username/PW are 100% correct. Thanks.

ghost commented 5 years ago

Bump. I'm interested too as our ESRI Portal uses AD,

mhogeweg commented 5 years ago

We have started to discuss how we could support authenticating the harvester with Portal for ArcGIS (and whatever security provider it is configured with). When doing this interactively, it would be straightforward (OAuth2 etc). But we need to be able to run the harvester overnight, scheduled and unattended. We'd like to not store various tokens and such. So, we're looking into this, but it becomes non-trivial...