fix: add authSource and directConnection params to MongoDB connection URLs#4112
Open
manalkaff wants to merge 2 commits intoDokploy:canaryfrom
Open
fix: add authSource and directConnection params to MongoDB connection URLs#4112manalkaff wants to merge 2 commits intoDokploy:canaryfrom
manalkaff wants to merge 2 commits intoDokploy:canaryfrom
Conversation
… URLs Fixes Dokploy#4105 - MongoDB external and internal connection URLs were missing required query parameters causing authentication failures. Added ?authSource=admin&directConnection=true to both connection strings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
apps/dokploy/components/dashboard/mongo/general/show-external-mongo-credentials.tsx
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
?authSource=admin&directConnection=trueto both connection strings.Changes
show-external-mongo-credentials.tsx: appended?authSource=admin&directConnection=trueto external connection URLshow-internal-mongo-credentials.tsx: appended?authSource=admin&directConnection=trueto internal connection URLTest plan
?authSource=admin&directConnection=true?authSource=admin&directConnection=trueGreptile Summary
This PR fixes MongoDB authentication failures (issue #4105) by appending authentication query parameters to both the external and internal connection URLs displayed in the credentials panels. The change is minimal, targeted, and follows the correct MongoDB URI specification.
Key changes:
show-external-mongo-credentials.tsx: External connection URL now includes theauthSourceanddirectConnectionquery parametersshow-internal-mongo-credentials.tsx: Internal connection URL now includes the same query parametersNotes:
authSourcetoadminis the correct default authentication database for a MongoDB container, matching the typical Dokploy deployment model.directConnectiontotrueis appropriate for standalone Docker-based MongoDB instances, but it is a hardcoded assumption. Users who configure a replica set or route traffic through a proxy may need to adjust these parameters manually.Confidence Score: 5/5
Safe to merge — the changes are pure display-string fixes with no logic, state, or API impact.
Both changes are single-line string additions to credential display components. The parameters added are correct for the standard Dokploy MongoDB deployment model. The only finding is a P2 style note about directConnection being a hardcoded standalone-topology assumption, which does not block the merge.
No files require special attention.
Important Files Changed
Reviews (1): Last reviewed commit: "fix: add authSource and directConnection..." | Re-trigger Greptile
(2/5) Greptile learns from your feedback when you react with thumbs up/down!