Bug 165565 - New port: www/mod_auth_token Token-based authentication similar to mod_secdownload in LIGHTTPD
Summary: New port: www/mod_auth_token Token-based authentication similar to mod_secdow...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-29 21:40 UTC by Filip Valder
Modified: 2013-11-18 14:10 UTC (History)
1 user (show)

See Also:


Attachments
mod_auth_token Token-based authentication similar to mod_secdownload in LIGHTTPD.eml (6.45 KB, message/rfc822)
2012-02-29 22:10 UTC, Filip Valder
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Valder 2012-02-29 21:40:16 UTC
Token-based authentication similar to mod_secdownload in LIGHTTPD.
Have your script generate a token and let Apache handle the file
transfer without having to pipe it through a script for security.

Fix: 

--------------030606060801070605070602
Content-Type: text/plain;
 name="=?ISO-8859-2?Q?=C8=E1st_p=F8ipojen=E9_zpr=E1vy?="
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename*0*=ISO-8859-2''%C8%E1%73%74%20%70%F8%69%70%6F%6A%65%6E%E9%20%7A;
 filename*1*=%70%72%E1%76%79


--------------030606060801070605070602----KQ46xbCEMTPElpndZhGrho9oyXGqerSyTkznRA1B22UlqeDu
Content-Type: text/plain; name="mod_auth_token.shar"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="mod_auth_token.shar"

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	mod_auth_token
#	mod_auth_token/Makefile
#	mod_auth_token/pkg-descr
#	mod_auth_token/distinfo
#	mod_auth_token/pkg-deinstall
#	mod_auth_token/pkg-message
#
echo c - mod_auth_token
mkdir -p mod_auth_token > /dev/null 2>&1
echo x - mod_auth_token/Makefile
sed 's/^X//' >mod_auth_token/Makefile << '9f12235b8a9ec0e6dd5b3158e829e2fc'
X# New ports collection makefile for:	mod_auth_token
X# Date created:				29 February 2012
X# Whom:					fv
X#
X# $FreeBSD$
X#
X
XPORTNAME=	mod_auth_token
XPORTVERSION=	1.0.5
XCATEGORIES=	www
XMASTER_SITES=	http://mod-auth-token.googlecode.com/files/
XMASTER_SITES+=	http://ports.valder.cz/${PORTNAME:L}/
X
XMAINTAINER=	filip@valder.cz
XCOMMENT=	Token-based authentication similar to mod_secdownload in LIGHTTPD
X
XBUILD_DEPENDS=	automake>=1.10:${PORTSDIR}/devel/automake
X
XUSE_APACHE=	22+
XAP_GENPLIST=	yes
XPLIST_FILES+=	%%APACHEMODDIR%%/mod_auth_token.so
X
XUSE_AUTOTOOLS=	aclocal:env automake:env libtool
X
Xpost-patch:
X	@${LN} -f -s ${PREFIX}/share/automake-${AUTOMAKE_VERSION}/COPYING 
${WRKSRC}/COPYING
X	@${LN} -f -s ${PREFIX}/share/automake-${AUTOMAKE_VERSION}/config.guess 
${WRKSRC}/config.guess
X	@${LN} -f -s ${PREFIX}/share/automake-${AUTOMAKE_VERSION}/config.sub 
${WRKSRC}/config.sub
X	@${LN} -f -s ${PREFIX}/share/automake-${AUTOMAKE_VERSION}/install-sh 
${WRKSRC}/install-sh
X	@${LN} -f -s ${PREFIX}/share/automake-${AUTOMAKE_VERSION}/missing 
${WRKSRC}/missing
X
Xpost-install:
X	@${CAT} ${WRKSRC}/README
X
X.include <bsd.port.mk>
9f12235b8a9ec0e6dd5b3158e829e2fc
echo x - mod_auth_token/pkg-descr
sed 's/^X//' >mod_auth_token/pkg-descr << '91039b76901d21b2a9e74a3142652e82'
XToken-based authentication similar to mod_secdownload in LIGHTTPD.
XHave your script generate a token and let Apache handle the file
Xtransfer without having to pipe it through a script for security.
X
XWWW: http://code.google.com/p/mod-auth-token/
91039b76901d21b2a9e74a3142652e82
echo x - mod_auth_token/distinfo
sed 's/^X//' >mod_auth_token/distinfo << '4f40ad080ecb2bad0a7130d84dcd78d7'
XSHA256 (mod_auth_token-1.0.5.tar.gz) = 
85af5d3d9bf5fb01d1ba04c814de3b43660cb0bb54122517429113cdb2b198fe
XSIZE (mod_auth_token-1.0.5.tar.gz) = 340355
4f40ad080ecb2bad0a7130d84dcd78d7
echo x - mod_auth_token/pkg-deinstall
sed 's/^X//' >mod_auth_token/pkg-deinstall << 
'cfd8bb91d9a91d905ba285ce084053e0'
X#!/bin/sh
X#
X# $FreeBSD$
X#
X
Xsed -i.bak '/LoadModule.*mod_auth_token.so/d' 
/usr/local/etc/apache[0-9]*/httpd.conf
cfd8bb91d9a91d905ba285ce084053e0
echo x - mod_auth_token/pkg-message
sed 's/^X//' >mod_auth_token/pkg-message << 
'887de36e5961a0b4aa13e29fd511a720'
X
X  This module uses token based authentication to secure downloads X 
and prevent deep-linking. X
X  Have your script or servlet generate a token to authenticate the X 
download and let Apache handle the file transfer without having X  to 
pipe it through a script for security.
X  X  You can find downloads, daily snapshots and support information at
X    http://www.synd.info/
X
XUSAGE
X
X  The token is an hex-encoded MD5 hash of the X  secret password, 
relative file path and the timestamp. It is X  encoded onto the URI as:
X
X    <uri-prefix><token>/<timestamp-in-hex><rel-path>
X
X  For example
X  X 
/protected/dee0ed6174a894113d5e8f6c98f0e92b/43eaf9c5/path/to/file.txt
X
X  where the token is generated as X
X    md5("secret" + "/path/to/file.txt" + dechex(time_now()))
X
X  with the following configuration in httpd.conf
X
X    <Location /protected/>
X      AuthTokenSecret       "secret"
X      AuthTokenPrefix       /protected/
X      AuthTokenTimeout      60
X    </Location
X
X  The actual file would be located in
X  X    /protected/path/to/file.txt
X
XCREDITS
X
X  Implementation ideas were taken from mod_secdownload for LIGHTTPD
X    - http://trac.lighttpd.net/trac/wiki/Docs%3AModSecDownload
887de36e5961a0b4aa13e29fd511a720
exit
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-02-29 21:40:35 UTC
Responsible Changed
From-To: freebsd-ports-bugs->apache

