[Geoserver-users] How can I configure user name/password in geowebcache.xml for wmslayers?

Hi,

As I wrote some hours ago, you can use only one username/password in geowebcache.xml. Because in your case you want to connect with several WMS services using different usernames and passwords it just does not work. This limitation could be worth making a feature request. Meanwhile you'd better investigate some proxy systems and/or try to find funding for contracting the development work.

You have already tried Geoserver as a proxy but perhaps you quit too easily. How about securing cascaded layers so that only your GWC user has rights for them? I do know that InteProxy works too.

-Jukka Rahkonen-

-----Alkuperäinen viesti-----
Lähettäjä: mano3688 [mailto:mano3688@anonymised.com]
Lähetetty: 19. joulukuuta 2012 16:45
Vastaanottaja: geoserver-users@lists.sourceforge.net
Aihe: Re: [Geoserver-users] How can I configure user name/password in
geowebcache.xml for wmslayers?

I am planning to stop to use Cascading WMS layers approach now.
if I use this approach,I have to publish the layer locally in geoserver.
But I don't want to publish the layer in geoserver.

So, How can directly access the external service layer using geowebcache.xml
file configuration with specific username and password for each layer?
Because I am plan to access the layer directly without local geoserver.

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-
can-I-configure-user-name-password-in-geowebcache-xml-for-wmslayers-
tp5023835p5023929.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Thanks.

I thought geowebcache.xml file support multiple username and password for
each layer url.
So that I asked again and again.

Now I got it clearly,so I skip that multiple username and password for each
layer url.

Now I will use cascaded layers or InteProxy .

I don't think so about cascaded layers for my GWC user.

But I will test with both approach in my app.

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-can-I-configure-user-name-password-in-geowebcache-xml-for-wmslayers-tp5023835p5023940.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

I have the feeling it is still not completely clear, hence copies from my
geowebcache.xmls:

1st case: one password for all layers at the beginning of the
geowebcache.xml:

<?xml version="1.0" encoding="utf-8"?>
<gwcConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation="http://geowebcache.org/schema/1.2.2
http://geowebcache.org/schema/1.2.4/geowebcache.xsd&quot;
xmlns="http://geowebcache.org/schema/1.2.2&quot;&gt;
  <version>1.2.4</version>
  <backendTimeout>240</backendTimeout>
  <cacheBypassAllowed>false</cacheBypassAllowed>
  <httpUsername>cm85</httpUsername>
  <httpPassword>xxxx</httpPassword>
.......

2nd case you have different accounts for different layers:

you put it into the <wmsLayer> tag as below
...........
      <wmsUrl>
        <string>http://imagestest.land.vic.gov.au/ecwp/ecw_wms.dll&lt;/string&gt;
      </wmsUrl>
     
<wmsLayers>ZTEST_ALG_VIC-LANDCOVER_2009DEC14_AIR_VIS_50CM_VG94</wmsLayers>
      <httpUsername>cm85</httpUsername>
      <httpPassword>xxxx</httpPassword>
      <expireCache>-2</expireCache>
      <backendTimeout>240</backendTimeout>
      <cacheBypassAllowed>false</cacheBypassAllowed>
      <queryable>false</queryable>
    </wmsLayer>

Obviously the layers could go to different servers.

3rd case you have different <wmsLayers> with different permits in one
<wmsLayer> tag.

Does not work.

Cheers

Christian

-----
____________________________

Dr Christian Maul
Project Manager

Information Services Branch
Department of Sustainability and Environment
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002

Telephone: +61-3-8636 2325
Telefax: +61-3-8636 2813
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-can-I-configure-user-name-password-in-geowebcache-xml-for-wmslayers-tp5023835p5024001.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

do you mean,the layers could go to different servers if my geowebcache.xml
like this?.

<layers>
    <wmsLayer>
      <name>kd:sverigekartan</name>
      <httpUsername>U1</httpUsername>
      <httpPassword>P1</httpPassword>
    
<wmsUrl><string>http://maps.lantmateriet.se/allmannakartor/wms/v1&lt;/string&gt;&lt;/wmsUrl&gt;
    </wmsLayer>
    <wmsLayer>
      <name>kd:topowebbkartan</name>
        <httpUsername>U2</httpUsername>
       <httpPassword>P2</httpPassword>
    
