ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Postgresql www.elarion.com [email_address] Never stop improving quality
Presentation Template Role Database Roles Role Attributes Role Membership Function and Triggers
Database Roles L¨¤ m?t kh¨¢i ni?m ho¨¤n to¨¤n ??c l?p v?i t¨¤i kho?n ng??i d¨´ng c?a h? ??u h¨¤nh C¨² ph¨¢p t?o v¨¤ x¨®a Database Roles: CREATE ROLE name DROP ROLE name Presentation Template
Role Attributes (1/5) Database Role c¨® m?t s? thu?c t¨ªnh nh? sau : Login  C¨² ph¨¢p : CREATE ROLE name LOGIN CREATE USER name Hai c¨² ph¨¢p tr¨ºn t??ng ???ng nhau nh?ng CREATE USER m?c ??nh l¨¤ c¨® thu?c t¨ªnh LOGIN cho n¨ºn kh?ng c?n khai b¨¢o n?a , c¨°n CREATE ROLE th¨¬ kh?ng v¨¬ v?y ph?i c?n khai b¨¢o th¨ºm thu?c t¨ªnh LOGIN
Role Attributes (2/5) Superuser C¨² ph¨¢p : CREATE ROLE name SUPERUSER ??y l¨¤ thu?c t¨ªnh cho ph¨¦p s? d?ng t?t c? c¨¢c ch?c n?ng trong Postgresql , thu?c t¨ªnh n¨¤y r?t nguy hi?m v¨¬ v?y n¨ºn s? d?ng m?t c¨¢ch c?n th?n khi ph?n quy?n ?? b?o m?t h?n th¨¬ n¨ºn th¨ºm thu?c t¨ªnh NOREPLICATION  v¨¬ n?u kh?ng c¨® thu?c t¨ªnh n¨¤y th¨¬ t? ??ng s? c¨® m?t ch? ?? sao ch¨¦p quy?n c?a m?t Superuser c¨® s?n
Role Attributes (3/5) Create database objects C¨² ph¨¢p : CREATE ROLE name CREATEDB Thu?c t¨ªnh n¨¤y cho ph¨¦p role n¨¤y c¨® th? t?o , x¨®a , s?a database N?u l¨¤ Superuser th¨¬ kh?ng ph?i khai b¨¢o th??c t¨ªnh n¨¤y v¨¬ Superuser ?? bao g?m b¨ºn trong
Role Attributes (4/5) Create roles C¨² ph¨¢p : CREATE ROLE name CREATEROLE Thu?c t¨ªnh n¨¤y cho ph¨¦p t?o , x¨®a , s?a role c?ng nh? c?p quy?n ho?c thu h?i nh?ng th¨¤nh vi¨ºn c?a role ?¨® Thu?c t¨ªnh n¨¤y kh?ng ?? ?? th?c hi?n c¨¢c ch?c n?ng tr¨ºn ??i v?i Superuser
Role Attributes (5/5) Initiating streaming replication and backups C¨² ph¨¢p : CREATE ROLE name REPLICATION LOGIN Thu?c t¨ªnh n¨¤y cho ph¨¦p kh?i t?o m?t lu?ng sao ch¨¦p v¨¤ backup. Role n¨¤y lu?n lu?n c¨® thu?c t¨ªnh LOGIN Password C¨² ph¨¢p : CREATE ROLE name PASSWORD ¡® String¡¯ Cho ph¨¦p t?o role c¨® password v¨¤ ???c m? h¨®a md5
Role Membership (1/6) Role Membership gi¨²p qu?n l? c¨¢c Role m?t c¨¢ch d? d¨¤ng , b?ng c¨¢ch n¨¤y quy?n s? ???c c?p ho?c l?y l?i t? m?t nh¨®m , v¨¤ c¨¢c th¨¤nh vi¨ºn c?a nh¨®m ?¨® c?ng b? ?nh h??ng C¨² ph¨¢p : CREATE ROLE name C¨² ph¨¢p t??ng t? t?o role nh?ng kh?ng c¨® thu?c t¨ªnh LOGIN , Postgresql s? hi?u l¨¤ m?t nh¨®m
Role Membership (2/6) C¨² ph¨¢p c?p quy?n cho role GRANT group_role TO  role1,role2¡­ C¨² ph¨¢p thu h?i quy?n t? role REVOKE group_role FROM  role1,role2 ...
Role Membership (3/6) Inherits rights from parnet roles ??y l¨¤ thu?c t¨ªnh cho ph¨¦p c¨¢c role thu?c m?t nh¨®m k? th?a thu?c t¨ªnh c?a nh¨®m V¨ª d? : CREATE ROLE joe LOGIN INHERIT CREATE ROLE admin NOINHERIT CREATE ROLE wheel NOINHERIT GRANT admin TO joe GRANT wheel TO admin
Role Membership (4/6) Ngay l?p t?c sau khi joe ??ng nh?p , quy?n s? ???c c?p cho joe v¨¤ th¨ºm v¨¤o ?¨® l¨¤ joe c?ng ???c c?p th¨ºm quy?n t? admin , v¨¬ joe th?a k? t? admin , Tuy nhi¨ºn , quy?n c?p cho wheel s? kh?ng c¨® hi?u l?c , th?m ch¨ª joe l¨¤ th¨¤nh vi¨ºn d¨¢n ti?p c?a wheel , v¨¬ admin c¨® thu?c t¨ªnh NOINHERIT , n¨® kh?ng cho ph¨¦p th?a k? quy?n t? wheel, sau ?¨® : SET ROLE admin L?nh n¨¤y s? c?p quy?n cho admin m¨¤ kh?ng c?p cho joe , sau ?¨® :
Role Membership (5/6) SET ROLE wheel H? th?ng s? c?p quy?n cho wheel v¨¤ kh?ng c?p quy?n cho m?t trong hai joe ho?c admin Nh?ng c?ng c¨® th? ph?c h?i b?ng c¨¢ch : SET ROLE joe SET ROLE NONE RESET ROLE SET ROLE lu?n ch?p nh?n ch?n b?t c? m?t role n¨¤o m¨¤ c? b?n v¨¤ c¨® th? ??ng nh?p
Role Membership (6/6) X¨®a Role C¨² ph¨¢p : DROP ROLE name
Presentation Template Questions & Answers ?
Presentation Template Thanks for your attention!
Ad

