KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > tanukisoftware > wrapper > security > WrapperPermission


1 package org.tanukisoftware.wrapper.security;
2
3 /*
4  * Copyright (c) 1999, 2006 Tanuki Software Inc.
5  *
6  * Permission is hereby granted, free of charge, to any person
7  * obtaining a copy of the Java Service Wrapper and associated
8  * documentation files (the "Software"), to deal in the Software
9  * without restriction, including without limitation the rights
10  * to use, copy, modify, merge, publish, distribute, sub-license,
11  * and/or sell copies of the Software, and to permit persons to
12  * whom the Software is furnished to do so, subject to the
13  * following conditions:
14  *
15  * The above copyright notice and this permission notice shall be
16  * included in all copies or substantial portions of the Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21  * NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25  * OTHER DEALINGS IN THE SOFTWARE.
26  */

27
28 import java.security.BasicPermission JavaDoc;
29
30 /**
31  * WrapperPermissions are used to control access to the various methods of the
32  * WrapperManager class.
33  *
34  * <table border=1 cellpadding=5 summary="permission target name,
35  * what the target allows,and associated risks">
36  * <tr>
37  * <th>Permission Target Name</th>
38  * <th>What the Permission Allows</th>
39  * <th>Risks of Allowing this Permission</th>
40  * </tr>
41  *
42  * <tr>
43  * <td>restart</td>
44  * <td>Restart the JVM</td>
45  * <td>
46  * This is an extremely dangerous permission to grant.
47  * Malicious applications can restart the JVM as a denial of service
48  * attack.
49  * </td>
50  * </tr>
51  *
52  * <tr>
53  * <td>stop</td>
54  * <td>Stop the JVM</td>
55  * <td>
56  * This is an extremely dangerous permission to grant.
57  * Malicious applications can stop the JVM as a denial of service
58  * attack.
59  * </td>
60  * </tr>
61  *
62  * <tr>
63  * <td>stopImmediate</td>
64  * <td>Stop the JVM immediately without running the shutdown hooks</td>
65  * <td>
66  * This is an extremely dangerous permission to grant.
67  * Malicious applications can stop the JVM as a denial of service
68  * attack.
69  * </td>
70  * </tr>
71  *
72  * <tr>
73  * <td>signalStarting</td>
74  * <td>Control the starting timeouts.</td>
75  * <td>
76  * Malicious code could set this to unrealistically small values as the application
77  * is starting, thus causing startup failures.
78  * </td>
79  * </tr>
80  *
81  * <tr>
82  * <td>signalStopping</td>
83  * <td>Control the stopping timeouts.</td>
84  * <td>
85  * Malicious code could set this to unrealistically small values as the application
86  * is stopping, thus causing the application to fail to shutdown cleanly.
87  * </td>
88  * </tr>
89  *
90  * <tr>
91  * <td>signalStopped</td>
92  * <td>Control when the Wrapper is told that the Application has stopped.</td>
93  * <td>
94  * Malicious code could call this before the application is actually stopped,
95  * thus causing the application to fail to shutdown cleanly.
96  * </td>
97  * </tr>
98  *
99  * <tr>
100  * <td>log</td>
101  * <td>Sends log output to the Wrapper over the back end socket at a specific log level.</td>
102  * <td>
103  * Malicious code could send very large quanities of log output which could affect
104  * the performance of the Wrapper.
105  * </td>
106  * </tr>
107  *
108  * <tr>
109  * <td>listServices</td>
110  * <td>Requests the status of all services currently installed on the system.</td>
111  * <td>
112  * Malicious code could use this information to find other weaknesses in the system.
113  * </td>
114  * </tr>
115  * </table>
116
117 addWrapperEventListener service,core
118 removeWrapperEventListener
119 setConsoleTitle
120 getUser
121 getInteractiveUser
122 getProperties
123 getWrapperPID
124 getJavaPID
125 requestThreadDump
126 test.appearHung
127 test.accessViolation
128 test.accessViolationNative
129
130  *
131  * @author Leif Mortenson <leif@tanukisoftware.com>
132  */

133 public class WrapperPermission
134     extends BasicPermission JavaDoc
135 {
136     /*---------------------------------------------------------------
137      * Constructors
138      *-------------------------------------------------------------*/

139     /**
140      * Creates a new WrapperPermission with the specified name.
141      * The name is the symbolic name of the WrapperPermission, such as "stop",
142      * "restart", etc. An asterisk may appear at the end of the name, following
143      * a ".", or by itself, to signify a wildcard match.
144      *
145      * @param name the name of the WrapperPermission.
146      */

147     public WrapperPermission( String JavaDoc name )
148     {
149         super( name );
150     }
151     
152     public WrapperPermission( String JavaDoc name, String JavaDoc actions )
153     {
154         super( name, actions );
155     }
156 }
157
Popular Tags