星期二, 12月 19, 2017

如何使用WAS下的scriptLibraries來簡化wsadmin操作

WAS下的scriptLibraries下有一些IBM提供給管理者簡化wsadmin 命令的Library (提供額外的命令來包裝原先複雜的wsadmin 命令), 讓管理可以方便使用。

其使用方法如下﹕(以設定WebContainer thread Pool 為例)

(1)./wsadmin.sh -lang jython -username admin_id -password admin_password

(2)進入wsadmin介面後, 使用execfile來載入擴充的Libraries。
wsadmin>execfile('<WAS-install-root>/scriptLibraries/servers/V70/AdminServerManagement.py')

(3)之後便能使用擴充的指令(至於有哪些指令, 可以自行參考那個.py 檔案的內容說明)
以AdminServerManagement.py 來說其設定Thread Pool的擴充指令為:configureThreadPool
=========================
  Ex40: configureThreadPool
# Example 40: Configure thread pool
def configureThreadPool(nodeName, serverName, parentType, tpName, maxSize, minSize, inactivityTimeout, otherAttrList=[], failonerror=AdminUtilities._BLANK_):
try:
        #--------------------------------------------------------------------
        # Configuring ThreadPool
        #--------------------------------------------------------------------
        print "---------------------------------------------------------------"
        print " AdminServerManagement:  Configuring ThreadPool"
        print " nodeName:               "+nodeName
        print " serverName:             "+serverName
        print " parentType:             "+parentType
        print " threadPoolName:         "+tpName
        print " maximumSize:            %s" % (maxSize)
        print " minimumSize:            %s" % (minSize)
        print " inactivityTimeout:      %s" % (inactivityTimeout)
===========================

(4)依上面說明, 其正確指令可寫成:
wsadmin>
configureThreadPool("loveNode02","base03","ThreadPoolManager","WebContainer","200","100","60000")

(5)其輸出結果如下﹕

---------------------------------------------------------------
 AdminServerManagement:  Configuring ThreadPool
 nodeName:               loveNode02
 serverName:             base03
 parentType:             ThreadPoolManager
 threadPoolName:         WebContainer
 maximumSize:            200
 minimumSize:            100
 inactivityTimeout:      60000
 Optional Attributes:
     otherAttributeList  []
 Usage: AdminServerManagement.configureThreadPool("loveNode02", "base03", "ThreadPoolManager", "WebContainer", "'200'", "'100'", "'60000'")
 Return: If the command is successful, a value of 1 is returned.
---------------------------------------------------------------


[customProperties []]
[inactivityTimeout 60000]
[isGrowable false]
[maximumSize 200]
[minimumSize 100]
[name WebContainer]
1

(6)若要把這二個步驟合成一個, 就自行寫個abc.py, 其內容如下﹕

execfile('<WAS-install-root>/scriptLibraries/servers/V70/AdminServerManagement.py')
configureThreadPool("loveNode02","base03","ThreadPoolManager","WebContainer","200","100","60000")

(7)最後要執行時就只要去指定abc.py 即可:
./wsadmin.sh -f abc.py












星期二, 11月 28, 2017

How to find out which user issue the MQ command?

(1) enable qmgr command event
     alter qmgr cmdev(enabled)

(2) the command event will be put into SYSTEM.ADMIN.COMMAND.EVENT queue

(3) use MH05 SupportPac to parse the command events or

(4) use MS0P SupportPac to format the command events in MQ Explorer

command events
https://www.ibm.com/support/knowledgecenter/SSFKSJ_7.1.0/com.ibm.mq.doc/mo11290_.htm

MH05: WebSphere MQ - Events Display Tool
http://www-01.ibm.com/support/docview.wss?uid=swg24029241

MS0P: WMQ explorer plugin
http://www-01.ibm.com/support/docview.wss?uid=swg24011617


星期五, 11月 03, 2017

How to find out the high CPU thread for WAS on Windows

follow the CPU high mustgather for Windows platform

http://www-01.ibm.com/support/docview.wss?uid=swg21111364

In the threadsout.txt, the Handle column stands for the thread id. You can use this thread id to find out
the java stack in the javacore files.


星期四, 10月 26, 2017

Install Oracle 11g missing package pdksh-5.2.14 issue

RHEL6 安裝 Oracle 11g 遭遇 pdksh-5.2.14 不存在
http://blog.roodo.com/oraksumi/archives/41081323.html

