{"action":"created","issue":{"url":"https://api.github.com/repos/apigee/microgateway-plugins/issues/92","repository_url":"https://api.github.com/repos/apigee/microgateway-plugins","labels_url":"https://api.github.com/repos/apigee/microgateway-plugins/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/apigee/microgateway-plugins/issues/92/comments","events_url":"https://api.github.com/repos/apigee/microgateway-plugins/issues/92/events","html_url":"https://github.com/apigee/microgateway-plugins/issues/92","id":396043820,"node_id":"MDU6SXNzdWUzOTYwNDM4MjA=","number":92,"title":"ApiKey caching is not using the cache expiry mechanism","user":{"login":"eschult2001","id":465177,"node_id":"MDQ6VXNlcjQ2NTE3Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/465177?v=4","gravatar_id":"","url":"https://api.github.com/users/eschult2001","html_url":"https://github.com/eschult2001","followers_url":"https://api.github.com/users/eschult2001/followers","following_url":"https://api.github.com/users/eschult2001/following{/other_user}","gists_url":"https://api.github.com/users/eschult2001/gists{/gist_id}","starred_url":"https://api.github.com/users/eschult2001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eschult2001/subscriptions","organizations_url":"https://api.github.com/users/eschult2001/orgs","repos_url":"https://api.github.com/users/eschult2001/repos","events_url":"https://api.github.com/users/eschult2001/events{/privacy}","received_events_url":"https://api.github.com/users/eschult2001/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-01-04T19:40:19Z","updated_at":"2019-01-05T20:10:29Z","closed_at":null,"author_association":"NONE","body":"[feature request] \r\n\r\nIn apikeys (and same code in oauth and oauthv2) \r\nhttps://github.com/apigee/microgateway-plugins/blob/94751da5776c89a2132d76ce9580591be665dd7b/apikeys/index.js#L201\r\n\r\nA distinct expiration time is known but not passed to the cache.   This could benefit\r\n  - less IPC transfer for objects that are expired\r\n  - simpler cache retrieval logic (memored already checks the TTL on retrieval)\r\n  - proactively evicting stale JWTs from cache making room for more active apiKeys\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apigee/microgateway-plugins/issues/comments/451686794","html_url":"https://github.com/apigee/microgateway-plugins/issues/92#issuecomment-451686794","issue_url":"https://api.github.com/repos/apigee/microgateway-plugins/issues/92","id":451686794,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTY4Njc5NA==","user":{"login":"srinandan","id":13950006,"node_id":"MDQ6VXNlcjEzOTUwMDA2","avatar_url":"https://avatars3.githubusercontent.com/u/13950006?v=4","gravatar_id":"","url":"https://api.github.com/users/srinandan","html_url":"https://github.com/srinandan","followers_url":"https://api.github.com/users/srinandan/followers","following_url":"https://api.github.com/users/srinandan/following{/other_user}","gists_url":"https://api.github.com/users/srinandan/gists{/gist_id}","starred_url":"https://api.github.com/users/srinandan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srinandan/subscriptions","organizations_url":"https://api.github.com/users/srinandan/orgs","repos_url":"https://api.github.com/users/srinandan/repos","events_url":"https://api.github.com/users/srinandan/events{/privacy}","received_events_url":"https://api.github.com/users/srinandan/received_events","type":"User","site_admin":false},"created_at":"2019-01-05T20:10:29Z","updated_at":"2019-01-05T20:10:29Z","author_association":"COLLABORATOR","body":"When an apikey is presented to MG, it invokes /edgemicro-auth/verifyApikey. The response from verifyApiKey is a JWT. At the moment, the JWT expiry is set to 1 minute (but easily customizable). The current logic stores the api key in cache for as long as the JWT expiry is set to.\r\n\r\nI'm happy to add a TTL for the cache itself, but remember there are two dials to operate - a JWT expiry and the cache TTL."}}
{"actor":{"display_login":"srinandan"}}