Recommended

Finsight - Private Equity in India: Recent observations and emerging trends a...
Finsight - Private Equity in India: Recent observations and emerging trends a...
South Asia Fast Track
?
Murli cement
Murli cement
Akhil Jain
?
§á§â§Ö§Ù§Ö§ß§ä§Ñ§è§Ú§ñ Microsoft power point
§á§â§Ö§Ù§Ö§ß§ä§Ñ§è§Ú§ñ Microsoft power point
Alexander Denisov
?
Deselction
Deselction
Ernani Agulto
?
§²§å-§è§Ö§ß§ä§â
§²§å-§è§Ö§ß§ä§â
§¥§Ö§ß§Ú§ã §®§Ú§Õ§Ñ§Ü§à§Ó
?
Format mingguan
Format mingguan
Lavendar Craft
?
Carolina tarrio
Yasmim de Oliveira
?
Photoshoot ppt for blog
Photoshoot ppt for blog
jessiekeegan
?
Convocatoria Concurso de Prototipos 2013
CBTIS No. 48
?
El P¨¨sol Negre. N¨²mero 1. Mar? 2008 (1a ¨¨poca)
El P¨¨sol Negre. N¨²mero 1. Mar? 2008 (1a ¨¨poca)
Cgtmanresa Bages
?
Email
Email
Qudsi Falkhi
?
Continental philosophy
Continental philosophy
tjmartin72768
?
First British Settlers
First British Settlers
Cyntia Oca?as
?
½â¶Á´¡±è±èÐÂÇ÷ÊÆ£¬ÔËÓô¡±è±èÓ®µÃ¸ü¶àÉÌ»ú£¡
½â¶Á´¡±è±èÐÂÇ÷ÊÆ£¬ÔËÓô¡±è±èÓ®µÃ¸ü¶àÉÌ»ú£¡
Leo Lin
?
Restructuring Capabilities
Restructuring Capabilities
MWWPR
?
App 10 rekurencja
App 10 rekurencja
Alban97
?
Micronutrientes
Micronutrientes
nutriscience
?
Dtoan ct. nosco
Dtoan ct. nosco
Ho¨¤ng Gia
?
Cell division-mitosis-meiosis-1225581257073362-9[1]
Cell division-mitosis-meiosis-1225581257073362-9[1]
Feriha Ercan
?
Mars odurtspp
Mars odurtspp
majarlie24
?
The uk
The uk
susana ferreras
?
Super Star Doughnut Awards
Super Star Doughnut Awards
Melanie Peck
?
Dppa
Dppa
Hendra Sirait
?
Simple machines makayla and jahneia
Simple machines makayla and jahneia
smbass62
?
Postgresql security
Postgresql security
TechMaster Vietnam
?
3. phan quyen trong sql server 01012010
3. phan quyen trong sql server 01012010
Truong van Duoc
?
ºÝºÝߣ 1.pdf
ºÝºÝߣ 1.pdf
PHAMTHAOVY
?
Database Schema and Relationships abcxyz
Database Schema and Relationships abcxyz
d0512203hhd
?
ºÝºÝߣ create databases_linh
ºÝºÝߣ create databases_linh
khacthuong2008
?