原因在於 OUI 在進行環境檢查時執行的是下列 command :
----------------------------------------------------------------------------------------
/bin/rpm -q --qf %{version} redhat-release
----------------------------------------------------------------------------------------
在 RHEL6 的環境下 redhat-release 已經被取代為 redhat-release-server-6Server,因此上述 command 會造成了缺少 "elfutils-libelf-devel-0.97" 或是 "pdksh-5.2.14" Package 的錯誤。

解決方式於安裝介質目錄下 database/stage/cvu/cv/admin 找出 cvu_config 這個檔案並且編輯他,將其中的 CV_ASSUME_DISTID=OEL4 改為 CV_ASSUME_DISTID=OEL6 ,如此一來 OUI 便可以正確的檢查系統所需的 Package 了。

由於 "elfutils-libelf-devel-0.97" 或是 "pdksh-5.2.14" 這兩個 Package 並不是必要的,若不想更動 cvu_config 這個檔案,那麼在安裝過程中忽略這個錯誤就可以了。

http://blog.roodo.com/oraksumi/archives/41081323.html

星期二, 10月 03, 2017

IHS and WAS fix for CVE-2016-2183

For IHS:

IBM HTTP Server and Sweet32: Birthday attack (CVE-2016-2183)


For WAS:

Security Bulletin: Multiple vulnerabilities in IBM® Java SDK affects WebSphere Application Server January 2017 CPU


星期四, 9月 21, 2017

How to find out user id and SID mapping


PsGetSid
https://docs.microsoft.com/zh-tw/sysinternals/downloads/psgetsid

Security Identifier(SID): GetSID of a user,object using Registry, WMIC, PowerShell
https://blogs.msdn.microsoft.com/gaurav/2014/06/03/security-identifiersid-getsid-of-a-userobject-using-registry-wmic-powershell/


wmic useraccount where (name='administrator' and domain='gauravtestMachine') get name,sid

Name           SID
administrator  S-1-5-21-1976753858-2077894621-3616986626-500




星期二, 9月 19, 2017

MQ client failed to connect qmgr with 2539 error

https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.tro.doc/q045390_.htm

2539 (09EB) (RC2539): MQRC_CHANNEL_CONFIG_ERROR

ExplanationAn MQCONN call was issued from a client to connect to a queue manager but the attempt to establish communication failed. Common causes of this reason code are:(1) The server and client cannot agree on the channel attributes to use.(2) There are errors in one or both of the QM.INI or MQCLIENT.INI configuration files.(3) The server machine does not support the code page used by the client.
注意﹕非常容易忘記(3)也可能造成無法連線, 從error 的文字訊息不易想到

星期二, 9月 05, 2017

How can I test if my server supports a specific SSL protocol?

1. Linux command line tool:
openssl can help you test which SSL protocols your server is configured to use.
openssl

If a protocol is enabled, the openssl s_client command will wait for input (or Control-D).
If the protocol is disabled, openssl will report an exception similiar to the one reproduced below:
21112:error:1407F0E5:SSL routines:SSL2_WRITE:ssl handshake failure:s2_pkt.c:428:

Openssl examples:
openssl s_client -connect ihshostname:443 -ssl2
openssl s_client -connect ihshostname:443 -ssl3
openssl s_client -connect ihshostname:443 -tls1

#openssl s_client -connect www.google.com:443 -ssl3
CONNECTED(00000003)
23569:error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number:s3_pkt.c:293:

#openssl s_client -connect localhost:1414 -cipher ECDHE-RSA-DES-CBC3-SHA

#openssl s_client -connect localhost:1414 -showcerts

#openssl ciphers  ==> 列出openssl可用的cipher名稱, 以:分隔

**** perl one liner 可用在此處, 把原本用:分隔不易查看的資訊, 改以每筆一行的方式列出

#openssl ciphers|perl -ne 's/:/\n/g;print'


2. online website check tool
https://www.ssllabs.com/ssltest/

3. standalone test tool (TestSSLServer)
https://www.bolet.org/TestSSLServer/

4. IHS v8 or above version command:
Windows:
httpd -t -D DUMP_SSL_CONFIG
Linux:
apachectl -t -D DUMP_SSL_CONFIG

http://publib.boulder.ibm.com/httpserv/ihsdiag/ssl_questions.html#sslprotsupptest


