# Authentication mechanism for all Dgraph versions

**URL:** <https://discuss.dgraph.io/t/authentication-mechanism-for-all-dgraph-versions/13489>\
**Category:** App Development\
**Tags:** auth\
**Created:** [March 31, 2021, 8:26am UTC](https://discuss.dgraph.io/t/authentication-mechanism-for-all-dgraph-versions/13489 "2021-03-31T08:26:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MIguel\_Angel\_Esteve](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/miguel_angel_esteve/32/6563_2.png) [@MIguel\_Angel\_Esteve](https://discuss.dgraph.io/u/MIguel_Angel_Esteve)\
**Post date:** [March 31, 2021, 8:26am UTC](https://discuss.dgraph.io/t/authentication-mechanism-for-all-dgraph-versions/13489/1 "2021-03-31T08:26:59Z")

</div>

I’m considering using Dgraph in various environments: local development with docker, Dgraph Slash and Dgraph Cloud.

I want to restrict access only to authorized sources.

Is there a common authentication mechanism valid for all environments? I have seen that in Dgraph Slash I can create API keys, can I use API keys when I install Dgraph by myself or when I will use Dgraph Cloud?

Thanks!

---

<div class="post-metadata">

**Author:** ![mrjn](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/mrjn/32/775_2.png) [@mrjn](https://discuss.dgraph.io/u/mrjn)\
**Post date:** [March 31, 2021, 9:15am UTC](https://discuss.dgraph.io/t/authentication-mechanism-for-all-dgraph-versions/13489/2 "2021-03-31T09:15:34Z")

</div>

There’s a level of auth only available to the cloud (what you see via API Keys, would be soon renamed to Auth Tokens or similar). Dgraph supports more complex auth rules — with GraphQL support object level auth, while the core supporting predicate level auth via ACLs. ACLs are enterprise feature though (available in all cloud offerings).
