Authenticatorは、orb.resolve_initial_references("Authenticator")を使用してORBから取得できるローカル性が制約されている初期オブジェクト参照です。これには、領域名、プリンシパル名、パスフレーズ、およびAuthenticationSchemeを受け取ってAuthenticatedPrincipalを返す1つのメソッドであるauthenticateが含まれます。Authenticatorは、プライベートインタフェースを使用してORBデーモン内で実行するリモートのAuthenticatorオブジェクトと通信します。リモートのAuthenticatorは、領域を有効にし、それらの領域に認証リクエストを委任します。
package com.sssw.jbroker.api.security;
import java.rmi.RemoteException;
public interface Authenticator extends org.omg.CORBA.Object
{
public AuthenticatedPrincipal authenticate(AuthenticationScheme scheme,
String realm, String principalName, byte[] passphrase)
throws SecurityException, RemoteException;
}AuthenticatedPrincipalの範囲は、「信頼ドメイン」です。 信頼ドメインは、「信頼ドメインID」が同じ1つまたは複数のORBインストールです。信頼ドメインIDは、libディレクトリの下のsecurity.propertiesファイルのORBTrustDomainIdプロパティによって指定される任意の大きな文字列です。
AuthenticationScheme
サポートされている認証スキームには、BASICおよびDIGESTの2つがあります。これらは、HTTP 1.1の仕様で定義されているとおりです。
package com.sssw.jbroker.api.security;
public class AuthenticationScheme
{
public static AuthenticationScheme BASIC = new AuthenticationScheme();
public static AuthenticationScheme DIGEST = new AuthenticationScheme();
private AuthenticationScheme() {}
}AuthenticatedPrincipal
AuthenticatedPrincipalは、認証されているプリンシパルを表します。これは、現在のスレッドのIDを設定するためや、ORBインスタンスを使用するすべてのスレッドに対して、SecurityCurrentインタフェースで使用できます。AuthenticatedPrincipalオブジェクトは、シリアル化することが可能です。したがって、保存しておいて、後で使用できます。
package com.sssw.jbroker.api.security; import java.io.Serializable;
import java.security.Principal;public interface AuthenticatedPrincipal extends Serializable
{
Principal getPrincipal();
}
Copyright © 1998-2003, Novell, Inc.All rights reserved.