数据库原理15.ppt

  1. 1、本文档共41页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
数据库原理15

Security and User Authorization in SQL Security Two aspects: Users only see the data they’re supposed to; Guard against malicious users. How SQL control it? Authorization ID Privileges Authorization ID An element of SQL environment A user or a group of users who may be granted some particular privileges on objects User ID: personal security account on behalf of individuals, applications, system services Not defined in SQL standard regarding its creation Role: a defined set of privileges CREATE ROLE Granted to users or other roles PUBLIC: a special built-in authorization ID Authorization in A Session A session provides the authorization ID a context to execute SQL statements during the connection A session is associated with a user ID or a role name. On session initialization, session uid is determined by: Explicit CONNECT TO … USER usr; Implementation-defined manner Authorization in A Session(cont.) In a session, embedded SQL, client module and SQL-invoked routines may specify authorization ID, so the current auth. ID is changing. SESSION_USER: SQL session user ID CURRENT_USER: the current user ID SET SESSION AUTHORIZATION… CURRENT_ROLE: the current rolename SET ROLE… Privileges Privileges are associated with authorization ID 9 types: SELECT, INSERT, DELETE, UPDATE: applied to a relation (base table or view) SELECT, INSERT, UPDATE may be associated with a list of attributes. REFERENCES: the right to refer to relations in IC May have attached list of attributes USAGE: the right to use some kinds of DB elements in ones’s own column definition TRIGGER: the right to define triggers on a relation EXECUTE: the right to execute PSM proc/func UNDER: the right to create subtypes of a UDT Obtaining Privileges Owner vs. granted user SQL elements (e.g. schemas, modules) have an owner. Owner has all privileges and may GRANT them to others Ownership Establishment Three points when creating a schema CREATE SCHEMA … AUTHORIZATION usr usr is the owner of the

您可能关注的文档

文档评论(0)

quechui388620 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档