[Featureserver] user level cfg?

Christopher Schmidt crschmidt at metacarta.com
Wed Nov 26 08:36:51 EST 2008


On Wed, Nov 26, 2008 at 03:15:32PM +0200, Lehtonen, Mika wrote:
> Hi there,
> 
> what you think about user level cfg-file for FeatureServer?
> 
> I've been writing an application where user can upload his/her own shp 
> or whatever data into FeatureServer. What's bothering me a little is 
> that everybody can see what others have uploaded into it. I don't mean 
> that my work would be involved with any top secret data serving, but 
> some privacy could be appreciated. What I was thinking, is that is it 
> feasible/possible to construct a FeatureServer with user level cfg?

There are so many things you could mean here that I can't even guess
where to begin. The short answer is "Yes, there are many things you
could do". 

> I don't have any Python experience, so it's quite hard to inspect the 
> code in order to find out that. Anyone having any comment on this?
> Mainly I was thinking about passing an userid with the request like: 
> ...featureserver.cgi?user=bill ... And the procedure would be that FS 
> would check the bill.cfg to see if there's any datastores defined. If 
> any userid  weren't attached, FS would use the default featureserver.cfg.

So this is completely unrelated to users. Instead, you simply want to
modify the featureserver.cgi to pull the config file name from the
request -- even a novice Python user can probably work that out.
specifically, you'll be changing the 'cfgfiles' variable: it's already
in featureserver.cgi, just set it equal to the filename you want t use,
using cgi.FieldStorage() to pull the request parameters from the GET
string...

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Featureserver mailing list