SlideShare a Scribd company logo
1 of 11
EigenbaseMeetup Feb 2011SQL:2008 Authorization JVS Slides
Authorization Model
Supported Privileges SELECT/INSERT/UPDATE/DELETE on tables Column-level not supported; use views EXECUTE on functions REFERENCES on tables Controls whether views can be created on them USAGE on UDT’s Extension projects can define new privileges as well as categorize the objects on which they apply
Notes on Roles Users/roles can inherit multiple roles Role inheritance cycles are not allowed A role has to be explicitly “activated” in a session At most one at a time Roles can own objects and can be grantor Avoids CASCADE which would occur when owner/grantor is a user who later gets dropped
Some Syntax GRANT ROLE unqualified-role-name, ... TO unqualified-user-or-role-name, ... [ WITH ADMIN OPTION ] [ GRANTED BY { CURRENT_ROLE | CURRENT_USER } ] GRANT { ALL PRIVILEGES | privileged-action, ... } ON [ TABLE | SPECIFIC { FUNCTION | PROCEDURE | ROUTINE } ] qualified-object-name TO unqualified-user-or-role-name, ... [ WITH GRANT OPTION ] [ GRANTED BY { CURRENT_ROLE | CURRENT_USER } ] privileged-action ::= { INSERT | UPDATE | SELECT | DELETE | EXECUTE | USAGE | REFERENCES }
“setuid” Currently only works for UDR implemented in Java Does not apply to UDX cursor inputs (those are treated the as the rest of the invoking query) CREATE { FUNCTION | PROCEDURE } … EXTERNAL NAME 'external-name' [ EXTERNAL SECURITY { DEFINER | INVOKER | IMPLEMENTATION DEFINED } ]
Authorization Stack Relevant when UDR’s call back in via jdbc:default:connection Implicit impersonation (via setuid) Explicit impersonation (via SET SESSION AUTHORIZATION) Role changes via SET ROLE CURRENT_ROLE is cleared in new stack frame SESSION_USER vs CURRENT_USER
Metadata Visibility Currently applies only to JDBC views, which themselves are queryable by PUBLIC Object is visible if user has any privilege granted on it Either directly or via role (recursively) Implemented via UDX FILTER_USER_VISIBLE_OBJECTS Need an equivalent for LucidDB-specific views (USER_ views to go with DBA_ views)
Open Issue:  Advanced Privileges Jar/function creation ANALYZE/REBUILD/TRUNCATE TABLE SQL/MED server/wrapper creation/reference SQL/MED metadata import Named catalog creation User/role creation Repository replacement Catalog extension models Purge/checkpoint, label creation ALTER SYSTEM, ALTER SESSION Impersonation Backup/restore
New LucidDB SYS_ROOT Views DBA_USERS DBA_ROLES DBA_AUTH_IDS (union of users and roles) DBA_INHERITED_ROLES DBA_ELEMENT_GRANTS Thanks to Kevin Secretan!
Remaining Work REVOKE (all of it) Non-table privileges Schema AUTHORIZATION clause Needed for allowing schema and its objects to be owned by role instead of user View grant dependencies REFERENCES, USAGE SET SESSION AUTHORIZATION (impersonation)

More Related Content

Viewers also liked (14)

Unit 03 presentation
Unit 03 presentationUnit 03 presentation
Unit 03 presentation
 
Free ice cream
Free ice creamFree ice cream
Free ice cream
 
Charla Informativa
Charla InformativaCharla Informativa
Charla Informativa
 
Chapter a.3
Chapter a.3Chapter a.3
Chapter a.3
 
Vm chp12
Vm chp12Vm chp12
Vm chp12
 
Social media workshop 04112010
Social media workshop 04112010Social media workshop 04112010
Social media workshop 04112010
 
Mike morelli
Mike morelliMike morelli
Mike morelli
 
Mike morelli
Mike morelliMike morelli
Mike morelli
 
Prologue
ProloguePrologue
Prologue
 
4 introduccion a la ingenieria pag 37-40
4 introduccion a la ingenieria pag 37-404 introduccion a la ingenieria pag 37-40
4 introduccion a la ingenieria pag 37-40
 
Hive Evolution: ApacheCon NA 2010
Hive Evolution:  ApacheCon NA 2010Hive Evolution:  ApacheCon NA 2010
Hive Evolution: ApacheCon NA 2010
 
