Hi Stefan,

you should hide your map file using a wrapper script on the server side.
See http://mapserver.org/cgi/wrapper.html
You can find some other methods at http://mapserver.org/ogc/wms_server.html
look for "Changing the Online Resource URL"

Regards,
Zoltan

On Mon, 6 Jan 2014, Stefan Schwarzer wrote:

Hi there,

I am wondering how to deal with the CONNECTION information in the .MAP which is 
used for WMS requests. As the .MAP file must be visible and is readable, the 
CONNECTION information for my database is readable too.

            # Layers definition ---------------------
            LAYER
                NAME wilderness_areas_po
                        METADATA
                                'wcs_label'           'Wilderness Areas'
                                'wcs_rangeset_name'   'test'
                                'wcs_rangeset_label'  'test label'
                        END
                TYPE RASTER
                STATUS OFF
                DATA wilderness_areas_po
                CONNECTIONTYPE postgis
                CONNECTION 'user=my_username password=my_password 
dbname=my_database'
                PROJECTION
                    'init=epsg:4326'
                END
                END


Either I would then need to create a very simple user for that case which 
really only can read the data, or I should hide the file in a directory which 
is not readable by a webuser. But I guess that Mapserver wouldn't like that.

What are your recommendations?

Thanks for any hints.

Stefan
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to