Skip to content
Browse files

update readme, metadata and fix userprogram script

  • Loading branch information...
1 parent b45c2ff commit 638cd9e711efb0a728d0eed5505410dd5c91ec4e @jtimberman jtimberman committed Oct 27, 2009
Showing with 19 additions and 2 deletions.
  1. +10 −0 README.rdoc
  2. +7 −1 metadata.rb
  3. +2 −1 templates/default/mod_auth_openid.rb.erb
View
10 README.rdoc
@@ -50,6 +50,16 @@ If 'cookbook' and 'template' are not specified, the current cookbook's templates
There's a new recipe, apache2::god_monitor. You will need to make sure to include the 'god' recipe before using the apache2::god_monitor recipe in your cookbook.
+== OpenID Auth
+
+Installs the mod_auth_openid module from source. Specify an array of OpenIDs that are allowed to authenticate with the attribute apache[:allowed_openids]. Use the following in a vhost to protect with OpenID authentication:
+
+ AuthOpenIDEnabled On
+ AuthOpenIDDBLocation /var/cache/apache2/mod_auth_openid.db
+ AuthOpenIDUserProgram /usr/local/bin/mod_auth_openid.rb
+
+Change the DBLocation as appropriate for your platform. You'll need to change the file in the recipe to match. The UserProgram is optional if you don't want to limit access by certain OpenIDs.
+
= LICENSE & AUTHOR:
Author:: Joshua Timberman (<joshua@opscode.com>)
View
8 metadata.rb
@@ -3,11 +3,12 @@
license "Apache 2.0"
description "Installs and configures all aspects of apache2 using Debian style symlinks with helper definitions"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
-version "0.9.1"
+version "0.10.0"
recipe "apache2", "Main Apache configuration"
recipe "apache2::mod_alias", "Apache module 'alias' with config file"
recipe "apache2::mod_auth_basic", "Apache module 'auth_basic'"
recipe "apache2::mod_auth_digest", "Apache module 'auth_digest'"
+recipe "apache2::mod_auth_openid", "Apache module 'authopenid'"
recipe "apache2::mod_authn_file", "Apache module 'authn_file'"
recipe "apache2::mod_authnz_ldap", "Apache module 'authnz_ldap'"
recipe "apache2::mod_authz_default", "Apache module 'authz_default'"
@@ -120,6 +121,11 @@
:description => "Determine behavior of TRACE requests",
:default => "On"
+attribute "apache/allowed_openids",
+ :display_name => "Apache Allowed OpenIDs",
+ :description => "Array of OpenIDs allowed to authenticate",
+ :default => ""
+
attribute "apache/prefork",
:display_name => "Apache Prefork",
:description => "Hash of Apache prefork tuning attributes.",
View
3 templates/default/mod_auth_openid.rb.erb
@@ -1,9 +1,10 @@
#!/usr/bin/env ruby
allowed_openids = <%= @allowed_openids %>
+requested_openid = ARGV[0]
allowed_openids.each do |id|
- if id == ARGV[0]
+ if requested_openid =~ /#{id}/
exit 0
else
exit 1

0 comments on commit 638cd9e

Please sign in to comment.
Something went wrong with that request. Please try again.