<wmsUrl><string>http://maps-eval.lantmateriet.se/topowebbfast/wms/v1&lt;/string&gt;&lt;/wmsUrl&gt;
    </wmsLayer>
    <wmsLayer>
      <name>kd:orto</name>
        <httpUsername>U1</httpUsername>
        <httpPassword>P1</httpPassword>
    
<wmsUrl><string>http://maps.lantmateriet.se/ortophoto/wms/v1&lt;/string&gt;&lt;/wmsUrl&gt;
    </wmsLayer>
    <wmsLayer>
      <name>gde:Gazetter</name>
    
<wmsUrl><string>http://localhost:8081/geoserver/wms?layers=gde:Gazetter&lt;/string&gt;
</wmsUrl>
    </wmsLayer>
    <wmsLayer>
      <name>0</name>
      <httpUsername>U3</httpUsername>
       <httpPassword>P3</httpPassword>
    
<wmsUrl><string>http://nvkarta.vic-metria.nu/ArcGIS/services/NVKarta/MapServer/WMSServer?&lt;/string&gt;&lt;/wmsUrl&gt;
    </wmsLayer>
</layers>

Thanks
By Mano G.

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-can-I-configure-user-name-password-in-geowebcache-xml-for-wmslayers-tp5023835p5024009.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Thanks lot.
<layers>
          <wmsLayer>
                        <name>kd:sverigekartan</name>
                        <httpUsername>U1</httpUsername>
                        <httpPassword>P1</httpPassword>
                       
<wmsUrl><string>http://maps.lantmateriet.se/allmannakartor/wms/v1&lt;/string&gt;&lt;/wmsUrl&gt;
          </wmsLayer>
          <wmsLayer>
                        <name>kd:topowebbkartan</name>
                          <httpUsername>U2</httpUsername>
                         <httpPassword>P2</httpPassword>
                       
<wmsUrl><string>http://maps-eval.lantmateriet.se/topowebbfast/wms/v1&lt;/string&gt;&lt;/wmsUrl&gt;
          </wmsLayer>
         
</layers>

This above approach is working in my application.Now I can set unique
username and password for each and every layer.

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-can-I-configure-user-name-password-in-geowebcache-xml-for-wmslayers-tp5023835p5024053.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

I haven't the time to try it but I think the order is relevant. At least
that is what I foggily recall and more importantly that is what my
XML-editor tells me. So, please see the example below. I think <wmsUrl>
after <httpUsername> and <httpPassword> doesn't work.

<wmsLayer>
      <name>SATELLITE_TEST_Google</name>
      <metaInformation>
        <title>Aerial Landcover Vic</title>
        <description>Melbourne April 2008</description>
      </metaInformation>
      <mimeFormats>
        <string>image/jpeg</string>
      </mimeFormats>
      <gridSubsets>
        <gridSubset>
          <gridSetName>EPSG:900913</gridSetName>
          <extent>
            <coords>
              <double>16085588.053641856</double>
              <double>-4608973.99366228</double>
              <double>16202712.472780583</double>
              <double>-4510011.0877771191</double>
            </coords>
          </extent>
          <zoomStart>0</zoomStart>
          <zoomStop>20</zoomStop>
        </gridSubset>
      </gridSubsets>
      
      <wmsUrl>
        <string>http://imagestest.land.vic.gov.au/ecwp/ecw_wms.dll&lt;/string&gt;
      </wmsUrl>
      <wmsLayers>ALG_MELBOURNE_2011APR08_AIR_VIS_10CM_MGA55</wmsLayers>
      <httpUsername>cm85</httpUsername>
      <httpPassword>xxxx</httpPassword>
      <expireCache>-2</expireCache>
      <expireClients>-1</expireClients>
      <backendTimeout>240</backendTimeout>
      <cacheBypassAllowed>false</cacheBypassAllowed>
      <queryable>false</queryable>
    </wmsLayer>

-----
____________________________

Dr Christian Maul
Project Manager

Information Services Branch
Department of Sustainability and Environment
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002

Telephone: +61-3-8636 2325
Telefax: +61-3-8636 2813
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-can-I-configure-user-name-password-in-geowebcache-xml-for-wmslayers-tp5023835p5024193.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Sorry for late response.
Order is not a problem.It should work.
I have tried using my layer
like <wmsUrl> after <httpUsername> and <httpPassword>
and
<wmsUrl> before <httpUsername> and <httpPassword>.

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-can-I-configure-user-name-password-in-geowebcache-xml-for-wmslayers-tp5023835p5024600.html
Sent from the GeoServer - User mailing list archive at Nabble.com.