Skip to content
This repository has been archived by the owner on Mar 12, 2019. It is now read-only.

Commit

Permalink
Updated Mongo Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Shumate committed Oct 11, 2016
1 parent e63c749 commit 226d38f
Showing 1 changed file with 29 additions and 24 deletions.
53 changes: 29 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -518,30 +518,35 @@ the beginning of the line indicating a _superuser_)
The `mongo` back-end works with superuser and ACL checks with the following collections format.

```
users = {username: "user",
password: "PBKDF_string"
topics: int (topicID location)
superuser: int (1 true, 0 false)
}
topics = {_id: int,
topics: ["xx/xx/#", "yy/#", ...]
}
```
Collection name parameters can be set in mongoParam.h
```
mongoParam.h
/*
*Mongo database parameters
*
*dbName - Mongo database name
*colName (topics - topicID(int)) - Mongo collection of users (username, password, superuser, topics)
*topicLoc - Mongo collection of topics (_id, topics)
*topicID - mongo fieldname for topicSet ID
*superUser - mongo fieldname for superuser flag (true/false)
*/
...
```
users = {
username: "user",
password: "PBKDF_string"
topics: int (topicID location)
superuser: int (1 true, 0 false)
}
topics = {
_id: int,
topics: ["xx/xx/#", "yy/#", ...]
}
```

The following `auth_opt_mongo_` options are supported by the mysql back-end:

| Option | default | Meaning |
| ------------------ | ----------------- | --------------------- |
| host | localhost | Hostname/Address
| port | 27017 | TCP port
| user | | Username
| password | | Password
| authSource | | Authentication Database Name
| database | mqGate | Database Name
| collection_users | users | Collection for User Documents
| collection_topics | topics | Collection for Topic Documents
| location_password | password | Password field name in User Document
| location_topic | topics | Topic Document pointer field name in User Document
| lotcation_topicId | _id | Field name that location_topic points to in Topic Document
| location_superuser | superuser | Superuser field name in User Document

Mosquitto configuration for the `mongo` back-end:
```
Expand Down

0 comments on commit 226d38f

Please sign in to comment.