当前位置:网站首页>如何对数据库账号权限进行精细化管理?
如何对数据库账号权限进行精细化管理?
2020-11-06 21:19:00 【Jack088】
如何做到对数据库账号权限的精细化管理?
@黎前红
按员工的职责不同,分权限。自己可以规划一张表,公司的每个部门需要什么样的权限,每个人需要什么权限。(一般来说,给几个通用的账号)不涉及的人员就不用给了。如果某个特定领导或员工需要某个权限,则需要向管理部门申请,注明是干什么,做这件事会产生什么效果,什么时候用,什么时候不用了,记得按时收回。
@温国兵
何谓精细化,一定是做到了对权限的全方位掌控。我来分享下经验。
第一,根据账户的不同类型,以前缀区分。简单的分类,分为业务账户和实名账户。细分来讲,业务账号分为网站应用、手机应用、报表应用、服务应用、查询服务,实名账户可以跟踪到具体的员工。
网站应用(web_业务简称)
手机应用(mob_业务简称)
报表应用(rep_业务简称)
服务应用(dae_业务简称)
查询服务(sea_业务简称)
实名查询(dev_姓名拼音)
第二,业务账号权限最大到 SELECT、UPDATE、DELETE 和 INSERT,查询服务和实名查询账户只能有查询权限。每个用户只有一个密码,授权时需要知悉此用户是否存在,如果存在,使用旧密码授权,如果不存在,生成随机密码进行授权。
第三,实名权限只能通过堡垒机或者跳板机进行查询,堡垒机有用户登录和执行 SQL 日志。
第四,线上 IDC 数据库只允许线上 Web 机连接,不允许测试机连接。
第五,员工申请权限需要工单申请,授权只能 DBA 操作。DBA 需要做好权限控制,相关业务负责人可以申请较高权限,但需要邮件抄送上一级领导进行审批。
第六,DBA 有一套完整的元数据库,里面记录了所有的用户相关信息,此数据库重要级别最高,做好安全控制。
第七,用户的密码需要足够复杂,而且有一套完整的随机密码生成规则。
第八,业务方通知业务账户存在异常,需要制定快速更改账户的流程。
第九,员工申请的临时高权账号,需要有备案,需要设置密码过期时间,而且需要制定回收流程。
第十,MySQL root 密码只有 DBA 拥有,而且不允许将此密码保存在任何云笔记或者云存储上,只能保存到本地。另外,定期修改 MySQL root 密码。
第十一,通过终端进入 MySQL,不允许将密码明文显示。
第十二,用户授权操作建议在 Web 页面完成,需要做好安全控制。此项也就是 DB 运维管理平台,需要编码实现。
第十三,做好数据备份,可以在误操作最快恢复数据。
第十四,如有可能,在新业务上线 MySQL 审计方案,可以通过 init-connect 参数 + access_log + binlog 实现审计。
以上。
@韩成亮
上面两位已经很细致, 关于精细化,主要是各个权限分配细致,做到,不重复,其次是权限的定义明确,该给什么权限给什么权限,不存在模糊权限,最后是权限的记录,做到从权限开始,审批,授权,收回,删除等一整套的规章流程,最重要的是一个精细化的思想,做到心中有数。
@mountainsun
从具体数据库来说 DB2是比较难实现对账号进行很精细化的管理的,因为DB2的用户都是操作系统的用户,在实际生产系统中,我们一般不可能在系统上建立很多用户的。而ORACLE和MYSQL是使用数据库自己的用户,实现根据权限分配适当的数据库操作权限是可以实现的。
版权声明
本文为[Jack088]所创,转载请带上原文链接,感谢
https://my.oschina.net/jack088/blog/4706114
边栏推荐
- NLP model Bert: from introduction to mastery (1)
- Python saves the list data
- If PPT is drawn like this, can the defense of work report be passed?
- TensorFlow中的Tensor是什么?
- 百万年薪,国内工作6年的前辈想和你分享这四点
- Details of dapr implementing distributed stateful service
- 一篇文章教会你使用HTML5 SVG 标签
- 给字节的学姐讲如何准备“系统设计面试”
- Word segmentation, naming subject recognition, part of speech and grammatical analysis in natural language processing
- Introduction to X Window System
猜你喜欢

Introduction to the structure of PDF417 bar code system

What knowledge do Python automated testing learn?

NLP model Bert: from introduction to mastery (1)

It's easy to operate. ThreadLocal can also be used as a cache

Wow, elasticsearch multi field weight sorting can play like this

一部完整的游戏,需要制作哪些音乐?

01. SSH Remote terminal and websocket of go language

Named entity recognition in natural language processing: tanford core LP ner (1)

【转发】查看lua中userdata的方法
![[Xinge education] poor learning host computer series -- building step 7 Simulation Environment](/img/f8/4bb6f887d56a7a18eb55cbec579204.jpg)
[Xinge education] poor learning host computer series -- building step 7 Simulation Environment
随机推荐
The road of C + + Learning: from introduction to mastery
C#和C/C++混合编程系列5-内存管理之GC协同
Building and visualizing decision tree with Python
Using NLP and ml to extract and construct web data
小游戏云开发入门
5.5 controlleradvice notes - SSM in depth analysis and project practice
一篇文章带你了解CSS 渐变知识
Wow, elasticsearch multi field weight sorting can play like this
Pollard's Rho algorithm
[C / C + + 1] clion configuration and running C language
Introduction to quantitative investment and Trading (Python introduction to financial analysis)
(1) ASP.NET Introduction to core3.1 Ocelot
The data of pandas was scrambled and the training machine and testing machine set were selected
新建一个空文件占用多少磁盘空间?
Get twice the result with half the effort: automation without cabinet
Humor: hacker programming is actually similar to machine learning!
Named entity recognition in natural language processing: tanford core LP ner (1)
Mongodb (from 0 to 1), 11 days mongodb primary to intermediate advanced secret
Windows 10 tensorflow (2) regression analysis of principles, deep learning framework (gradient descent method to solve regression parameters)
With the advent of tensorflow 2.0, can pytoch still shake the status of big brother?