Discussion:
Webapps policy: final RFC
Neil McGovern
2009-08-10 10:47:31 UTC
Permalink
Hi,

I've been tasked as part of the release team of finalising and pushing
through the Webapps Policy, whcih can be found at
http://webapps-common.alioth.debian.org/draft/html/

The source for this is at
http://svn.debian.org/viewsvn/webapps-common/webapps-common/trunk/doc/Webapps-Policy-Manual-DRAFT.sgml?view=log

Comments appreciated, I'd like to get these all in and integrated by end
of August, to push to the policy team for inclusion.

Thanks,
Neil McGovern
--
automake: the emo of Debian software. "You just don't understand me."
Patrick Schoenfeld
2009-08-10 12:47:16 UTC
Permalink
Post by Neil McGovern
Comments appreciated, I'd like to get these all in and integrated by end
of August, to push to the policy team for inclusion.
"3.5 Security measurements"

is interesting. However I fail to see how this relates to packaging
webapps. Do we really want to impose additional policy on which
standards software must fulfill to be included in Debian?
If so, then.. where to draw the line? Imposing it on webapps only
seems a bit inconsequent.

Best Regards,
Patrick
--
To UNSUBSCRIBE, email to debian-webapps-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Dario Minnucci (midget)
2009-08-10 14:02:46 UTC
Permalink
Neil McGovern wrote:

[...]
Post by Neil McGovern
Comments appreciated, I'd like to get these all in and integrated by end
of August, to push to the policy team for inclusion.
'Webapps Policy' --> 4.1.1 Includable files for web applications

Please, include a paragraph about 'site-wide' includes and the preferred path for them.


Cheers.
--
Dario Minnucci (midget) <***@midworld.net>
Phone: +34 902021030 | Fax: +34 902024417 | Support: +34 807450000
Key fingerprint = 62FF F60F CE79 9CE4 EBA8 523F FC84 1B2D 82C8 B711
Neil McGovern
2009-08-10 14:59:24 UTC
Permalink
[cc-ing you, not sure if you're subscribed...]
Post by Dario Minnucci (midget)
Post by Neil McGovern
Comments appreciated, I'd like to get these all in and integrated by end
of August, to push to the policy team for inclusion.
'Webapps Policy' --> 4.1.1 Includable files for web applications
Please, include a paragraph about 'site-wide' includes and the
preferred path for them.
Added this, thoughts?

site-wide include files should be split into a different package,
and made available in
<file>/usr/share/<var>NEWPACKAGE</var></file>. This is to avoid
having multiple copies of code in different packages.

Neil
--
A. Because it breaks the logical sequence of discussion
Q. Why is top posting bad?
gpg key - http://www.halon.org.uk/pubkey.txt ; the.earth.li A40F862E
Dario Minnucci (midget)
2009-08-10 15:39:54 UTC
Permalink
Post by Neil McGovern
[cc-ing you, not sure if you're subscribed...]
I'm a subscriber.
I use to read spam too! :)


[...]
Post by Neil McGovern
Added this, thoughts?
site-wide include files should be split into a different package,
and made available in
<file>/usr/share/<var>NEWPACKAGE</var></file>. This is to avoid
having multiple copies of code in different packages.
I had to read it twice to understand it. :)
Thanks a lot.


Cheers
--
Dario Minnucci (midget) <***@midworld.net>
Phone: +34 902021030 | Fax: +34 902024417 | Support: +34 807450000
Key fingerprint = 62FF F60F CE79 9CE4 EBA8 523F FC84 1B2D 82C8 B711
Romain Beauxis
2009-08-10 16:23:57 UTC
Permalink
Post by Neil McGovern
Added this, thoughts?
site-wide include files should be split into a different package,
and made available in
<file>/usr/share/<var>NEWPACKAGE</var></file>. This is to avoid
having multiple copies of code in different packages.
When splitting files into share and var locations, static files go to share and
editable/dynamic files to var.

