yesodweb / yesodweb/persistent

Is connecting using MongoDB over SSL possible?

Open
#774 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

mongoDB
Dominant language
Haskell
Stars
486
Forks
306
PR merge metrics
No merged PRs in 30d

Description

This functionality seems to be supported with MongoDB using https://hackage.haskell.org/package/mongoDB-2.3.0.1/docs/Database-MongoDB-Transport-Tls.html#v:connect

I'm testing using the following:

  let mongoConfig = MongoConf "test" "cluster0-shard-00-00-gv0qj.mongodb.net" (PortNumber 27017) (Just $ MongoAuth "*" "*") UnconfirmedWrites 1 1 2000 Nothing
  withConnection mongoConfig $ \pool -> runMongoDBPool master actions pool

Which produces an error of:

*** Exception: Data.Binary.Get.runGet at position 0: not enough bytes
CallStack (from HasCallStack):
  error, called at libraries/binary/src/Data/Binary/Get.hs:351:5 in binary-0.8.5.1:Data.Binary.Get

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the MongoConf connection path used by withConnection and runMongoDBPool, then compare it with the mongoDB TLS connect API linked in the issue. Reproduce the reported Data.Binary.Get error using the provided configuration. Done means the project documents or supports a working MongoDB SSL connection, with the failure behavior clarified.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell, mongodb
Domain
databases, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.