Spec-Zone.ru › OpenJDK 21

Класс AuthPermission

java.lang.Object
java.security.Permission
java.security.BasicPermission
javax.security.auth.AuthPermission
Все реализуемые интерфейсы:
Serializable, Guard
public final class AuthPermission extends BasicPermission
Этот класс предназначен для разрешений на аутентификацию. Разрешение AuthPermission содержит имя (также называемое "именем цели"), но не список действий; у вас есть указанное разрешение или нет.

Имя цели — это имя параметра конфигурации безопасности (см. ниже). В настоящее время объект AuthPermission используется для защиты доступа к объектам Subject, LoginContext и Configuration.

Стандартные имена целей для разрешения на аутентификацию:

      doAs -                  allow the caller to invoke the
                              Subject.doAs methods.

      doAsPrivileged -        allow the caller to invoke the
                              Subject.doAsPrivileged methods.

      getSubject -            allow for the retrieval of the
                              Subject(s) associated with the
                              current Thread.

      getSubjectFromDomainCombiner -  allow for the retrieval of the
                              Subject associated with the
                              a SubjectDomainCombiner.

      setReadOnly -           allow the caller to set a Subject
                              to be read-only.

      modifyPrincipals -      allow the caller to modify the Set
                              of Principals associated with a
                              Subject

      modifyPublicCredentials - allow the caller to modify the
                              Set of public credentials
                              associated with a Subject

      modifyPrivateCredentials - allow the caller to modify the
                              Set of private credentials
                              associated with a Subject

      refreshCredential -     allow code to invoke the refresh
                              method on a credential which implements
                              the Refreshable interface.

      destroyCredential -     allow code to invoke the destroy
                              method on a credential object
                              which implements the Destroyable
                              interface.

      createLoginContext.{name} -  allow code to instantiate a
                              LoginContext with the
                              specified name.  name
                              is used as the index into the installed login
                              Configuration
                              (that returned by
                              Configuration.getConfiguration()).
                              name can be wildcarded (set to '*')
                              to allow for any name.

      getLoginConfiguration - allow for the retrieval of the system-wide
                              login Configuration.

      createLoginConfiguration.{type} - allow code to obtain a Configuration
                              object via
                              Configuration.getInstance.

      setLoginConfiguration - allow for the setting of the system-wide
                              login Configuration.

      refreshLoginConfiguration - allow for the refreshing of the system-wide
                              login Configuration.
 

Обратите внимание, что предоставление этого разрешения с целью "modifyPrincipals", "modifyPublicCredentials" или "modifyPrivateCredentials" позволяет модулю аутентификации JAAS заполнять объекты принципала или данных в объекте Subject. Хотя чтение информации внутри набора частных данных требует предоставления разрешения PrivateCredentialPermission типа данных, чтение информации внутри набора принципалов и набора публичных данных не требует дополнительных разрешений. Эти объекты могут содержать потенциально конфиденциальную информацию. Например, модули аутентификации, которые считывают локальную информацию о пользователе или выполняют вход Kerberos, могут добавлять потенциально конфиденциальную информацию, такую как идентификаторы пользователей, группы и имена доменов, в набор принципалов.

Следующее имя цели было устаревшим в пользу createLoginContext.{name}.

      createLoginContext -    allow code to instantiate a
                              LoginContext.
 
Примечание реализации:
Реализации могут определять дополнительные имена целей, но должны использовать соглашения об именовании, такие как нотация доменного имени в обратном порядке, чтобы избежать конфликтов имен.
С:
1.4
См. также:
  • Сериализованная форма

Краткое описание конструкторов

Конструктор Описание
AuthPermission(String name)
Создаёт новый AuthPermission с указанным именем.
AuthPermission(String name, String actions)
Создаёт новый объект AuthPermission с указанным именем.

Краткое описание методов

Методы, объявленные в классе java.security.BasicPermission

equals, getActions, hashCode, implies, newPermissionCollection

Методы, объявленные в классе java.security.Permission

checkGuard, getName, toString

Методы, объявленные в классе java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Подробное описание конструкторов

AuthPermission

public AuthPermission(String name)
Создаёт новый AuthPermission с указанным именем. Имя — это символическое имя AuthPermission.
Параметры:
name - имя AuthPermission
Исключения:
NullPointerException - если name равно null.
IllegalArgumentException - если name пустое.

AuthPermission

public AuthPermission(String name, String actions)
Создаёт новый объект AuthPermission с указанным именем. Имя — это символическое имя AuthPermission, а строка действий в настоящее время не используется и должна быть null.
Параметры:
name - имя AuthPermission
actions - должно быть null.
Исключения:
NullPointerException - если name равно null.
IllegalArgumentException - если name пустое.

© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/javax/security/auth/AuthPermission.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API