Layer7 API Management

Expand all | Collapse all

Deleted tokens on external OTK db

  • 1.  Deleted tokens on external OTK db

    Posted 04-16-2019 07:27 AM

    Hello, 

    we are using an API Gateway 9.3 with OTK 4.3.0 and an external mySQL otk_db.

    When we create a new token, it works for a few minutes and then something goes to delete it at all.

    The schedulated tasks "OTK Database Maintenance" are configured to run 1 time a day, what could be the cause of this behavior?

    Thank you in advance for any suggest, 

    Andrea



  • 2.  Re: Deleted tokens on external OTK db

    Posted 04-16-2019 08:00 AM

    Hi Andrea,

     

    I would check the configured lifetimes for the tokens: Configure Token Lifetime Properties

     

    Also, are you creating tokens using the same client credentials and resource owner combination? In older versions (ie 3.5) if the same RO and client credentials are used it would invalidate the previously generated tokens.

     

     

    Regards,

    Joe



  • 3.  Re: Deleted tokens on external OTK db

    Posted 04-18-2019 09:24 AM

    Thank you Dasjo02, you was right.

    I'm still having a doubt:

    when I create a new token with the same client/resource combination, I want to wait 15 minutes before the complete erasing of the token.
    As I read in the Configure Token Lifetime Properties page, I tried to set the "oauth2_access_token_lifetime_sec" variable in #OTK Token Lifetime Configuration but, when I create the second token, the first immediately disappear.

    Is that the right variable?

    Thank you for your help, 

    Andrea



  • 4.  Re: Deleted tokens on external OTK db

    Posted 05-20-2019 05:30 PM

    Hi,

    by default when a new token gets generated previous token is deleted ( only 1 token can exists per client ). To change this behaviour, set max_oauth_token_count in  #OTK Storage Configuration policy

     

    https://docops.ca.com/ca-api-management-oauth-toolkit/4-3/en/installation-workflow/configure-authentication/token-configuration