Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication Failure with Scram and MongoDB 4.2.6 #80

Closed
slamanna-descartes opened this issue Mar 11, 2022 · 1 comment
Closed

Authentication Failure with Scram and MongoDB 4.2.6 #80

slamanna-descartes opened this issue Mar 11, 2022 · 1 comment

Comments

@slamanna-descartes
Copy link

Description

When implementing the MongoDB integration for New Relic, I get an authentication failure when using any credentials using SCRAM. The same credentials works both in the MongoDB service and in the individual pods. I'm able to get all the databases and collections needed based on the role and user to add for New Relic to work properly.

Expected Behavior

The authentication should be working in the integration if it is working both on the service and the individual replicas.

NR Diag

time="2022-03-11T19:11:15Z" level=warning msg="integration exited with error state" component=integrations.runner.Runner env=azure error="exit status 1" integration_name=nri-mongodb stderr="[INFO] Collecting all collections for database 'test'\n[ERR] Failed to create session: server returned error on SASL authentication step: Authentication failed."

Steps to Reproduce

  1. Install the MongoDB community operator then a replica set on K8S.
  2. Create the NR user along with the necessary roles.
  3. Install the nri-bundle helm chart and ensure those values are included:
    - name: mongodb-config.yml data: discovery: command: exec: /var/db/newrelic-infra/nri-discovery-kubernetes --namespaces mongodb --port 10250 --tls match: label.app: mongodb-replica-svc integrations: - name: nri-mongodb env: HOST: ${discovery.ip} PORT: 27017 USERNAME: newrelic PASSWORD: *** AUTH_SOURCE: admin MONGODB_CLUSTER_NAME: abc FILTERS: '{"test":null}' labels: env: dev

This fails, but mongodb://newrelic:***@localhost:27017/admin?authSource=admin&readPreference=primary&appname=MongoDB%20Compass&directConnection=true&ssl=false works without any issues. The password is the same.

Your Environment

I'm using the latest helm chart version of the helm nri-bundle helm chart as well as the mongodb community operator. Kubernetes version is 1.21.

@gsanchezgavier
Copy link
Contributor

We appreciate you taking the time to bring this to our attention and the details provided.

I checked that there is an existing issue regarding this #67 but there is no ETA for this yet that i can share.

I will close this in favor of the previous one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants