[COMPASS-6058] An update on a sharded collection is failing unless the user has admin privileges Created: 30/Aug/22 Updated: 29/Oct/23 Resolved: 11/May/23 |
|
| Status: | Closed |
| Project: | Compass |
| Component/s: | CRUD |
| Affects Version/s: | 1.32.6 |
| Fix Version/s: | 1.37.0 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Dmitry Ryabtsev | Assignee: | Alena Khineika |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
OS: |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Epic Link: | COMPASS-5987 | ||||||||
| Story Points: | 5 | ||||||||
| Documentation Changes: | Not Needed | ||||||||
| Sprint: | Iteration Seahorse, Iteration Unicornfish, Iteration Velvet Crab, Iteration Whale, Iteration Xantic Sargo, Iteration Zebrafish, Iteration Ankylosaurus, Iteration Brontosaurus | ||||||||
| Description |
|
Steps to reproduce: Same operation will work if executed from mongosh:
Same operation works in Compass if executed as an admin user. Log inspection indicates that the failure occurs because Compas is failing to obtain shard key:
However the lack of authorization is nowhere visible in the Compass UI. |
| Comments |
| Comment by Githook User [ 20/May/23 ] |
|
Author: {'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}Message: refactor: fallback to modifyOneMethod with query
|
| Comment by Githook User [ 20/May/23 ] |
|
Author: {'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}Message: fix: allow updates on a sharded collection
|
| Comment by Githook User [ 15/May/23 ] |
|
Author: {'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}Message: refactor: fallback to modifyOneMethod with query
|
| Comment by Githook User [ 15/May/23 ] |
|
Author: {'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}Message: fix: allow updates on a sharded collection
|
| Comment by Githook User [ 15/May/23 ] |
|
Author: {'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}Message: refactor: fallback to modifyOneMethod with query
|
| Comment by Githook User [ 15/May/23 ] |
|
Author: {'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}Message: refactor: fallback to modifyOneMethod with query
|
| Comment by Githook User [ 15/May/23 ] |
|
Author: {'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}Message: fix: allow updates on a sharded collection
|
| Comment by Githook User [ 12/May/23 ] |
|
Author: {'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}Message: refactor: fallback to modifyOneMethod with query
|
| Comment by Thomas Soestini (@Scopely) [ 12/May/23 ] |
|
Yay!! Thanks! |
| Comment by Githook User [ 12/May/23 ] |
|
Author: {'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}Message: refactor: fallback to modifyOneMethod with query
|
| Comment by Githook User [ 12/May/23 ] |
|
Author: {'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}Message: fix: allow updates on a sharded collection
|
| Comment by Githook User [ 12/May/23 ] |
|
Author: {'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}Message: refactor: fallback to modifyOneMethod with query |
| Comment by Githook User [ 11/May/23 ] |
|
Author: {'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}Message: fix: allow updates on a sharded collection
|
| Comment by Githook User [ 11/May/23 ] |
|
Author: {'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}Message: Merge remote-tracking branch 'origin/main' into |
| Comment by Githook User [ 10/May/23 ] |
|
Author: {'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}Message: Merge remote-tracking branch 'origin/main' into |
| Comment by Githook User [ 09/May/23 ] |
|
Author: {'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}Message: Merge remote-tracking branch 'origin/main' into |
| Comment by Githook User [ 08/May/23 ] |
|
Author: {'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}Message: Merge remote-tracking branch 'origin/main' into |
| Comment by Githook User [ 08/May/23 ] |
|
Author: {'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}Message: fix: an update on a sharded collection is failing unless the user has admin privileges |
| Comment by Thomas Soestini (@Scopely) [ 03/May/23 ] |
|
yay! |
| Comment by Maurizio Casimirri [ 03/May/23 ] |
|
thomas.soestini@scopely.com We managed to reproduce it and we are going to add a fix for it soon |
| Comment by Thomas Soestini (@Scopely) [ 03/May/23 ] |
|
I'm not sure what server version we were using 8 months ago, but I think it was 4.2. It looks like Dmitry was able to reproduce it on MongoDB v4.2.22, too. You can see the thread here: https://support.mongodb.com/case/00988425 Just one note on the repro steps listed above: I think there may be an error in step 4. The problem appears when you don't have admin, in case that helps. |
| Comment by Alena Khineika [ 27/Apr/23 ] |
|
Hey thomas.soestini@scopely.com, I am trying to reproduce the issue and currently can't. What server version are you using? |
| Comment by Thomas Soestini (@Scopely) [ 29/Mar/23 ] |
|
Ooo, Iteration Z! Hopefully it gets fixed this iteration, otherwise not sure what's after Z. |