5. use nmap to help to verify which cipherspec is supported by SSL server

nmap --script ssl-enum-ciphers -p port_number ip_address

# nmap --script ssl-enum-ciphers -p 1477 localhost
Starting Nmap 7.70 ( https://nmap.org ) at 2019-06-03 10:56 CST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00018s latency).
Other addresses for localhost (not scanned): ::1

PORT     STATE SERVICE
1477/tcp open  ms-sna-server
| ssl-enum-ciphers:
|   TLSv1.0:
|     ciphers:
|       TLS_RSA_WITH_AES_128_CBC_SHA (rsa 1024) - A
|       TLS_RSA_WITH_AES_256_CBC_SHA (rsa 1024) - A
|     compressors:
|       NULL
|     cipher preference: server
|   TLSv1.2:
|     ciphers:
|       TLS_RSA_WITH_AES_128_CBC_SHA256 (rsa 1024) - A
|       TLS_RSA_WITH_AES_256_CBC_SHA256 (rsa 1024) - A
|       TLS_RSA_WITH_AES_128_GCM_SHA256 (rsa 1024) - A
|       TLS_RSA_WITH_AES_256_GCM_SHA384 (rsa 1024) - A
|       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (secp256r1) - A
|       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 (secp384r1) - A
|       TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (secp256r1) - A
|       TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (secp384r1) - A
|     compressors:
|       NULL
|     cipher preference: server
|_  least strength: A

Nmap done: 1 IP address (1 host up) scanned in 1.63 seconds

Ref:

SSL 相關的測試工具
https://www.qa-knowhow.com/?p=3888

SSL handshake concept:
https://support.f5.com/csp/article/K15292








星期四, 8月 24, 2017

Perl — Calculate timing difference in microseconds

Time::Piece has been in core since 5.10.


use Time::Piece;

sub str2time {
    my ($str) = @_;
    $str =~ s/(\.[0-9]+)?\z//;
    my $fraction = $1 || 0;
    return Time::Piece->strptime($str, '%Y-%m-%d %H:%M:%S')->epoch + $fraction;
}

my $t1 = str2time('2013-12-27 13:28:14.975952');
my $t2 = str2time('2013-12-27 13:28:16.345667');

printf "difference: %f\n", $t2 - $t1;


This can be used to analyze the trace for performance issue.

Note:

||                              if the left operand is true, the right operand is not even evaluated.
\z                             Match only at end of string
 ?                             Match 1 or 0 times
$var =~ s/A/B/       
把變數 $var 內的第一個A子字串整個代換成B子字串。特別注意第一部份(A)為RE, 但第二部分(B)僅為字串

http://irw.ncut.edu.tw/peterju/perl.html

$str =~ s/(\.[0-9]+)?\z//   => 表示將小數點後(含小數點)的部分用空字串取代, 也就是移除
$fraction = $1 || 0            => 表示若有找到小數點後的部分, 即把其值copy 給fraction, 不然就設為0




星期二, 8月 15, 2017

星期四, 8月 03, 2017

How to specify the path of the JVM core dump file

https://jazz.net/forum/questions/147686/is-it-possible-to-customize-the-java-core-and-heap-dump-paths-for-tomcat

http://www-01.ibm.com/support/docview.wss?uid=swg21255223

http://www-01.ibm.com/support/docview.wss?uid=swg21242497

Using dump agent to specify the path of the core file

example:

-Xdump:system:file="/path/core.%Y%m%d.%H%M%S.%pid.%seq.dmp"



How to install ComputerCraft mod for Minecraft

https://www.youtube.com/watch?v=pMrxzffJVs8


1. launch the Minecraft with the correct version
2. download and install corresponding forge version mod
3. download the corresponding ComputerCraft mod and put it into the mod subfolder

*** 不同版本的mod 可能無法被不同版本的Minecraft forge載入, 要搭配正確版本
例如: 1.7.10 的Minecraft 就要搭配同樣是1.7.10 的forge 和 ComputerCraft

若要切換不同版本, 也要記得移除mod目錄下的檔案, 換成正確版本的mod 檔案



星期四, 7月 27, 2017

Recording a response file with Installation Manager

https://www.ibm.com/support/knowledgecenter/en/SSDV2W_1.8.4/com.ibm.silentinstall12.doc/topics/t_silent_create_response_files_IM.html

https://www.youtube.com/watch?v=G7G_uMA17J8



  • Windows: IBMIM.exe -record responseFile -skipInstall agentDataLocation
  • Linux, UNIX, and the OS X operating system: ./IBMIM -record responseFile -skipInstall agentDataLocation

Example:

Examples:
Table 1. -record commands by operating system
Operating SystemCommand
WindowsIBMIM.exe -record c:\response_files\install_product.xml -skipInstall c:\skipInstall\IBM_product
Linux, UNIX, and the OS X operating system./IBMIM -record /response_files/install_product.xml -skipInstall skipInstall/IBM_product

MQ QMGR on Windows does not start after system reboot even if it is configured to automatically start in the MQ explorer?

https://developer.ibm.com/answers/questions/216225/mq-qmgr-on-windows-does-not-start-after-system-reb.html

Q:
A WebSphere MQ queue manager on Windows is configured to automatically start in the MQ explorer, however, after system reboot, the queue manager does not start. No errors can be found in the Windows event log or MQ error log. The queue manager can be manually started successfully using command line or MQ explorer (V7.1 or later version).

Ans:
One possible scenario could be that the Startup value in the qm.ini file has been set to "2". If the Startup value is 2, the MQ queue manager will not start automatically. If this is the case, please follow these steps to solve the problem.
1) Change "Startup" value to "1" in /qmgrs//qm.ini For example, InstanceData:    InstanceID=1381394841    Startup=1 .
2) Stop IBM MQ Service ( endmqsvc)
3) Start IBM MQServices ( strmqsvc)



