1. /*
  2. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package javax.security.auth;
  6. /**
  7. * This class is for authentication permissions.
  8. * An AuthPermission contains a name
  9. * (also referred to as a "target name")
  10. * but no actions list; you either have the named permission
  11. * or you don't.
  12. *
  13. * <p> The target name is the name of a security configuration parameter
  14. * (see below). Currently the AuthPermission object is used to
  15. * guard access to the Policy, Subject, LoginContext,
  16. * and Configuration objects.
  17. *
  18. * <p> The possible target names for an Authentication Permission are:
  19. *
  20. * <pre>
  21. * doAs - allow the caller to invoke the
  22. * <code>Subject.doAs</code> methods.
  23. *
  24. * doAsPrivileged - allow the caller to invoke the
  25. * <code>Subject.doAsPrivileged</code> methods.
  26. *
  27. * getSubject - allow for the retrieval of the
  28. * Subject(s) associated with the
  29. * current Thread.
  30. *
  31. * getSubjectFromDomainCombiner - allow for the retrieval of the
  32. * Subject associated with the
  33. * a <code>SubjectDomainCombiner</code>.
  34. *
  35. * setReadOnly - allow the caller to set a Subject
  36. * to be read-only.
  37. *
  38. * modifyPrincipals - allow the caller to modify the <code>Set</code>
  39. * of Principals associated with a
  40. * <code>Subject</code>
  41. *
  42. * modifyPublicCredentials - allow the caller to modify the
  43. * <code>Set</code> of public credentials
  44. * associated with a <code>Subject</code>
  45. *
  46. * modifyPrivateCredentials - allow the caller to modify the
  47. * <code>Set</code> of private credentials
  48. * associated with a <code>Subject</code>
  49. *
  50. * getPolicy - allow the caller to retrieve the system-wide
  51. * Subject-based access control policy.
  52. *
  53. * setPolicy - allow the caller to set the system-wide
  54. * Subject-based access control policy.
  55. *
  56. * refreshPolicy - allow the caller to refresh the system-wide
  57. * Subject-based access control policy.
  58. *
  59. * refreshCredential - allow code to invoke the <code>refresh</code>
  60. * method on a credential which implements
  61. * the <code>Refreshable</code> interface.
  62. *
  63. * destroyCredential - allow code to invoke the <code>destroy</code>
  64. * method on a credential <code>object</code>
  65. * which implements the <code>Destroyable</code>
  66. * interface.
  67. *
  68. * createLoginContext - allow code to instantiate a
  69. * <code>LoginContext</code>.
  70. *
  71. * getLoginConfiguration - allow for the retrieval of the system-wide
  72. * login Configuration.
  73. *
  74. * setLoginConfiguration - allow for the setting of the system-wide
  75. * login Configuration.
  76. *
  77. * refreshLoginConfiguration - allow for the refreshing of the system-wide
  78. * login Configuration.
  79. * </pre>
  80. *
  81. * @version 1.42, 01/14/00
  82. */
  83. public final class AuthPermission extends
  84. java.security.BasicPermission {
  85. /**
  86. * Creates a new AuthPermission with the specified name.
  87. * The name is the symbolic name of the AuthPermission.
  88. *
  89. * <p>
  90. *
  91. * @param name the name of the AuthPermission
  92. */
  93. public AuthPermission(String name) {
  94. super(name);
  95. }
  96. /**
  97. * Creates a new AuthPermission object with the specified name.
  98. * The name is the symbolic name of the AuthPermission, and the
  99. * actions String is currently unused and should be null. This
  100. * constructor exists for use by the <code>Policy</code> object
  101. * to instantiate new Permission objects.
  102. *
  103. * <p>
  104. *
  105. * @param name the name of the AuthPermission <p>
  106. *
  107. * @param actions should be null.
  108. */
  109. public AuthPermission(String name, String actions) {
  110. super(name, actions);
  111. }
  112. }