Autorisations (moteur de base de données)

Chaque objet sécurisable SQL Server a des autorisations associées qui peuvent être accordées à une entité de sécurité. Cette rubrique fournit les informations suivantes :

  • Conventions de noms d'autorisations

  • Autorisations relatives à des objets sécurisables spécifiques

  • Autorisations SQL Server

  • Algorithme de vérification des autorisations

  • Exemples

Conventions de noms d'autorisations

La section ci-après décrit les conventions générales qui sont suivies pour affecter des noms aux autorisations.

  • CONTROL

    Confère des fonctionnalités de type propriété au bénéficiaire de l'autorisation. Le bénéficiaire dispose effectivement de toutes les autorisations définies sur l'objet sécurisable. Une entité de sécurité qui dispose de l'autorisation CONTROL peut elle-même accorder des autorisations sur l'objet sécurisable. Le modèle de sécurité de SQL Server étant hiérarchique, l'autorisation CONTROL sur une portée particulière étend implicitement CONTROL à tous les objets sécurisables inclus dans cette portée. Par exemple, CONTROL sur une base de données implique toutes les autorisations sur la base de données, toutes les autorisations sur tous les assemblys de la base de données, toutes les autorisations sur tous les schémas de la base de données et toutes les autorisations sur les objets de tous les schémas de la base de données.

  • ALTER

    Confère la capacité de modifier les propriétés, excepté l'appartenance, d'un objet sécurisable particulier. Lorsque ALTER est accordé sur une portée, ALTER octroie également la capacité de modifier, de créer ou de supprimer tous les objets sécurisables contenus dans cette portée. Par exemple, l'autorisation ALTER sur un schéma inclut la capacité de créer, de modifier et de supprimer les objets du schéma.

  • ALTER ANY <Server Securable>, où Server Securable désigne n'importe quel objet sécurisable de type serveur.

    Confère la capacité de créer, de modifier ou de supprimer des instances individuelles du Server Securable. Par exemple, ALTER ANY LOGIN confère la capacité de créer, de modifier ou de supprimer n'importe quelle connexion dans l'instance.

  • ALTER ANY <Database Securable>, où Database Securable désigne n'importe quel objet sécurisable au niveau de la base de données.

    Confère la capacité de créer, de modifier ou de supprimer des instances individuelles du Server Securable. Par exemple, ALTER ANY SCHEMA confère la capacité de créer, de modifier ou de supprimer n'importe quel schéma dans la base de données.

  • TAKE OWNERSHIP

    Permet au bénéficiaire d'obtenir la propriété de l'objet sécurisable sur lequel cette autorisation est accordée.

  • IMPERSONATE <Login>

    Permet au bénéficiaire d'emprunter l'identité impliquée dans la connexion.

  • IMPERSONATE <User>

    Permet au bénéficiaire d'emprunter l'identité de l'utilisateur.

  • CREATE <Server Securable>

    Confère au bénéficiaire la capacité de créer l'objet sécurisable de type serveur ou Server Securable.

  • CREATE <Database Securable>

    Confère au bénéficiaire la capacité de créer l'objet sécurisable de type base de données ou Database Securable.

  • CREATE <Schema-contained Securable>

    Confère la capacité de créer l'objet sécurisable contenu dans le schéma. Toutefois, l'autorisation ALTER sur le schéma est requise pour créer l'objet sécurisable dans un schéma particulier.

  • VIEW DEFINITION

    Permet au bénéficiaire d'accéder aux métadonnées.

  • REFERENCES

    L'autorisation REFERENCES sur une table est obligatoire pour pouvoir créer une contrainte FOREIGN KEY qui référence cette table.

    L'autorisation REFERENCES est obligatoire sur un objet pour pouvoir créer une FONCTION ou une VUE avec la clause WITH SCHEMABINDING qui référence cet objet.

Autorisations applicables à des objets sécurisables spécifiques

Le tableau ci-dessous répertorie les principales classes d'autorisations et les types d'objets sécurisables auxquels elles peuvent s'appliquer.

Autorisation

S'applique à

SELECT

Synonymes

Tables et colonnes

Fonctions table, Transact-SQL et CLR (Common Language Runtime) et colonnes

Vues et colonnes

VIEW CHANGE TRACKING

Tables

Schémas

UPDATE

Synonymes

Tables et colonnes

Vues et colonnes

REFERENCES

Fonctions scalaires et d'agrégation (Transact-SQL et CLR)

Files d'attente Service Broker

Tables et colonnes

Fonctions table (Transact-SQL et CLR) et colonnes

Vues et colonnes

INSERT

Synonymes

Tables et colonnes

Vues et colonnes

DELETE

Synonymes

Tables et colonnes

Vues et colonnes

EXECUTE

Procédures (Transact-SQL et CLR)

Fonctions scalaires et d'agrégation (Transact-SQL et CLR)

Synonymes

Types CLR

RECEIVE

Files d'attente Service Broker

VIEW DEFINITION

Procédures (Transact-SQL et CLR)

Files d'attente Service Broker

Fonctions scalaires et d'agrégation (Transact-SQL et CLR)

Synonymes

Tables

Fonctions table (Transact-SQL et CLR)

Vues

ALTER

Procédures (Transact-SQL et CLR)

Fonctions scalaires et d'agrégation (Transact-SQL et CLR)

Files d'attente Service Broker

Tables

Fonctions table (Transact-SQL et CLR)

Vues

TAKE OWNERSHIP

Procédures (Transact-SQL et CLR)

Fonctions scalaires et d'agrégation (Transact-SQL et CLR)

Synonymes

Tables

Fonctions table (Transact-SQL et CLR)

Vues

CONTROL

Procédures (Transact-SQL et CLR)

Fonctions scalaires et d'agrégation (Transact-SQL et CLR)

Files d'attente Service Broker

Synonymes

Tables

Fonctions table (Transact-SQL et CLR)

Vues

Autorisations SQL Server

Le tableau ci-dessous fournit la liste complète des autorisations SQL Server.

Objet sécurisable de base

Autorisations granulaires sur les objets sécurisables de base

Code du type d'autorisation

Objet sécurisable qui contient un objet sécurisable de base

Autorisation sur l'objet sécurisable conteneur, qui implique une autorisation granulaire sur l'objet sécurisable de base

RÔLE D'APPLICATION

ALTER

AL

BASE DE DONNÉES

ALTER ANY APPLICATION ROLE

RÔLE D'APPLICATION

CONTROL

CL

BASE DE DONNÉES

CONTROL

RÔLE D'APPLICATION

VIEW DEFINITION

VW

BASE DE DONNÉES

VIEW DEFINITION

ASSEMBLY

ALTER

AL

BASE DE DONNÉES

ALTER ANY ASSEMBLY

ASSEMBLY

CONTROL

CL

DATABASE

CONTROL

ASSEMBLY

REFERENCES

RF

DATABASE

REFERENCES

ASSEMBLY

TAKE OWNERSHIP

TO

BASE DE DONNÉES

CONTROL

ASSEMBLY

VIEW DEFINITION

VW

BASE DE DONNÉES

VIEW DEFINITION

CLÉ ASYMÉTRIQUE

ALTER

AL

BASE DE DONNÉES

ALTER ANY ASYMMETRIC KEY

CLÉ ASYMÉTRIQUE

CONTROL

CL

BASE DE DONNÉES

CONTROL

CLÉ ASYMÉTRIQUE

REFERENCES

RF

BASE DE DONNÉES

REFERENCES

CLÉ ASYMÉTRIQUE

TAKE OWNERSHIP

TO

BASE DE DONNÉES

CONTROL

CLÉ ASYMÉTRIQUE

VIEW DEFINITION

VW

BASE DE DONNÉES

VIEW DEFINITION

CERTIFICAT

ALTER

AL

BASE DE DONNÉES

ALTER ANY CERTIFICATE

CERTIFICAT

CONTROL

CL

BASE DE DONNÉES

CONTROL

CERTIFICAT

REFERENCES

RF

BASE DE DONNÉES

REFERENCES

CERTIFICAT

TAKE OWNERSHIP

TO

BASE DE DONNÉES

CONTROL

CERTIFICAT

VIEW DEFINITION

VW

BASE DE DONNÉES

VIEW DEFINITION

CONTRAT

ALTER

AL

BASE DE DONNÉES

ALTER ANY CONTRACT

CONTRAT

CONTROL

CL

BASE DE DONNÉES

CONTROL

CONTRAT

REFERENCES

RF

BASE DE DONNÉES

REFERENCES

CONTRAT

TAKE OWNERSHIP

TO

BASE DE DONNÉES

CONTROL

CONTRAT

VIEW DEFINITION

VW

BASE DE DONNÉES

VIEW DEFINITION

BASE DE DONNÉES

ALTER

AL

SERVEUR

ALTER ANY DATABASE

BASE DE DONNÉES

ALTER ANY APPLICATION ROLE

ALAR

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

ALTER ANY ASSEMBLY

ALAS

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

ALTER ANY ASYMMETRIC KEY

ALAK

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

ALTER ANY CERTIFICATE

ALCF

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

ALTER ANY CONTRACT

ALSC

SERVER

CONTROL SERVER

DATABASE

ALTER ANY DATABASE AUDIT

ALDA

SERVER

ALTER ANY SERVER AUDIT

DATABASE

ALTER ANY DATABASE DDL TRIGGER

ALTG

SERVER

CONTROL SERVER

BASE DE DONNÉES

ALTER ANY DATABASE EVENT NOTIFICATION

ALED

SERVEUR

ALTER ANY EVENT NOTIFICATION

BASE DE DONNÉES

ALTER ANY DATASPACE

ALDS

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

ALTER ANY FULLTEXT CATALOG

ALFT

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

ALTER ANY MESSAGE TYPE

ALMT

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

ALTER ANY REMOTE SERVICE BINDING

ALSB

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

ALTER ANY ROLE

ALRL

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

ALTER ANY ROUTE

ALRT

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

ALTER ANY SCHEMA

ALSM

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

ALTER ANY SERVICE

ALSV

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

ALTER ANY SYMMETRIC KEY

ALSK

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

ALTER ANY USER

ALUS

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

AUTHENTICATE

AUTH

SERVEUR

AUTHENTICATE SERVER

BASE DE DONNÉES

BACKUP DATABASE

BADB

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

BACKUP LOG

BALO

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CHECKPOINT

CP

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CONNECT

CO

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CONNECT REPLICATION

CORP

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CONTROL

CL

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE AGGREGATE

CRAG

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE ASSEMBLY

CRAS

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE ASYMMETRIC KEY

CRAK

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE CERTIFICATE

CRCF

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE CONTRACT

CRSC

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE DATABASE

CRDB

SERVEUR

CREATE ANY DATABASE

BASE DE DONNÉES

CREATE DATABASE DDL EVENT NOTIFICATION

CRED

SERVEUR

CREATE DDL EVENT NOTIFICATION

BASE DE DONNÉES

CREATE DEFAULT

CRDF

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE FULLTEXT CATALOG

CRFT

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE FUNCTION

CRFN

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE MESSAGE TYPE

CRMT

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE PROCEDURE

CRPR

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE QUEUE

CRQU

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE REMOTE SERVICE BINDING

CRSB

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE ROLE

CRRL

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE ROUTE

CRRT

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE RULE

CRRU

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE SCHEMA

CRSM

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE SERVICE

CRSV

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE SYMMETRIC KEY

CRSK

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE SYNONYM

CRSN

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE TABLE

CRTB

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE TYPE

CRTY

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE VIEW

CRVW

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

CREATE XML SCHEMA COLLECTION

CRXS

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

DELETE

DL

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

EXECUTE

EX

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

INSERT

IN

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

REFERENCES

RF

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

SELECT

SL

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

SHOWPLAN

SPLN

SERVEUR

ALTER TRACE

BASE DE DONNÉES

SUBSCRIBE QUERY NOTIFICATIONS

SUQN

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

TAKE OWNERSHIP

TO

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

UPDATE

UP

SERVEUR

CONTROL SERVER

BASE DE DONNÉES

VIEW DATABASE STATE

VWDS

SERVEUR

VIEW SERVER STATE

BASE DE DONNÉES

VIEW DEFINITION

VW

SERVEUR

VIEW ANY DEFINITION

POINT DE TERMINAISON

ALTER

AL

SERVEUR

ALTER ANY ENDPOINT

POINT DE TERMINAISON

CONNECT

CO

SERVEUR

CONTROL SERVER

POINT DE TERMINAISON

CONTROL

CL

SERVEUR

CONTROL SERVER

POINT DE TERMINAISON

TAKE OWNERSHIP

TO

SERVEUR

CONTROL SERVER

POINT DE TERMINAISON

VIEW DEFINITION

VW

SERVEUR

VIEW ANY DEFINITION

CATALOGUE DE TEXTE INTÉGRAL

ALTER

AL

BASE DE DONNÉES

ALTER ANY FULLTEXT CATALOG

CATALOGUE DE TEXTE INTÉGRAL

CONTROL

CL

BASE DE DONNÉES

CONTROL

CATALOGUE DE TEXTE INTÉGRAL

REFERENCES

RF

BASE DE DONNÉES

REFERENCES

CATALOGUE DE TEXTE INTÉGRAL

TAKE OWNERSHIP

TO

BASE DE DONNÉES

CONTROL

FULLTEXT CATALOG

VIEW DEFINITION

VW

DATABASE

VIEW DEFINITION

FULLTEXT STOPLIST

ALTER

AL

DATABASE

ALTER ANY FULLTEXT CATALOG

FULLTEXT STOPLIST

CONTROL

CL

DATABASE

CONTROL

FULLTEXT STOPLIST

REFERENCES

RF

DATABASE

REFERENCES

FULLTEXT STOPLIST

TAKE OWNERSHIP

TO

DATABASE

CONTROL

FULLTEXT STOPLIST

VIEW DEFINITION

VW

DATABASE

VIEW DEFINITION

LOGIN

ALTER

AL

SERVEUR

ALTER ANY LOGIN

CONNEXION

CONTROL

CL

SERVEUR

CONTROL SERVER

CONNEXION

IMPERSONATE

IM

SERVEUR

CONTROL SERVER

CONNEXION

VIEW DEFINITION

VW

SERVEUR

VIEW ANY DEFINITION

TYPE DE MESSAGE

ALTER

AL

BASE DE DONNÉES

ALTER ANY MESSAGE TYPE

TYPE DE MESSAGE

CONTROL

CL

BASE DE DONNÉES

CONTROL

TYPE DE MESSAGE

REFERENCES

RF

BASE DE DONNÉES

REFERENCES

TYPE DE MESSAGE

TAKE OWNERSHIP

TO

BASE DE DONNÉES

CONTROL

TYPE DE MESSAGE

VIEW DEFINITION

VW

DATABASE

VIEW DEFINITION

OBJECT

ALTER

AL

SCHEMA

ALTER

OBJECT

CONTROL

CL

SCHEMA

CONTROL

OBJECT

DELETE

DL

SCHEMA

DELETE

OBJET

EXECUTE

EX

SCHÉMA

EXECUTE

OBJET

INSERT

IN

SCHÉMA

INSERT

OBJET

RECEIVE

RC

SCHÉMA

CONTROL

OBJET

REFERENCES

RF

SCHÉMA

REFERENCES

OBJET

SELECT

SL

SCHÉMA

SELECT

OBJET

TAKE OWNERSHIP

TO

SCHEMA

CONTROL

OBJECT

UPDATE

UP

SCHEMA

UPDATE

OBJECT

VIEW CHANGE TRACKING

VWCT

SCHEMA

VIEW CHANGE TRACKING

OBJECT

VIEW DEFINITION

VW

SCHEMA

VIEW DEFINITION

REMOTE SERVICE BINDING

ALTER

AL

BASE DE DONNÉES

ALTER ANY REMOTE SERVICE BINDING

LIAISONS DE SERVICE DISTANT

CONTROL

CL

BASE DE DONNÉES

CONTROL

LIAISONS DE SERVICE DISTANT

TAKE OWNERSHIP

TO

BASE DE DONNÉES

CONTROL

LIAISONS DE SERVICE DISTANT

VIEW DEFINITION

VW

BASE DE DONNÉES

VIEW DEFINITION

RÔLE

ALTER

AL

BASE DE DONNÉES

ALTER ANY ROLE

RÔLE

CONTROL

CL

BASE DE DONNÉES

CONTROL

RÔLE

TAKE OWNERSHIP

TO

BASE DE DONNÉES

CONTROL

RÔLE

VIEW DEFINITION

VW

BASE DE DONNÉES

VIEW DEFINITION

ITINÉRAIRE

ALTER

AL

BASE DE DONNÉES

ALTER ANY ROUTE

ITINÉRAIRE

CONTROL

CL

BASE DE DONNÉES

CONTROL

ITINÉRAIRE

TAKE OWNERSHIP

TO

BASE DE DONNÉES

CONTROL

ITINÉRAIRE

VIEW DEFINITION

VW

BASE DE DONNÉES

