Skip to content

Commit 0b4619f

Browse files
author
Vladimir Kotal
committed
add debugging section
1 parent f545ffb commit 0b4619f

File tree

1 file changed

+40
-4
lines changed

1 file changed

+40
-4
lines changed

plugins/README.md

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,43 @@ This directory contains various authorization plugins:
44

55
- FalsePlugin - denies everything
66
- 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+
```
1144

1245
## Example configuration
1346

@@ -17,6 +50,9 @@ plugins and a sub-stack with 1 SUFFICIENT and 1 REQUIRED plugin.
1750
There is a config file `ldap-plugin-config.xml` specified globally that will be
1851
used by LdapPlugin. See LdapPlugin directory for sample of this config file.
1952

53+
This snippet can be put info read-only configuration that is passed to the
54+
indexer via the -R option.
55+
2056

2157
```xml
2258
<!-- Authorization config begin -->

0 commit comments

Comments
 (0)