Temporarily disable feed authentication

This commit is contained in:
Alex Cabal 2022-07-11 20:43:02 -05:00
parent 05e0f77b45
commit 4268c6f91c

View file

@ -286,25 +286,25 @@ Define webroot /standardebooks.org/web
RewriteRule ^/bulk-downloads/([^/\.]+)$ /bulk-downloads/collection.php?name=$1
# Enable mod_authn_dbd
DBDriver mysql
DBDParams "dbname=se user=www-data"
# HTTP Basic Auth configuration for /feeds
<DirectoryMatch "^${webroot}/www/feeds/(opds|rss|atom)">
AuthType Basic
AuthName "Enter your Patrons Circle email address and leave the password empty."
Require valid-user
# DBDriver mysql
# DBDParams "dbname=se user=www-data"
# # HTTP Basic Auth configuration for /feeds
# <DirectoryMatch "^${webroot}/www/feeds/(opds|rss|atom)">
# AuthType Basic
# AuthName "Enter your Patrons Circle email address and leave the password empty."
# Require valid-user
# Credentials caching to prevent slamming the DB. socache must be ahead of dbd
AuthBasicProvider socache dbd
AuthnCacheProvideFor dbd
AuthnCacheContext ${domain}
# # Credentials caching to prevent slamming the DB. socache must be ahead of dbd
# AuthBasicProvider socache dbd
# AuthnCacheProvideFor dbd
# AuthnCacheContext ${domain}
# mod_authn_dbd SQL query to authenticate a user
# The hash is simply the hash of a blank password. We're only interested in the username/API key.
# We have to do this tortured query instead of a cleaner one, because the AuthDBDUserPWQuery
# function will only replace %s EXACTLY ONCE. We cannot have more than one %s in the query string.
AuthDBDUserPWQuery "select '$apr1$13q1pnGf$vQnIj94BXP1EPdL/4ISba.' from Users u inner join Benefits b using (UserId) where %s in (u.Email, u.Uuid) and b.CanAccessFeeds = true limit 1"
</DirectoryMatch>
# # mod_authn_dbd SQL query to authenticate a user
# # The hash is simply the hash of a blank password. We're only interested in the username/API key.
# # We have to do this tortured query instead of a cleaner one, because the AuthDBDUserPWQuery
# # function will only replace %s EXACTLY ONCE. We cannot have more than one %s in the query string.
# AuthDBDUserPWQuery "select '$apr1$13q1pnGf$vQnIj94BXP1EPdL/4ISba.' from Users u inner join Benefits b using (UserId) where %s in (u.Email, u.Uuid) and b.CanAccessFeeds = true limit 1"
# </DirectoryMatch>
# Specific config for /bulk-downloads
<DirectoryMatch "${webroot}/www/bulk-downloads">