From 11b0bb2d29e3751377f2beda96136a0e24c403b1 Mon Sep 17 00:00:00 2001 From: Inel Pandzic Date: Sat, 23 Mar 2024 05:42:10 +0100 Subject: [PATCH] Update init-deploy test. --- e2e-tests/init-deploy/compare/backup-70.json | 476 ++++++++++++++++++ .../init-deploy/compare/clusterAdmin-70.json | 305 +++++++++++ .../compare/clusterMonitor-70.json | 202 ++++++++ .../init-deploy/compare/userAdmin-70.json | 185 +++++++ 4 files changed, 1168 insertions(+) create mode 100644 e2e-tests/init-deploy/compare/backup-70.json create mode 100644 e2e-tests/init-deploy/compare/clusterAdmin-70.json create mode 100644 e2e-tests/init-deploy/compare/clusterMonitor-70.json create mode 100644 e2e-tests/init-deploy/compare/userAdmin-70.json diff --git a/e2e-tests/init-deploy/compare/backup-70.json b/e2e-tests/init-deploy/compare/backup-70.json new file mode 100644 index 0000000000..5aaa92ad7d --- /dev/null +++ b/e2e-tests/init-deploy/compare/backup-70.json @@ -0,0 +1,476 @@ +{ + "authInfo": { + "authenticatedUsers": [ + { + "user": "backup", + "db": "admin" + } + ], + "authenticatedUserRoles": [ + { + "role": "backup", + "db": "admin" + }, + { + "role": "clusterMonitor", + "db": "admin" + }, + { + "role": "pbmAnyAction", + "db": "admin" + }, + { + "role": "readWrite", + "db": "admin" + }, + { + "role": "restore", + "db": "admin" + } + ], + "authenticatedUserPrivileges": [ + { + "resource": { + "system_buckets": "" + }, + "actions": [ + "bypassDocumentValidation", + "collMod", + "convertToCapped", + "createCollection", + "createIndex", + "createSearchIndexes", + "dropCollection", + "find", + "insert", + "updateSearchIndex" + ] + }, + { + "resource": { + "db": "", + "collection": "" + }, + "actions": [ + "bypassDocumentValidation", + "changeCustomData", + "changePassword", + "collMod", + "collStats", + "convertToCapped", + "createCollection", + "createIndex", + "createRole", + "createSearchIndexes", + "createUser", + "dbStats", + "dropCollection", + "dropRole", + "dropUser", + "find", + "getDatabaseVersion", + "getShardVersion", + "grantRole", + "indexStats", + "insert", + "revokeRole", + "setAuthenticationRestriction", + "startBackup", + "updateSearchIndex", + "viewRole", + "viewUser" + ] + }, + { + "resource": { + "db": "", + "collection": "system.js" + }, + "actions": [ + "bypassDocumentValidation", + "collMod", + "convertToCapped", + "createCollection", + "createIndex", + "createSearchIndexes", + "dropCollection", + "find", + "insert", + "updateSearchIndex" + ] + }, + { + "resource": { + "db": "", + "collection": "system.profile" + }, + "actions": [ + "find" + ] + }, + { + "resource": { + "db": "", + "collection": "system.users" + }, + "actions": [ + "bypassDocumentValidation", + "collMod", + "convertToCapped", + "createCollection", + "createIndex", + "createSearchIndexes", + "dropCollection", + "find", + "insert", + "remove", + "update", + "updateSearchIndex" + ] + }, + { + "resource": { + "db": "admin", + "collection": "" + }, + "actions": [ + "changeStream", + "collStats", + "compactStructuredEncryptionData", + "convertToCapped", + "createCollection", + "createIndex", + "createSearchIndexes", + "dbHash", + "dbStats", + "dropCollection", + "dropIndex", + "dropSearchIndex", + "find", + "insert", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead", + "remove", + "renameCollectionSameDB", + "update", + "updateSearchIndex" + ] + }, + { + "resource": { + "db": "admin", + "collection": "system.backup_users" + }, + "actions": [ + "bypassDocumentValidation", + "collMod", + "convertToCapped", + "createCollection", + "createIndex", + "createSearchIndexes", + "dropCollection", + "find", + "insert", + "updateSearchIndex" + ] + }, + { + "resource": { + "db": "admin", + "collection": "system.js" + }, + "actions": [ + "changeStream", + "collStats", + "compactStructuredEncryptionData", + "convertToCapped", + "createCollection", + "createIndex", + "createSearchIndexes", + "dbHash", + "dbStats", + "dropCollection", + "dropIndex", + "dropSearchIndex", + "find", + "insert", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead", + "remove", + "renameCollectionSameDB", + "update", + "updateSearchIndex" + ] + }, + { + "resource": { + "db": "admin", + "collection": "system.roles" + }, + "actions": [ + "createIndex", + "createSearchIndexes", + "find" + ] + }, + { + "resource": { + "db": "admin", + "collection": "system.version" + }, + "actions": [ + "bypassDocumentValidation", + "collMod", + "convertToCapped", + "createCollection", + "createIndex", + "createSearchIndexes", + "dropCollection", + "find", + "insert", + "updateSearchIndex" + ] + }, + { + "resource": { + "db": "admin", + "collection": "temproles" + }, + "actions": [ + "find" + ] + }, + { + "resource": { + "db": "admin", + "collection": "tempusers" + }, + "actions": [ + "find" + ] + }, + { + "resource": { + "db": "config", + "collection": "" + }, + "actions": [ + "bypassDocumentValidation", + "changeStream", + "collMod", + "collStats", + "convertToCapped", + "createCollection", + "createIndex", + "createSearchIndexes", + "dbHash", + "dbStats", + "dropCollection", + "find", + "getDatabaseVersion", + "getShardVersion", + "indexStats", + "insert", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead", + "updateSearchIndex" + ] + }, + { + "resource": { + "db": "config", + "collection": "settings" + }, + "actions": [ + "find", + "insert", + "update" + ] + }, + { + "resource": { + "db": "config", + "collection": "system.js" + }, + "actions": [ + "changeStream", + "collStats", + "dbHash", + "dbStats", + "find", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead" + ] + }, + { + "resource": { + "db": "config", + "collection": "system.sessions" + }, + "actions": [ + "collStats", + "dbStats", + "getDatabaseVersion", + "getShardVersion", + "indexStats" + ] + }, + { + "resource": { + "db": "local", + "collection": "" + }, + "actions": [ + "bypassDocumentValidation", + "changeStream", + "collMod", + "collStats", + "convertToCapped", + "createCollection", + "createIndex", + "createSearchIndexes", + "dbHash", + "dbStats", + "dropCollection", + "find", + "getDatabaseVersion", + "getShardVersion", + "indexStats", + "insert", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead", + "updateSearchIndex" + ] + }, + { + "resource": { + "db": "local", + "collection": "replset.election" + }, + "actions": [ + "bypassDocumentValidation", + "collMod", + "convertToCapped", + "createCollection", + "createIndex", + "createSearchIndexes", + "dropCollection", + "find", + "insert", + "updateSearchIndex" + ] + }, + { + "resource": { + "db": "local", + "collection": "replset.minvalid" + }, + "actions": [ + "bypassDocumentValidation", + "collMod", + "convertToCapped", + "createCollection", + "createIndex", + "createSearchIndexes", + "dropCollection", + "find", + "insert", + "updateSearchIndex" + ] + }, + { + "resource": { + "db": "local", + "collection": "system.js" + }, + "actions": [ + "changeStream", + "collStats", + "dbHash", + "dbStats", + "find", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead" + ] + }, + { + "resource": { + "db": "local", + "collection": "system.replset" + }, + "actions": [ + "bypassDocumentValidation", + "collMod", + "convertToCapped", + "createCollection", + "createIndex", + "createSearchIndexes", + "dropCollection", + "find", + "insert", + "updateSearchIndex" + ] + }, + { + "resource": { + "cluster": true + }, + "actions": [ + "allCollectionStats", + "appendOplogNote", + "bypassWriteBlockingMode", + "checkFreeMonitoringStatus", + "connPoolStats", + "forceUUID", + "getDefaultRWConcern", + "getCmdLineOpts", + "getLog", + "getParameter", + "getShardMap", + "hostInfo", + "inprog", + "listDatabases", + "listSessions", + "listShards", + "netstat", + "operationMetrics", + "replSetGetConfig", + "replSetGetStatus", + "serverStatus", + "setUserWriteBlockMode", + "shardedDataDistribution", + "shardingState", + "top", + "useUUID", + "applyOps" + ] + }, + { + "resource": { + "anyResource": true + }, + "actions": [ + "anyAction" + ] + } + ] + } +} diff --git a/e2e-tests/init-deploy/compare/clusterAdmin-70.json b/e2e-tests/init-deploy/compare/clusterAdmin-70.json new file mode 100644 index 0000000000..76aff4bd81 --- /dev/null +++ b/e2e-tests/init-deploy/compare/clusterAdmin-70.json @@ -0,0 +1,305 @@ +{ + "authInfo": { + "authenticatedUsers": [ + { + "user": "clusterAdmin", + "db": "admin" + } + ], + "authenticatedUserRoles": [ + { + "role": "clusterAdmin", + "db": "admin" + } + ], + "authenticatedUserPrivileges": [ + { + "resource": { + "system_buckets": "" + }, + "actions": [ + "clearJumboFlag", + "enableSharding", + "moveChunk", + "refineCollectionShardKey", + "reshardCollection", + "splitChunk", + "splitVector" + ] + }, + { + "resource": { + "db": "", + "collection": "" + }, + "actions": [ + "clearJumboFlag", + "collStats", + "dbStats", + "dropDatabase", + "enableSharding", + "getDatabaseVersion", + "getShardVersion", + "indexStats", + "killCursors", + "moveChunk", + "refineCollectionShardKey", + "reshardCollection", + "splitChunk", + "splitVector" + ] + }, + { + "resource": { + "db": "", + "collection": "system.profile" + }, + "actions": [ + "find" + ] + }, + { + "resource": { + "db": "config", + "collection": "" + }, + "actions": [ + "changeStream", + "clearJumboFlag", + "collStats", + "dbHash", + "dbStats", + "enableSharding", + "find", + "getDatabaseVersion", + "getShardVersion", + "indexStats", + "insert", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "moveChunk", + "planCacheRead", + "refineCollectionShardKey", + "remove", + "reshardCollection", + "splitChunk", + "splitVector", + "update" + ] + }, + { + "resource": { + "db": "config", + "collection": "system.js" + }, + "actions": [ + "changeStream", + "collStats", + "dbHash", + "dbStats", + "find", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead" + ] + }, + { + "resource": { + "db": "config", + "collection": "system.sessions" + }, + "actions": [ + "collStats", + "dbStats", + "getDatabaseVersion", + "getShardVersion", + "indexStats" + ] + }, + { + "resource": { + "db": "local", + "collection": "" + }, + "actions": [ + "changeStream", + "clearJumboFlag", + "collStats", + "dbHash", + "dbStats", + "enableSharding", + "find", + "getDatabaseVersion", + "getShardVersion", + "indexStats", + "insert", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "moveChunk", + "planCacheRead", + "refineCollectionShardKey", + "remove", + "reshardCollection", + "splitChunk", + "splitVector", + "update" + ] + }, + { + "resource": { + "db": "local", + "collection": "replset.election" + }, + "actions": [ + "find", + "insert", + "remove", + "update" + ] + }, + { + "resource": { + "db": "local", + "collection": "replset.minvalid" + }, + "actions": [ + "find", + "insert", + "remove", + "update" + ] + }, + { + "resource": { + "db": "local", + "collection": "system.healthlog" + }, + "actions": [ + "changeStream", + "collStats", + "dbHash", + "dbStats", + "find", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead" + ] + }, + { + "resource": { + "db": "local", + "collection": "system.js" + }, + "actions": [ + "changeStream", + "collStats", + "dbHash", + "dbStats", + "find", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead" + ] + }, + { + "resource": { + "db": "local", + "collection": "system.replset" + }, + "actions": [ + "changeStream", + "collStats", + "dbHash", + "dbStats", + "find", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead" + ] + }, + { + "resource": { + "cluster": true + }, + "actions": [ + "addShard", + "allCollectionStats", + "appendOplogNote", + "applicationMessage", + "auditConfigure", + "checkFreeMonitoringStatus", + "cleanupOrphaned", + "connPoolStats", + "connPoolSync", + "dropConnections", + "flushRouterConfig", + "fsync", + "getClusterParameter", + "getDefaultRWConcern", + "getCmdLineOpts", + "getLog", + "getParameter", + "getShardMap", + "hostInfo", + "inprog", + "invalidateUserCache", + "killAnyCursor", + "killAnySession", + "killop", + "listDatabases", + "listSessions", + "listShards", + "logRotate", + "netstat", + "oidReset", + "operationMetrics", + "removeShard", + "replSetConfigure", + "replSetGetConfig", + "replSetGetStatus", + "replSetResizeOplog", + "replSetStateChange", + "resync", + "rotateCertificates", + "runTenantMigration", + "serverStatus", + "setClusterParameter", + "setDefaultRWConcern", + "setFeatureCompatibilityVersion", + "setFreeMonitoring", + "setParameter", + "shardedDataDistribution", + "shardingState", + "shutdown", + "top", + "touch", + "trafficRecord", + "unlock", + "useUUID" + ] + }, + { + "resource": { + "anyResource": true + }, + "actions": [ + "dbCheck", + "exportCollection", + "importCollection" + ] + } + ] + } +} diff --git a/e2e-tests/init-deploy/compare/clusterMonitor-70.json b/e2e-tests/init-deploy/compare/clusterMonitor-70.json new file mode 100644 index 0000000000..c5dae81e27 --- /dev/null +++ b/e2e-tests/init-deploy/compare/clusterMonitor-70.json @@ -0,0 +1,202 @@ +{ + "authInfo": { + "authenticatedUsers": [ + { + "user": "clusterMonitor", + "db": "admin" + } + ], + "authenticatedUserRoles": [ + { + "role": "clusterMonitor", + "db": "admin" + }, + { + "role": "explainRole", + "db": "admin" + }, + { + "role": "read", + "db": "local" + } + ], + "authenticatedUserPrivileges": [ + { + "resource": { + "db": "", + "collection": "" + }, + "actions": [ + "collStats", + "dbHash", + "dbStats", + "find", + "getDatabaseVersion", + "getShardVersion", + "indexStats", + "listCollections", + "listIndexes" + ] + }, + { + "resource": { + "db": "", + "collection": "system.profile" + }, + "actions": [ + "collStats", + "dbStats", + "find", + "indexStats" + ] + }, + { + "resource": { + "db": "config", + "collection": "" + }, + "actions": [ + "changeStream", + "collStats", + "dbHash", + "dbStats", + "find", + "getDatabaseVersion", + "getShardVersion", + "indexStats", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead" + ] + }, + { + "resource": { + "db": "config", + "collection": "system.js" + }, + "actions": [ + "changeStream", + "collStats", + "dbHash", + "dbStats", + "find", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead" + ] + }, + { + "resource": { + "db": "config", + "collection": "system.sessions" + }, + "actions": [ + "collStats", + "dbStats", + "getDatabaseVersion", + "getShardVersion", + "indexStats" + ] + }, + { + "resource": { + "db": "local", + "collection": "" + }, + "actions": [ + "changeStream", + "collStats", + "dbHash", + "dbStats", + "find", + "getDatabaseVersion", + "getShardVersion", + "indexStats", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead" + ] + }, + { + "resource": { + "db": "local", + "collection": "replset.election" + }, + "actions": [ + "find" + ] + }, + { + "resource": { + "db": "local", + "collection": "replset.minvalid" + }, + "actions": [ + "find" + ] + }, + { + "resource": { + "db": "local", + "collection": "system.js" + }, + "actions": [ + "changeStream", + "collStats", + "dbHash", + "dbStats", + "find", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead" + ] + }, + { + "resource": { + "db": "local", + "collection": "system.replset" + }, + "actions": [ + "find" + ] + }, + { + "resource": { + "cluster": true + }, + "actions": [ + "allCollectionStats", + "checkFreeMonitoringStatus", + "connPoolStats", + "getDefaultRWConcern", + "getCmdLineOpts", + "getLog", + "getParameter", + "getShardMap", + "hostInfo", + "inprog", + "listDatabases", + "listSessions", + "listShards", + "netstat", + "operationMetrics", + "replSetGetConfig", + "replSetGetStatus", + "serverStatus", + "shardedDataDistribution", + "shardingState", + "top", + "useUUID" + ] + } + ] + } +} diff --git a/e2e-tests/init-deploy/compare/userAdmin-70.json b/e2e-tests/init-deploy/compare/userAdmin-70.json new file mode 100644 index 0000000000..f49a256858 --- /dev/null +++ b/e2e-tests/init-deploy/compare/userAdmin-70.json @@ -0,0 +1,185 @@ +{ + "authInfo": { + "authenticatedUsers": [ + { + "user": "userAdmin", + "db": "admin" + } + ], + "authenticatedUserRoles": [ + { + "role": "userAdminAnyDatabase", + "db": "admin" + } + ], + "authenticatedUserPrivileges": [ + { + "resource": { + "db": "", + "collection": "" + }, + "actions": [ + "changeCustomData", + "changePassword", + "createRole", + "createUser", + "dropRole", + "dropUser", + "grantRole", + "listCachedAndActiveUsers", + "revokeRole", + "setAuthenticationRestriction", + "viewRole", + "viewUser" + ] + }, + { + "resource": { + "db": "", + "collection": "system.users" + }, + "actions": [ + "changeStream", + "collStats", + "dbHash", + "dbStats", + "find", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead" + ] + }, + { + "resource": { + "db": "admin", + "collection": "system.backup_users" + }, + "actions": [ + "changeStream", + "collStats", + "dbHash", + "dbStats", + "find", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead" + ] + }, + { + "resource": { + "db": "admin", + "collection": "system.roles" + }, + "actions": [ + "changeStream", + "collStats", + "createIndex", + "createSearchIndexes", + "dbHash", + "dbStats", + "dropIndex", + "dropSearchIndex", + "find", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead" + ] + }, + { + "resource": { + "db": "admin", + "collection": "system.users" + }, + "actions": [ + "changeStream", + "collStats", + "createIndex", + "createSearchIndexes", + "dbHash", + "dbStats", + "dropIndex", + "dropSearchIndex", + "find", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead" + ] + }, + { + "resource": { + "db": "admin", + "collection": "system.version" + }, + "actions": [ + "changeStream", + "collStats", + "dbHash", + "dbStats", + "find", + "killCursors", + "listCollections", + "listIndexes", + "listSearchIndexes", + "planCacheRead" + ] + }, + { + "resource": { + "db": "config", + "collection": "" + }, + "actions": [ + "changeCustomData", + "changePassword", + "createRole", + "createUser", + "dropRole", + "dropUser", + "grantRole", + "revokeRole", + "setAuthenticationRestriction", + "viewRole", + "viewUser" + ] + }, + { + "resource": { + "db": "local", + "collection": "" + }, + "actions": [ + "changeCustomData", + "changePassword", + "createRole", + "createUser", + "dropRole", + "dropUser", + "grantRole", + "revokeRole", + "setAuthenticationRestriction", + "viewRole", + "viewUser" + ] + }, + { + "resource": { + "cluster": true + }, + "actions": [ + "authSchemaUpgrade", + "invalidateUserCache", + "listDatabases", + "viewUser" + ] + } + ] + } +}