Hi Danny,
 
The module import code in my XQuery library module is as follows
 
import module namespace search =
"http://marklogic.com/appservices/search"; 

at "/MarkLogic/appservices/search/search.xqy";

I would like to reiterate a point that

1.      If I load the modules with read and execute to default role, the
same code works without any error (application default user is
default-user having default-role) 
2.      If I load the modules with read and execute to app role, the
same code works without any error (application default user is app-user
having app-role) 

 
Only when I load few modules with read and execute to default-role, and
the remaining modules with read and execute to app-role this problem
appears. Even though app role is extending from default-role, so
effectively app role has indirect read and execute to all the modules.
 
It is hindering me to set-up security for my application properly.
 
Thanks,
Balvinder
 
________________________________

From: [email protected]
[mailto:[email protected]] On Behalf Of Danny
Sokolsky
Sent: Thursday, May 20, 2010 6:15 PM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] Marklogic Security Issue



In looking closer at the error (not enough coffee before), it is
complaining about not finding:

 

C:\Program
Files\MarkLogic\Modules\MarkLogic\appservices\search\search.xqy

 

So perhaps your module is importing that path, instead of this one:

 

/MarkLogic/appservices/search/search.xqy

 

If it was importing the c: one, it would look for a document in the
modules db with that URI.  What is your module import code for the
search.xqy look like?

 

-Danny

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Danny
Sokolsky
Sent: Thursday, May 20, 2010 9:41 AM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] Marklogic Security Issue

 

My guess is that the /framework/mvc/xqmvc.xqy  document does not have
execute permissions for a role that the user running the app has.  The
xqmvc modules are in the database, right?  Try doing an
xdmp:document-get-permissions("/framework/mvc/xqmvc.xqy") and check the
permissions.

 

That at least is a place to start.

 

-Danny 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of SinghDang,
Balvinder (ELS-OXF)
Sent: Thursday, May 20, 2010 9:02 AM
To: [email protected]
Subject: [MarkLogic Dev General] Marklogic Security Issue

 

Hi All,

 

We are facing a strange issue in our project, any help from the gurus
out there is greatly appreciated

1.      We have created a default-role and and app-role in the ML
Security DB 
2.      App role is inheriting default-role 
3.      Modules are loaded with some modules having read and execute to
default role, and the rest of the modules having read and execute to app
role 
4.      When we request access an application library module which is
importing the search i.e.   import module namespace
search="http://marklogic.com/appservices/search"; at
"/MarkLogic/appservices/search/search.xqy"; 

5.      The application throws the following error 

XDMP-MODNOTFOUND: (err:XQST0059) xdmp:eval("import module namespace
xqmvc-ctrlr = "http://scholarsporta...";, (fn:QName("",
"form-data"), map:map(<map:map
xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:map="http://marklogic.com/xdmp/map";><map:entry key="_f"><map:value
xsi:type="xs:string">render-form<...</map:map>)), <options
xmlns="xdmp:eval"><isolation>different-transaction</isolation><prevent-d
eadlocks>t...</options>) -- Module C:\Program
Files\MarkLogic\Modules\MarkLogic\appservices\search\search.xqy not
found 

in /framework/mvc/xqmvc.xqy, on line 98,
in _controller("/application/controllers/search/search.xqy",
"render-form") [1.0-ml] 

$controller-file = "/application/controllers/search/search.xqy"
$function = "render-form"
$import-declaration = "import module namespace xqmvc-ctrlr =
&quot;http://scholarsporta...";
$form-data = map:map(<map:map
xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:map="http://marklogic.com/xdmp/map";><map:entry key="_f"><map:value
xsi:type="xs:string">render-form<...</map:map>)
$function-call = "xqmvc-ctrlr:render-form(map:map(<map:map
xmlns:xs=&quot;http://w..."; 

in /framework/mvc/xqmvc.xqy, on line 180,

 

1.      If I load the modules with read and execute to default role, the
same code works without any error (application default user is
default-user having default-role) 
2.      If I load the modules with read and execute to app role, the
same code works without any error (application default user is app-user
having app-role) 

Please help.

 

Thanks,

Balvinder

Elsevier Limited. Registered Office: The Boulevard, Langford Lane,
Kidlington, Oxford, OX5 1GB, United Kingdom, Registration No. 1982084
(England and Wales).
 

Elsevier Limited. Registered Office: The Boulevard, Langford Lane, Kidlington, 
Oxford, OX5 1GB, United Kingdom, Registration No. 1982084 (England and Wales).

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to