@@ -4,10 +4,43 @@ This directory contains various authorization plugins:
4
4
5
5
- FalsePlugin - denies everything
6
6
- TruePlugin - allows everything
7
- - HttpBasicAuthorizationPlugin -
8
- - SampleAuthorizationPlugin -
9
- - LdapPlugin
10
- - UserPlugin
7
+ - HttpBasicAuthorizationPlugin - sample plugin to utilize HTTP Basic auth
8
+ - LdapPlugin - set of plugins to perform authorization based on LDAP
9
+ - UserPlugin - extract user information from HTTP headers
10
+
11
+ ## Debugging
12
+
13
+ In general, it should be possible to increase log level in Tomcat's
14
+ ` logging.properties ` file to get more verbose logging.
15
+
16
+ ### UserPlugin
17
+
18
+ Has a special property called "fake" that allows to insert custom headers,
19
+ e.g. using the Modify headers Firefox plugin.
20
+
21
+
22
+ ``` xml
23
+ <!-- get user cred from HTTP headers -->
24
+ <void method =" add" >
25
+ <object class =" org.opensolaris.opengrok.authorization.AuthorizationPlugin" >
26
+ <void property =" name" >
27
+ <string >opengrok.auth.plugin.UserPlugin</string >
28
+ </void >
29
+ <void property =" flag" >
30
+ <string >REQUISITE</string >
31
+ </void >
32
+
33
+ <!-- set fake parameter to true to allow insertion of custom headers -->
34
+ <void property =" setup" >
35
+ <void method =" put" >
36
+ <string >fake</string >
37
+ <boolean >true</boolean >
38
+ </void >
39
+ </void >
40
+ </object >
41
+ </void >
42
+
43
+ ```
11
44
12
45
## Example configuration
13
46
@@ -17,6 +50,9 @@ plugins and a sub-stack with 1 SUFFICIENT and 1 REQUIRED plugin.
17
50
There is a config file ` ldap-plugin-config.xml ` specified globally that will be
18
51
used by LdapPlugin. See LdapPlugin directory for sample of this config file.
19
52
53
+ This snippet can be put info read-only configuration that is passed to the
54
+ indexer via the -R option.
55
+
20
56
21
57
``` xml
22
58
<!-- Authorization config begin -->
0 commit comments