More Related Content

Viewers also liked (17)

Photoshoot ppt for blog
Photoshoot ppt for blog
jessiekeegan
?
Convocatoria Concurso de Prototipos 2013
CBTIS No. 48
?
El P¨¨sol Negre. N¨²mero 1. Mar? 2008 (1a ¨¨poca)
El P¨¨sol Negre. N¨²mero 1. Mar? 2008 (1a ¨¨poca)
Cgtmanresa Bages
?
Email
Email
Qudsi Falkhi
?
Continental philosophy
Continental philosophy
tjmartin72768
?
First British Settlers
First British Settlers
Cyntia Oca?as
?
½â¶Á´¡±è±èÐÂÇ÷ÊÆ£¬ÔËÓô¡±è±èÓ®µÃ¸ü¶àÉÌ»ú£¡
½â¶Á´¡±è±èÐÂÇ÷ÊÆ£¬ÔËÓô¡±è±èÓ®µÃ¸ü¶àÉÌ»ú£¡
Leo Lin
?
Restructuring Capabilities
Restructuring Capabilities
MWWPR
?
App 10 rekurencja
App 10 rekurencja
Alban97
?
Micronutrientes
Micronutrientes
nutriscience
?
Dtoan ct. nosco
Dtoan ct. nosco
Ho¨¤ng Gia
?
Cell division-mitosis-meiosis-1225581257073362-9[1]
Cell division-mitosis-meiosis-1225581257073362-9[1]
Feriha Ercan
?
Mars odurtspp
Mars odurtspp
majarlie24
?
The uk
The uk
susana ferreras
?
Super Star Doughnut Awards
Super Star Doughnut Awards
Melanie Peck
?
Dppa
Dppa
Hendra Sirait
?
Simple machines makayla and jahneia
Simple machines makayla and jahneia
smbass62
?
Photoshoot ppt for blog
Photoshoot ppt for blog
jessiekeegan
?
Convocatoria Concurso de Prototipos 2013
CBTIS No. 48
?
El P¨¨sol Negre. N¨²mero 1. Mar? 2008 (1a ¨¨poca)
El P¨¨sol Negre. N¨²mero 1. Mar? 2008 (1a ¨¨poca)
Cgtmanresa Bages
?
½â¶Á´¡±è±èÐÂÇ÷ÊÆ£¬ÔËÓô¡±è±èÓ®µÃ¸ü¶àÉÌ»ú£¡
½â¶Á´¡±è±èÐÂÇ÷ÊÆ£¬ÔËÓô¡±è±èÓ®µÃ¸ü¶àÉÌ»ú£¡
Leo Lin
?
Restructuring Capabilities
Restructuring Capabilities
MWWPR
?
App 10 rekurencja
App 10 rekurencja
Alban97
?
Cell division-mitosis-meiosis-1225581257073362-9[1]
Cell division-mitosis-meiosis-1225581257073362-9[1]
Feriha Ercan
?
Super Star Doughnut Awards
Super Star Doughnut Awards
Melanie Peck
?
Simple machines makayla and jahneia
Simple machines makayla and jahneia
smbass62
?

Similar to Role (20)

Postgresql security
Postgresql security
TechMaster Vietnam
?
3. phan quyen trong sql server 01012010
3. phan quyen trong sql server 01012010
Truong van Duoc
?
ºÝºÝߣ 1.pdf
ºÝºÝߣ 1.pdf
PHAMTHAOVY
?
Database Schema and Relationships abcxyz
Database Schema and Relationships abcxyz
d0512203hhd
?
ºÝºÝߣ create databases_linh
ºÝºÝߣ create databases_linh
khacthuong2008
?
Lecture5 userandgroup c¨® ghi ch¨²
Lecture5 userandgroup c¨® ghi ch¨²
L? ??t
?
Mcsa 2012 domain network thu?c t¨ªnh user v¨¤ group
Mcsa 2012 domain network thu?c t¨ªnh user v¨¤ group
laonap166
?
ºÝºÝߣ m?n ??m b?o an to¨¤n th?ng tin
ºÝºÝߣ m?n ??m b?o an to¨¤n th?ng tin
ducmanhkthd
?
Gpo
Gpo
it
?
Authentication and Authorization
Authentication and Authorization
TechMaster Vietnam
?
ORACLE_ch2_SQL.pptx
ORACLE_ch2_SQL.pptx
QuangTrnMinh18
?
Chuyen De 1 CSDL nang cao
Chuyen De 1 CSDL nang cao
Ho¨¤ng Ch¨ª D?ng
?
Bai10 he thong bao ve bao mat
Bai10 he thong bao ve bao mat
V? Sang
?
Chuong 3 ER
Chuong 3 ER
QuangHuy668560
?
B¨¤i gi?ng c? s? d? li?u M? h¨¬nh th?c th? k?t h?p
B¨¤i gi?ng c? s? d? li?u M? h¨¬nh th?c th? k?t h?p
L¨º Ph¨² Th?o
?
H? qu?n tr? CSDL PostgreSQL cho sinh vi¨ºn
H? qu?n tr? CSDL PostgreSQL cho sinh vi¨ºn
TranHoangViet001455
?
C2 1
C2 1
Tr?n Thanh
?
Giaotrinh csdl
Giaotrinh csdl
John Phan
?
Giaotrinh csdl
Giaotrinh csdl
T? v?n m?i tr??ng
?
Giaotrinh csdl[bookbooming.com]
Giaotrinh csdl[bookbooming.com]
bookbooming1
?
3. phan quyen trong sql server 01012010
3. phan quyen trong sql server 01012010
Truong van Duoc
?
ºÝºÝߣ 1.pdf
ºÝºÝߣ 1.pdf
PHAMTHAOVY
?
Database Schema and Relationships abcxyz
Database Schema and Relationships abcxyz
d0512203hhd
?
ºÝºÝߣ create databases_linh
ºÝºÝߣ create databases_linh
khacthuong2008
?
Lecture5 userandgroup c¨® ghi ch¨²
Lecture5 userandgroup c¨® ghi ch¨²
L? ??t
?
Mcsa 2012 domain network thu?c t¨ªnh user v¨¤ group
Mcsa 2012 domain network thu?c t¨ªnh user v¨¤ group
laonap166
?
ºÝºÝߣ m?n ??m b?o an to¨¤n th?ng tin
ºÝºÝߣ m?n ??m b?o an to¨¤n th?ng tin
ducmanhkthd
?
Gpo
Gpo
it
?
Bai10 he thong bao ve bao mat
Bai10 he thong bao ve bao mat
V? Sang
?
B¨¤i gi?ng c? s? d? li?u M? h¨¬nh th?c th? k?t h?p
B¨¤i gi?ng c? s? d? li?u M? h¨¬nh th?c th? k?t h?p
L¨º Ph¨² Th?o
?
H? qu?n tr? CSDL PostgreSQL cho sinh vi¨ºn
H? qu?n tr? CSDL PostgreSQL cho sinh vi¨ºn
TranHoangViet001455
?
Giaotrinh csdl[bookbooming.com]
Giaotrinh csdl[bookbooming.com]
bookbooming1
?
Ad