VIEW DEFINITION

SCHÉMA

ALTER

AL

BASE DE DONNÉES

ALTER ANY SCHEMA

SCHEMA

CONTROL

CL

DATABASE

CONTROL

SCHEMA

DELETE

DL

DATABASE

DELETE

SCHEMA

EXECUTE

EX

DATABASE

EXECUTE

SCHÉMA

INSERT

IN

BASE DE DONNÉES

INSERT

SCHÉMA

REFERENCES

RF

BASE DE DONNÉES

REFERENCES

SCHÉMA

SELECT

SL

BASE DE DONNÉES

SELECT

SCHÉMA

TAKE OWNERSHIP

TO

DATABASE

CONTROL

SCHEMA

UPDATE

UP

DATABASE

UPDATE

SCHEMA

VIEW CHANGE TRACKING

VWCT

DATABASE

VIEW CHANGE TRACKING

SCHEMA

VIEW DEFINITION

VW

DATABASE

VIEW DEFINITION

SERVER

ADMINISTER BULK OPERATIONS

ADBO

Non applicable

Non applicable

SERVEUR

ALTER ANY CONNECTION

ALCO

Non applicable

Non applicable

SERVEUR

ALTER ANY CREDENTIAL

ALCD

Non applicable

Non applicable

SERVEUR

ALTER ANY DATABASE

ALDB

Non applicable

Non applicable

SERVEUR

ALTER ANY ENDPOINT

ALHE

Non applicable

Non applicable

SERVEUR

ALTER ANY EVENT NOTIFICATION

ALES

Non applicable

Non applicable

SERVEUR

ALTER ANY LINKED SERVER

ALLS

Non applicable

Non applicable

SERVEUR

ALTER ANY LOGIN

ALLG

Non applicable

Non applicable

SERVER

ALTER ANY SERVER AUDIT

ALAA

Non applicable

Non applicable

SERVER

ALTER RESOURCES

ALRS

Non applicable

Non applicable

SERVEUR

ALTER SERVER STATE

ALSS

Non applicable

Non applicable

SERVEUR

ALTER SETTINGS

ALST

Non applicable

Non applicable

SERVEUR

ALTER TRACE

ALTR

Non applicable

Non applicable

SERVEUR

AUTHENTICATE SERVER

AUTH

Non applicable

Non applicable

SERVEUR

CONNECT SQL

COSQ

Non applicable

Non applicable

SERVEUR

CONTROL SERVER

CL

Non applicable

Non applicable

SERVEUR

CREATE ANY DATABASE

CRDB

Non applicable

Non applicable

SERVEUR

CREATE DDL EVENT NOTIFICATION

CRDE

Non applicable

Non applicable

SERVEUR

CREATE ENDPOINT

CRHE

Non applicable

Non applicable

SERVEUR

CREATE TRACE EVENT NOTIFICATION

CRTE

Non applicable

Non applicable

SERVEUR

EXTERNAL ACCESS ASSEMBLY

XA

Non applicable

Non applicable

SERVEUR

SHUTDOWN

SHDN

Non applicable

Non applicable

SERVEUR

UNSAFE ASSEMBLY

XU

Non applicable

Non applicable

SERVEUR

VIEW ANY DATABASE

VWDB

Non applicable

Non applicable

SERVEUR

VIEW ANY DEFINITION

VWAD

Non applicable

Non applicable

SERVEUR

VIEW SERVER STATE

VWSS

Non applicable

Non applicable

SERVICE

ALTER

AL

BASE DE DONNÉES

ALTER ANY SERVICE

SERVICE

CONTROL

CL

BASE DE DONNÉES

CONTROL

SERVICE

SEND

SN

BASE DE DONNÉES

CONTROL

SERVICE

TAKE OWNERSHIP

TO

BASE DE DONNÉES

CONTROL

SERVICE

VIEW DEFINITION

VW

BASE DE DONNÉES

VIEW DEFINITION

CLÉ SYMÉTRIQUE

ALTER

AL

BASE DE DONNÉES

ALTER ANY SYMMETRIC KEY

CLÉ SYMÉTRIQUE

CONTROL

CL

BASE DE DONNÉES

CONTROL

CLÉ SYMÉTRIQUE

REFERENCES

RF

BASE DE DONNÉES

REFERENCES

CLÉ SYMÉTRIQUE

TAKE OWNERSHIP

