monogdb操作system.*权限

mongodb roles

system.roles集合删不掉

当你自定义了特权(角色):
db.createRole({role: "dropSystemViewsAnyDatabase",privileges: [{actions: [ "dropCollection" ],resource: { db: "", collection: "system.roles" }}],roles: []}
)
// admin库下自动生成system.roles集合:
{"_id" : "admin.dropSystemViewsAnyDatabase","role" : "dropSystemViewsAnyDatabase","db" : "admin","privileges" : [ {"resource" : {"db" : "","collection" : "system.roles"},"actions" : [ "dropCollection"]}],"roles" : []
}// 然后期望配置该权限能删除system.roles集合,但是并没有用,不得而知
{"_id" : "admin.admin","userId" : UUID("198fe62e-8f36-421e-877e-4d73ca1a1fe4"),"user" : "admin","db" : "admin","credentials" : {"SCRAM-SHA-1" : {"iterationCount" : 10000,"salt" : "rmYnVC/Kc8U8jHJ8Xoa0AA==","storedKey" : "s2s+seXTlu5e/Et3RBMRjcT+1sc=","serverKey" : "qwEGx4vyIn6UHWXiPwDYVSAb9QA="},"SCRAM-SHA-256" : {"iterationCount" : 15000,"salt" : "UEJ8pbH7IU7HFyhjjQCn31h2OY5GjZ6SXONgjw==","storedKey" : "z6otQQpA4/SU5N6VJfuD3mm68kBH0z+5aKIexmgXaP4=","serverKey" : "MdeLFLQOh7gM93WrNioub9UjLSc8SREDQZskfT7wiYQ="}},"roles" : [ {"role" : "root", // 该权限可以读写除了system.*之外的所有"db" : "admin"}, {"role" : "__system", // 该权限可以读写system.*"db" : "admin"}, {"role" : "dropSystemViewsAnyDatabase",// 配置了自定义的权限,但是并没有用,不得而知"db" : "admin"}]
}

ps:就算取消了登录授权依然删不掉system.role,有哪个同学晓得啊???

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/279644.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

如何发现假库存照片(并将合适的人归于属性)

Spammers and other unscrupulous advertisers are always looking for new ways to get you click on their pages. One of the latest tactics is to steal popular and useful stock images—like the kind you sometimes see in news articles—and re-upload them elsewhe…

Mysql Hunter

一、简介自动化实施的过程中,我们通常都面临一个棘手的问题:数据的准备和恢复。即在成功执行一个自动化用例时,我们可能需要一定的数据前提,而为了使得整个前提不至于被其他的用例破坏,以至于我们有时不得不在自动化用…

如何在Windows 10上限制Wi​​ndows Update的下载带宽

Windows 10’s Fall Creators Update gives you more control of Windows Update’s downloads and uploads. You can now set a download bandwidth limit, ensuring Windows Update won’t hog your Internet connection with its background downloads. Windows 10的Fall Cr…

Elasticsearch嵌套查询

2019独角兽企业重金招聘Python工程师标准>>> 一、背景 最近在做基于宴会厅档期的商户搜索推荐时,如果用传统平铺式的mapping结构,无法满足需求场景,于是用到了Elasticsearch支持的Nested(嵌套)查询。 二、普通对象与嵌套对象的索引…

如何使用PowerShell提升开发效率(以Windows Embedded CE为例)

简介 本文讲述如何使用Powershell通过RAPI来控制Windows Embedded CE和Windows Mobile设备。 缘由 我入行的时候是做AS400 RPG和UNIX C开发的,所有开发环境都是字符界面,因此习惯了vigrepmake的开发模式。后来开始做Windows的开发,开始也不大…

Windows7旗舰版磁盘分区详解—附分区步骤截图

最近工作中配置使用联想的Thinkpad TL系列本本.当然原装的系统时刚发布的Windows RTM旗舰版.在考虑买之前也参考了戴尔 苹果的等等, 但个人私下也是一直在用Tinkpad系列, 相比其他的品牌本人还是比较钟情于Tinkpad 非常实用的键盘. 以及简洁的外观.买回来一看这个TL系列原装的系…

outlook存档邮件_如何在Outlook 2013中存档电子邮件

outlook存档邮件We’ve always been told that backing up our data is a good idea. Well, that same concept can extend to email as well. You may want to archive your email every so often, such as monthly, quarterly, or even yearly. 我们一直被告知备份数据是一个…

计算机组装和维护_如何构建自己的计算机,第二部分:组装在一起

计算机组装和维护So you’ve selected your parts, double- and triple-checked their compatibility, and waited for economy shipping to bring them all to your door. It’s time to get to the fun part: putting them all together. 因此,您已经选择了零件&a…

Autofac之自动装配

从容器中的可用服务中选择一个构造函数来创造对象,这个过程叫做自动装配。这个过程是通过反射实现的 默认 思考这么一个问题,如果注册类型中存在多个构造函数,那么Autofac会选择哪一个来创建类型的实例 答案是"尽可能最多参数" class ConstructorClass {p…

对Emlog 6.0 Beta的完整代码审计过程

Emlog 6.0 beta版本,这可能是最后一篇关于PHP语言CMS的代码审计文章,此次将详细记录完整的审计过程。 文章基本上完整记录小东的对此CMS审计过程,或许显得繁琐,但代码审计的过程就是这样,发现可能项,然后精…

SINOCES 2011

突然发现又好久没写过日志了 是在是太懒了… 难得休假去看了眼消费电子 感觉实在是一年不如一年 佳能、索尼不见踪影,相机满场没见一家(大牌子是真没见到) 华硕技嘉微星等主板厂商同样失踪… PC方面,联想貌似是来卖电脑包鼠标的&a…

esim卡与ms卡的区别_什么是eSIM,它与SIM卡有何不同?

esim卡与ms卡的区别With the launch of the Apple Watch 3, the term “eSIM” has been thrown around a lot. And now, Google’s Pixel 2 is the first phone to use this new technology, it’s time we take a closer look at what it is, what it does, and what this me…

机器学习实战之logistic回归分类

利用logistic回归进行分类的主要思想:根据现有数据对分类边界建立回归公式,并以此进行分类。 logistic优缺点: 优点:计算代价不高,易于理解和实现。缺点:容易欠拟合,分类精度可能不高。 .适用数…

HDU 6343.Problem L. Graph Theory Homework-数学 (2018 Multi-University Training Contest 4 1012)

6343.Problem L. Graph Theory Homework 官方题解: 一篇写的很好的博客: HDU 6343 - Problem L. Graph Theory Homework - [(伪装成图论题的)简单数学题] 代码: 1 //1012-6343-数学2 #include<iostream>3 #include<cstdio>4 #include<cstring>5 #include<…

Android GridView LruCache

照片墙这种功能现在应该算是挺常见了&#xff0c;在很多应用中你都可以经常看到照片墙的身影。它的设计思路其实也非常简单&#xff0c;用一个GridView控件当作“墙”&#xff0c;然后随着GridView的滚动将一张张照片贴在“墙”上&#xff0c;这些照片可以是手机本地中存储的&a…

如何在Android TV上自定义推荐行

When you fire up Android TV, the first thing you see is a list of movies and shows the system thinks you’ll like. It’s often full of the latest flicks or hottest news, but sometimes it could just be things relevant to your interests and the apps you have…

steam串流到手机_如何从手机将Steam游戏下载到PC

steam串流到手机Steam allows you to remotely install games from your smartphone, just like you can with a PlayStation 4 or Xbox One. You can download games to your gaming PC from anywhere, ensuring those big downloads are complete and the game is ready to p…

禁用windows10更新_如何在Windows 10中禁用投影

禁用windows10更新The drop shadows on applications in the Windows 10 preview are really big and suspiciously similar to the ones in OS X, and if they aren’t your speed, you can easily remove them. We actually think they look good, but since somebody out th…

如何访问 Service?- 每天5分钟玩转 Docker 容器技术(99)

前面我们已经学习了如何部署 service&#xff0c;也验证了 swarm 的 failover 特性。不过截止到现在&#xff0c;有一个重要问题还没有涉及&#xff1a;如何访问 service&#xff1f;这就是本节要讨论的问题。 为了便于分析&#xff0c;我们重新部署 web_server。 ① docker se…

Linux配置手册(二)配置DHCP服务器

1.检查是否安装DHCP服务器软件 2.挂在RHEL5系统光盘 3.安装DHCP服务软件 4.将模板配置文件复制并覆盖现在的配置文件 5.配置修改dhcpd.conf文件 配置信息 默认租约时间 default-lease-time 最大租约时间 max-lease-time 局域网内所有主机的域名 option domain-name 客户机所使用…