However, a lot of PHP code, for instance, rely on relative path for their
inclusion, which is not compatible with this: as soon as a file from share
calls for the inclusion of a file that is in var using a relative path, this
will fail.

Hence, I recommend, when splitting files across share, var, and others
potentially, to also create symlinks to the relative files. For instance:

Original structure:
static.html
dynamic-folder/

static.html then goes to /usr/share/application, and dynamic-folder to
/var/lib/application:

/usr/share/application/static.html
/var/lib/application/dynamic-folder/

Hence, to make this work, I add:

/usr/share/application/static.html
/usr/share/application/dynamic-folder -> /var/lib/application/dynamic-folder/
/var/lib/application/dynamic-folder/
/var/lib/application/static.html -> /usr/share/application/static.html

I believe this should be written somewhere in a webapp policy. I've also been
thinking that this could be a dh_whatever call...



Romain
--
To UNSUBSCRIBE, email to debian-webapps-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Ian Lawrence
2009-08-10 16:01:22 UTC
Permalink
Hi
Post by Neil McGovern
Comments appreciated, I'd like to get these all in and integrated by end
of August, to push to the policy team for inclusion.
Just suggestions really - cherry pick them as you like

Chapter 2 - Terms and Conventions
'Most PHP applications are based from this type of content'
should be ->
Most PHP applications are based on this type of content

3.2 Configuration Files and Customizable Content
for information such as "themes"
should be ->
for information on the "themes"

3.5 Security measurements
Before emitting them, the data need to be checked for
should be ->
Before emitting them, the data needs to be checked for

Input for databases need to be checked against SQL
should be ->
Input for databases needs to be checked against SQL

i.e. input need to be checked for ways to escape
should be ->
i.e. input needs to be checked for ways to escape

5.2 Enabling virtual hosting facilities
SERVER_NAME and HTTP_HOST can be used to provide applications with
enough information to find what config file/script it should use
should be ->
SERVER_NAME and HTTP_HOST can be used to provide applications with
enough information to find out which config file/script should be used

5.3 Default web location of package
The static and dynamically interpreted content of a web application
should be accessable from at or underneath
should be ->
The static and dynamically interpreted content of a web application
should be accessible from, at or underneath

Chapter 6 - Tools provided to help maintenance
This centralizes the effort not only for the packageers themselves
should be ->
This centralizes the effort not only for the packagers themselves

6.2 webapps-common
The webapps-common package may be used instead of registering
applications directly with the webserver, as described in Registering
and unregistering an application with web servers section
should be ->
The webapps-common package may be used instead of registering
applications directly with the webserver, as described in the
Registering and unregistering an application with web servers section

HTH

Ian
--
http://ianlawrence.info
--
To UNSUBSCRIBE, email to debian-webapps-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Neil McGovern
2009-08-11 11:53:04 UTC
Permalink
Post by Ian Lawrence
Hi
Post by Neil McGovern
Comments appreciated, I'd like to get these all in and integrated by end
of August, to push to the policy team for inclusion.
Just suggestions really - cherry pick them as you like
Hi Ian,

Thanks for your contributions!

All taken.

Neil
--
<dkscully> doesn't the world come to an end if iDunno shaves?
<Maulkin> That's how the dinosaurs died then...
<iDunno> and why the dodo was made extinct, the last known habitat for them
was my beard... poor bastards didn't stand a chance.
sean finney
2009-08-10 17:42:06 UTC
Permalink
hi neil,
Post by Neil McGovern
Comments appreciated, I'd like to get these all in and integrated by end
of August, to push to the policy team for inclusion.
good to hear! i'm on vacation now though and won't have time to review
this for at least a week, but i'll chime in when i have a chance.


sean
Marcelo Jorge Vieira (metal)
2009-08-11 03:04:50 UTC
Permalink
hi!

This is a small patch to 6.2 webapps-common section:

--- Webapps-Policy-Manual-DRAFT.sgml 2009-08-10 23:54:54.000000000 -0300
+++ Webapps-Policy-Manual-DRAFT.sgml.new 2009-08-10 23:59:01.000000000 -0300
@@ -569,7 +569,7 @@
</list>

<sect id="tools-webapps">webapps-common
- <p> <package>webapps-common</package>provides a centralized
+ <p> <package>webapps-common</package> provides a centralized
set of tools and procedures for configuring web applications,
webserver extensions, and other packages related to the world
of web applications. Details of this package, and it's implementation


Cheers,

--
Marcelo Jorge Vieira (metal)
poesias/rascunhos - http://metal.alucinados.com
fotos - http://flickr.com/photos/marcelometal/
blog tecnico - http://metaldot.alucinados.com
--
To UNSUBSCRIBE, email to debian-webapps-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Neil McGovern
2009-08-11 11:53:44 UTC
Permalink
hi!
Thanks, applied.

Neil
--
< linuxpoet> rails is a perversion
< mc> someone who use pgsql as calculator shouldnt talk of perversion.
Paul Wise
2009-08-11 06:26:36 UTC
Permalink
I suggest mentioning /home alongside /srv etc in 5.1.1 and 3.1.

3.3 mentions /usr/local/PACKAGE, IMO that should be /usr/local/share/PACKAGE

I also wonder how /usr/lib/cgi-bin/ interacts with multi-arch.

/usr/share/PACKAGE/htdocs also gets used for static content, I wonder
about adding that to 3.1.
--
bye,
pabs

http://wiki.debian.org/PaulWise
--
To UNSUBSCRIBE, email to debian-webapps-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Neil McGovern
2009-08-11 14:32:09 UTC
Permalink
Post by Paul Wise
I suggest mentioning /home alongside /srv etc in 5.1.1 and 3.1.
Added.
Post by Paul Wise
3.3 mentions /usr/local/PACKAGE, IMO that should be /usr/local/share/PACKAGE
Updated.
Post by Paul Wise
I also wonder how /usr/lib/cgi-bin/ interacts with multi-arch.
Have asked :)
Post by Paul Wise
/usr/share/PACKAGE/htdocs also gets used for static content, I wonder
about adding that to 3.1.
It's currently got:
"A unique subdirectory of /usr/share/PACKAGE"
which should cover this. Do you think it's worth adding htdocs as an
example?

Neil
--
< MadCoder> and right now I'm wearing a tutu and am doing dance steps
< Maulkin> I'm scared by the French cabal in tutus.
< HE> The french cabal doesn't need tutus to scare me.
< HE> They have combined computing power (see lucas) with pure madness (see Joss)
Paul Wise
2009-08-11 15:06:33 UTC
Permalink
Post by Paul Wise
/usr/share/PACKAGE/htdocs also gets used for static content, I wonder
about adding that to 3.1.
 "A unique subdirectory of /usr/share/PACKAGE"
which should cover this. Do you think it's worth adding htdocs as an
example?
Perhaps this: "A unique subdirectory of /usr/share/PACKAGE, for
example www or htdocs."
--
bye,
pabs

