From 95b85be502f639fb2080ae92d4d33c013b18aa94 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 31 Dec 2012 20:08:30 +0100 Subject: Add support for password protected albums This adds support for simple password protected areas (albums and all subalbums) through webserver HTTP authentication. CGG simply generates .htaccess and password files and it's up to the user to set up the rest on server side. No UI changes at this point. Limited to one user per album for the moment. --- sample/src/passwd_protect/index.xml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 sample/src/passwd_protect/index.xml (limited to 'sample/src/passwd_protect/index.xml') diff --git a/sample/src/passwd_protect/index.xml b/sample/src/passwd_protect/index.xml new file mode 100644 index 0000000..10225fa --- /dev/null +++ b/sample/src/passwd_protect/index.xml @@ -0,0 +1,27 @@ + + + + Restricted area + Restricted area + file:// URL). +

+ This feature requires web server user htaccess override enabled as well as the particular authentication modules loaded. All subdirectories (including the current album images) should be protected the same way through automatic parenting. It's usually sufficient to only set password for top-level path you want to protect. Please note this implementation is not bulletproof in any way, a simple configuration error or missing file will bypass any protection. See httpd.apache.org/docs/2.2/howto/auth.html for more information. +

+ CGG will automatically create new password file and will add necessary lines in .htaccess file (appending if it exists). By default, MD5 hash is used. The htpasswd tool needs to be installed as Apache uses it's own MD5 hash modification. Check e.g. apache-tools package. +

+ All of this has a culprit however. For security reasons, the webserver (Apache) disallows relative pathnames to the password file and requires either absolute path or relative path to ServerRoot (basically document root for the domain). Also, storing the password file within the document tree is discouraged though it's fully satisfactory for our needs. A new <location> section in setup.xml file has been introduced. Having a correct path in the <local_path> tag is the key to success. + ]]>
+ + + + Secret pictures + test + + test + + Basic + +
+ +
+ -- cgit v1.2.3