More from khacthuong2008 (11)

Phan1
Phan1
khacthuong2008
?
Phan2
Phan2
khacthuong2008
?
Phan3
Phan3
khacthuong2008
?
Phan4
Phan4
khacthuong2008
?
Phan5
Phan5
khacthuong2008
?
Phan6
Phan6
khacthuong2008
?
Group 1 hao_nv
Group 1 hao_nv
khacthuong2008
?
Group 1 hao_nv
Group 1 hao_nv
khacthuong2008
?
Postgre sql nhunq
Postgre sql nhunq
khacthuong2008
?
Presentation
Presentation
khacthuong2008
?
Postgre Diagram
Postgre Diagram
khacthuong2008
?
Ad

Role

  • 1. Postgresql www.elarion.com [email_address] Never stop improving quality
  • 2. Presentation Template Role Database Roles Role Attributes Role Membership Function and Triggers
  • 3. Database Roles L¨¤ m?t kh¨¢i ni?m ho¨¤n to¨¤n ??c l?p v?i t¨¤i kho?n ng??i d¨´ng c?a h? ??u h¨¤nh C¨² ph¨¢p t?o v¨¤ x¨®a Database Roles: CREATE ROLE name DROP ROLE name Presentation Template
  • 4. Role Attributes (1/5) Database Role c¨® m?t s? thu?c t¨ªnh nh? sau : Login C¨² ph¨¢p : CREATE ROLE name LOGIN CREATE USER name Hai c¨² ph¨¢p tr¨ºn t??ng ???ng nhau nh?ng CREATE USER m?c ??nh l¨¤ c¨® thu?c t¨ªnh LOGIN cho n¨ºn kh?ng c?n khai b¨¢o n?a , c¨°n CREATE ROLE th¨¬ kh?ng v¨¬ v?y ph?i c?n khai b¨¢o th¨ºm thu?c t¨ªnh LOGIN
  • 5. Role Attributes (2/5) Superuser C¨² ph¨¢p : CREATE ROLE name SUPERUSER ??y l¨¤ thu?c t¨ªnh cho ph¨¦p s? d?ng t?t c? c¨¢c ch?c n?ng trong Postgresql , thu?c t¨ªnh n¨¤y r?t nguy hi?m v¨¬ v?y n¨ºn s? d?ng m?t c¨¢ch c?n th?n khi ph?n quy?n ?? b?o m?t h?n th¨¬ n¨ºn th¨ºm thu?c t¨ªnh NOREPLICATION v¨¬ n?u kh?ng c¨® thu?c t¨ªnh n¨¤y th¨¬ t? ??ng s? c¨® m?t ch? ?? sao ch¨¦p quy?n c?a m?t Superuser c¨® s?n
  • 6. Role Attributes (3/5) Create database objects C¨² ph¨¢p : CREATE ROLE name CREATEDB Thu?c t¨ªnh n¨¤y cho ph¨¦p role n¨¤y c¨® th? t?o , x¨®a , s?a database N?u l¨¤ Superuser th¨¬ kh?ng ph?i khai b¨¢o th??c t¨ªnh n¨¤y v¨¬ Superuser ?? bao g?m b¨ºn trong
  • 7. Role Attributes (4/5) Create roles C¨² ph¨¢p : CREATE ROLE name CREATEROLE Thu?c t¨ªnh n¨¤y cho ph¨¦p t?o , x¨®a , s?a role c?ng nh? c?p quy?n ho?c thu h?i nh?ng th¨¤nh vi¨ºn c?a role ?¨® Thu?c t¨ªnh n¨¤y kh?ng ?? ?? th?c hi?n c¨¢c ch?c n?ng tr¨ºn ??i v?i Superuser
  • 8. Role Attributes (5/5) Initiating streaming replication and backups C¨² ph¨¢p : CREATE ROLE name REPLICATION LOGIN Thu?c t¨ªnh n¨¤y cho ph¨¦p kh?i t?o m?t lu?ng sao ch¨¦p v¨¤ backup. Role n¨¤y lu?n lu?n c¨® thu?c t¨ªnh LOGIN Password C¨² ph¨¢p : CREATE ROLE name PASSWORD ¡® String¡¯ Cho ph¨¦p t?o role c¨® password v¨¤ ???c m? h¨®a md5
  • 9. Role Membership (1/6) Role Membership gi¨²p qu?n l? c¨¢c Role m?t c¨¢ch d? d¨¤ng , b?ng c¨¢ch n¨¤y quy?n s? ???c c?p ho?c l?y l?i t? m?t nh¨®m , v¨¤ c¨¢c th¨¤nh vi¨ºn c?a nh¨®m ?¨® c?ng b? ?nh h??ng C¨² ph¨¢p : CREATE ROLE name C¨² ph¨¢p t??ng t? t?o role nh?ng kh?ng c¨® thu?c t¨ªnh LOGIN , Postgresql s? hi?u l¨¤ m?t nh¨®m
  • 10. Role Membership (2/6) C¨² ph¨¢p c?p quy?n cho role GRANT group_role TO role1,role2¡­ C¨² ph¨¢p thu h?i quy?n t? role REVOKE group_role FROM role1,role2 ...
  • 11. Role Membership (3/6) Inherits rights from parnet roles ??y l¨¤ thu?c t¨ªnh cho ph¨¦p c¨¢c role thu?c m?t nh¨®m k? th?a thu?c t¨ªnh c?a nh¨®m V¨ª d? : CREATE ROLE joe LOGIN INHERIT CREATE ROLE admin NOINHERIT CREATE ROLE wheel NOINHERIT GRANT admin TO joe GRANT wheel TO admin
  • 12. Role Membership (4/6) Ngay l?p t?c sau khi joe ??ng nh?p , quy?n s? ???c c?p cho joe v¨¤ th¨ºm v¨¤o ?¨® l¨¤ joe c?ng ???c c?p th¨ºm quy?n t? admin , v¨¬ joe th?a k? t? admin , Tuy nhi¨ºn , quy?n c?p cho wheel s? kh?ng c¨® hi?u l?c , th?m ch¨ª joe l¨¤ th¨¤nh vi¨ºn d¨¢n ti?p c?a wheel , v¨¬ admin c¨® thu?c t¨ªnh NOINHERIT , n¨® kh?ng cho ph¨¦p th?a k? quy?n t? wheel, sau ?¨® : SET ROLE admin L?nh n¨¤y s? c?p quy?n cho admin m¨¤ kh?ng c?p cho joe , sau ?¨® :
  • 13. Role Membership (5/6) SET ROLE wheel H? th?ng s? c?p quy?n cho wheel v¨¤ kh?ng c?p quy?n cho m?t trong hai joe ho?c admin Nh?ng c?ng c¨® th? ph?c h?i b?ng c¨¢ch : SET ROLE joe SET ROLE NONE RESET ROLE SET ROLE lu?n ch?p nh?n ch?n b?t c? m?t role n¨¤o m¨¤ c? b?n v¨¤ c¨® th? ??ng nh?p
  • 14. Role Membership (6/6) X¨®a Role C¨² ph¨¢p : DROP ROLE name
  • 16. Presentation Template Thanks for your attention!