Opened 20 years ago

Closed 16 years ago

#581 closed defect (fixed)

[WMS] Need a way to pass authentication parameters for WMS connections

Reported by: dmorissette Owned by: mapserverbugs
Priority: high Milestone: FUTURE
Component: WMS Client Version: 4.1
Severity: normal Keywords:
Cc: bfraser@…, sgillies@…, mapserver@…, bartvde@…, uli@…, micheal.arnold@…

Description

We need to add the ability to pass a user/password through to libcurl for a WMS
connection.



Sean Gillies wrote:
> Hi all, I've run into a nasty bug with a WMS client connection.  I'm 
> digging
> into the code right now, but am hoping that one of the WMS developers will
> have some suggestions for me.
> 
> Problem is that with the CVS mapserver a WMS layer with a connection like
> 
>     CONNECTION "http://user:passwd@host/servlet?&foo=bar"
> 
> is falling all the way through the logic in msDrawLayer to the point where
> we try to draw it using drawEPPL().  Any reasons why this connection
> wouldn't work?

Change History (17)

comment:1 by dmorissette, 20 years ago

Status: newassigned
The user:password need to be passed to 
  curl_easy_setopt(CURLOPT_USERPWD, "user:pwd")

See http://curl.haxx.se/libcurl/c/curl_easy_setopt.html

I will likely create a wms_something metadata for that.

comment:2 by bartvde@…, 20 years ago

I don't think this is a bug as it works fine for me in a binary from 02-02-2004. 
Or something should have changed between 02-02-2004 and the current CVS release.

comment:3 by bartvde@…, 20 years ago

Cc: bartvde@… added

comment:4 by dmorissette, 20 years ago

Which version of libcurl do you use, Sean?

Note that when you get the drawEPPL() error that normally means that the remote
WMS server returned junk and since WMS layers are processed as rasters, no
format understands the junk, and the last format in the list, which is EPPL,
produces an error.

If you compiled your mapserver with --enable-debug, then look in the apache
error_log and you'll see a log of everything curl does, with any error message
from curl is there are some.

comment:5 by dmorissette, 20 years ago

Milestone: 4.2 release

comment:6 by dmorissette, 20 years ago

OK, so it seems that CURL does accept the user:pwd as part of the URL, but to
prevent the password from being exposed in error messages or in logfiles, I
think we should still implement a separate metadata to pass the user/password to
curl.  I'll keep this bug open for that.


Sean Gillies wrote:
> 
> Turns out that the service, which the developers claimed was WMS 
> compliant, was
> requiring lower case WMS parameters.  This isn't up to spec, is it?
> 
> So I hacked mapwmslayer.c to emit a GetMap with lower case params.  And now
> it "works", but sure smells bad.
> 


comment:7 by mapserver@…, 20 years ago

Cc: mapserver@… added

comment:8 by dmorissette, 20 years ago

Milestone: 4.2 release4.4 release
Pushing to 4.4 release

comment:9 by hopthu1745@…, 20 years ago

bug_file_loc: www.coithienthai.com/members

comment:10 by hopthu1745@…, 20 years ago

Cc: hopthu1745@… added

comment:11 by dmorissette, 20 years ago

bug_file_loc: www.coithienthai.com/members
Nice... now we have bugzilla spammers... taking out the spam URL.

comment:12 by dmorissette, 20 years ago

Cc: hopthu1745@… removed

comment:13 by micheal.arnold@…, 19 years ago

Cc: micheal.arnold@… added

comment:14 by dmorissette, 19 years ago

Milestone: 4.4 releaseFUTURE
Not in 4.4. Setting FUTURE target milsetone.

comment:15 by uli@…, 19 years ago

Cc: uli@… added

comment:16 by bfraser@…, 19 years ago

Cc: bfraser@… added

comment:17 by project10, 16 years ago

Resolution: fixed
Status: assignedclosed

The changes described in this patch were also submitted, and are in trunk, as a result of #571. The ticket gives a list of metadata to use, to specify http authentication information for cascaded wms layers.

Note: See TracTickets for help on using tickets.