Liquibase Version: 4.25.0
- lib\bson-4.11.1.jar: bson 4.11.1
- lib\liquibase-mongodb-4.24.0.jar: Liquibase MongoDB Extension 4.24.0 By Liquibase
- lib\mongodb-driver-core-4.11.1.jar: mongodb-driver-core 4.11.1
- lib\mongodb-driver-sync-4.11.1.jar: mongodb-driver-sync 4.11.1
Error:
Unexpected error running Liquibase: Could not execute
- Caused by: Command failed with error 13 (Unauthorized): 'not authorized on test to execute command { collMod: "DATABASECHANGELOG", validator: { $jsonSchema: { bsonType: "object", description: "Database Change Log Table.", required: [ "id", "author", "fileName", "execType" ], properties: { id: { bsonType: "string", description: "Value from the changeSet id attribute." }, author: { bsonType: "string", description: "Value from the changeSet author attribute." }, fileName: { bsonType: "string", description: "Path to the changelog. This may be an absolute path or a relative path depending on how the changelog was passed to Liquibase. For best results, it sh..." }, dateExecuted: { bsonType: [ "date", "null" ], description: "Date/time of when the changeSet was executed. Used with orderExecuted to determine rollback order." }, orderExecuted: { bsonType: [ "int", "null" ], description: "Order that the changeSets were executed. Used in addition to dateExecuted to ensure order is correct even when the databases datetime supports poor resolution." }, execType: { bsonType: "string", enum: [ "EXECUTED", "FAILED", "SKIPPED", "RERAN", "MARK_RAN" ], description: "Description of how the changeSet was executed." }, md5sum: { bsonType: [ "string", "null" ], description: "Checksum of the changeSet when it was executed. Used on each run to ensure there have been no unexpected changes to changSet in the changelog file." }, description: { bsonType: [ "string", "null" ], description: "Short auto-generated human readable description of changeSet." }, comments: { bsonType: [ "string", "null" ], description: "Value from the changeSet comment attribute." }, tag: { bsonType: [ "string", "null" ], description: "Tracks which changeSets correspond to tag operations." }, contexts: { bsonType: [ "string", "null" ], description: "Context expression of the run." }, labels: { bsonType: [ "string", "null" ], description: "Labels assigned." }, deploymentId: { bsonType: [ "string", "null" ], description: "Unique identifier generate for a run." }, liquibase: { bsonType: [ "string", "null" ], description: "Version of Liquibase used to execute the changeSet." } } } }, validationLevel: "strict", validationAction: "error", $db: "test", $clusterTime: { clusterTime: Timestamp(1700259145, 1), signature: { hash: BinData(0, 229B0AFF550E67CB8F0A1A26B2FDF90A54B80B62), keyId: 7247279398104072193 } }, lsid: { id: UUID("705d6e2f-3387-4811-a68b-d882882ff428") } }' on server blablabla.gcp.mongodb.net:27017. The full response is {"ok": 0.0, "errmsg": "not authorized on test to execute command { collMod: \"DATABASECHANGELOG\", validator: { $jsonSchema: { bsonType: \"object\", description: \"Database Change Log Table.\", required: [ \"id\", \"author\", \"fileName\", \"execType\" ], properties: { id: { bsonType: \"string\", description: \"Value from the changeSet id attribute.\" }, author: { bsonType: \"string\", description: \"Value from the changeSet author attribute.\" }, fileName: { bsonType: \"string\", description: \"Path to the changelog. This may be an absolute path or a relative path depending on how the changelog was passed to Liquibase. For best results, it sh...\" }, dateExecuted: { bsonType: [ \"date\", \"null\" ], description: \"Date/time of when the changeSet was executed. Used with orderExecuted to determine rollback order.\" }, orderExecuted: { bsonType: [ \"int\", \"null\" ], description: \"Order that the changeSets were executed. Used in addition to dateExecuted to ensure order is correct even when the databases datetime supports poor resolution.\" }, execType: { bsonType: \"string\", enum: [ \"EXECUTED\", \"FAILED\", \"SKIPPED\", \"RERAN\", \"MARK_RAN\" ], description: \"Description of how the changeSet was executed.\" }, md5sum: { bsonType: [ \"string\", \"null\" ], description: \"Checksum of the changeSet when it was executed. Used on each run to ensure there have been no unexpected changes to changSet in the changelog file.\" }, description: { bsonType: [ \"string\", \"null\" ], description: \"Short auto-generated human readable description of changeSet.\" }, comments: { bsonType: [ \"string\", \"null\" ], description: \"Value from the changeSet comment attribute.\" }, tag: { bsonType: [ \"string\", \"null\" ], description: \"Tracks which changeSets correspond to tag operations.\" }, contexts: { bsonType: [ \"string\", \"null\" ], description: \"Context expression of the run.\" }, labels: { bsonType: [ \"string\", \"null\" ], description: \"Labels assigned.\" }, deploymentId: { bsonType: [ \"string\", \"null\" ], description: \"Unique identifier generate for a run.\" }, liquibase: { bsonType: [ \"string\", \"null\" ], description: \"Version of Liquibase used to execute the changeSet.\" } } } }, validationLevel: \"strict\", validationAction: \"error\", $db: \"test\", $clusterTime: { clusterTime: Timestamp(1700259145, 1), signature: { hash: BinData(0, 229B0AFF550E67CB8F0A1A26B2FDF90A54B80B62), keyId: 7247279398104072193 } }, lsid: { id: UUID(\"705d6e2f-3387-4811-a68b-d882882ff428\") } }", "code": 13, "codeName": "Unauthorized", "$clusterTime": {"clusterTime": {"$timestamp": {"t": 1700259145, "i": 1}}, "signature": {"hash": {"$binary": {"base64": "IpsK/1UOZ8uPChomsv35ClS4C2I=", "subType": "00"}}, "keyId": 7247279398104072193}}, "operationTime": {"$timestamp": {"t": 1700259145, "i": 1}}}
I can see a collection called DATABASECHANGELOG being created in the database but nothing else happens other than the error above.
Complains about a lack of authorization to execute some command.
Do you know what authorization is needed or what Im missing?
TIA