13.3 SSLを介したWLST管理の実行
次のステップでは、SSLを介してWLST管理を実行する方法を示します:
- デフォルトでは、SSLポートは管理サーバーまたはOracle Access Management (OAM)管理対象サーバーに対して有効になっていません。管理サーバーおよび管理対象サーバーのSSLポートを構成するには:
- WebLogicリモート・コンソールにログインします。
- 「ツリーの編集」をクリックし、左側のナビゲーション・メニューで「環境」→「サーバー」→
「<server_name>」
に移動して、「一般」タブをクリックします。 - 「SSLリスニング・ポートの有効化」ボタンを選択し、SSLポートを指定します(
AdminServer
は7002
、oam_server1
は14101
) - 「保存」をクリックします。
- 「ショッピング・カート」をクリックし、「変更のコミット」を選択します。
ノート:
SSL用にOAM管理対象サーバーを構成する場合は、すべてのサーバー(oam_server1
からoam_server5
)で同じポートに対してSSLを有効にする必要があります。 - 次のように
myscripts
ディレクトリを作成します:cd $WORKDIR/kubernetes
mkdir myscripts
cd myscripts
- OAM管理サーバーの
myscripts
ディレクトリに<domain_uid>-adminserver-ssl.yaml
ファイルを作成します:ノート:
環境に基づいてdomainName
、domainUID
およびnamespace
を更新します。例:apiVersion: v1 kind: Service metadata: labels: serviceType: SERVER weblogic.domainName: accessdomain weblogic.domainUID: accessdomain weblogic.resourceVersion: domain-v2 weblogic.serverName: AdminServer name: accessdomain-adminserverssl namespace: oamns spec: clusterIP: None ports: - name: default port: 7002 protocol: TCP targetPort: 7002 selector: weblogic.createdByOperator: "true" weblogic.domainUID: accessdomain weblogic.serverName: AdminServer type: ClusterIP
- OAM管理対象サーバー用の
<domain_uid>-oamcluster-ssl.yaml
を作成します:apiVersion: v1 kind: Service metadata: labels: serviceType: SERVER weblogic.domainName: accessdomain weblogic.domainUID: accessdomain weblogic.resourceVersion: domain-v2 name: accessdomain-oamcluster-ssl namespace: oamns spec: clusterIP: None ports: - name: default port: 14101 protocol: TCP targetPort: 14101 selector: weblogic.clusterName: oam_cluster weblogic.createdByOperator: "true" weblogic.domainUID: accessdomain type: ClusterIP
- 次のコマンドを使用して、管理サーバーにテンプレートを適用します:
例:kubectl apply -f <domain_uid>-adminserver-ssl.yaml
出力は次のようになります:kubectl apply -f accessdomain-adminserver-ssl.yaml
service/accessdomain-adminserverssl created
- 次のコマンドを使用して、OAM管理対象サーバーにテンプレートを適用します:
例:kubectl apply -f <domain_uid>-oamcluster-ssl.yaml
出力は次のようになります:kubectl apply -f accessdomain-oamcluster-ssl.yaml
service/accessdomain-oamcluster-ssl created
- SSLポートにアクセスするためのKubernetesサービスが正常に作成されたことを確認します:
例:kubectl get svc -n <domain_namespace> |grep ssl
出力は次のようになります:kubectl get svc -n oamns |grep ssl
accessdomain-adminserverssl ClusterIP None <none> 7002/TCP 102s accessdomain-oamcluster-ssl ClusterIP None <none> 14101/TCP 35s
- 実行中のヘルパー・ポッドのBashシェル内で、次を実行します:
export WLST_PROPERTIES="-Dweblogic.security.SSL.ignoreHostnameVerification=true -Dweblogic.security.TrustKeyStore=DemoTrust"
cd /u01/oracle/oracle_common/common/bin
出力は次のようになります:./wlst.sh
管理サーバーのt3sサービスに接続するには:Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands wls:/offline>
出力は次のようになります:connect('weblogic','<password>','t3s://accessdomain-adminserverssl:7002')
OAM管理対象サーバーのt3sサービスに接続するには:Connecting to t3s://accessdomain-adminserverssl:7002 with userid weblogic ... <<DATE>> <Info> <Security> <BEA-090905> <Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.> <<DATE>> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to HMACDRBG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.> <<DATE>> <Info> <Security> <BEA-090909> <Using the configured custom SSL Hostname Verifier implementation: weblogic.security.utils.SSLWLSHostnameVerifier$NullHostnameVerifier.> Successfully connected to Admin Server "AdminServer" that belongs to domain "accessdomain". wls:/accessdomain/serverConfig/>
出力は次のようになります:connect('weblogic','<password>','t3s://accessdomain-oamcluster-ssl:14101')
Connecting to t3s://accessdomain-oamcluster-ssl:14101 with userid weblogic ... <<DATE>> <Info> <Security> <BEA-090905> <Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.> <<DATE>> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to HMACDRBG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.> <<DATE>> <Info> <Security> <BEA-090909> <Using the configured custom SSL Hostname Verifier implementation: weblogic.security.utils.SSLWLSHostnameVerifier$NullHostnameVerifier.> Successfully connected to managed Server "oam_server1" that belongs to domain "accessdomain".