Project

Profile

Help

Issue #660

closed

Pulp does not authenticate with mongodb using username and password if specified

Added by bmbouter about 9 years ago. Updated almost 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.6 Beta
Platform Release:
2.6.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description of problem: Pulp cannot connect a correctly configured mongodb database with a username and password. It gives the following error:

pymongo.errors.OperationFailure: database error: not authorized for query on pulp_database.system.namespaces

How reproducible:

Steps to Reproduce:
1. Configure mongodb with a username and password that provides and require authentication. It needs the 'readWrite' and 'dbAdmin' roles. Here is my user:

{
"_id" : ObjectId("54b6cdca340ec35faf1ce787"),
"user" : "pulp_user",
"pwd" : "3f50a5c107a5f1dbba228759cbf4283c",
"roles" : [
"readWrite",
"dbAdmin"
]
}

2. Verify that the username and password allows you to list connections using mongo shell:

[bmbouter@dhcp129-138 pulp]$ mongo pulp_database -u pulp_user -p
MongoDB shell version: 2.4.6
Enter password:
connecting to: pulp_database

show collections

archived_calls
celery_taskmeta
consumer_bindings
consumer_groups
consumer_history
consumer_unit_profiles
consumers
content_catalog
content_types
event_listeners
migration_trackers
permissions
repo_content_units
repo_distributors
repo_group_publish_results
repo_groups
repo_importers
repo_publish_results
repo_sync_results
repos
reserved_resources
roles
scheduled_calls
system.indexes
system.users
task_status
units_distribution
units_drpm
units_erratum
units_iso
units_node
units_package_category
units_package_environment
units_package_group
units_puppet_module
units_python_package
units_repository
units_rpm
units_srpm
units_yum_repo_metadata_file
users
workers

3. Configure pulp with the same username and password

4. Start pulp

5. observe exception

Actual results: I cannot use pulp with a username and password [database] auth

Expected results: I expect that username and password settings in server.conf will be used by Pulp to authenticate with mongodb

+ This bug was cloned from Bugzilla Bug #1182335 +


Files

165cc3201b5d47ac95b09659d5aeeba1 (15 KB) 165cc3201b5d47ac95b09659d5aeeba1 igulina@redhat.com, 03/01/2015 12:19 AM

Also available in: Atom PDF