MongoDB中用户的角色说明

来源:互联网 发布:腾讯qq微信红包数据 编辑:程序博客网 时间:2024/05/21 18:33

MongoDB中用户的角色说明

read

数据库的只读权限,包括:

aggregate,checkShardingIndex,cloneCollectionAsCapped,collStats,count,dataSize,dbHash,dbStats,distinct,filemd5,mapReduce (inline output only.),text (beta feature.)geoNear,geoSearch,geoWalk,group

readWrite

数据库的读写权限,包括:

    cloneCollection (as the target database.),convertToCapped,create (and to create collections implicitly.),renameCollection (within the same database.)findAndModify,mapReduce (output to a collection.) drop(),dropIndexes,emptycapped,ensureIndex() 

read的所有权限

dbAdmin

clean,collMod,collStats,compact,convertToCappe create,db.createCollection(),dbStats,drop(),dropIndexes ensureIndex(),indexStats,profile,reIndex renameCollection (within a single database.),validate 

userAdmin角色

数据库的用户管理权限

clusterAdmin角色

集群管理权限(副本集、分片、主从等相关管理),包括:

addShard,closeAllDatabases,connPoolStats,connPoolSync,_cpuProfilerStart_cpuProfilerStop,cursorInfo,diagLogging,dropDatabase shardingState,shutdown,splitChunk,splitVector,split,top,touchresync serverStatus,setParameter,setShardVersion,shardCollection replSetMaintenance,replSetReconfig,replSetStepDown,replSetSyncFrom repairDatabase,replSetFreeze,replSetGetStatus,replSetInitiate logRotate,moveChunk,movePrimary,netstat,removeShard,unsetSharding hostInfo,db.currentOp(),db.killOp(),listDatabases,listShardsgetCmdLineOpts,getLog,getParameter,getShardMap,getShardVersion enableSharding,flushRouterConfig,fsync,db.fsyncUnlock()

readAnyDatabase

任何数据库的只读权限(和read相似)

readWriteAnyDatabase

任何数据库的读写权限(和readWrite相似)

userAdminAnyDatabase

任何数据库用户的管理权限(和userAdmin相似)

dbAdminAnyDatabase

任何数据库的管理权限(dbAdmin相似)

__system
什么权限都有

0 0
原创粉丝点击