StackStorm / StackStorm/st2

Database password can't contain dollar-sign $

Open
#4,797 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue status:to be verified
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

SUMMARY

Database password cannot contain $ dollar-sign. It's unclear if the problem happens at MongoEngine or at Stackstorm level.

Testing PyMongo with a password containing $ worked just fine (could create indexes and perform queries).

STACKSTORM VERSION

Paste the output of st2 --version: st2 3.1.0, on Python 2.7.12

OS, environment, install method

Post what OS you are running this on, along with any other relevant information/

Running on Docker Swarm using https://github.com/StackStorm/st2-dockerfiles

Steps to reproduce the problem

Use a password with * in the [database] section. I've used on st2.docker.conf.

Expected Results

Services should start normally.

Actual Results

Authentication to Mongo is reported as successful but fails on ensuring indexes are created.

OperationFailure: not authorized on st2 to execute command { createIndexes: "user_d_b", indexes: [ { unique: true, background: false, sparse: false, key: { name: 1 }, name: "name_1" } ] }

If a password without $ is used, everything works just fine.

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 [database] section in st2.docker.conf and trace how StackStorm passes the configured password to MongoDB. Reproduce with the reported special-character password, compare with PyMongo behavior, and confirm the fix by verifying authentication and index creation succeed.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, python
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.