This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new f55f2be0 Add some more authzn tests
f55f2be0 is described below

commit f55f2be0ce535edc196bbbd23dcd60b8dfcf8b9c
Author: Sebb <[email protected]>
AuthorDate: Thu Dec 22 14:23:56 2022 +0000

    Add some more authzn tests
---
 docker-config/25-authz_ldap_group_membership.conf | 10 ++++++++++
 docker-config/whimsy.conf                         | 20 ++++++++++++++++++++
 www/test/pmc-chair/index.html                     |  1 +
 www/test/pmc-chair/test.cgi                       |  3 +++
 www/test/secretary/index.html                     |  1 +
 www/test/secretary/test.cgi                       |  3 +++
 6 files changed, 38 insertions(+)

diff --git a/docker-config/25-authz_ldap_group_membership.conf 
b/docker-config/25-authz_ldap_group_membership.conf
index 7611ee33..2c6b2115 100644
--- a/docker-config/25-authz_ldap_group_membership.conf
+++ b/docker-config/25-authz_ldap_group_membership.conf
@@ -37,3 +37,13 @@
   AuthLDAPGroupAttributeIsDN on
   AuthLDAPMaxSubGroupDepth 0
 </AuthzProviderAlias>
+
+# LDAP alias: Secretary
+<AuthzProviderAlias ldap-group ldap-alias-secretary 
cn=asf-secretary,ou=groups,ou=services,dc=apache,dc=org>
+  AuthLDAPUrl "ldaps://<%= ldaphosts%>/ou=people,dc=apache,dc=org?uid"
+  AuthLDAPBindDN <%= ldapbinddn%>
+  AuthLDAPBindPassword "<%= ldapbindpw%>"
+  AuthLDAPGroupAttribute member
+  AuthLDAPGroupAttributeIsDN on
+  AuthLDAPMaxSubGroupDepth 0
+</AuthzProviderAlias>
diff --git a/docker-config/whimsy.conf b/docker-config/whimsy.conf
index df5ba3b1..c83b06ec 100644
--- a/docker-config/whimsy.conf
+++ b/docker-config/whimsy.conf
@@ -284,6 +284,26 @@ Alias /project/icla/ /srv/whimsy/www/project/icla/public
   </RequireAny>
 </Directory>
 
+<Directory /srv/whimsy/www/test/pmc-chair>
+  AuthType Basic
+  AuthName "ASF PMC Chairs"
+  AuthBasicProvider ldap
+  AuthLDAPUrl "ldaps://<%= ldaphosts%>/ou=people,dc=apache,dc=org?uid"
+  AuthLDAPBindDN <%= ldapbinddn%>
+  AuthLDAPBindPassword "<%= ldapbindpw%>"
+  Require ldap-alias-pmc-chair
+</Directory>
+
+<Directory /srv/whimsy/www/test/secretary>
+  AuthType Basic
+  AuthName "ASF secretarial team"
+  AuthBasicProvider ldap
+  AuthLDAPUrl "ldaps://<%= ldaphosts%>/ou=people,dc=apache,dc=org?uid"
+  AuthLDAPBindDN <%= ldapbinddn%>
+  AuthLDAPBindPassword "<%= ldapbindpw%>"
+  Require ldap-alias-secretary
+</Directory>
+
 <LocationMatch ^/incubator/moderators>
   AuthType Basic
   AuthName "ASF Members and Incubator PMC"
diff --git a/www/test/pmc-chair/index.html b/www/test/pmc-chair/index.html
new file mode 100644
index 00000000..3ceda836
--- /dev/null
+++ b/www/test/pmc-chair/index.html
@@ -0,0 +1 @@
+pmc-chair
diff --git a/www/test/pmc-chair/test.cgi b/www/test/pmc-chair/test.cgi
new file mode 100755
index 00000000..97c40334
--- /dev/null
+++ b/www/test/pmc-chair/test.cgi
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+PAGETITLE = "Whimsy Environment Tester"
+load "#{__dir__}/../../test.cgi"
diff --git a/www/test/secretary/index.html b/www/test/secretary/index.html
new file mode 100644
index 00000000..7509b10d
--- /dev/null
+++ b/www/test/secretary/index.html
@@ -0,0 +1 @@
+secretary
\ No newline at end of file
diff --git a/www/test/secretary/test.cgi b/www/test/secretary/test.cgi
new file mode 100755
index 00000000..97c40334
--- /dev/null
+++ b/www/test/secretary/test.cgi
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+PAGETITLE = "Whimsy Environment Tester"
+load "#{__dir__}/../../test.cgi"

Reply via email to