How to get additional debugging configured to troubleshoot OAuth issues in TIBCO Data Virtualization?

How to get additional debugging configured to troubleshoot OAuth issues in TIBCO Data Virtualization?

book

Article ID: KB0070006

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization All supported versions

Description

This article provides details on the log4j2 properties for enabling debug to troubleshoot OAuth issues in TIBCO Data Virtualization.

Issue/Introduction

How to get additional debugging configured to troubleshoot OAuth issues in TIBCO Data Virtualization?

Environment

All supported Operating Systems

Resolution

    
Follow below steps: 
(1)   Back up the file <TDV_SERVER_INSTALLDIR>/conf/server/log4j2.properties. 
(2)   Append the following lines to the original 'log4j2.properties' file, which will enable debug logging specifically for OAuth issues - 
 logger.HttpUtils.name = com.compositesw.http.HttpUtils logger.HttpUtils.level = DEBUG logger.OAuthToken.name = com.compositesw.server.security.authenticator.oauth.OAuthToken logger.OAuthToken.level = DEBUG logger.OAuthPrimitives.name = com.compositesw.server.security.OAuthPrimitives logger.OAuthPrimitives.level = DEBUG logger.OAuthCallback.name=com.compositesw.server.security.OAuth2StudioCallbackServlet logger.OAuthCallback.level=DEBUG 
Save changes to the file. 

(3)  To activate the debug trace, you should restart the TDV Server. However, if you prefer not to restart it, you can use an alternative approach:

  • Navigate to Studio > Administration > Configuration > Server > Configuration > Debugging > Debug Output Enabled.

  • Change the value to “True”.

  • Click “Apply” but don’t close the window.

  • Immediately change the value back to “False”.

  • Click “Apply” and close the window.

User-added image

