![]() ![]() ![]() ![]() ![]() ![]() ![]() |
ここでは、CORBAセキュリティのC++メソッドについて説明します。
Security::AttributeList get_attributes(
in Security::AttributeTypeList attributes
);
};
attributes
このメソッドは、プリンシパルの資格証明から権限などの属性をCurrentインタフェース用に取得します。
注: | defining_authority フィールドは常に空です。UBBCONFIG ファイルで定義されているセキュリティ・レベルによって、get_attribute メソッドの一部の値を使用できない場合があります。追加された2つの値(Group Id およびRole )は、UBBCONFIG ファイルでセキュリティ・レベルがACL またはMANDATORY_ACL に設定されている場合に使用できます。 |
注: | この情報は、「CORBAservices: Common Object Services Specification」の15-103、104ページから引用しました。改訂版: 1995年3月31日更新: 1997年11月。また、この情報は、OMGの権限を得て転載しています。 |
プリンシパルを認証し、オプションでプリンシパルの資格証明を取得します。
Security::AuthenticationStatus
authenticate(
in Security::AuthenticationMethodmethod
,
in Security::SecurityNamesecurity_name
,
in Security::Opaqueauth_data
,
in Security::AttributeListprivileges
,
out Credentialscreds
,
out Security::Opaquecontinuation_data
,
out Security::Opaqueauth_specific_data
);
method
security_name
milozzi@company.com
は、LDAPを有効にしたディレクトリ・サービスで証明書をルックアップするのに使用する電子メール・アドレスで、milozzi_company.pem
は秘密鍵ファイル名です。
auth_data
Tobj:TuxedoSecurity
セキュリティ・メカニズムを指定した場合、この引数の値は、構成された認証のレベルによって異なります。Tobj::CertificateBased
引数を指定した場合、この引数の値は、プリンシパルの秘密鍵の復号化に使用するパス・フレーズです。
privileges
creds
SecurityLevel2::Current::authenticate
メソッドの戻り値がSecAuthSuccess
になるまで使用できません。
continuation_data
auth_specific_data
SecurityLevel2::Current::authenticate
メソッドは、プリンシパルを認証し、Oracle Tuxedoドメインでのセッション時にプリンシパルで必要なオプションで権限属性をリクエストするために、クライアント・アプリケーションによって使用されます。
Tobj::TuxedoSecurity
セキュリティ・メカニズムを指定する場合、Tobj::PrincipalAuthenticator::logon
オペレーションを呼び出すことで同じ機能を取得できます。このオペレーションは、同じ機能を提供しますが、ATMI認証セキュリティ・メカニズムで使用するための特別なオペレーションです。
void set_credentials(
in Security::CredentialType cred_type,
in Credentials creds
);
cred_type
creds
このメソッドは、SecInvocationCredentials
の設定にのみ使用できます。それ以外の場合に使用すると、set_credentials
でCORBA::BAD_PARAM
が発生します。資格証明は、以前のSecurityLevel2::Current::get_credentials
またはSecurityLevel2::PrincipalAuthenticator::authenticate
への呼出しで取得済になっている必要があります。
注: | この情報は、「CORBAservices: Common Object Services Specification」の15-104ページから引用しました。改訂版: 1995年3月31日更新: 1997年11月。また、この情報は、OMGの権限を得て転載しています。 |
Credentials get_credentials(
in Security::CredentialType cred_type
);
cred_type
この呼出しは、SecInvocationCredentials
の取得にのみ使用できます。それ以外の場合に使用すると、get_credentials
でCORBA::BAD_PARAM
が発生します。資格証明を使用できない場合、get_credentials
でCORBA::BAD_INV_ORDER
が発生します。
クライアント・アプリケーションのアクティブな資格証明のみを返します。
注: | この情報は、「CORBAservices: Common Object Services Specification」の15-105ページから引用しました。改訂版: 1995年3月31日更新: 1997年11月。また、この情報は、OMGの権限を得て転載しています。 |
readonly attribute PrincipalAuthenticator
principal_authenticator;
principal_authenticator
属性によって返されたPrincipalAuthenticator
は、実際の型Tobj::PrincipalAuthenticator
によるものです。このため、Tobj::PrincipalAuthenticator
およびSecurityLevel2::PrincipalAuthenticator
の両方として使用できます。
注: | このメソッドが無効なSecurityCurrentオブジェクトで呼び出された場合、CORBA::BAD_INV_ORDER が発生します。 |
プロセスに特有のプリンシパルの資格証明情報を表します。SecurityLevel2::Credentials
インタフェースをサポートするCredentialsオブジェクトは、位置制約付きオブジェクトです。このオブジェクトの位置の外に参照を渡すか、CORBA::ORB::object_to_string()
操作を使用してオブジェクトを外部化すると、CORBA::Marshall
例外が発生します。
#ifndef _SECURITY_LEVEL_2_IDL
#define _SECURITY_LEVEL_2_IDL
#include <SecurityLevel1.idl>
#pragma prefix “omg.org”
module SecurityLevel2
{
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 );
};
};
#endif /* _SECURITY_LEVEL_2_IDL */
class SecurityLevel2
{
public:
class Credentials;
typedef Credentials * Credentials_ptr;
class Credentials : public virtual CORBA::Object
{
public:
static Credentials_ptr _duplicate(Credentials_ptr obj);
static Credentials_ptr _narrow(CORBA::Object_ptr obj);
static Credentials_ptr _nil();
virtual Security::AssociationOptions
invocation_options_supported() = 0;
virtual void
invocation_options_supported(
const Security::AssociationOptions options ) = 0;
virtual Security::AssociationOptions
invocation_options_required() = 0;
virtual void
invocation_options_required(
const Security::AssociationOptions options ) = 0;
virtual Security::AttributeList *
get_attributes(
const Security::AttributeTypeList & attributes) = 0;
virtual CORBA::Boolean
is_valid( Security::UtcT_out expiry_time) = 0;
protected:
Credentials(CORBA::Object_ptr obj = 0);
virtual ~Credentials() { }
private:
Credentials( const Credentials&) { }
void operator=(const Credentials&) { }
}; // class Credentials
}; // class SecurityLevel2
Security::AttributeList get_attributes(
in AttributeTypeList attributes
);
attributes
このメソッドは、プリンシパルの資格証明に添付された属性リストを返します。属性タイプのリストでは、AttributeList
に返す属性タイプの値のみを含める必要があります。属性は現在、属性ファミリまたはIDに基づいて返されません。ほとんどの場合、どのインスタンスでもプリンシパルの資格証明の有効なセットは1つのみであるため、これは、SecurityLevel1::Current::get_attributes()
を呼び出した場合と同じ結果です。結果は、資格証明が使用中でない場合には異なる可能性があります。
注: | この情報は、「CORBAservices: Common Object Services Specification」の15-97ページから引用しました。改訂版: 1995年3月31日更新: 1997年11月。また、この情報は、OMGの権限を得て転載しています。 |
SSL接続を確立してOracle Tuxedoドメインでオブジェクトに対する呼出しを実行する際に使用できるセキュリティ・オプションの最大数を示します。
attribute Security::AssociationOptions
invocation_options_supported
;
このメソッドは、SecurityLevel2::Credentials::invocation_options_required
メソッドと組み合せて使用する必要があります。
セキュリティの関連付けにTobj::TuxedoSecurity
セキュリティ・メカニズムを使用する場合、NoProtection
、EstablishTrustInClient
、およびSimpleDelegation
セキュリティ・オプションのみが返されます。Oracle Tuxedoドメインへのアクセスにパスワードが要求されるようにCORBAアプリケーションのセキュリティ・レベルが定義された場合にのみ、EstablishTrustInClient
セキュリティ・オプションが表示されます。
注: | 指定したセキュリティ・オプションが、CORBAアプリケーション用に定義されたセキュリティ・メカニズムでサポートされていない場合、CORBA::NO_PERMISSION 例外が返されます。この例外は、指定したセキュリティ・オプションが、SecurityLevel2::Credentials::invocation_options_required メソッドで指定したセキュリティ・オプションよりも少ない機能しか持っていない場合にも発生します。 |
注: | invocation_options_supported 属性には、set() メソッドとget() メソッドがあります。Tobj::TuxedoSecurity セキュリティ・メカニズムを使用してCredentialsオブジェクトを取得する場合には、set() メソッドを使用できません。Tobj::TuxedoSecurity セキュリティ・メカニズムでset() メソッドを使用すると、CORBA::NO_PERMISSION 例外が返されます。 |
SSL接続を確立してOracle Tuxedoドメインでターゲット・オブジェクトに対する呼出しを実行する際に使用できるセキュリティ・オプションの最少数を指定します。
attribute Security::AssociationOptions
invocation_options_required
;
このメソッドを使用すると、プリンシパルとOracle Tuxedoドメインの間の通信の保護を指定できます。このメソッドを使用すると、Credentialsオブジェクトは、定義したセキュリティ・オプションのレベルのSSLプロトコルを使用してターゲット・オブジェクトに対する呼出しを実行します。このメソッドは、SecurityLevel2::Credentials::invocation_options_supported
メソッドと組み合せて使用する必要があります。
セキュリティの関連付けにTobj::TuxedoSecurity
セキュリティ・メカニズムを使用する場合、NoProtection
、EstablishTrustInClient
、およびSimpleDelegation
セキュリティ・オプションのみが返されます。Oracle Tuxedoドメインへのアクセスにパスワードが要求されるようにCORBAアプリケーションのセキュリティ・レベルが定義された場合にのみ、EstablishTrustInClient
セキュリティ・オプションが表示されます。
注: | 指定したセキュリティ・オプションが、CORBAアプリケーション用に定義されたセキュリティ・メカニズムでサポートされていない場合、CORBA::NO_PERMISSION 例外が返されます。この例外は、指定したセキュリティ・オプションが、SecurityLevel2::Credentials::invocation_options_supported メソッドで指定したセキュリティ・オプションよりも機能が多い場合にも発生します。 |
注: | invocation_options_required 属性には、set() メソッドとget() メソッドがあります。Tobj::TuxedoSecurity セキュリティ・メカニズムを使用してCredentialsオブジェクトを取得する場合には、set() メソッドを使用できません。Tobj::TuxedoSecurity セキュリティ・メカニズムでset() メソッドを使用すると、CORBA::NO_PERMISSION 例外が返されます。 |
boolean is_valid(
out Security::UtcT expiry_time
);
使用された資格がそのときにアクティブな場合、このメソッドは、TRUE
を返します。つまり、Tobj::PrincipalAuthenticator::logoff
またはTobj_Bootstrap::destroy_current
を呼び出していないということです。このメソッドがTobj::PrincipalAuthenticator::logoff()
の後に呼び出された場合、FALSE
が返されます。このメソッドがTobj_Bootstrap::destroy_current()
の後に呼び出された場合、CORBA::BAD_INV_ORDER
例外が発生します。
返された有効期限には、maximum unsigned long long
値(C++)が含まれています。unsigned long long
データ型が適用されると、ulonglong
が控えのデータ型になります。ulonglong
データ型は次のように定義します。
// ulonglongデータ型の仮の定義
//これは、すべてのクライアントORBによる型の拡張の適用を保留
struct ulonglong {
unsigned long low;
unsigned long high;
};
注: | この情報は、「CORBAservices: Common Object Services Specification」の15-97ページから引用しました。改訂版: 1995年3月31日更新: 1997年11月。また、この情報は、OMGの権限を得て転載しています。 |
プリンシパルを認証できるようにします。SecurityLevel2::PrincipalAuthenticator
インタフェースをサポートするPrincipal Authenticatorオブジェクトは、位置制約付きオブジェクトです。このオブジェクトの位置の外に参照を渡すか、CORBA::ORB::object_to_string()
操作を使用してオブジェクトを外部化すると、CORBA::Marshall
例外が発生します。
#ifndef _SECURITY_LEVEL_2_IDL
#define _SECURITY_LEVEL_2_IDL
#include <SecurityLevel1.idl>
#pragma prefix “omg.org”
module SecurityLevel2
{
interface PrincipalAuthenticator
{ // Locality Constrained
Security::AuthenticationStatus authenticate (
in Security::AuthenticationMethod method,
in Security::SecurityName 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,
in Credentials creds,
out Security::Opaque continuation_data,
out Security::Opaque auth_specific_data
);
};
};
#endif // SECURITY_LEVEL_2_IDL
#pragma prefix "beasys.com"
module Tobj
{
const Security::AuthenticationMethod
TuxedoSecurity = 0x54555800;
CertificateBased = 0x43455254;
};
class SecurityLevel2
{
public:
class PrincipalAuthenticator;
typedef PrincipalAuthenticator * PrincipalAuthenticator_ptr;
class PrincipalAuthenticator : public virtual CORBA::Object
{
public:
static PrincipalAuthenticator_ptr
_duplicate(PrincipalAuthenticator_ptr obj);
static PrincipalAuthenticator_ptr
_narrow(CORBA::Object_ptr obj);
static PrincipalAuthenticator_ptr _nil();
virtual Security::AuthenticationStatus
authenticate (
Security::AuthenticationMethod method,
const char * security_name,
const Security::Opaque & auth_data,
const Security::AttributeList & privileges,
Credentials_out creds,
Security::Opaque_out continuation_data,
Security::Opaque_out auth_specific_data) = 0;
virtual Security::AuthenticationStatus
continue_authentication (
const Security::Opaque & response_data,
Credentials_ptr & creds,
Security::Opaque_out continuation_data,
Security::Opaque_out auth_specific_data) = 0;
protected:
PrincipalAuthenticator(CORBA::Object_ptr obj = 0);
virtual ~PrincipalAuthenticator() { }
private:
PrincipalAuthenticator( const PrincipalAuthenticator&) { }
void operator=(const PrincipalAuthenticator&) { }
}; // class PrincipalAuthenticator
};
Security::AuthenticationStatus continue_authentication(
in Security::Opaque response_data,
in Credentials creds,
out Security::Opaque continuation_data,
out Security::Opaque auth_specific_data
);
Oracle Tuxedoソフトウェアは1つの手順で認証を実行するため、このメソッドは常に失敗し、Security::AuthenticationStatus::SecAuthFailure
を返します。
常にSecurity::AuthenticationStatus::SecAuthFailure
を返します。
注: | この情報は、「CORBAservices: Common Object Services Specification」の15-92、93ページから引用しました。改訂版: 1995年3月31日更新: 1997年11月。また、この情報は、OMGの権限を得て転載しています。 |
Oracle Tuxedoドメインによって予測されている認証のタイプを取得します。
AuthType get_auth_type();
このメソッドは、Oracle Tuxedoドメインによって予測されている認証のタイプを返します。
注: | このメソッドが無効なSecurityCurrentオブジェクトで呼び出された場合、CORBA::BAD_INV_ORDER が発生します。 |
Tobj_AuthType
列挙への参照。Oracle Tuxedoドメインへのアクセスに必要な認証のタイプを返します。次の表は、有効な戻り値について説明しています。
Security::AuthenticationStatus logon(
in string user_name,
in string client_name,
in string system_password,
in string user_password,
in UserAuthData user_data
);
user_name
TOBJ_NOAUTH
です。user_name
がNULLまたは空の場合、あるいは30文字を超えている場合、logon
でCORBA::BAD_PARAM
が発生します。
client_name
TOBJ_NOAUTH
です。client_name
がNULLまたは空の場合、あるいは30文字を超えている場合、logonでCORBA::BAD_PARAM
例外が発生します。
system_password
TOBJ_SYSAUTH
です。クライアント名がNULLまたは空の場合、あるいは30文字を超えている場合、logonでCORBA::BAD_PARAM
例外が発生します。注: | system_password は、30文字以内で指定する必要があります。 |
user_password
user_data
TOBJ_APPAUTH
です。注: | TOBJ_SYSAUTH には、TOBJ_NOAUTH に加えてクライアント・アプリケーション・パスワードの要件が含まれます。TOBJ_APPAUTH には、TOBJ_SYSAUTH に加えて、ユーザー・パスワードまたはユーザー・データなどの追加情報が含まれます。 |
注: | user_password 引数とuser_data 引数は相互に排他的であり、Oracle Tuxedoドメインの構成で使用する認証サービスの要件によって異なります。Oracle Tuxedoのデフォルト認証サービスには、ユーザー・パスワードが必要です。カスタマイズされた認証サービスにはユーザー・データが必要です。user_password とuser_data の両方が設定されている場合、ログオン呼出しでCORBA::BAD_PARAM 例外が発生します。 |
このメソッドは、プリンシパルがOracle TuxedoドメインにアクセスできるようにIIOPリスナー/ハンドラを介してプリンシパルを認証します。このメソッドはSecurityLevel2::PrincipalAuthenticator::authenticate
と同じ機能ですが、引数はATMI認証指向です。
注: | このメソッドが無効なSecurityCurrentオブジェクトで呼び出された場合、CORBA::BAD_INV_ORDER が発生します。 |
プリンシパルに関連付けられたセキュリティ・コンテキストを破棄します。
void logoff();
この呼出しは、セキュリティ・コンテキストを破棄しますが、Oracle Tuxedoドメインへのネットワーク接続を閉じません。Logoff
でも、現在の資格証明を無効化できます。認証タイプがTOBJ_NOAUTH
でない場合、ログオフした後の既存のオブジェクト参照を使用した呼出しは失敗します。
プリンシパルが現在Oracle Tuxedoドメインに対して認証されている場合、Tobj_Bootstrap::destroy_current()
を呼び出すと、暗黙的にlogoff
が呼び出されます。
注: | このメソッドが無効なSecurityCurrentオブジェクトで呼び出された場合、CORBA::BAD_INV_ORDER が発生します。 |
SecurityLevel2::PrincipalAuthenticator::authenticate
で使用する認証データと属性を作成します。
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
);
引数
user_name
client_name
system_password
user_password
user_data
auth_data
privileges
authenticate
で使用します。 注: | user_name 、client_name 、またはsystem_password がNULLまたは空の場合、あるいは30文字を超えている場合、以降のauthenticate メソッド呼出しでCORBA::BAD_PARAM 例外が発生します。 |
注: | user_password パラメータとuser_data パラメータは相互に排他的であり、Oracle Tuxedoドメインの構成で使用する認証サービスの要件によって異なります。Oracle Tuxedoのデフォルト認証サービスには、ユーザー・パスワードが必要です。カスタマイズされた認証サービスにはユーザー・データが必要です。user_password とuser_data の両方が指定されている場合、後続の認証呼出しでCORBA::BAD_PARAM 例外が発生します。 |
説明
このメソッドは、SecurityLevel2::PrincipalAuthenticator::authenticate
で使用する認証データと属性を作成するヘルパー関数です。
注: | このメソッドが無効なSecurityCurrentオブジェクトで呼び出された場合、CORBA::BAD_INV_ORDER が発生します。 |
![]() ![]() ![]() |