ここでは、CORBAセキュリティ・モデルで使用する次のモジュールのObject Management Group (OMG)インタフェース定義言語(IDL)の定義を説明します。
注: | Oracle Tuxedo CORBA JavaクライアントとOracle Tuxedo CORBA JavaクライアントORBはTuxedo 8.1で非推奨になり、サポートされなくなりました。すべてのOracle Tuxedo CORBA JavaクライアントおよびOracle Tuxedo CORBA JavaクライアントORBのテキスト・リファレンスとコード・サンプルは、サード・パーティ製のJava ORBライブラリを実装または実行する際の参考や、プログラマの参照用としてのみ使用してください。 |
注: | サード・パーティのCORBA Java ORBのテクニカル・サポートは、各ベンダーによって提供されます。Oracle Tuxedoでは、サード・パーティのCORBA Java ORBに関する技術的なサポートまたはドキュメントは提供していません。 |
OMGでは、Current擬似オブジェクトをサポートするために、CORBA::Current
インタフェースをCORBAモジュールに追加しています。この変更によって、CORBAモジュールは、Security ReplaceabilityおよびSecurity Level 2をサポートできるようになりました。
リスト13-1に、CORBA::Current
インタフェースのOMG IDL文を示します。
注: | この情報は、「CORBAservices: Common Object Services Specification」の15-230ページから引用しました。改訂版: 1995年3月31日更新: 1997年11月。また、この情報は、OMGの権限を得て転載しています。 |
module CORBA {
// Extensions to CORBA
interface Current {
};
};
基本的なTime Service、Universal Timeオブジェクト、およびTime Intervalオブジェクトに適用されるすべてのデータ構造体は、TimeBaseモジュールで定義されます。これによって、ほかのサービスは、インタフェース定義なしでもこのデータ構造を使用できるようになります。インタフェース定義およびそれに関連するenumと例外は、TimeBaseモジュールにカプセル化されます。
リスト13-2に、TimeBaseモジュールのOMG IDL文を示します。
注: | この情報は、「CORBAservices: Common Object Services Specification」の14-5ページから引用しました。改訂版: 1995年3月31日更新: 1997年11月。また、この情報は、OMGの権限を得て転載しています。 |
// From time service
module TimeBase {// interim definition of type ulonglong pending the
// adoption of the type extension by all client ORBs.
struct ulonglong {
unsigned long low;
unsigned long high;
};
typedef ulonglong TimeT;
typedef short TdfT;
struct UtcT {
TimeT time; // 8 octets
unsigned long inacclo; // 4 octets
unsigned short inacchi; // 2 octets
TdfT tdf; // 2 octets
// total 16 octets
};
};
表13-1に、TimeBaseモジュールのデータ型を定義します。
注: | この情報は、「CORBAservices: Common Object Services Specification」の14-6ページから引用しました。改訂版: 1995年3月31日更新: 1997年11月。また、この情報は、OMGの権限を得て転載しています。 |
Securityモジュールは、ほかのセキュリティ・モジュールで共通のセキュリティ・データ型に対するOMG IDLを定義します。このメソッドは、TimeBaseモジュールによって異なり、セキュリティ対応のORBで使用できなければなりません。
リスト13-3に、Securityモジュールでサポートされているデータ型を示します。
注: | この情報は、「CORBAservices: Common Object Services Specification」の15-193から15-195ページより引用しました。改訂版: 1995年3月31日更新: 1997年11月。また、この情報は、OMGの権限を得て転載しています。 |
module Security {
typedef sequence<octet> Opaque;
// Extensible families for standard data types
struct ExtensibleFamily {
unsigned short family_definer;
unsigned short family;
};
//security attributes
typedef unsigned long SecurityAttributeType;
// identity attributes; family = 0
const SecurityAttributeType AuditId = 1;
const SecurityAttributeType AccountingId = 2;
const SecurityAttributeType NonRepudiationId = 3;
// privilege attributes; family = 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;
// The value of this attribute can be
// interpreted only with knowledge of type
};
typedef sequence<SecAttribute> AttributeList;
// Authentication return status
enum AuthenticationStatus {
SecAuthSuccess,
SecAuthFailure,
SecAuthContinue,
SecAuthExpired
};
// Authentication method
typedef unsigned long AuthenticationMethod;
enum CredentialType {
SecInvocationCredentials;
SecOwnCredentials;
SecNRCredentials
// Pick up from TimeBase
typedef TimeBase::UtcT UtcT;
};
表13-2に、Securityモジュールのデータ型を示します。
ここでは、レベル1のセキュリティ機能のみを使用するクライアント・アプリケーション・オブジェクトで使用可能なインタフェースを定義します。このモジュールは、CORBAモジュール、Securityモジュール、TimeBaseモジュールによって異なります。Currentインタフェースは、ORBによって実装されます。
リスト13-4に、Security Level 1モジュールのOMG IDL文を示します。
注: | この情報は、「CORBAservices: Common Object Services Specification」の15-198ページから引用しました。改訂版: 1995年3月31日更新: 1997年11月。また、この情報は、OMGの権限を得て転載しています。 |
module SecurityLevel1 {
interface Current : CORBA::Current { // PIDL
Security::AttributeList get_attributes(
in Security::AttributeTypeList attributes
);
};
};
Security Level 2モジュール
ここでは、レベル2のセキュリティ機能を使用するクライアント・アプリケーション・オブジェクトで使用可能な追加インタフェースを定義します。このモジュールは、CORBAモジュールおよびSecurityモジュールによって異なります。
リスト13-5に、Security Level 2モジュールのOMG IDL文を示します。
注: | この情報は、「CORBAservices: Common Object Services Specification」の15-198から15-200ページより引用しました。改訂版: 1995年3月31日更新: 1997年11月。また、この情報は、OMGの権限を得て転載しています。 |
module SecurityLevel2 {
// Forward declaration of interfaces
interface PrincipalAuthenticator;
interface Credentials;
interface Current;
// Interface 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
);
};
// Interface 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
);
};
// Interface Current derived from SecurityLevel1::Current
// providing additional operations on Current at this
// security level. This is implemented by the 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;
};
};
このモジュールは、ATMI型の認証をプログラムするのに使用するインタフェースを提供します。
リスト13-6に、TobjモジュールのOMG IDL文を示します。
//Tobj Specific definitions
//get_auth_type () return values
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
);
};
};