プロパティー・ファイルを使用して、セキュリティー・プロパティーの変更または削除を行えます。
始める前に
セキュリティー構成に行う変更を決定します。
wsadmin スクリプト・ツールを開始します。
Jython 言語を使用して wsadmin を開始する場合は、サーバー・プロファイルの bin ディレクトリーから wsadmin -lang jython コマンドを実行します。
このタスクについて
プロパティー・ファイルを使用して、セキュリティー・オブジェクトの変更または削除を行えます。
wsadmin を使用して管理コマンドを実行し、
セキュリティー・オブジェクト・プロパティー・ファイルの変更、プロパティーの検証、プロパティーの構成への適用を行います。
表 1. セキュリティー・プロパティーのアクション. セキュリティー・プロパティーは変更または削除できます。アクション |
手順 |
作成 |
該当なし |
modify |
セキュリティー・プロパティー・ファイルのプロパティー値を編集し、applyConfigProperties コマンドを実行します。 |
delete |
deleteConfigProperties コマンドを実行して 1 つ以上のプロパティーを削除します。削除するプロパティーにデフォルト値がある場合、プロパティーはデフォルト値に設定されます。そうでなければ、削除されたプロパティーは除去されます。 |
プロパティーの作成 |
該当なし |
プロパティーの削除 |
該当なし |
オプションで、以下のコマンドを使用して、対話モードを使用することができます。
AdminTask.command_name('-interactive')
手順
- 既存のプロパティー・ファイルを変更します。
- 変更する Security オブジェクトのプロパティー・ファイルを取得します。
extractConfigProperties コマンドを使用して、Security オブジェクトのプロパティー・ファイルを抽出することができます。
- エディターでプロパティー・ファイルを開き、必要に応じてプロパティーを変更します。
プロパティー・ファイル内の環境変数が、ご使用のシステムと一致していることを確認してください。以下は、Security プロパティー・ファイルの例です。
#
# Header
#
ResourceType=Security
ImplementingResourceType=Security
ResourceId=Cell=!{cellName}:Security=
#
#
#Properties
#
useLocalSecurityServer=true #boolean,default(false)
cacheTimeout=600 #integer,required,default(0)
allowBasicAuth=true #boolean,default(false)
enforceJava2Security=false #boolean,default(false)
activeAuthMechanism=Cell=!{cellName}:Security=:LTPA= #ObjectName(LTPA)
enabled=true #boolean,default(false)
adminPreferredAuthMech=null
enableJava2SecRuntimeFiltering=false #boolean,default(false)
allowAllPermissionForApplication=false #boolean,default(false)
useDomainQualifiedUserNames=false #boolean,default(false)
internalServerId=null
activeUserRegistry= Cell=!{cellName}:Security=:LDAPUserRegistry=type#IBM_DIRECTORY_SERVER #ObjectName(LDAPUserRegistry)
defaultSSLSettings=Cell=!{cellName}:Security=:SSLConfig=alias#CellDefaultSSLSett
ings,managementScope#"Cell=!{cellName}:Security=:ManagementScope=scopeName#"(cell):!{cellName}"" #ObjectName(SSLConfig)
enforceFineGrainedJCASecurity=false #boolean,default(false)
dynamicallyUpdateSSLConfig=true #boolean,default(false)
activeProtocol=BOTH #ENUM(CSI|IBM|BOTH),required,default(IBM)
issuePermissionWarning=true #boolean,default(false)
appEnabled=false #boolean,default(false)
EnvironmentVariablesSection
#Environment Variables
cellName=myCell
- applyConfigProperties コマンドを実行して、セキュリティー・オブジェクトを作成または変更します。
applyConfigProperties コマンドを実行すると、構成にプロパティー・ファイルが適用されます。以下の Jython の例では、オプションの -reportFileName パラメーターによって report.txt という名前のレポートが作成されます。
AdminTask.applyConfigProperties(['-propertiesFileName myObjectType.props -reportFileName report.txt '])
- プロパティーがもう必要ない場合には、そのセキュリティー・プロパティーを削除することができます。
プロパティーを 1 つ以上削除する場合は、削除するプロパティーのみをプロパティー・ファイル内で指定し、deleteConfigProperties コマンドを実行します。
例えば、次のようにします。
AdminTask.deleteConfigProperties('[-propertiesFileName myObjectType.props -reportFileName report.txt]')
タスクの結果
プロパティー・ファイルを使用して、セキュリティー・プロパティーを構成および管理することができます。