# About the Lookup Keys

**URL:** <https://community.dreamfactory.com/t/about-the-lookup-keys/2265>\
**Category:** Miscellaneous\
**Created:** [February 25, 2016, 3:42pm UTC](https://community.dreamfactory.com/t/about-the-lookup-keys/2265 "2016-02-25T15:42:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RJP](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@RJP](https://community.dreamfactory.com/u/RJP)\
**Post date:** [February 25, 2016, 3:42pm UTC](https://community.dreamfactory.com/t/about-the-lookup-keys/2265/1 "2016-02-25T15:42:11Z")

</div>

Continuing the discussion from [Amazon / Bitnami / Dreamfactory / Mongo Setup](https://community.dreamfactory.com/t/amazon-bitnami-dreamfactory-mongo-setup/2264):

See this thread on setting up Lookup Keys. Currently experiencing a problem getting the lookup keys to authenticate the Mongo DB server

---

<div class="post-metadata">

**Author:** ![formerstaff](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/formerstaff/32/1133_2.png) [@formerstaff](https://community.dreamfactory.com/u/formerstaff)\
**Post date:** [March 2, 2016, 5:52pm UTC](https://community.dreamfactory.com/t/about-the-lookup-keys/2265/2 "2016-03-02T17:52:08Z")

</div>

There is a bug that prevents you from using lookups for credentials in services. This bug is resolved in the forthcoming release (in ~ 2 weeks)

---

<div class="post-metadata">

**Author:** ![RJP](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@RJP](https://community.dreamfactory.com/u/RJP)\
**Post date:** [March 2, 2016, 5:53pm UTC](https://community.dreamfactory.com/t/about-the-lookup-keys/2265/3 "2016-03-02T17:53:53Z")

</div>

Okay, figured after a couple hours hammering my keyboard and abusing Google time to reach out for a lifeline.

Connecting to external MongoDb (Amazon VPC)

Setting up the service and roles.

In my service, I can create a role and connect no problem with:

`mongodb://mymongousername:mymongopassword@52.21.228.198:27017/mymongodb`

But when I try to enter Lookup Keys in the role to replace the mymongousername:mymongopassword I can no longer connect.

I set up my service like this:

`mongodb://{m_username}:{m_password}@52.21.228.198:27017/mymongodb`

and in my user role I set up

KEY: m\_username VALUE: mymongousername PRVATE  
KEY: m\_password VALUE: mymongopassword PRIVATE

I get a response:

```
Unexpected MongoDb Service Exception:
Failed to connect to: 52.21.228.198:27017: SASL Authentication failed on database 'mymongodb': Authentication failed.

```

I tried variants of username/password curly brackets etc but no luck. I revert back to original service setup with `mongodb://mymongousername:mymongopassword@52.21.228.198:27017/mymongodb` and connect again no problem.

Any help?

---

<div class="post-metadata">

**Author:** ![formerstaff](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/formerstaff/32/1133_2.png) [@formerstaff](https://community.dreamfactory.com/u/formerstaff)\
**Post date:** [March 2, 2016, 5:54pm UTC](https://community.dreamfactory.com/t/about-the-lookup-keys/2265/4 "2016-03-02T17:54:39Z")

</div>

Sorry if this is confusing. I tried to merge the topics. See my reply 2 posts up.