http://wiki.debian.org/PaulWise
--
To UNSUBSCRIBE, email to debian-webapps-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Penny Leach
2009-08-11 18:31:07 UTC
Permalink
Hi,
Post by Neil McGovern
Comments appreciated, I'd like to get these all in and integrated by end
of August, to push to the policy team for inclusion.
One thing that seemed to be missing (forgive me if I'm wrong) is where to
put user-uploaded content. The closest thing I found was "Modifiable and
overridable content" which lives in /etc/packagename/, but that clearly
seems wrong.

In the case of, for example, Moodle, we're currently designating
/var/lib/moodle to hold all content that is uploaded by users (through
Moodle, not via dav or any other mechanism although I guess that could be
included).


Cheers,
Penny
--
/* ---------------------------------------------------
Penny Leach | http://mjollnir.org | http://she.geek.nz
GPG: 8347 00FC B5BF 6CC0 0FC9 AB90 1875 120A A30E C22B
--------------------------------------------------- */
sean finney
2009-08-11 20:14:46 UTC
Permalink
hi everyone,
Post by Patrick Schoenfeld
Post by Neil McGovern
Comments appreciated, I'd like to get these all in and integrated by end
of August, to push to the policy team for inclusion.
i took a checkout of the latest svn and don't see anything there, are you
working on a local copy?
Post by Patrick Schoenfeld
"3.5 Security measurements"
is interesting. However I fail to see how this relates to packaging
webapps. Do we really want to impose additional policy on which
standards software must fulfill to be included in Debian?
If so, then.. where to draw the line? Imposing it on webapps only
seems a bit inconsequent.
i think what distinguishes a webapp package from a standard software
package is the fact that the primary use case involves acting on input
from untrusted third parties. i think you're right though; there's a
risk that we might be trying to micro-manage this a bit too much, and
some of the specifics (like register_globals) really shouldn't be in
the webapps policy but instead the php policy, unless they are only
illustrative examples. i.e. instead of:

<p>
PHP applications must not depend on
the "register_global" setting turned
on in Apache or other httpds.
<p>
PHP applications should take extra
care not to use internal variables
before their initialisation, in case
"register_global" is turned on by the
administrator.

have:

<p>
Web applications that are configured by default to be publically
accessable[1] must not rely on features or particular
configurations of a webserver or scripting engine that are
considered to be insecure[2]. For example, applications must not
depend on the "register_globals" setting in the PHP scripting
engine
Post by Patrick Schoenfeld
Post by Neil McGovern
'Webapps Policy' --> 4.1.1 Includable files for web applications
Please, include a paragraph about 'site-wide' includes and the
preferred path for them.
Added this, thoughts?
site-wide include files should be split into a different package,
and made available in
<file>/usr/share/<var>NEWPACKAGE</var></file>. This is to avoid
having multiple copies of code in different packages.
I'd say that site-wide include files should defer to the respective
language policy documents, with an aside that suggests something along
these lines. how about this:

When applicable, site-wide include files should adhere to the rules
and conventions of the respective language policy documents[3]. Otherwise,
a directory location similar to the application-specific includes path can
be used. The files should be provided in a package separate from any
web application or otherwise unneeded dependencies, to allow for re-use
and eliminate multiple copies of the code in different packages.
Post by Patrick Schoenfeld
Post by Neil McGovern
site-wide include files should be split into a different package,
and made available in
<file>/usr/share/<var>NEWPACKAGE</var></file>. This is to avoid
having multiple copies of code in different packages.
When splitting files into share and var locations, static files go to share and
editable/dynamic files to var.
However, a lot of PHP code, for instance, rely on relative path for their
inclusion, which is not compatible with this: as soon as a file from share
calls for the inclusion of a file that is in var using a relative path, this
will fail.
i think the application should be responsible for setting its include
path, which is easily doable with a centrally included debian file or
apache configuration. i realize i'm a bit of a hypocrite for saying
this because i'm using a set of symlinks in the cacti package, though :)
Post by Patrick Schoenfeld
/usr/share/application/static.html
/usr/share/application/dynamic-folder -> /var/lib/application/dynamic-folder/
/var/lib/application/dynamic-folder/
/var/lib/application/static.html -> /usr/share/application/static.html
apart from what i said above, i think it's important to use
unique subdirectories of the top level package directories
(i.e. /usr/share/application/htdocs/static.html).
Post by Patrick Schoenfeld
I suggest mentioning /home alongside /srv etc in 5.1.1 and 3.1.
seems reasonable.
Post by Patrick Schoenfeld
3.3 mentions /usr/local/PACKAGE, IMO that should be /usr/local/share/PACKAGE
yes, good catch :)
Post by Patrick Schoenfeld
I also wonder how /usr/lib/cgi-bin/ interacts with multi-arch.
TBH, i think we should deprecate/disallow the use of this directory. All the
years of bikeshedding about /usr/lib/cgi-bin vs /usr/share/cgi-bin aside,
I think it's a fundamentally wrong idea to drop remotely executable
files in a location where they are by default turned on even if the
application isn't configured.
Post by Patrick Schoenfeld
Post by Neil McGovern
/usr/share/PACKAGE/htdocs also gets used for static content, I wonder
about adding that to 3.1.
"A unique subdirectory of /usr/share/PACKAGE"
which should cover this. Do you think it's worth adding htdocs as an
example?
I see no harm in doing that.
Post by Patrick Schoenfeld
One thing that seemed to be missing (forgive me if I'm wrong) is where to
put user-uploaded content. The closest thing I found was "Modifiable and
overridable content" which lives in /etc/packagename/, but that clearly
seems wrong.
In the case of, for example, Moodle, we're currently designating
/var/lib/moodle to hold all content that is uploaded by users (through
Moodle, not via dav or any other mechanism although I guess that could be
included).
I'd say moodle is on the right track there, maybe we should add a
subsection that enshrines this type of behavior (i'd once again make
the amendment that it should be a unique subdirectory)? then again i
guess it might be duplicating what's already specified by the FHS.



sean

[1] we might want a footnote to define publically available, which in my head means
something like "network accessable".
[2] some definition of who determines what insecure is needed, and who
gets the final say.
[3] link/footnote to language policy references
--
Romain Beauxis
2009-08-11 21:24:03 UTC
Permalink
Hi !

Thanks for the comments ! I'll reply on my part.
Post by sean finney
Post by Romain Beauxis
However, a lot of PHP code, for instance, rely on relative path for their
inclusion, which is not compatible with this: as soon as a file from
share calls for the inclusion of a file that is in var using a relative
path, this will fail.
i think the application should be responsible for setting its include
path, which is easily doable with a centrally included debian file or
apache configuration. i realize i'm a bit of a hypocrite for saying
this because i'm using a set of symlinks in the cacti package, though :)
Well, the issue here is that often there is a strong misunderstanding between
upstream developpers and packagers.

Upstream developpers think of their application as files standing on a single
directory which the user copies into its webserver's root.

Hence, when you explain that you split the files according to some strange
policy about static vs. dynamic content, they just don't understand and even
sometimes claim you're breaking their software.

Another issue is that it is a real pain to maintain distribution-specific
patches for that purpose. It can even lead to new issues for this case.

Hence, the symlink solution is the best solution since it allows to install
unmodified files matching the same structure as the original project had.

As a side note, a similar issue exists for multi-site installations, most of
upstream's devs would just say "copy the file in each directory". Here also I
would love to see a standardised way of sharing the same files for multisites
install.

This is the problem for mediawiki for instance.... (someone is working on
solving that for mediawiki by the way)


Romain
--
To UNSUBSCRIBE, email to debian-webapps-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Neil McGovern
2009-09-07 16:34:13 UTC
Permalink
Post by sean finney
hi everyone,
Lots of stuff here, mostly taken :)

Neil
--
* DrFairlyEvil kills himself.
< Werefern> DrFairlyEvil: Wait, you should give me your computer first!
< DrFairlyEvil> Werefern: Bite me. It's coming with me.
< Werefern> How selfish, you won't need it where you're going!
< DrFairlyEvil> If a programmer commits suicide then they are cursed to an eternity working in support. I'll need a computer.
Neil McGovern
2009-09-07 16:28:57 UTC
Permalink
Post by Penny Leach
In the case of, for example, Moodle, we're currently designating
/var/lib/moodle to hold all content that is uploaded by users (through
Moodle, not via dav or any other mechanism although I guess that could be
included).
Seems sensible, added.

Neil
--
02:14:04 <stockholm> crap. my squirrelmail does not work
02:14:07 <stockholm> Maulkin: ping
Loading...