Selective SSL logging
ns.log. This information is especially helpful in debugging failures.
nsapimgr_wr.sh -ys enable_ssl_hs_loginfo=1
nsapimgr_wr.sh -ys enable_ssl_hs_loginfo=0
ns.log. However, when you configure an SSL log profile, only information related to client authentication and SSL handshake is logged. To log this information, perform the following steps:
-
Set DEBUG on syslog parameters.
-
Configure an SSL log profile. Enable logging of client authentication and SSL handshake failure/success and failures only. All four are logged when you attach the SSL log profile with the SSL profile. Only client authentication failure/success and failures only are logged when you attach the SSL log profile with the SSL action.
-
Attach the SSL log profile to an SSL profile or to an SSL action.
Set DEBUG level
set audit syslogParams -logLevel DEBUG
SSL log profile
-
Client authentication success and failures, or failures only.
-
SSL handshake success and failures, or failures only.
Add an SSL log profile by using the CLI
add ssl logprofile <name> [-sslLogClAuth ( ENABLED | DISABLED )] [-ssllogClAuthFailures ( ENABLED | DISABLED )] [-sslLogHS ( ENABLED | DISABLED )] [-sslLogHSfailures ( ENABLED | DISABLED )]
sslLogClAuth:
ssllogClAuthFailures:
sslLogHS:
sslLogHSfailures:
> add ssl logprofile ssllog10 -sslLogClAuth ENABLED -sslLogHS ENABLED
Done
sh ssllogprofile ssllog10
1) Name: ssllog10
SSL log ClientAuth [Success/Failures] : ENABLED
SSL log ClientAuth [Failures] : DISABLED
SSL log Handshake [Success/Failures] : ENABLED
SSL log Handshake [Failures] : DISABLED
Done
Add an SSL log profile by using the GUI
Modify an SSL log profile by using the CLI
set ssl logprofile <name> [-sslLogClAuth ( ENABLED | DISABLED )][-ssllogClAuthFailures ( ENABLED | DISABLED )] [-sslLogHS ( ENABLED | DISABLED )] [-sslLogHSfailures ( ENABLED | DISABLED )]
set ssllogprofile ssllog10 -ssllogClAuth en -ssllogClAuthFailures en -ssllogHS en -ssllogHSfailures en
Done
sh ssllogprofile ssllog10
1) Name: ssllog10
SSL log ClientAuth [Success/Failures] : ENABLED
SSL log ClientAuth [Failures] : ENABLED
SSL log Handshake [Success/Failures] : ENABLED
SSL log Handshake [Failures] : ENABLED
Done
Modify an SSL log profile by using the GUI
-
Navigate to System > Profiles > SSL Log Profile, select a profile, and click Edit.
-
Make changes and click OK.
View all the SSL log profiles by using the CLI
sh ssl logprofile
sh ssl logprofile
1) Name: ssllogp1
SSL log ClientAuth [Success/Failures] : ENABLED
SSL log ClientAuth [Failures] : ENABLED
SSL log Handshake [Success/Failures] : DISABLED
SSL log Handshake [Failures] : ENABLED
2) Name: ssllogp2
SSL log ClientAuth [Success/Failures] : DISABLED
SSL log ClientAuth [Failures] : DISABLED
SSL log Handshake [Success/Failures] : DISABLED
SSL log Handshake [Failures] : DISABLED
3) Name: ssllogp3
SSL log ClientAuth [Success/Failures] : DISABLED
SSL log ClientAuth [Failures] : DISABLED
SSL log Handshake [Success/Failures] : DISABLED
SSL log Handshake [Failures] : DISABLED
4) Name: ssllog10
SSL log ClientAuth [Success/Failures] : ENABLED
SSL log ClientAuth [Failures] : ENABLED
SSL log Handshake [Success/Failures] : ENABLED
SSL log Handshake [Failures] : ENABLED
Done
View all the SSL log profiles by using the GUI
Attach an SSL log profile to an SSL profile
Attach an SSL log profile on an SSL profile by using the CLI
set ssl profile <name> [-ssllogProfile <string>]
set ssl profile fron_1 -ssllogProfile ssllog10
Attach an SSL log profile to an SSL profile by using the GUI
-
Navigate to System > Profiles > SSL Profile.
-
Click Edit and in SSL Log Profile, specify a profile.
Attach an SSL log profile to an SSL action
Attach an SSL log profile to an SSL action by using the CLI
add ssl action <name> -clientAuth ( DOCLIENTAUTH | NOCLIENTAUTH ) -ssllogProfile <string>
> add ssl action act1 -clientAuth DoCLIENTAUTH -ssllogProfile ssllog10
Done
> sh ssl action act1
1) Name: act1
Type: Client Authentication (DOCLIENTAUTH)
Hits: 0
Undef Hits: 0
Action Reference Count: 0
SSLlogProfile: ssllog10
Done
Attach an SSL log profile to an SSL action by using the GUI
-
Navigate to Traffic Management > SSL > Policies and click SSL Actions.
-
Click Add.
-
In Client Authentication, select ENABLED.
-
In SSL Log Profile, select a profile from the list, or click "+" to create a profile.
-
Click Create.
Sample output from the log file
ns.log for successful client authentication.
Jan 24 16:24:25 <local0.debug> 10.102.57.80 01/24/2019:10:54:25 GMT 0-PPE-0 : default SSLLOG SSL_HANDSHAKE_SUCCESS 158 0 : SPCBId 671 - ClientIP 10.102.1.98 - ClientPort 49451 - VserverServiceIP 10.102.57.82 - VserverServicePort 443 - ClientVersion TLSv1.2 - CipherSuite "AES-256-CBC-SHA TLSv1.2 Non-Export 256-bit" - Session New - CLIENT_AUTHENTICATED -SerialNumber "2A" - SignatureAlgorithm "sha1WithRSAEncryption" - ValidFrom "Sep 22 09:15:20 2008 GMT" - ValidTo "Feb 8 09:15:20 2036 GMT" - HandshakeTime 10 ms
Jan 24 16:24:25 <local0.debug> 10.102.57.80 01/24/2019:10:54:25 GMT 0-PPE-0 : default SSLLOG SSL_HANDSHAKE_ISSUERNAME 159 0 : SPCBId 671 - IssuerName " C=IN,ST=KAR,O=Citrix R&D Pvt Ltd,CN=Citrix"
Jan 24 16:24:25 <local0.debug> 10.102.57.80 01/24/2019:10:54:25 GMT 0-PPE-0 : default SSLLOG SSL_HANDSHAKE_SUBJECTNAME 160 0 : SPCBId 671 - SubjectName " C=IN,ST=KAR,O=Citrix Pvt Ltd,OU=A,CN=B"
Jan 24 16:24:25 <local0.debug> 10.102.57.80 01/24/2019:10:54:25 GMT 0-PPE-0 : default SSLLOG SSL_HANDSHAKE_SUCCESS 161 0 : Backend SPCBId 674 - ServerIP 10.102.57.85 - ServerPort 443 - ProtocolVersion TLSv1.2 - CipherSuite "AES-256-CBC-SHA TLSv1.2 Non-Export 256-bit" - Session Reuse - SERVER_AUTHENTICATED -SerialNumber "3E" - SignatureAlgorithm "sha1WithRSAEncryption" - ValidFrom "Sep 24 06:40:37 2008 GMT" - ValidTo "Feb 10 06:40:37 2036 GMT" - HandshakeTime 1 ms
Jan 24 16:24:25 <local0.debug> 10.102.57.80 01/24/2019:10:54:25 GMT 0-PPE-0 : default SSLLOG SSL_HANDSHAKE_ISSUERNAME 162 0 : SPCBId 674 - IssuerName " C=IN,ST=KAR,O=Citrix Pvt Ltd"
Jan 24 16:24:25 <local0.debug> 10.102.57.80 01/24/2019:10:54:25 GMT 0-PPE-0 : default SSLLOG SSL_HANDSHAKE_SUBJECTNAME 163 0 : SPCBId 674 - SubjectName " C=IN,ST=P,L=Q,O=R"