# Consumers are not namespace isolated

**URL:** <https://discuss.konghq.com/t/consumers-are-not-namespace-isolated/5687>\
**Category:** General\
**Created:** [March 2, 2020, 2:13pm UTC](https://discuss.konghq.com/t/consumers-are-not-namespace-isolated/5687 "2020-03-02T14:13:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jumal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/jumal/32/1754_2.png) [@jumal](https://discuss.konghq.com/u/jumal)\
**Post date:** [March 2, 2020, 2:13pm UTC](https://discuss.konghq.com/t/consumers-are-not-namespace-isolated/5687/1 "2020-03-02T14:13:05Z")

</div>

Hi there,

I am using the key-auth plugin by

1. creating a “foo” namespace
2. creating a KongPlugin custom resource in the “foo” namespace
3. annotating a service in the namespace “foo” to use the plugin
4. creating KongConsumer custom resources with their associated secrets all in the “foo” namespace

When I create a KongConsumer with its associated secret in another “bar” namespace, this consumer’s API key can be used to authenticate to the service in namespace “foo”.

I would not expect the api keys defined in one namespace to be valid to access a service in another namespace.

Is this a bug or the intended behaviour?

Regards,  
JP

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [March 6, 2020, 7:04pm UTC](https://discuss.konghq.com/t/consumers-are-not-namespace-isolated/5687/2 "2020-03-06T19:04:58Z")

</div>

This is the intended behavior. KongConsumers are namespaced but are really global resources and this is something that we wish to address in future.

If you want to achieve what you want, please look at ACL plugin in Kong.  
You can assign an ACL group to each consumer in a namespace and limit the access based on namespace, KongConsumer and service relationship.
