[COMPASS-4901] Compass overwrites appname field in connection string Created: 24/Jun/21 Updated: 10/Jan/24 Resolved: 14/Jul/21 |
|
| Status: | Closed |
| Project: | Compass |
| Component/s: | Connectivity |
| Affects Version/s: | 1.26.1 |
| Fix Version/s: | 1.28.4 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Nabil Boutemeur | Assignee: | Sergey Petushkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Story Points: | 1 | ||||
| Documentation Changes: | Not Needed | ||||
| Sprint: | Iteration Firenze, Iteration Geneva | ||||
| Description |
Problem Statement/RationaleCompass overwrites the appName field in connection string even when explicitly specified. Steps to Reproduce
Expected ResultsI expect appname to keep its explicitly set value. Actual ResultsThe appname field is added when omited, or overwritten with a value of "MongoDB%20Compass" Additional NotesIssue seems to come from https://github.com/mongodb-js/compass/blob/fe5fc2925a2621b2a69c9dc835de68da1a393be5/packages/compass/src/app/migrations/legacy-connection.js#L686 I suggest either removing these lines, or using the default value only if it wasn't specified explicitly in the connection string. |
| Comments |
| Comment by Nabil Boutemeur [ 28/Jun/21 ] |
|
Hi Sergey Petushkov, thank you for the prompt reply. Our use case is that in our company we have a software that uses the appname field to authenticate users (kind of as it's shown in this page, for realm) and provide additional features on top (mainly monitoring, but extensible to do just about anything). However this issue makes Compass incompatible with this software and forces us to maintain an internal fork with a two-line patch. I personally do not understand why the decision of not allowing this field to be overwritten when explicitly set was made, maybe you can bring us some light on this issue? I'm sorry as this probably comes out as an oddly specific edge-case that'd possibly only be convenient for our specific needs. Thank you.
|
| Comment by Sergey Petushkov [ 28/Jun/21 ] |
|
Hey nabil.boutemeur@gmail.com, thanks for reporting the issue! This is currently "working as expected", but we would like to learn more why it might be important for you to override the appname argument with your own one. Can you share your use-case with us, please? |
| Comment by Nabil Boutemeur [ 25/Jun/21 ] |
|
Is actually the line that overwrites the appname field. |