- java.lang.Object
-
- java.security.Permission
-
- java.security.BasicPermission
-
- javax.security.auth.AuthPermission
-
- すべての実装されたインタフェース:
Serializable
,Guard
public final class AuthPermission extends BasicPermission
このクラスは、認証のアクセス権に関連します。AuthPermission
には名前(ターゲット名とも呼ばれる)は含まれますが、アクション・リストは含まれません。名前付きアクセス権を得るか、得ないかのどちらかになります。ターゲット名には、セキュリティ構成パラメータの名前(下記を参照)を指定します。 現在、
AuthPermission
オブジェクトは、Policy
、Subject
、LoginContext
、およびConfiguration
オブジェクトへのアクセスを保護するために使用されます。認証許可の標準ターゲット名は次のとおりです:
doAs - allow the caller to invoke the
Subject.doAs
methods. doAsPrivileged - allow the caller to invoke theSubject.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 aSubjectDomainCombiner
. setReadOnly - allow the caller to set a Subject to be read-only. modifyPrincipals - allow the caller to modify theSet
of Principals associated with aSubject
modifyPublicCredentials - allow the caller to modify theSet
of public credentials associated with aSubject
modifyPrivateCredentials - allow the caller to modify theSet
of private credentials associated with aSubject
refreshCredential - allow code to invoke therefresh
method on a credential which implements theRefreshable
interface. destroyCredential - allow code to invoke thedestroy
method on a credentialobject
which implements theDestroyable
interface. createLoginContext.{name} - allow code to instantiate aLoginContext
with the specifiedname
.name
is used as the index into the installed loginConfiguration
(that returned byConfiguration.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 viaConfiguration.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ログイン・モジュールでプリンシパルまたは資格証明オブジェクトをサブジェクトに読み込むことができます。 プライベート資格証明セット内の情報を読み取るには、資格証明型の
PrivateCredentialPermission
を許可する必要がありますが、プリンシパル・セット内の情報を読み取るには、パブリック資格証明セットに追加のアクセス権は必要ありません。 これらのオブジェクトには、機密情報が含まれる可能性があります。 たとえば、ローカル・ユーザー情報を読み取るか、Kerberosログインを実行するログイン・モジュールは、ユーザーID、グループ、ドメイン名などの潜在的に機密性の高い情報をプリンシパル・セットに追加できます。createLoginContext.{name}
が推奨され、次のターゲット名は非推奨になりました。createLoginContext - allow code to instantiate a
LoginContext
.java.security.Policy
が推奨され、javax.security.auth.Policy
は非推奨になりました。 そのため、次のターゲット名も非推奨になりました。getPolicy - allow the caller to retrieve the system-wide Subject-based access control policy. setPolicy - allow the caller to set the system-wide Subject-based access control policy. refreshPolicy - allow the caller to refresh the system-wide Subject-based access control policy.
- 実装上の注意:
- 実装は追加のターゲット名を定義するかもしれませんが、名前の衝突を避けるために逆ドメイン名表記法などの命名規則を使用する必要があります。
- 導入されたバージョン:
- 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
-
-
-
-
コンストラクタの詳細
-
AuthPermission
public AuthPermission(String name)
指定された名前でAuthPermissionを新しく作成します。 名前は、AuthPermissionのシンボリック名です。- パラメータ:
name
- AuthPermissionの名前- 例外:
NullPointerException
-name
がnull
である場合。IllegalArgumentException
-name
が空である場合。
-
AuthPermission
public AuthPermission(String name, String actions)
指定された名前でAuthPermissionオブジェクトを新しく作成します。 この名前はAuthPermissionのシンボリック名で、actionsのStringのactionsは現在使用されないためnullにする必要があります。- パラメータ:
name
- AuthPermissionの名前actions
- nullでなければならない。- 例外:
NullPointerException
-name
がnull
である場合。IllegalArgumentException
-name
が空である場合。
-
-