|
|
セキュリティ・モジュール
ここでは、CORBA セキュリティ・モデルで使用する以下のモジュールの Object Management Group (OMG) インターフェイス定義言語 (IDL) の定義を説明します。
CORBA モジュール
OMG では、Current 疑似オブジェクトをサポートするために、CORBA::Current
インターフェイスを CORBA モジュールに追加しています。この変更によって、CORBA モジュールは、Security Replaceability および Security Level 2 をサポートできるようになりました。
リスト 14-1 では、CORBA::Current
インターフェイスの OMG IDL 文を示します。
注記 この情報は、「CORBAservices: Common Object Services Specification」(1995 年 3 月 31 日改訂版、1997 年 11 月更新) の 15-230 ページから、OMG の許可を得て転載しています。
リスト 14-1 CORBA::Current インターフェイスの OMG IDL 文
module CORBA {
//CORBA に対する拡張
interface Current {
};
};
TimeBase モジュール
基本的な Time Service、Universal Time オブジェクト、および Time Interval オブジェクトに適用されるすべてのデータ構造体は、TimeBase モジュールで定義されます。これによって、ほかのサービスは、インターフェイス定義なしでもこのデータ構造を使用できるようになります。インターフェイス定義およびそれに関連する enum と例外は、TimeBase モジュールにカプセル化されます。
リスト 14-2 では、TimeBase モジュールの OMG IDL 文を示します。
注記 この情報は、「CORBAservices: Common Object Services Specification」(1995 年 3 月 31 日改訂版、1997 年 11 月更新) の 14-5 ページから、OMG の許可を得て転載しています。
リスト 14-2 TimeBase モジュールの OMG IDL 文
//Time Service から
module TimeBase {
//ulonglong データ型の仮の定義
//これは、すべてのクライアント ORB による型の拡張の適用を保留
struct ulonglong {
unsigned long low;
unsigned long high;
};
typedef ulonglong TimeT;
typedef short TdfT;
struct UtcT {
TimeT time; // 8 オクテット
unsigned long inacclo; // 4 オクテット
unsigned short inacchi; // 2 オクテット
TdfT tdf; // 2 オクテット
// 合計 16 オクテット
};
};
表 14-1 では、TimeBase モジュールのデータ型を定義します。
注記 この情報は、「CORBAservices: Common Object Services Specification」(1995 年 3 月 31 日改訂版、1997 年 11 月更新) の 14-6 ページから、OMG の許可を得て転載しています。
Security モジュール
Security モジュールは、ほかのセキュリティ・モジュールで共通のセキュリティ・データ型に対する OMG IDL を定義します。このメソッドは、TimeBase モジュールによって異なり、セキュリティ対応の ORB で使用できなければなりません。
リスト 14-3 には、Security モジュールでサポートされているデータ型が示されています。
注記 この情報は、「CORBAservices: Common Object Services Specification」(1995 年 3 月 31 日改訂版、1997 年 11 月更新) の 15-193 〜 15-195 ページから、OMG の許可を得て転載しています。
リスト 14-3 Security モジュールの OMG IDL 文
module Security {
typedef sequence<octet> Opaque;
//標準データ型の拡張可能なファミリ
struct ExtensibleFamily {
unsigned short family_definer;
unsigned short family;
};
//セキュリティ属性
typedef unsigned long SecurityAttributeType;
//ID 属性; ファミリ = 0
const SecurityAttributeType AuditId = 1;
const SecurityAttributeType AccountingId = 2;
const SecurityAttributeType NonRepudiationId = 3;
//特権属性; ファミリ = 1
const SecurityAttributeType Public = 1;
const SecurityAttributeType AccessId = 2;
const SecurityAttributeType PrimaryGroupId = 3;
const SecurityAttributeType GroupId = 4;
const SecurityAttributeType Role = 5;
const SecurityAttributeType AttributeSet = 6;
const SecurityAttributeType Clearance = 7;
const SecurityAttributeType Capability = 8;
struct AttributeType {
ExtensibleFamily attribute_family;
SecurityAttributeType attribute_type;
};
typedef sequence <AttributeType> AttributeTypeLists;
struct SecAttribute {
AttributeType attribute_type;
Opaque defining_authority;
Opaque value;
//この属性の値は
//型の認識を基にしてのみ解釈可能
};
typedef sequence<SecAttribute> AttributeList;
//Authentication はステータスを返す
enum AuthenticationStatus {
SecAuthSuccess,
SecAuthFailure,
SecAuthContinue,
SecAuthExpired
};
//Authentication メソッド
typedef unsigned long AuthenticationMethod;
enum CredentialType {
SecInvocationCredentials;
SecOwnCredentials;
SecNRCredentials
//TimeBase から選択
typedef TimeBase::UtcT UtcT;
};
表 14-2 では、Security モジュールのデータ型を説明します。
データ型 |
定義 |
---|---|
|
表現がセキュリティ・サービス・インプリメンテーションにのみ認識されるデータ。 |
Security Level 1 モジュール
ここでは、レベル 1 のセキュリティ機能のみを使用するクライアント・アプリケーション・オブジェクトで使用可能なインターフェイスを定義します。このモジュールは、CORBA モジュール、Security モジュール、TimeBase モジュールによって異なります。Current インターフェイスは、ORB によってインプリメントされます。
リスト 14-4 では、Security Level 1 モジュールの OMG IDL 文を示します。
注記 この情報は、「CORBAservices: Common Object Services Specification」(1995 年 3 月 31 日改訂版、1997 年 11 月更新) の 15-198 ページから、OMG の許可を得て転載しています。
リスト 14-4 Security Level 1 モジュールの OMG IDL 文
module SecurityLevel1 {
interface Current : CORBA::Current { // PIDL
Security::AttributeList get_attributes(
in Security::AttributeTypeList attributes
);
};
};
Security Level 2 モジュール
ここでは、レベル 2 のセキュリティ機能を使用するクライアント・アプリケーション・オブジェクトで使用可能な追加インターフェイスを定義します。このモジュールは、CORBA モジュールおよび Security モジュールによって異なります。
リスト 14-5 では、Security Level 2 モジュールの OMG IDL 文を示します。
注記 この情報は、「CORBAservices: Common Object Services Specification」(1995 年 3 月 31 日改訂版、1997 年 11 月更新) の 15-198 〜 15-200 ページから、OMG の許可を得て転載しています。
リスト 14-5 Security Level 2 モジュールの OMG IDL 文
module SecurityLevel2 {
//インターフェイスの宣言を転送
interface PrincipalAuthenticator;
interface Credentials;
interface Current;
//インターフェイス Principal Authenticator
interface PrincipalAuthenticator {
Security::AuthenticationStatus authenticate(
in Security::AuthenticationMethod method,
in string security_name,
in Security::Opaque auth_data,
in Security::AttributeList privileges,
out Credentials creds,
out Security::Opaque continuation_data,
out Security::Opaque auth_specific_data
);
Security::AuthenticationStatus
continue_authentication(
in Security::Opaque response_data,
inout Credentials creds,
out Security::Opaque continuation_data,
out Security::Opaque auth_specific_data
);
};
//インターフェイス Credentials
interface Credentials {
attribute Security::AssociationOptions
invocation_options_supported;
attribute Security::AssociationOptions
invocation_options_required;
Security::AttributeList get_attributes(
in Security::AttributeTypeList attributes
);
boolean is_valid(
out Security::UtcT expiry_time
);
};
//インターフェイス Current。SecurityLevel1::Current から派生。
//このセキュリティ・レベルでの Current の追加オペレーションを提供する。
//これは ORB によってインプリメントされる
interface Current : SecurityLevel1::Current { // PIDL
void set_credentials(
in Security::CredentialType cred_type,
in Credentials cred
);
Credentials get_credentials(
in Security::CredentialType cred_type
);
readonly attribute PrincipalAuthenticator
principal_authenticator;
};
};
Tobj モジュール
ここでは、Tobj モジュールのインターフェイスを定義します。
このモジュールは、ATMI 型の認証をプログラムするのに使用するインターフェイスを提供します。
リスト 14-6 では、Tobj モジュールの OMG IDL 文を示します。
リスト 14-6 Tobj モジュールの OMG IDL 文
//Tobj 固有の定義
//get_auth_type () が値を返す
enum AuthType {
TOBJ_NOAUTH,
TOBJ_SYSAUTH,
TOBJ_APPAUTH
};
typedef sequence<octet> UserAuthData;
interface PrincipalAuthenticator :
SecurityLevel2::PrincipalAuthenticator { // PIDL
AuthType get_auth_type();
Security::AuthenticationStatus logon(
in string user_name,
in string client_name,
in string system_password,
in string user_password,
in UserAuthData user_data
);
void logoff();
void build_auth_data(
in string user_name,
in string client_name,
in string system_password,
in string user_password,
in UserAuthData user_data,
out Security::Opaque auth_data,
out Security::AttributeList privileges
);
};
};
|
Copyright © 2001, BEA Systems, Inc. All rights reserved.
|