https://developer.ibm.com/answers/questions/216225/mq-qmgr-on-windows-does-not-start-after-system-reb.html

星期五, 5月 26, 2017

PM85864: SYMBOLIC LINK UNDER INSTALLEDAPPS DIRECTORY DOES NOT GET RETAINED AFTER APPLICATION UNINSTALL AND RE-INSTALL

PM85864: SYMBOLIC LINK UNDER INSTALLEDAPPS DIRECTORY DOES NOT GET RETAINED AFTER APPLICATION UNINSTALL AND RE-INSTALL
http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg1PM85864

Any symbolic links that exist in the application installation directory will be deleted when the application is uninstalled or updated.

Problem conclusion
The code has been modified to allow you to set the custom property

com.ibm.websphere.management.application.sync.deleteSymbolicLinks 
on the JVM to false to override the default setting of true.

1) To enable the System Property in the administrative
console: a) In a Network Deployment edition, the system
property needs to be set on the nodeagent. System
administration --> Node agents --> nodeagent --> Java and
Process Management --> Process definition --> Java Virtual
Machine --> Custom properties Name:
com.ibm.websphere.management.application.sync.deleteSymbolicLinks 
Value: true/false

*** both node agent and application server must restart to take effect 

b) In a Base edition, the system property is set on the
server. Servers --> Application Servers --> server1 --> Java
and Process Management --> Process Definition --> Java Virtual
Machine --> Custom Properties Name:
com.ibm.websphere.management.application.sync.deleteSymbolicLinks 
Value: true/false

*** Restrictions: ***
Do not use symbolic links on Microsoft Windows operating systems as they are not supported.


The fix for this APAR is currently targeted for inclusion in
fix pack 8.0.0.7 and fix pack 8.5.5.1.

How to determine if a browser is using an SSL or TLS connection?

https://security.stackexchange.com/questions/19096/how-to-determine-if-a-browser-is-using-an-ssl-or-tls-connection


Chrome:
右鍵 -> 檢查 ->


Security 頁面即有連線使用SSL或TLS的版本資訊。



Firefox:

右鍵 -> 檢視頁面資訊 -> 安全


IE:

右鍵 -> 內容







星期三, 5月 10, 2017

MQv8.0.0.2 - Support for MQ C++ applications built using Visual Studio 2005-10 Compilers

https://www.ibm.com/developerworks/community/blogs/messaging/entry/mqv8_0_0_2_support_for_mq_c_applications_built_using_visual_studio_2005_10_compilers?lang=en

 At version 8.0.0.0, MQ updated it's C/C++ compiler to Visual Studio 2012. This updated meant that any MQ C++ application built using Visual Studio 2010 or below required a recompilation. This was documented also. Now with version 8.0.0.2 MQ supports C++ applications built using Visual Studio 2005/2008/2010. In V8.0.0.2 MQ C++ libraries built using Visual Studio 2005 are now installed bin\VS2005 (32 bit) and bin64\VS2005 (64 bit).

