Frames | No Frames |
1: /* AuthPermission.java -- permissions related to authentication. 2: Copyright (C) 2004 Free Software Foundation, Inc. 3: 4: This file is part of GNU Classpath. 5: 6: GNU Classpath is free software; you can redistribute it and/or modify 7: it under the terms of the GNU General Public License as published by 8: the Free Software Foundation; either version 2, or (at your option) 9: any later version. 10: 11: GNU Classpath is distributed in the hope that it will be useful, but 12: WITHOUT ANY WARRANTY; without even the implied warranty of 13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14: General Public License for more details. 15: 16: You should have received a copy of the GNU General Public License 17: along with GNU Classpath; see the file COPYING. If not, write to the 18: Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19: 02110-1301 USA. 20: 21: Linking this library statically or dynamically with other modules is 22: making a combined work based on this library. Thus, the terms and 23: conditions of the GNU General Public License cover the whole 24: combination. 25: 26: As a special exception, the copyright holders of this library give you 27: permission to link this library with independent modules to produce an 28: executable, regardless of the license terms of these independent 29: modules, and to copy and distribute the resulting executable under 30: terms of your choice, provided that you also meet, for each linked 31: independent module, the terms and conditions of the license of that 32: module. An independent module is a module which is not derived from 33: or based on this library. If you modify this library, you may extend 34: this exception to your version of the library, but you are not 35: obligated to do so. If you do not wish to do so, delete this 36: exception statement from your version. */ 37: 38: 39: package javax.security.auth; 40: 41: import java.security.BasicPermission; 42: 43: /** 44: * <p>A permission controlling access to authentication service. The 45: * <i>actions</i> field of auth permission objects is ignored; the whole 46: * of the permission is defined by the <i>target</i>.</p> 47: * 48: * <p>The authentication permission targets recognized are:</p> 49: * 50: * <dl> 51: * <dt><code>doAs</code></dt> 52: * 53: * <dd><p>Allows access to the {@link 54: * Subject#doAs(javax.security.auth.Subject java.security.PrivilegedAction)} 55: * methods.</p></dd> 56: * 57: * <dt><code>doAsPrivileged</code></dt> 58: * 59: * <dd><p>Allows access to the {@link 60: * Subject#doAsPrivileged(javax.security.auth.Subject, 61: * java.security.PrivilegedAction, java.security.AccessControlContext)} 62: * methods.</p></dd> 63: * 64: * <dt><code>getSubject</code></dt> 65: * 66: * <dd><p>Allows access to the {@link Subject} associated with a 67: * thread.</p></dd> 68: * 69: * <dt><code>getSubjectFromDomainCombiner</code></dt> 70: * 71: * <dd><p>Allows access to the {@link Subject} associated with a 72: * {@link SubjectDomainCombiner}.</p></dd> 73: * 74: * <dt><code>setReadOnly</code></dt> 75: * 76: * <dd><p>Allows a {@link Subject} to be marked as read-only.</p></dd> 77: * 78: * <dt><code>modifyPrincipals</code></dt> 79: * 80: * <dd><p>Allows the set of principals of a subject to be modified.</p></dd> 81: * 82: * <dt><code>modifyPublicCredentials</code></dt> 83: * 84: * <dd><p>Allows the set of public credentials of a subject to be 85: * modified.</p></dd> 86: * 87: * <dt><code>modifyPrivateCredentials</code></dt> 88: * 89: * <dd><p>Allows the set of private credentials of a subject to be 90: * modified.</p></dd> 91: * 92: * <dt><code>refreshCredential</code></dt> 93: * 94: * <dd><p>Allows a {@link Refreshable} credential to be refreshed.</p></dd> 95: * 96: * <dt><code>destroyCredential</code></dt> 97: * 98: * <dd><p>Allows a {@link Destroyable} credential to be destroyed.</p></dd> 99: * 100: * <dt><code>createLoginContext.<i>name</i></code></dt> 101: * 102: * <dd><p>Allows a {@link javax.security.auth.login.LoginContext} for the 103: * given <i>name</i>. <i>name</i> can also be a wildcard (<code>'*'</code>), 104: * which allows the creation of a context with any name.</p></dd> 105: * 106: * <dt><code>getLoginConfiguration</code></dt> 107: * 108: * <dd><p>Allows the system-wide login {@link 109: * javax.security.auth.login.Configuration} to be retrieved.</p></dd> 110: * 111: * <dt><code>setLoginConfiguration</code></dt> 112: * 113: * <dd><p>Allows the system-wide login {@link 114: * javax.security.auth.login.Configuration} to be set.</p></dd> 115: * 116: * <dt><code>refreshLoginConfiguration</code></dt> 117: * 118: * <dd><p>Allows the system-wide login {@link 119: * javax.security.auth.login.Configuration} to be refreshed.</p></dd> 120: * </dl> 121: */ 122: public final class AuthPermission extends BasicPermission 123: { 124: 125: /** 126: * Creates a new authentication permission for the given target name. 127: * 128: * @param name The target name. 129: */ 130: public AuthPermission (String name) 131: { 132: super (name); 133: } 134: 135: /** 136: * Creates a new authentication permission for the given target name. 137: * The actions list is not used by this class. 138: * 139: * @param name The target name. 140: * @param actions The action list. 141: */ 142: public AuthPermission (String name, String actions) 143: { 144: super (name, actions); 145: } 146: }