apache@ wants this port PRs (via the GNATS Auto Assign Tool)
Comment 2 Filip Valder 2012-02-29 22:10:00 UTC
Hi.

I've got some problem with my public PTR record (maintained by my ISP). 
FreeBSD.org MXs don't accept mail from me, so I re-sent it using another 
mailbox, but the message was corrupted (as I expected :-)). I've 
attached the original message to his mail. It has got the right headers, 
consistent shar file etc...

Sorry for the inconvenience... My first porting...

Cheers,
Filip
Comment 3 Philip M. Gollucci freebsd_committer freebsd_triage 2012-03-09 02:44:31 UTC
Responsible Changed
From-To: apache->pgollucci

I will take it.
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2012-10-11 22:58:50 UTC
Responsible Changed
From-To: pgollucci->freebsd-ports-bugs

With bugmeister hat, return this to the pool due to inactivity.
Comment 5 Philippe Audeoud freebsd_committer freebsd_triage 2013-11-05 16:10:02 UTC
State Changed
From-To: open->feedback

Since this PR, new release of mod-auth-token has been released. Do you 
wnat to submit a new PR or update this one?
Comment 6 Philippe Audeoud freebsd_committer freebsd_triage 2013-11-18 14:10:54 UTC
State Changed
From-To: feedback->closed

No feedback since long time.