How to point your application to use MQ C++ libraries built using Visual Studio 2005?

There are couple of ways:

1) Prefix the PATH environment variable with path to MQ C++ libraries as below

     SET PATH=C:\Program Files\IBM\WebSphere MQ\bin\VS2005;%PATH%

2) If updating PATH environment variable is not an option, then a batch file can be used to launch the application

    A sample batch file content can be

    SETLOCAL

    SET PATH=C:\Program Files\IBM\WebSphere MQ\bin\VS2005;%PATH%

    app.exe <= Your application name

    ENDLOCAL



Important point to note here: Do not enclose the path in double quotes like "C:\Program Files\IBM\WebSphere MQ\bin\VS2005" because DLL search logic does not handle correctly if the path is enclosed in double quotes. Please see an useful discussion here.


https://www.ibm.com/developerworks/community/blogs/messaging/entry/mqv8_0_0_2_support_for_mq_c_applications_built_using_visual_studio_2005_10_compilers?lang=en

星期三, 5月 03, 2017

How to pass password to su

su command only accept password from terminal in normal case. The following is using "expect" command to overcome this restriction. However this is not secure.

You must install expect package before using this command.

http://blog.roodo.com/ystuan/archives/6128305.html
https://blog.longwin.com.tw/2011/07/expect-shell-auto-linux-2011/

We can use autoexpect tool to help us to build the script.

#!/usr/bin/expect -f
set timeout -1
spawn su -c {cp /tmp/a.txt /tmp/b.txt}
match_max 100000
expect -exact "Password: "
send -- "your_root_password\r"
expect eof


However this is not secure, it will leave your root_password in this file.
We should use sudo -S to do this job.

http://blog.roodo.com/ystuan/archives/6128305.html
https://blog.longwin.com.tw/2011/07/expect-shell-auto-linux-2011/



How can I migrate MQ cluster full repository queue managers to new servers?

https://developer.ibm.com/answers/questions/183882/how-can-i-migrate-mq-cluster-full-repository-queue.html

Q:
I want to move my MQ cluster full repository queue managers to new servers. What's the best way to migrate to new servers without causing any downtime or cluster errors?

ANS:
We have to be careful with how we do this since the goal is to make the change as transparent to users as much as possible and also preserve cluster information integrity as much as we can. So if there are multiple full repositories, we can move each repository over from one box to another ONE at a time. Please move full repositories to new location first and then follow up with partials.

1. Alter QM1 to be a partial repository 
   alter qmgr repos(' ')
   
2. suspend QM1 from the cluster
   suspend qmgr cluster(cluster name)
   
3. alter cluster receiver on QM1 to take it out of a cluster 
   alter channel (channel name) chltype(clusrcvr)cluster (' ') 
   - stop channel 
   - delete channel
   
4. alter cluster sender to QM2 to take it out of the cluster 
   alter channel (channel name) chltype(clussdr)cluster (' ') 
   - stop channel 
   - delete channel 
   NOTE: At this point cluster has only one full repository QM2 and QM1 is out of the cluster. 
   All partial repositories will be able to function as they have 
   established connections to remaining full repository queue managers.

5. Issue RESET cluster command on QM2 and reference queue manager 
   name as QM1 to take all info about this queue manager from the 
   cluster out. This step will delete all information about QM1 including
   autodefined cluster sender channels in the cluster 
   reset cluster (cluster name) qmname(QM1) action(forceremove) queues(yes) 
   Issue display clusqmgr(*) to make sure that QM1 is no longer in the 
   cluster.
   
6. Take steps to define this queue manager on a new box and configure it to join your cluster. 
   Once queue manager is created on a new box: 
   - fill in REPOS attribute of a queue manager with the cluster name 
   - create a cluster receiver 
   - create a cluster sender channel pointing to QM2 
   NOTE: at this point, cluster has two full repositories again: one on a
   new box and one on an old box. Two full repositories will sink up 
   cluster information.

7. Repeat steps 1 - 5 for queue manager QM2 
   Reset cluster will have to be issued on QM1 referencing QM2 
   NOTE: At this point, cluster has only one full repository QM

