microgateway-edgeauth which param control the cache time out on Apigee Edge related to verify api key request from Edge Microgateway

Since v2.4.12 the cache policy enabled to improve the apikey verify performance, which exact parameter in this proxy on Apigee Edge config how long the value will be cached on Apigee Edge by the cache policy. Thanks.

Solved Solved
0 4 350
1 ACCEPTED SOLUTION

Former Community Member
Not applicable

The cache for API Key is controlled by this policy (https://github.com/apigee/microgateway-edgeauth/blob/master/apiproxy/policies/Populate-Entity.xml) -- Lookup-Entity. The default cache setting is 3600 seconds.

View solution in original post

4 REPLIES 4

In Create OAuth Request policy there's one token_expiry config:

<AssignVariable>

<Name>token_expiry</Name>

<Value>300</Value>

</AssignVariable>

Is this the parameter control how long the JWT for Edge Microgateway apikey verify request cached on Apigee Edge? If it is, please also confirm the unit of the cache time out is second or million second? Thanks.

Former Community Member
Not applicable

This parameter token_expiry is used to control the expiry of the JWT Token. The JWT token ExpiresIn variable (https://docs.apigee.com/api-platform/reference/policies/generate-jwt-policy#expiresin) is in seconds.

NOTE: The same variable is also used to generate an internal OAuth token (opaque token in Edge). The OAuth v2 policy's ExpiresIn variable (https://docs.apigee.com/api-platform/reference/policies/oauthv2-policy#expiresinelement) is in milliseconds. However, this token is not used by Microgateway. If you want to match the tokens, you'll have to convert both to seconds before applying it.

Former Community Member
Not applicable

The cache for API Key is controlled by this policy (https://github.com/apigee/microgateway-edgeauth/blob/master/apiproxy/policies/Populate-Entity.xml) -- Lookup-Entity. The default cache setting is 3600 seconds.

Thanks @srinandans