Versa Plugin Oauth Flow Error from a Virtual Network Assurance perspective
search cancel

Versa Plugin Oauth Flow Error from a Virtual Network Assurance perspective

book

Article ID: 281324

calendar_today

Updated On: 03-28-2024

Products

Network Observability

Issue/Introduction

When requests were sent out from VNA (Virtual Network Assurance) installed with Versa Plugin, the following log entries were noticed:

2024-03-22 12:55:00,576 INFO (EE-ManagedThreadFactory-default-Thread-191) [OC_CORE] EngineThreadManager$EngineActionTask 208 Executor for Versa_938393749749339469364538387 : Availability Poll, taskID=Availability_Poll_1711106387553 started 
2024-03-22 12:55:00,616 INFO (EE-ManagedThreadFactory-default-Thread-191) [OC_SCRIPTING] Logger$info$3 -1 OAuth Bearer Token is invalid - Need to generate a new one

2024-03-22 12:55:00,617 INFO (EE-ManagedThreadFactory-default-Thread-191) [OC_SCRIPTING] Logger$info$3 -1 Revalidating token expiry before refreshing token 
2024-03-22 12:55:00,618 INFO (EE-ManagedThreadFactory-default-Thread-191) [OC_SCRIPTING] Logger$info$3 -1 OAuth Bearer Token is invalid - Need to generate a new one

Additionally, we are experiencing data gaps in the NetOps portal as the authentication seems to be failing.

Environment

DX NetOps Virtual Network Assurance 23.3.x

Cause

Token Expiry Settings:

  • The original configuration of access token expiry for the client ID and Client Secret within Versa was not aligned with the operational requirements. With a shorter token expiry duration, there was a higher frequency of token regeneration, increasing the likelihood of authentication failures.

Resolution

To address this issue and ensure proper functionality, the following changes were made:

  1. Adjust Token Expiry Settings:

    • The access token expiry for the client ID and Client Secret Configuration within Versa was adjusted to 20 days, and the refresh token expiry to 30 days. This change ensures that tokens remain valid for an extended period, reducing the frequency of token regeneration.
  2. Delete Tokenstore File:

    • The tokenstore file located at /opt/CA/VNA/collector/Versa_938393749749339469364538387/repository/work was deleted. To resolve any issues related to token storage or corruption, this file was deleted.
  3. Reapply Plugin Configuration:

    • After deleting the tokenstore file, the plugin configuration was reapplied. This step ensures that the plugin settings are properly initialized and synchronized with the updated token expiry settings. Reapplying the configuration helps in establishing a fresh connection with the Versa platform, incorporating the new token settings seamlessly.

By implementing these steps, the authentication and token management process within the Versa plugin is optimized, minimizing the occurrence of authentication failures and data gaps. Users can expect improved stability and reliability in data retrieval and processing within the NetOps portal.