(4)  Once debugging is enabled, you can proceed to reproduce the issue you're troubleshooting. The debug entries will be reflected in the 'cs_server.log' file. 
      Sample Entries:

 DEBUG [jetty thread pool-2186] 2024-06-25 15:25:38.564 -0700 OAuth2Primitives - GRANT_TYPE: authorization_code DEBUG [jetty thread pool-2186] 2024-06-25 15:25:38.565 -0700 OAuth2Primitives - CODE: 0.ASwAWfrmzbOrcUm-ASRDxBfL2jmiv8OR9bBFvRJ_m_Fi1b0sACM.AgABBAIAAAApTwJmzXqdR4BN2miheQMYAgDs_wUA9P9g6HnUatfVpBUnxDjDP4L2gbPP14omnPWk83M0FZQI1V2kG5kSoVEisFt3MsXbeBcVhtGfXtF9PbXlM3qgQLQfOs-yhxyiv5QCMCszobQ5HeAiynzmYs619Nk6_JTwZniYgRjolZF9JRbhsEsxipKAa3Oc60euJOWGfDw77nnrkwkiC4O-JSnxewo57RJajeHg6qC_38HfU69-7C7_qzu3W1TPpvJZiW-N-X-hJXU531FQ5JdQJwjhyygqPjr2Eyu19ueitveoXvrBuS0ULszBy5fDtfED-HFA0hZvIACd-vESp6n7V1VujhWa4mH62qcZbTcL4eJvvOMphjpyizaVNWFtNRwd_QN9Kx1ckL-SrriDKl7UfIdknbRw6JT5xXuW5iheVgRvsayYAeR5aOozvpbiytCFRwOeHVKuehpELqxGlb1LJhu4GKAyHQo1_mbgQUpe1vspESeVzzIeRC-Hkbpb-gCFLnWMEkGCo744s3Cn5XfuGYDDUUJHnzXGC2yIQK8l5545cdcQGTv8oX-iC4za2trTRYXqVoaLtwsq9ZaFJh2t8BOVJIyo_pWBMPZH0LTjoDfwKcqRiRQAGtmM6fQRY7jS3KLYlbH9lCWRwkUe0forIHWfS5Kz9OI3adgRhOt_h3GXOVY3Qv3bsv_ElNJKuRoG8e-kmMh4D-zMGkDsHVm1ezd1xVwJzs3vgFvOkw8xHJJermvSUe8wXO4fI3YP1fYfplHDjL0LFqAkefc-DTUVh-8NcIXebU47waJj8Y4QWa12v64RBzo8saYa0P0qzBdE-CTFAG17GKYdrEHR_rD-aFw8rCStl0bIINmBz9_VkLHxHkDeYTA93hhmLfP7KkMJ8cTUCX9HPm6OSnBxD_HWTQ DEBUG [jetty thread pool-2186] 2024-06-25 15:25:38.565 -0700 OAuth2Primitives - CLIENT_ID: ******* DEBUG [jetty thread pool-2186] 2024-06-25 15:25:38.565 -0700 OAuth2Primitives - CLIENT_SECRET: ******** DEBUG [jetty thread pool-2186] 2024-06-25 15:25:38.565 -0700 OAuth2Primitives - CODE_VERIFIER: 1dd60275e61222a866869b7dcfaa59d805b3abbb867b0a259e17815d DEBUG [jetty thread pool-2186] 2024-06-25 15:25:38.567 -0700 OAuth2Primitives - Executing HTTP post request: https://login.microsoftonline.com/cde6fa59-abb3-4971-be01-2443c417cbda/oauth2/v2.0/token DEBUG [jetty thread pool-2186] 2024-06-25 15:25:39.414 -0700 OAuth2Primitives - token response: {"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik1HTHFqOThWTkxvWGFGZnBKQ0JwZ0I0SmFLcyJ9.eyJhdWQiOiJjM2JmYTIzOS1mNTkxLTQ1YjAtYmQxMi03ZjliZjE2MmQ1YmQiLCJpc3MiOiJodHRwczovL2xvZ2luLm1pY3Jvc29mdG9ubGluZS5jb20vY2RlNmZhNTktYWJiMy00OTcxLWJlMDEtMjQ0M2M0MTdjYmRhL3YyLjAiLCJpYXQiOjE3MTkzNTQwNDQsIm5iZiI6MTcxOTM1NDA0NCwiZXhwIjoxNzE5MzU5MzExLCJhaW8iOiJBVVFBdS84WEFBQUFDaUZtamJ5NHgvZG04Qm9oWDY5NnZrVGhJbDgwUmc0RTJJS1JoVmJOcVF3ZGlpK0kwUW9jVitVdUk4Q3FCN1pWNStYMkNrbXZORkRmREh1QklrTFlDQT09IiwiYXpwIjoiYzNiZmEyMzktZjU5MS00NWIwLWJkMTItN2Y5YmYxNjJkNWJkIiwiYXpwYWNyIjoiMSIsImdyb3VwcyI6WyI2NTljNDEwYS0yYTJiLTRiMWEtOTZlYi05YmUzY2E5OWUzYTMiLCJhNTYyYjgyYS0zYjlkLTQ1OWUtOTcwNi02OThkMTljNTk3MDkiLCI3MTg5NmFhMi05MDRkLTQ3NzAtODQ0MC0xYzZmOTJkMmQwNWEiLCJkNjM1NGM2YS0wNjYzLTRmZTYtYjAzOC01ODhjNTc4ZDM3NjMiXSwibmFtZSI6IlNpZGRoYW50IEd1amFyIiwib2lkIjoiODQwNTJiNTYtMTU3Ni00OGZiLTkzOWYtZDQwODJlNjIxNzlhIiwicHJlZmVycmVkX3VzZXJuY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W3NdXYk5krxYc9gCi6xs-mgdrbJPmOcjdY8Y3WsEYni84nsDOYs-K3X3g9jHE6F-rkYWNs5bBQ1dMBfmh8PqOvbFd5sAoIVdKydrmozwvs8ngI_QN4_f2PxVwu2VdBLewpfhubmX8d5XuFpmcZNGcyUQ","ext_expires_in":4966,"token_type":"Bearer","expires_in":4966} DEBUG [jetty thread pool-2181] 2024-06-25 15:25:41.897 -0700 OAuth2Primitives - CLAIMS: {aud=c3bfa239-f591-45b0-bd12-7f9bf162d5bd, iss=https://login.microsoftonline.com/cde6fa59-abb3-4971-be01-2443c417cbda/v2.0, iat=1719354044, nbf=1719354044, exp=1719359311, aio=AUQAu/8XAAAACiFmjby4x/dm8BohX696vkThIl80Rg4E2IKRhVbNqQwdii+I0QocV+UuI8CqB7ZV5+X2CkmvNFDfDHuBIkLYCA==, azp=c3bfa239-f591-45b0-bd12-7f9bf162d5bd, azpacr=1, groups=[659c410a-2a2b-4b1a-96eb-9be3ca99e3a3, a562b82a-3b9d-459e-9706-698d19c59709, 71896aa2-904d-4770-8440-1c6f92d2d05a, d6354c6a-0663-4fe6-b038-588c578d3763], name=ABC, oid=84052b56-1576-48fb-939f-d4082e62179a, preferred_username=abc@gmail.com, rh=0.ASwAWfrmzbOrcUm-ASRDxBfL2jmiv8OR9bBFvRJ_m_Fi1b0sACM., scp=.19121de4-95f3-4d24-b5e9-ea5598e6863c, sub=s9Y323Mkkjd2dl36yPpNMAjDjxjpepbUivGZAkCEg9I, tid=cde6fa59-abb3-4971-be01-2443c417cbda, uti=NaDfMYNKhkSe9RbBi2clAA, ver=2.0, wids=[cf1c38e5-3621-4004-a7cb-879624dced7c, b79fbf4d-3ef9-4689-8143-76b194e85509]} DEBUG [jetty thread pool-2181] 2024-06-25 15:25:41.899 -0700 OAuth2Primitives - Claim group mapping: [aud (190126,3634) [3634-8602], aud:c3bfa239-f591-45b0-bd12-7f9bf162d5bd (190129,3634) [3634-8602], iss (190133,3634) [3634-8602], iss:https://login.microsoftonline.com/cde6fa59-abb3-4971-be01-2443c417cbda/v2.0 (190128,3634) [3634-8602], aio (190130,3634) [3634-8602], azp (190131,3634) [3634-8602], azp:c3bfa239-f591-45b0-bd12-7f9bf162d5bd (190127,3634) [3634-8602], azpacr (190132,3634) [3634-8602], azpacr:1 (190134,3634) [3634-8602]]

(5) To disable debug logging, comment the .level=DEBUG lines in the log4j2.properties / remove all lines added in step(2). Carry out Step (3) once more to reload the log4j2 file to disable debug.