8. Create QM2 on a new box and configure it to join cluster (by 
   this time NAT'd table changes should take place to service routing to 
   this new box if one is used) 
   Once queue manager is created on a new box 
   - fill in REPOS attribute of a queue manager with the cluster name 
   - create a cluster receiver 
   - create a cluster sender channel pointing to QM1 on a new box. 
   NOTE:Cluster has two new full repositories now that are connected to 
   each other!

9. Manually defined cluster sender channels from partial to full 
   repositories will have to be altered to contain a new conname that 

   points to a new location of a full repository of choice. 

https://developer.ibm.com/answers/questions/183882/how-can-i-migrate-mq-cluster-full-repository-queue.html



星期三, 4月 12, 2017

How to find out all used ports for the specified process in Linux and AIX


1. For Linux:
    It's easy to use the following command:
    #netstat -tupln|grep pid_of_your_process

2. For AIX:
    You must combine several commands:
    #netstat -Aan|grep LISTEN|awk '{print $1}'|xargs -i rmsock {} tcpcb > a.txt
    #netstat -Aan|grep LISTEN|awk '{print $5"\t\t"}' > b.txt
    #paste b.txt a.txt > c.txt
    #grep pid_of_your_process c.txt

*** xargs -i can use the output of previous command to replace the {} as the argument of the next command.


星期三, 3月 15, 2017

Migrate Java of IHS 8 from 1.6 to 1.8

1. Can't directly migrate to Java 1.8 before fixpack 8.5.5.11

2. Must new install IHS 8.5.5.11 to have Java 1.8

4. To install IHS 8.5.5.11 with Java 1.8 using imcl command, you must add "-properties wasjava=java8" option

5. Will be able to migrate to 1.8 directly by applying fixpack 8.5.5.12

6. The incorrect core runtime  information in the versionInfo output will be fixed in fixpack 8.5.5.12 (PI77304)

Installing Java SDK 8.0 on WAS 8.5.5.x                                
https://www.ibm.com/developerworks/community/blogs/aimsupport/entry/Installing_Java_SDK_8.0_on_WAS_8.5.5.x?lang=en                            

7. If you install IHS 5.5.5.11 (new install) using IM GUI (wizard mode), it will install Java 8 default (same as WAS). It is not necessary to add the option "-properties wasjava=java8" like imcl command line.


星期一, 3月 13, 2017

Bindings and Extensions Conversion Tool

Use of .xmi versus .xml files

  1. For pre-JEE5 support you must continue to use .xmi bindings and extensions files
  2. For JEE 5 and later you must use .xml bindings and extensions files
  3. Approaches for migrating from .xmi to .xml files

      – Done automatically by RAD/RSA when you migrate an app from
        pre-JEE5 to or later.
      – Use the Bindings and Extensions Conversion Tool
•       http://www.ibm.com/developerworks/websphere/downloads/bindings_and_extensions.html

WebSphere Application Server Versions: What’s Different? (Page 145)
http://www-01.ibm.com/support/docview.wss?uid=swg27008724&aid=8

星期三, 3月 01, 2017

WebSphere Application Server versions to support TLS 1.2

WebSphere Application Server versions to support TLS 1.2


WAS 7.0.0.23 onwards, 8.0.0.3 onwards and 8.5


configuration detail:
https://developer.ibm.com/answers/questions/206952/how-do-i-configure-websphere-application-server-ss.html

