Skip to content

Commit

Permalink
Makes the mongo authentication mechanism configurable from the enviro…
Browse files Browse the repository at this point in the history
…nment

* Defaults to ':scram', the authentication mechanism supported by mongo >3.0,
  which is also supported by the devstack.
* Uses MONGOID_AUTH_MECH: "" for CI, because that mongo database has no user credentials.
  • Loading branch information
pomegranited committed Apr 26, 2020
1 parent cd26759 commit fafb9e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis/docker-compose-travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ services:
container_name: forum_testing
volumes:
- ..:/edx/app/forum/cs_comments_service
environment:
MONGOID_AUTH_MECH: ""
forum:
extends: forum-base
command: tail -f /dev/null
Expand Down
1 change: 1 addition & 0 deletions config/mongoid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ common: &default_client
timeout: <%= ENV['MONGOID_TIMEOUT'] || 0.5 %>
ssl: <%= ENV['MONGOID_USE_SSL'] || false %>
auth_source: <%= ENV['MONGOID_AUTH_SOURCE'] || '' %>
auth_mech: <%= ENV['MONGOID_AUTH_MECH'].nil? ? ':scram' : ENV['MONGOID_AUTH_MECH'] %>

common_uri: &default_uri
uri: <%= ENV['MONGOHQ_URL'] %>
Expand Down

0 comments on commit fafb9e8

Please sign in to comment.