Fin del curso
Fin del cursoFin del curso
Fin del curso
 
Validez- Unidad 3
 Validez- Unidad 3  Validez- Unidad 3
Validez- Unidad 3
 
Ron Newman Resume T
Ron Newman Resume TRon Newman Resume T
Ron Newman Resume T
 

Similar to EigenbaseMeetup Feb 2011SQL:2008 Authorization JVS Slides

03_DP_300T00A_Secure_Environment.pptx
03_DP_300T00A_Secure_Environment.pptx03_DP_300T00A_Secure_Environment.pptx
03_DP_300T00A_Secure_Environment.pptxKareemBullard1
 
Oracle Database Security For Developers
Oracle Database Security For DevelopersOracle Database Security For Developers
Oracle Database Security For DevelopersSzymon Skorupinski
 
Les14[1]Controlling User Access
Les14[1]Controlling User AccessLes14[1]Controlling User Access
Les14[1]Controlling User Accesssiavosh kaviani
 
Write the query for creating the users exp 11
Write the query for creating the users exp 11Write the query for creating the users exp 11
Write the query for creating the users exp 11vishal choudhary
 
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKitAtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKitWojciech Seliga
 
Resthub framework presentation
Resthub framework presentationResthub framework presentation
Resthub framework presentationSébastien Deleuze
 
Database administration
Database administrationDatabase administration
Database administrationabhi_love
 
Smooth scrolling in UITableView and UICollectionView
Smooth scrolling in UITableView and UICollectionViewSmooth scrolling in UITableView and UICollectionView
Smooth scrolling in UITableView and UICollectionViewAndrea Prearo
 
Backbone beyond jQuery
Backbone beyond jQueryBackbone beyond jQuery
Backbone beyond jQueryAdam Krebs
 
e computer notes - Controlling user access
e computer notes - Controlling user accesse computer notes - Controlling user access
e computer notes - Controlling user accessecomputernotes
 
Security in Relational model
Security in Relational modelSecurity in Relational model
Security in Relational modelSlideshare
 
Views for hackers v1.3
Views for hackers v1.3Views for hackers v1.3
Views for hackers v1.3Karim Ratib
 
Users66666666666666666666666666666666666666
Users66666666666666666666666666666666666666Users66666666666666666666666666666666666666
Users66666666666666666666666666666666666666227567
 
Tech talk live share extras extension modules feb 13
Tech talk live   share extras extension modules feb 13Tech talk live   share extras extension modules feb 13
Tech talk live share extras extension modules feb 13Alfresco Software
 
Director x Backbone = :)
Director x Backbone = :)Director x Backbone = :)
Director x Backbone = :)Janessa Det
 

Similar to EigenbaseMeetup Feb 2011SQL:2008 Authorization JVS Slides (20)

Les14
Les14Les14
Les14
 
Db pre
Db preDb pre
Db pre
 
03_DP_300T00A_Secure_Environment.pptx
03_DP_300T00A_Secure_Environment.pptx03_DP_300T00A_Secure_Environment.pptx
03_DP_300T00A_Secure_Environment.pptx
 
Oracle Database Security For Developers
Oracle Database Security For DevelopersOracle Database Security For Developers
Oracle Database Security For Developers
 
Les14[1]Controlling User Access
Les14[1]Controlling User AccessLes14[1]Controlling User Access
Les14[1]Controlling User Access
 
Write the query for creating the users exp 11
Write the query for creating the users exp 11Write the query for creating the users exp 11
Write the query for creating the users exp 11
 
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKitAtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
AtlasCamp 2012 - Testing JIRA plugins smarter with TestKit
 
MySQL Views
MySQL ViewsMySQL Views
MySQL Views
 
Advanced db features
Advanced db featuresAdvanced db features
Advanced db features
 
Resthub framework presentation
Resthub framework presentationResthub framework presentation
Resthub framework presentation
 
Database administration
Database administrationDatabase administration
Database administration
 
Smooth scrolling in UITableView and UICollectionView
Smooth scrolling in UITableView and UICollectionViewSmooth scrolling in UITableView and UICollectionView
Smooth scrolling in UITableView and UICollectionView
 
