[SERVER-83881] make checkMetadataConsistency hook work in case of enabled authentication Created: 05/Dec/23 Updated: 14/Dec/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Enrico Golfieri | Assignee: | Backlog - Catalog and Routing |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | car-qw | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Catalog and Routing
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Story Points: | 2 | ||||||||
| Description |
|
The checkMetadataConsistency hook runs on a separate shell which does not authenticate. In case a test enables authentication. The checkMetadataConsistency will error with Error.Unauthorized. Before SERVER-70396 this behaviour was hidden behind the feature flag check which used to fail with "Unauthorized". However the try-catch would swallow the error causing the check to be skipped for the wrong reason. After SERVER-70396 we will set Error.Unauthorized as TransientError At the current state, the checkMetadataConsistency is always skipped in case authentication is enabled, causing a reduced test coverage. This ticket is to make checkMetadataConsistency authenticate before running in case of enabled authentication. Similar to what is done in check_shard_filtering_metadata |