<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NO-BOK" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Some more user comments: When we installed RStudio server in our company, our network administrator actually only agreed, because we could limit
the listening-addresses / the server was not available from the internet and only accessible within the trusted company network. The same would likely be true for a GRASS web-interface too. So like Massimo, I would guess that the “trused-user” approach would
be the most popular…<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">In fact, the only use-case I can imagine for an anonymous web access to a GRASS installation would be demonstration / marketing, that people can
have a closer look without installing. But that would require, that the web UI is comparable to the desktop solution to give a comparable impression… Would be anonymous www-access be possible at all? I mean, how would one exclude concurrent use of a mapset,
i.e. two anonymous users accessing the same mapset at the same time?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Cheers<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Stefan <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> grass-dev-bounces@lists.osgeo.org [mailto:grass-dev-bounces@lists.osgeo.org]
<b>On Behalf Of </b>epi<br>
<b>Sent:</b> 9. mars 2014 15:28<br>
<b>To:</b> Glynn Clements<br>
<b>Cc:</b> grass-dev@lists.osgeo.org<br>
<b>Subject:</b> Re: [GRASS-dev] GSoC 2014: GRAS GIS Web UI<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Glynn,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I’aware that the "security risk handling" in a web app is a hard and hot topic, hopefully a lot of project are working on this direction <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Of course a web-ui for grass will be designed for registered users and not for the anonymous www (password, registration and https can be implemented) <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The “web-shell” feature is obviously reserved to only “trusted users”.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">without this assumption application like Rstudio or IPython notebook should not exist.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">A multi user approach needs to be based IMHO on unix each user has to have its own home and access to filesystem. If this is not enough the application can be restricted to a chroot jail but this is not part of the UI development (is more
a sys admin choice)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">For the authorization protocol it can be implemented using PAM. (i guess is what Rstudio is using)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">WT has a mature authentication module <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><a href="http://www.webtoolkit.eu/wt/blog/2011/11/29/wt___jwt_3_2_0">http://www.webtoolkit.eu/wt/blog/2011/11/29/wt___jwt_3_2_0</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="http://www.webtoolkit.eu/wt/blog/2013/08/07/security__wt_and_the_new_breach_vulnerability/">http://www.webtoolkit.eu/wt/blog/2013/08/07/security__wt_and_the_new_breach_vulnerability/</a><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The potential user of a web ui for grass, need to be a trusted user in any case and need to go trough a registration process where an admin as to approve it. not anonymous users allowed.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I guess the code behind the web-ui has to sanitize each text entry, will be this enough ?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">A "sanitize inspection" on all the “input” coming from the web-ui can be performed and this will be part of the UI itself, not of the grass modules. with the aim to avoid people doing something like .. <a href="http://xkcd.com/327/">http://xkcd.com/327/</a>
;)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Massimo.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">On Mar 8, 2014, at 11:42 AM, Glynn Clements <<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<p class="MsoNormal"><br>
Rashad M wrote:<br>
<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">My main concern would be security.<br>
<br>
You will need to thoroughly sanitise all inputs. You cannot rely upon<br>
GRASS modules to do this, as e.g. most string handling uses fixed-size<br>
buffers, so you need to explicitly limit the length of any arguments<br>
to avoid the possibility of buffer overruns.<o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><br>
I am not clear with this. maybe security and web apps are creating me a<br>
confusion.<o:p></o:p></p>
<p class="MsoNormal"><br>
If you do not understand the principles of secure programming, you<br>
shouldn't attempt to write a web interface to GRASS.<br>
<br>
GRASS modules typically do not attempt to be secure against invalid<br>
input. If you're providing access to "untrusted" users (users who<br>
aren't supposed to have the full privileges of the account under which<br>
the modules are executed), you will need to prevent invalid input from<br>
reaching the modules.<br>
<br>
<span lang="EN-US">-- <br>
Glynn Clements <</span><a href="mailto:glynn@gclements.plus.com"><span lang="EN-US">glynn@gclements.plus.com</span></a><span lang="EN-US">><br>
_______________________________________________<br>
grass-dev mailing list<br>
</span><a href="mailto:grass-dev@lists.osgeo.org"><span lang="EN-US">grass-dev@lists.osgeo.org</span></a><span lang="EN-US"><br>
</span><a href="http://lists.osgeo.org/mailman/listinfo/grass-dev"><span lang="EN-US">http://lists.osgeo.org/mailman/listinfo/grass-dev</span></a><span lang="EN-US"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</div>
</body>
</html>