Backbone beyond jQuery
Backbone beyond jQueryBackbone beyond jQuery
Backbone beyond jQuery
 
dba
dbadba
dba
 
e computer notes - Controlling user access
e computer notes - Controlling user accesse computer notes - Controlling user access
e computer notes - Controlling user access
 
Security in Relational model
Security in Relational modelSecurity in Relational model
Security in Relational model
 
Views for hackers v1.3
Views for hackers v1.3Views for hackers v1.3
Views for hackers v1.3
 
Users66666666666666666666666666666666666666
Users66666666666666666666666666666666666666Users66666666666666666666666666666666666666
Users66666666666666666666666666666666666666
 
Tech talk live share extras extension modules feb 13
Tech talk live   share extras extension modules feb 13Tech talk live   share extras extension modules feb 13
Tech talk live share extras extension modules feb 13
 
Director x Backbone = :)
Director x Backbone = :)Director x Backbone = :)
Director x Backbone = :)
 

EigenbaseMeetup Feb 2011SQL:2008 Authorization JVS Slides

  • 1. EigenbaseMeetup Feb 2011SQL:2008 Authorization JVS Slides
  • 3. Supported Privileges SELECT/INSERT/UPDATE/DELETE on tables Column-level not supported; use views EXECUTE on functions REFERENCES on tables Controls whether views can be created on them USAGE on UDT’s Extension projects can define new privileges as well as categorize the objects on which they apply
  • 4. Notes on Roles Users/roles can inherit multiple roles Role inheritance cycles are not allowed A role has to be explicitly “activated” in a session At most one at a time Roles can own objects and can be grantor Avoids CASCADE which would occur when owner/grantor is a user who later gets dropped
  • 5. Some Syntax GRANT ROLE unqualified-role-name, ... TO unqualified-user-or-role-name, ... [ WITH ADMIN OPTION ] [ GRANTED BY { CURRENT_ROLE | CURRENT_USER } ] GRANT { ALL PRIVILEGES | privileged-action, ... } ON [ TABLE | SPECIFIC { FUNCTION | PROCEDURE | ROUTINE } ] qualified-object-name TO unqualified-user-or-role-name, ... [ WITH GRANT OPTION ] [ GRANTED BY { CURRENT_ROLE | CURRENT_USER } ] privileged-action ::= { INSERT | UPDATE | SELECT | DELETE | EXECUTE | USAGE | REFERENCES }
  • 6. “setuid” Currently only works for UDR implemented in Java Does not apply to UDX cursor inputs (those are treated the as the rest of the invoking query) CREATE { FUNCTION | PROCEDURE } … EXTERNAL NAME 'external-name' [ EXTERNAL SECURITY { DEFINER | INVOKER | IMPLEMENTATION DEFINED } ]
  • 7. Authorization Stack Relevant when UDR’s call back in via jdbc:default:connection Implicit impersonation (via setuid) Explicit impersonation (via SET SESSION AUTHORIZATION) Role changes via SET ROLE CURRENT_ROLE is cleared in new stack frame SESSION_USER vs CURRENT_USER
  • 8. Metadata Visibility Currently applies only to JDBC views, which themselves are queryable by PUBLIC Object is visible if user has any privilege granted on it Either directly or via role (recursively) Implemented via UDX FILTER_USER_VISIBLE_OBJECTS Need an equivalent for LucidDB-specific views (USER_ views to go with DBA_ views)
  • 9. Open Issue: Advanced Privileges Jar/function creation ANALYZE/REBUILD/TRUNCATE TABLE SQL/MED server/wrapper creation/reference SQL/MED metadata import Named catalog creation User/role creation Repository replacement Catalog extension models Purge/checkpoint, label creation ALTER SYSTEM, ALTER SESSION Impersonation Backup/restore
  • 10. New LucidDB SYS_ROOT Views DBA_USERS DBA_ROLES DBA_AUTH_IDS (union of users and roles) DBA_INHERITED_ROLES DBA_ELEMENT_GRANTS Thanks to Kevin Secretan!
  • 11. Remaining Work REVOKE (all of it) Non-table privileges Schema AUTHORIZATION clause Needed for allowing schema and its objects to be owned by role instead of user View grant dependencies REFERENCES, USAGE SET SESSION AUTHORIZATION (impersonation)