已接受的答案
由 ramarika (6236回答 
The following steps works from WAS 7.0.0.23 onwards, 8.0.0.3 onwards and 8.5
System Administrator may also look into backup and restore the configuration before TLSV1.2 configuration as it will affect communication with other programs.
backupConfig command for v8 (contains URL link to restoreConfig command)
backupConfig command for v7 (contains URL link to restoreConfig command)
Modify all WebSphere SSL configurations by running the following manual steps from the WebSphere Application Server console:
a. Log in to the WebSphere Application Server Integrated Solutions Console.
b. Click Security > SSL certificate and key management, and under Related Items, click SSL configurations. ( such as CellDefaultSSLsetting , NodedefaultSSLsetting and any other SSLConfig )
alt text
alt text
alt text
Note: For each node it has their own NodeDefaultSSLsetting and above setting will APPLY BOTH inbound and outbound SSL Communication
d.Select each SSL Configuration described above, then click Quality of protection (QoP) settings under Additional Properties.
e.On the Quality of protection (QoP) settings panel, select TLSv1.2 from the pull-down list in the box named Protocol. change the protocol to TLSV1.2
f.Click Apply and Save.
Update ssl.client.props:
The SSL protocol is set with the com.ibm.ssl.protocol property in the ssl.client.props file. Edit the ssl.client.props file and set the com.ibm.ssl.protocol value to TLS.
For example, modify com.ibm.ssl.protocol=TLSv1.2 This must be done for each ssl.client.props file under the following directories:
For Node example WAS_install\profiles\AppSrv01\properties
For DMGR example WAS_install\profiles\Dmgr01\properties alt text
Restart the dmgr using stopmanger command and startmanager command
Stop the node: WAS_install\profiles\AppSrv01\bin\stopNode.bat -username -password
Stop all Application Servers running on this node using stopserver command
Note: If neither of these unable to stop properly due to permission issues, or some other issue you will have to manually kill each of these by logging onto the machines and killing the appropriate deployment manager and nodeagent, Application servers processes.
Synchronize the node using syncnode command
  1. you must run the syncNode.bat or syncNode.sh command from the command line on each federated node, otherwise the nodes will not synchronize in the administrative console. For additional information on the syncNode command,
  2. Windows <was_home>/<profile_home>/bin/syncNode.bat <deploymgr host> <deploymgr soap port>
  3. Unix <was_home>/<profile_home>/bin/syncNode.sh <deploymgr host> <deploymgr soap port>
  4. Note: If you don't know <deploymgr soap port> number you can check from console under system Administration Deployment manager > Ports . Look for SOAP_CONNECTOR_ADDRESS
  5. Start the node agent on each federated node, and then synchronize nodes in the administrative console.
From WAS_install\profiles\AppSrv01\bin\syncNode.bat dmgrhostname dmgrsoapport -username consoleadminuser -password consoleuserpassword
Start the node: From WAS_install\profiles\AppSrv01\bin\startNode.bat
Check the Sync status of node from console.. and then start the application server from console.
TESTING Methods

USING BROWSER

Testing Configuring browsers to support only TLS 1.2 and access the adminconsole or application.
Restriction: The only browsers that currently support TLSv1.2 are Internet Explorer and Mozilla Firefox.
  1. 1. To configure Internet Explorer version 8 and later, complete these steps:
  2. a. In Internet Explorer, click Tools > Internet Options.
  3. b. In the Internet Options dialog box, click the Advanced tab.
  4. c. Scroll to the Security section, select the Use TLS 1.2 check box, and click OK.
  1. To configure Firefox version 24 and later, complete these steps:
    1. a. Open a Firefox browser and enter about:config in the address bar.
    2. b. When prompted, click I'll be careful, I promise! and accept the warning.
    3. c. Search for security.tls.version.max.
    4. d. Double-click security.tls.version.max and change the value to 3 to configure the browser to support TLS1.2.
    5. Tip: Value of 1 supports TLS1.0. Value of 2 supports TLS1.0 and TLS1.1. Value of 3 supports TLS1.0, TLS1.1, and TLS1.2.

    USING External Tools such as OPENSSL

You can use openssl s_client connnect to WAS using SSL port like console SSL port or Application server ssl port
openssl s_client -connect webspherehostname:consolesslport -tls1_2
example
openssl s_client -connect webspherehostname:9443 -tls1_2
If it connected to WAS system then it will display the certificate chain in command prompt and the handshake details.. Based on this you will know that WAS system is configured to support TLVs1.2.
Note: The above steps apply for other protocols such TLSV1.1 to SSL_TLSV2
=================================================================================
Frequently asked questions (FAQ) or Questions and Answers (Q&A), are listed as follows
=================================================================================
Question: Is TLS v1.2 supported in WebSphere Full Profile 7.0, 8.0, 8.5? What's minimum fix pack?
Answer: TLsv1.2 Suppport on V7.0.0.23 on wards TLsv1.2 Support on 8.0.0.3 onwards and 8.5.0.0.
Question: Is TLS v1.2 supported in WebSphere Liberty Profile 8.5.5? What's minimum fix pack?
Answer: Liberty can configured with any JDK .. So it is depend what JDK version is configured with Liberty profile. If you are using IBM JDK v1.6 jdk SR11 then it is supported. if you are using below version of this JDK then it is not supported
TLSv1.2 is introduced on JDK 1.6 Sr10 . which mean it starts from WAS7.0.0.23 ( JDK1.6 SR10 FP1)) onwards
see the following link
JSSE enhancements The following enhancements were made in the JSSE in IBM SDK for Java™ V6 service refresh 10:
  1. The IBMJSSE2 provider now supports Transport Layer Security (TLS) 1.1 as described in RFC 4346. The most important update is protection against cipher block chaining (CBC) attacks.
  2. **The IBMJSSE2 provider now supports TLS 1.2 as described in RFC 5246. Among other things, this RFC specifies different internal hashing algorithms, adds new cipher suites, and contains improved flexibility, particularly for negotiation of cryptographic algorithms**.
