4

I am trying to access a Basic-Auth secured WMS Service. When requesting the Capabilities document, the service will always list some layers, even without authentication. But with authentications, more layers should be listed.

Unfortunately it won't work, only publicly available layers are listed in ArcGIS Pro. When I look at the HTTP request I can not see an Authorization header.

What kind of authentication is used in ArcGIS Pro (or ESRI products in general) when adding username/password in the "Add WMS Server Connection" Dialog? How is this intended to work?

I am completely in control of said service, it is possible to debug and configure any way we like. At the moment it supports HTTP Basic only but other methods could be implemented. I tested this service with a Browser and QGIS, where everything works as expected.

4
  • Can you test using an authkey in the WMS URL?
    – Ali
    Commented Jul 4, 2019 at 14:46
  • While that probably would work, it is not secure at all. I hope we don't have to resort to that, since all GIS clients should support Basic Auth, no? Commented Jul 5, 2019 at 7:09
  • Just another test to cover all bases. Check out PolyGeo's answer to a similar question.
    – Ali
    Commented Jul 5, 2019 at 8:37
  • Thanks for the link. We tried contacting ESRI before, but this lead to no satisfying answer. What I'm trying to find out is this: How is it actually supposed to work with ArcGIS? I don't get any errors, nor can I see any HTTP Headers. Commented Jul 5, 2019 at 10:31

1 Answer 1

3

Unlike QGIS for example, ArcGIS Pro won't just happily send user credentials in the initial Request. It tries without Authorization header first, expects a 401 Unauthorized Status and a WWW-Authenticate Basic Header in return. Then, and only then, the Authorization header with user credentials will be set. This is per the Spec, but happens to be a bit inconvenient.

In our case, we always want to answer with a Capabilities document, because we need authentication only for some layers. An unauthorized user will therefore just get a much shorter list of layers. An additional mechanism for distinguishing users is needed, I opted for an additional HTTP GET parameter in the URL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.