1
1
Using OpenGrok authorization
2
- ------------------------
2
+ ----------------------------
3
3
4
4
This howto provides information about opengrok authorization with authorization framework.
5
5
You can use this package along with project groupings (merged before) which allows
@@ -15,7 +15,9 @@ Configuration
15
15
--------------
16
16
17
17
You can configure:
18
+
18
19
1) Plugin directory
20
+
19
21
In web.xml for the webapp, there is a context parameter dedicated to this.
20
22
21
23
<context-param>
@@ -26,14 +28,15 @@ You can configure:
26
28
Default value is OPENGROK_DATA_ROOT/plugins
27
29
</description>
28
30
</context-param>
29
-
31
+
30
32
It is commented out by default so that the framework does not do anything.
31
33
The OPENGROK_DATA_ROOT is the dataRoot directory set in configuration.xml.
32
34
33
35
Opengrok authorization expects plugin classes in that directory, it loads those classes in
34
36
memory as plugins and then perform the authorization for each request.
35
37
36
38
2) Watchdog service
39
+
37
40
For easier development there is another context parameter in web.xml.
38
41
39
42
<context-param>
@@ -51,7 +54,8 @@ You can configure:
51
54
plugin directory are loaded.
52
55
53
56
3) Provide a plugin
54
- You can provide your own plugin by putting the compiled
57
+
58
+ You can provide your own plugin by putting the compiled
55
59
plugin class (.class or in .jar) into plugin directory.
56
60
57
61
@@ -116,8 +120,8 @@ Also JVM can forbid you to extend some packages which are not meant to be extend
116
120
Set up
117
121
------
118
122
119
- The plugin class must be compiled to the .class file (and the it can be packaged into .jar file).
120
- The frameworks supports both .class and .jar files.
123
+ The plugin class must be compiled to the .class file (and then it can be packaged into .jar file).
124
+ The framework supports both .class and .jar files.
121
125
For compiling you have to provide opengrok.jar in the classpath
122
126
123
127
Example (for the SampleAuthorizationPlugin which is included):
@@ -127,12 +131,12 @@ Then you can just drop the compiled .class file into plugin directory and deploy
127
131
If the plugin is a part of a package. Then you have to copy the full directory path which is made
128
132
by the compiler relatively to the source file.
129
133
130
- If anything goes wrong, you should find information in the logs.
134
+ If anything goes wrong, you will find information in the logs.
131
135
132
136
Running
133
137
-------
134
138
135
- The framework consists of three parts
139
+ The framework consists of three parts:
136
140
137
141
1) PluginFramework
138
142
Plugin container
@@ -155,4 +159,4 @@ The framework consists of three parts
155
159
156
160
Every 403 error is logged. But information about the user is missing
157
161
because the decision is made by plugins and the filter does not know
158
- how to interpret the request to get the user from it.
162
+ how to interpret the request to get the user from it.
0 commit comments