Service refresh 10
Question: Which cipher suites supports with TLSv1.2 protocol?
Answer: Cipher suites with SHA384 and SHA256 are available only for TLS 1.2 or later more details Please see the following link
Cipher suites
Cipher suites
Question: Do I have to enable FIPS strict mode in order to use TLSv1.2?
Answer: No. You can configure WAS to use TLSv1.2 without FIPS.
Question: WAS is act SSL client, Does Remote SSL server has to use TLSV1.2 as well, in order to work?
Answer: Yes BOTH Client side and Server side MUST use TLSv1.2 for SSL communication.
Question: WAS is act SSL client, What does remote SSL server support only TLSv1.0 or TLSv1.1 and Similar WAS is act SSL Server, What does Remote SSL client does support only TLSv1.0 or TLSv1.1 or TLSv1.2. What to do in order to work such environments?
Answer: There is an alternative option, SSL_TLSv2, which will enable support for TLSv1.0, TLSv1.1, and TLSv1.2 in the environment. Please use this setting SSL_TLSv2 in environments where support for multiple TLS protocols is required, or if you are not sure whether your WAS environment interacts with other servers or clients using non-TLSv1.2 protocols then, you can configure WAS to use SSL_TLSv2 using same steps as given in the above.
Note:
Without poddle fix and configured WAS to use SSL_TLSv2
SSL_TLSv2 ==> Enables all SSL v3.0 and TLS v1.0, v1.1 and v1.2 protocols. Accepts SSLv3 or TLSv1 hello encapsulated in an SSLv2 format hello.
If you installed Poddle fix (will disable SSLv3 ) and configured WAS to use SSL_TLSv2
SSL_TLSv2 ==> Enables these three TLS v1.0, v1.1 and v1.2 protocols.
Question: Why do I receive a GSK_ERROR_SOCKET_CLOSED (gsk rc = 420) error, when WebSphere Application Server and IBM HTTP Server are configured to use TLSv1.2?
Answer: you need to have StrictSecurity="true" in the plugin-cfg.xml for TLSv1.2 to work. More details see the following link
Best Regards
Ram

   11   分享
120000DBVU gravatar image
由 Steve Reid (1825回答 
Please note that IBM HTTP Server (IHS) v7.0, and IBM web server Plug-in v7.0, do NOT support TLSv1.1 or TLSv1.2. So, enabling TLSv1.2 in WAS may cause a failure if you are using v7.0 web server Plug-in.
For TLSv1.2 support in IHS and Plug-in, you need to upgrade to v8.x. Please see the following page:
   4   分享
060000KXHE gravatar image
由 ramarika (6236回答 
How do I change my WebSphere SSL configuration to use protocol TLsv1.2 in a standalone Websphere Application server where you have servername called server1. Please see the following youtube link.
The above manual steps for ND environment where you have dmgr, nodeagents and application server.
Best Regards
Ram Arika
   2   分享

100000MYWK gravatar image
由 Naveen_Shetty (746回答 
Alternately on the IHS side
Here is how to disable all protocols accept TLS1.2 in your IBM http server.
Add the following lines in the VirtualHost stanza for your SSL configuration. (For each VH:SSL port configured).
SSLProtocolEnable TLSv12 SSLProtocolDisable SSLv2 SSLv3 TLSv10 TLSv11
Now if I wanted to allow only a specific Cipher within TLS 1.2 (example is below), I would add SSLCIpherSpec directive as a 3rd line. SSLCipherSpec TLSv12 TLS_RSA_WITH_AES_256_CBC_SHA256
To verify what is allowed, one can use the following command in IBM http server
/opt/ibm/HTTPServer/bin/apachectl -DDUMP_SSL_CONFIG
Optionally, a debug level IS errorlog would give you the same information during startup. startup.
NOTE: Any change to the IHS httpd.conf file needs a server restart for it to take effect.