[mapserver-users] Oracle Layer: how to set context prior to fetching the data

Michael Smith michael.smith.erdc at gmail.com
Thu Mar 24 06:39:36 PDT 2016


Martin,

How I've done this in the past is use a plsql function that sets the
context and call that function in the query (and just have the function
return a dummy value that you don't use).

Mike

-- 
Michael Smith

Remote Sensing/GIS Center
US Army Corps of Engineers



On 3/24/16,  5:59 AM, "mapserver-users on behalf of Martin Icking"
<mapserver-users-bounces at lists.osgeo.org on behalf of
martin.icking at bentley.com> wrote:

>One of the Oracle based sources we are publishing is using Oracle context
>variables to enable Oracle's fine grained access control.
>So we are in the need to set these context variables (e.g. current
>username)
>prior to doing the select defined by MapServer's DATA statement. In other
>applications we do that by calling a set_context (...) stored procedure
>prior to any data requests.
>Is there any possibility in MapServer to send a pre-request statement to
>the
>database? A current work-around is to set the context at logon time but
>that
>means that we need a new logon for every request that needs a different
>user
>context, not optimal for websites with many users. We'd prefer to have a
>single logon that can be re-used for all requests.
>If there is currently no way to handle this in MapServer we'd like to
>extend
>the Oracle layer's capabilities. Any suggestion by the MS developers on
>where we should place the needed extension in the mapfile (e.g. adding an
>additional keyword at the USING part of the data statement or using new
>layer metadata)?
>Any interest in generalizing this approach?
>
>Tx
>Martin
>
>
>
>--
>View this message in context:
>http://osgeo-org.1560.x6.nabble.com/Oracle-Layer-how-to-set-context-prior-
>to-fetching-the-data-tp5258155.html
>Sent from the Mapserver - User mailing list archive at Nabble.com.
>_______________________________________________
>mapserver-users mailing list
>mapserver-users at lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list