TO

BASE DE DONNÉES

CONTROL

CLÉ SYMÉTRIQUE

VIEW DEFINITION

VW

BASE DE DONNÉES

VIEW DEFINITION

TYPE

CONTROL

CL

SCHÉMA

CONTROL

TYPE

EXECUTE

EX

SCHÉMA

EXECUTE

TYPE

REFERENCES

RF

SCHÉMA

REFERENCES

TYPE

TAKE OWNERSHIP

TO

SCHÉMA

CONTROL

TYPE

VIEW DEFINITION

VW

SCHÉMA

VIEW DEFINITION

UTILISATEUR

ALTER

AL

BASE DE DONNÉES

ALTER ANY USER

UTILISATEUR

CONTROL

CL

BASE DE DONNÉES

CONTROL

UTILISATEUR

IMPERSONATE

IM

BASE DE DONNÉES

CONTROL

UTILISATEUR

VIEW DEFINITION

VW

BASE DE DONNÉES

VIEW DEFINITION

COLLECTION DE SCHÉMAS XML

ALTER

AL

SCHÉMA

ALTER

COLLECTION DE SCHÉMAS XML

CONTROL

CL

SCHÉMA

CONTROL

COLLECTION DE SCHÉMAS XML

EXECUTE

EX

SCHÉMA

EXECUTE

COLLECTION DE SCHÉMAS XML

REFERENCES

RF

SCHÉMA

REFERENCES

COLLECTION DE SCHÉMAS XML

TAKE OWNERSHIP

TO

SCHÉMA

CONTROL

XML SCHEMA COLLECTION

VIEW DEFINITION

VW

SCHEMA

VIEW DEFINITION

Synthèse sur l'algorithme de vérification des autorisations

La vérification des autorisations peut être complexe. L'algorithme de vérification des autorisations englobe les membres de groupes qui se chevauchent et le chaînage des propriétés, l'autorisation explicite et implicite, et peut être affecté par les autorisations sur les classes sécurisables qui contiennent l'entité sécurisable. Le processus général de l'algorithme consiste à collecter toutes les autorisations pertinentes. Si aucun blocage DENY n'est rencontré, l'algorithme recherche une instruction GRANT fournissant un accès suffisant. L'algorithme contient trois éléments essentiels : le contexte de sécurité, l'espace d'autorisation et l'autorisation requise.

  • Contexte de sécurité

    Il s'agit du groupe d'entités de sécurité qui apporte les autorisations à la vérification d'accès. Ces autorisations sont liées à la connexion ou à l'utilisateur actif, à moins que le contexte de sécurité n'ait été modifié au profit d'une autre connexion ou d'un autre utilisateur par le biais de l'instruction EXECUTE AS. Le contexte de sécurité se compose des entités de sécurité suivantes :

    • la connexion ;

    • l'utilisateur ;

    • les appartenances aux rôles ;

    • les appartenances aux groupes Windows ;

    • si la signature de module est utilisée, toute connexion ou compte d'utilisateur du certificat utilisé pour signer le module actuellement exécuté par l'utilisateur, ainsi que les appartenances aux rôles associées de cette entité de sécurité.

  • Espace d'autorisation

    Correspond à l'entité sécurisable et aux classes sécurisables qui contiennent l'élément sécurisable. Par exemple, une table (entité sécurisable) est contenue par la classe sécurisable de schéma et par la classe sécurisable de base de données. L'accès peut être affecté par des autorisations de niveau table, schéma, base de données et serveur. Pour plus d'informations, consultez Hiérarchie des autorisations (moteur de base de données).

  • Autorisation requise

    Correspond au type d'autorisation requise. Il peut s'agir, par exemple, d'une autorisation INSERT, UPDATE, DELETE, SELECT, EXECUTE, ALTER, CONTROL, etc.

    L'accès peut nécessiter plusieurs autorisations, comme l'illustrent les exemples suivants :

    • Une procédure stockée peut nécessiter une autorisation EXECUTE sur la procédure stockée et une autorisation INSERT sur plusieurs tables référencées par la procédure stockée.

    • Une vue de gestion dynamique peut nécessiter à la fois une autorisation VIEW SERVER STATE et une autorisation SELECT sur la vue.

Étapes générales de l'algorithme

Au moment de déterminer si l'accès à un élément sécurisable doit être autorisé, l'algorithme peut suivre différentes étapes en fonction des entités de sécurité et des éléments sécurisables concernés. Cependant, l'algorithme exécute les étapes générales suivantes :

  1. Contournement de la procédure de vérification des autorisations si la connexion est membre du rôle serveur fixe sysadmin ou si l'utilisateur est l'utilisateur dbo dans la base de données active.

  2. Autorisation de l'accès si le chaînage des propriétés est applicable et si la vérification de l'accès sur l'objet plus tôt dans la chaîne a passé avec succès le contrôle de sécurité. Pour plus d'informations sur le chaînage des propriétés, consultez Chaînes de propriétés.

  3. Agrégation des identités de niveau serveur, base de données et du module signé qui sont associées à l'appelant pour créer le contexte de sécurité.

  4. Pour ce contexte de sécurité, collecte de toutes les autorisations accordées ou refusées pour l'espace d'autorisation. L'autorisation peut être explicitement déclarée comme une autorisation GRANT, GRANT WITH GRANT ou DENY ; les autorisations peuvent également correspondre à une autorisation implicite ou couvrante GRANT ou DENY. Par exemple, l'autorisation CONTROL sur un schéma implique une autorisation CONTROL sur une table. Et une autorisation CONTROL sur une table implique une autorisation SELECT. Par conséquent, si l'autorisation CONTROL a été accordée sur le schéma, l'autorisation SELECT l'est également sur la table. Si l'autorisation CONTROL a été refusée sur la table, l'autorisation SELECT l'est tout autant sur la table. Pour plus d'informations, consultez Autorisations couvrantes/implicites (moteur de base de données).

    [!REMARQUE]

    Une instruction GRANT associée à une autorisation au niveau colonne se substitue à une instruction DENY au niveau objet.

  5. Identification de l'autorisation requise.

  6. Échec de la vérification des autorisations si l'autorisation requise est directement ou implicitement refusée à l'une des identités dans le contexte de sécurité pour les objets contenus dans l'espace d'autorisation.

  7. Succès de la vérification des autorisations si l'autorisation requise n'a pas été refusée et si l'autorisation requise contient une autorisation GRANT ou GRANT WITH GRANT directement ou implicitement accordée à l'une des identités dans le contexte de sécurité pour un objet contenu dans l'espace d'autorisation.

Exemples

Les exemples suivants montrent comment récupérer des informations relatives aux autorisations.

A. Retour de la liste complète des autorisations accordables

L'instruction suivante retourne toutes les autorisations du moteur de base de données à l'aide de la fonction fn_builtin_permissions. Pour plus d'informations, consultez sys.fn_builtin_permissions (Transact-SQL).

SELECT * FROM fn_builtin_permissions(default);
GO

B. Retour des autorisations sur une classe d'objets particulière

Vous pouvez également utiliser la fonction fn_builtin_permissions pour consulter toutes les autorisations disponibles pour une catégorie d'élément sécurisable donnée. L'exemple suivant retourne les autorisations sur les assemblys.

SELECT * FROM fn_builtin_permissions('assembly');
GO  

C. Retour des autorisations accordées à l'entité de sécurité en cours d'exécution sur un objet

Vous pouvez utiliser fn_my_permissions pour retourner la liste des autorisations effectives détenues par le serveur principal appelant sur un élément sécurisable spécifié. Pour plus d'informations, consultez fn_my_permissions (Transact-SQL). L'exemple suivant retourne les autorisations sur un objet nommé Orders55.

SELECT * FROM fn_my_permissions('Orders55', 'object');
GO

D. Retour des autorisations applicables à un objet spécifié

L'exemple suivant retourne les autorisations applicables à un objet nommé Yttrium. Notez que la fonction intégrée OBJECT_ID est utilisée pour récupérer l'identificateur de l'objet Yttrium.

SELECT * FROM sys.database_permissions 
    WHERE major_id = OBJECT_ID('Yttrium');
GO

Historique des modifications

Mise à jour du contenu

Ajout de cinq autorisations liées à FULLTEXT STOPLIST.

Ajout de l'autorisation ALTER ANY SERVER AUDIT pour SERVER et de l'autorisation ALTER ANY DATABASE AUDIT pour DATABASE.

Suppression de l'autorisation EXECUTE pour ASSEMBLY, qui n'existe pas.

Ajout de la section « Synthèse sur l'algorithme de vérification des autorisations ».