-
-
Notifications
You must be signed in to change notification settings - Fork 505
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
Not authorized to execute collMod during schema creation #2402
Comments
@nikophil are you sure this is because of ODM and not some other library/driver update? Asking because |
Hi @malarzm $ composer info doctrine/mongodb-odm
# results in 2.2.3
$ bin/console doctrine:mongodb:schema:update
Updated indexes for all classes
$ composer u doctrine/mongodb-odm:2.3.0
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
- Upgrading doctrine/mongodb-odm (2.2.3 => 2.3.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Downloading doctrine/mongodb-odm (2.3.0)
- Upgrading doctrine/mongodb-odm (2.2.3 => 2.3.0): Extracting archive
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
Executing script cache:clear [OK]
$ bin/console doctrine:mongodb:schema:update
Updated indexes for all classes
not authorized on db to execute command { collMod: "some-collection", validator: [], validationAction: "error", validationLevel: "strict", $db: "db", lsid: { id: UUID("xxxxxxxxxxx") }, $clusterTime: { clusterTime: Timestamp(1640850344, 139), signature: { hash: BinData(0, xxxxxxxx), keyId: xxxxxxxx } } } maybe, I'm mistaking and the root cause is not BTW here some extra info: |
This query comes from new feature in ODM 2.3 (#2238). Most probably the user you're authenticating with is not authorized to run |
thanks for this, I'll ask for a change of the authorization o my user, I'll let you know. sorry for the misunderstanding about |
Hello,
BC Break Report
Summary
Since we've upgraded to doctrine/mongo-odm 2.3.0 the
authSource
will always beadmin
even if another one is provided in the dsn with theauthSource
param. This leads to "authentication failed" errors.How to reproduce
try to connect to a database which authentication database has another name than
admin
thanks for your work 👍
The text was updated successfully, but these errors were encountered: