34 * This class is for various network permissions. 35 * A NetPermission contains a name (also referred to as a "target name") but 36 * no actions list; you either have the named permission 37 * or you don't. 38 * <P> 39 * The target name is the name of the network permission (see below). The naming 40 * convention follows the hierarchical property naming convention. 41 * Also, an asterisk 42 * may appear at the end of the name, following a ".", or by itself, to 43 * signify a wildcard match. For example: "foo.*" and "*" signify a wildcard 44 * match, while "*foo" and "a*b" do not. 45 * <P> 46 * The following table lists all the possible NetPermission target names, 47 * and for each provides a description of what the permission allows 48 * and a discussion of the risks of granting code the permission. 49 * 50 * <table class="striped"> 51 * <caption style="display:none">Permission target name, what the permission allows, and associated risks</caption> 52 * <thead> 53 * <tr> 54 * <th>Permission Target Name</th> 55 * <th>What the Permission Allows</th> 56 * <th>Risks of Allowing this Permission</th> 57 * </tr> 58 * </thead> 59 * <tbody> 60 * <tr> 61 * <td>allowHttpTrace</td> 62 * <td>The ability to use the HTTP TRACE method in HttpURLConnection.</td> 63 * <td>Malicious code using HTTP TRACE could get access to security sensitive 64 * information in the HTTP headers (such as cookies) that it might not 65 * otherwise have access to.</td> 66 * </tr> 67 * 68 * <tr> 69 * <td>getCookieHandler</td> 70 * <td>The ability to get the cookie handler that processes highly 71 * security sensitive cookie information for an Http session.</td> 72 * <td>Malicious code can get a cookie handler to obtain access to 73 * highly security sensitive cookie information. Some web servers 74 * use cookies to save user private information such as access 75 * control information, or to track user browsing habit.</td> 76 * </tr> 77 * 78 * <tr> 79 * <td>getNetworkInformation</td> 80 * <td>The ability to retrieve all information about local network interfaces.</td> 81 * <td>Malicious code can read information about network hardware such as 82 * MAC addresses, which could be used to construct local IPv6 addresses.</td> 83 * </tr> 84 * 85 * <tr> 86 * <td>getProxySelector</td> 87 * <td>The ability to get the proxy selector used to make decisions 88 * on which proxies to use when making network connections.</td> 89 * <td>Malicious code can get a ProxySelector to discover proxy 90 * hosts and ports on internal networks, which could then become 91 * targets for attack.</td> 92 * </tr> 93 * 94 * <tr> 95 * <td>getResponseCache</td> 96 * <td>The ability to get the response cache that provides 97 * access to a local response cache.</td> 98 * <td>Malicious code getting access to the local response cache 99 * could access security sensitive information.</td> 100 * </tr> 101 * 102 * <tr> 103 * <td>requestPasswordAuthentication</td> 104 * <td>The ability 105 * to ask the authenticator registered with the system for 106 * a password</td> 107 * <td>Malicious code may steal this password.</td> 108 * </tr> 109 * 110 * <tr> 111 * <td>setCookieHandler</td> 112 * <td>The ability to set the cookie handler that processes highly 113 * security sensitive cookie information for an Http session.</td> 114 * <td>Malicious code can set a cookie handler to obtain access to 115 * highly security sensitive cookie information. Some web servers 116 * use cookies to save user private information such as access 117 * control information, or to track user browsing habit.</td> 118 * </tr> 119 * 120 * <tr> 121 * <td>setDefaultAuthenticator</td> 122 * <td>The ability to set the 123 * way authentication information is retrieved when 124 * a proxy or HTTP server asks for authentication</td> 125 * <td>Malicious 126 * code can set an authenticator that monitors and steals user 127 * authentication input as it retrieves the input from the user.</td> 128 * </tr> 129 * 130 * <tr> 131 * <td>setProxySelector</td> 132 * <td>The ability to set the proxy selector used to make decisions 133 * on which proxies to use when making network connections.</td> 134 * <td>Malicious code can set a ProxySelector that directs network 135 * traffic to an arbitrary network host.</td> 136 * </tr> 137 * 138 * <tr> 139 * <td>setResponseCache</td> 140 * <td>The ability to set the response cache that provides access to 141 * a local response cache.</td> 142 * <td>Malicious code getting access to the local response cache 143 * could access security sensitive information, or create false 144 * entries in the response cache.</td> 145 * </tr> 146 * 147 * <tr> 148 * <td>specifyStreamHandler</td> 149 * <td>The ability 150 * to specify a stream handler when constructing a URL</td> 151 * <td>Malicious code may create a URL with resources that it would 152 * normally not have access to (like file:/foo/fum/), specifying a 153 * stream handler that gets the actual bytes from someplace it does 154 * have access to. Thus it might be able to trick the system into 155 * creating a ProtectionDomain/CodeSource for a class even though 156 * that class really didn't come from that location.</td> 157 * </tr> 158 </tbody> 159 * </table> 160 * 161 * @see java.security.BasicPermission 162 * @see java.security.Permission 163 * @see java.security.Permissions 164 * @see java.security.PermissionCollection 165 * @see java.lang.SecurityManager 166 * 167 * 168 * @author Marianne Mueller | 34 * This class is for various network permissions. 35 * A NetPermission contains a name (also referred to as a "target name") but 36 * no actions list; you either have the named permission 37 * or you don't. 38 * <P> 39 * The target name is the name of the network permission (see below). The naming 40 * convention follows the hierarchical property naming convention. 41 * Also, an asterisk 42 * may appear at the end of the name, following a ".", or by itself, to 43 * signify a wildcard match. For example: "foo.*" and "*" signify a wildcard 44 * match, while "*foo" and "a*b" do not. 45 * <P> 46 * The following table lists all the possible NetPermission target names, 47 * and for each provides a description of what the permission allows 48 * and a discussion of the risks of granting code the permission. 49 * 50 * <table class="striped"> 51 * <caption style="display:none">Permission target name, what the permission allows, and associated risks</caption> 52 * <thead> 53 * <tr> 54 * <th scope="col">Permission Target Name</th> 55 * <th scope="col">What the Permission Allows</th> 56 * <th scope="col">Risks of Allowing this Permission</th> 57 * </tr> 58 * </thead> 59 * <tbody> 60 * <tr> 61 * <th scope="row">allowHttpTrace</th> 62 * <td>The ability to use the HTTP TRACE method in HttpURLConnection.</td> 63 * <td>Malicious code using HTTP TRACE could get access to security sensitive 64 * information in the HTTP headers (such as cookies) that it might not 65 * otherwise have access to.</td> 66 * </tr> 67 * 68 * <tr> 69 * <th scope="row">getCookieHandler</th> 70 * <td>The ability to get the cookie handler that processes highly 71 * security sensitive cookie information for an Http session.</td> 72 * <td>Malicious code can get a cookie handler to obtain access to 73 * highly security sensitive cookie information. Some web servers 74 * use cookies to save user private information such as access 75 * control information, or to track user browsing habit.</td> 76 * </tr> 77 * 78 * <tr> 79 * <th scope="row">getNetworkInformation</th> 80 * <td>The ability to retrieve all information about local network interfaces.</td> 81 * <td>Malicious code can read information about network hardware such as 82 * MAC addresses, which could be used to construct local IPv6 addresses.</td> 83 * </tr> 84 * 85 * <tr> 86 * <th scope="row">getProxySelector</th> 87 * <td>The ability to get the proxy selector used to make decisions 88 * on which proxies to use when making network connections.</td> 89 * <td>Malicious code can get a ProxySelector to discover proxy 90 * hosts and ports on internal networks, which could then become 91 * targets for attack.</td> 92 * </tr> 93 * 94 * <tr> 95 * <th scope="row">getResponseCache</th> 96 * <td>The ability to get the response cache that provides 97 * access to a local response cache.</td> 98 * <td>Malicious code getting access to the local response cache 99 * could access security sensitive information.</td> 100 * </tr> 101 * 102 * <tr> 103 * <th scope="row">requestPasswordAuthentication</th> 104 * <td>The ability 105 * to ask the authenticator registered with the system for 106 * a password</td> 107 * <td>Malicious code may steal this password.</td> 108 * </tr> 109 * 110 * <tr> 111 * <th scope="row">setCookieHandler</th> 112 * <td>The ability to set the cookie handler that processes highly 113 * security sensitive cookie information for an Http session.</td> 114 * <td>Malicious code can set a cookie handler to obtain access to 115 * highly security sensitive cookie information. Some web servers 116 * use cookies to save user private information such as access 117 * control information, or to track user browsing habit.</td> 118 * </tr> 119 * 120 * <tr> 121 * <th scope="row">setDefaultAuthenticator</th> 122 * <td>The ability to set the 123 * way authentication information is retrieved when 124 * a proxy or HTTP server asks for authentication</td> 125 * <td>Malicious 126 * code can set an authenticator that monitors and steals user 127 * authentication input as it retrieves the input from the user.</td> 128 * </tr> 129 * 130 * <tr> 131 * <th scope="row">setProxySelector</th> 132 * <td>The ability to set the proxy selector used to make decisions 133 * on which proxies to use when making network connections.</td> 134 * <td>Malicious code can set a ProxySelector that directs network 135 * traffic to an arbitrary network host.</td> 136 * </tr> 137 * 138 * <tr> 139 * <th scope="row">setResponseCache</th> 140 * <td>The ability to set the response cache that provides access to 141 * a local response cache.</td> 142 * <td>Malicious code getting access to the local response cache 143 * could access security sensitive information, or create false 144 * entries in the response cache.</td> 145 * </tr> 146 * 147 * <tr> 148 * <th scope="row">specifyStreamHandler</th> 149 * <td>The ability 150 * to specify a stream handler when constructing a URL</td> 151 * <td>Malicious code may create a URL with resources that it would 152 * normally not have access to (like file:/foo/fum/), specifying a 153 * stream handler that gets the actual bytes from someplace it does 154 * have access to. Thus it might be able to trick the system into 155 * creating a ProtectionDomain/CodeSource for a class even though 156 * that class really didn't come from that location.</td> 157 * </tr> 158 </tbody> 159 * </table> 160 * 161 * @see java.security.BasicPermission 162 * @see java.security.Permission 163 * @see java.security.Permissions 164 * @see java.security.PermissionCollection 165 * @see java.lang.SecurityManager 166 * 167 * 168 * @author Marianne Mueller |