title: Kong API key strategy
body: <p>I want to use Kong as an API gateway for all my upstream services. And I want to use API Keys so my customers can use that to use some APIs they are allowed to use.</p>
  
  <p>There is a plugin for managing API Keys: <a href="https://docs.konghq.com/hub/kong-inc/key-auth/" rel="nofollow noreferrer">https://docs.konghq.com/hub/kong-inc/key-auth/</a></p>
  
  <p>But I'm wondering if I can add properties to some API key or link it to some configuration. </p>
  
  <p>Let me explain with an example:</p>
  
  <p>I have 3 apis</p>
  
  <blockquote>
    <ul>
    <li>API 1</li>
    <li>API 2</li>
    <li>API 3</li>
    </ul>
  </blockquote>
  
  <p>On the Kong API Gateway I want to use rate limiting. So I want to generate API keys for 2 customers with some properties</p>
  
  <blockquote>
    <ul>
    <li>customer X: basic subscription which has a rate limit of 10 requests per minute for API 1 and 20 requests per minute for API 2</li>
    <li>customer Y: premium subscription on API 2 which has a rate limit of 5000 requests per minute and 1000 requests per minute for API 3</li>
    </ul>
  </blockquote>
  
  <p>So in Kong I create 3 services for those 3 APIs and add the rate limit plugin to that. Is there any way to let the rate limit plugin know (based upon the API key that is sent in the request) what limit it should use for that request that just has been entered?</p>
  
  <p>I seems to me that I need to create new services for the same APIs every time with a specific rate limit with a specific value. This feels a bit unmanageable when dealing with a lot of customers and apis.</p>
  
  <p>Is it possible to fetch the rate limit value based upon the API key that is passed through?</p>
  
  <p>Or is there any solution to do so? Or is this the actual behaviour we want in an API gateway, if yes, why?</p>