RE: Sql 2005 - how to allow users to decrypt table data using a database certificate ??
- From: petery@xxxxxxxxxxxxxxxxxxxx ("privatenews")
- Date: Wed, 12 Jul 2006 07:12:09 GMT
Hello,
Thank you for using Microsoft MSDN newsgroup. Great to meet you again. :-)
From your description, I understand that you'd like to know what permissionyou need to grant to user group so that they could use EncryptByCert and
DecryptByCert to read/write tables when necessary. If I'm off-base, please
let me know.
If the users have permission of the table, they could read the data
properly by using the decryptByCert function by refererence the certificate
ID. For example:
SELECT CustID, Name, City,
CONVERT(VARCHAR,
DecryptByCert(Cert_ID('User1Certificate'),
CreditCardType)) AS CardType,
CONVERT(VARCHAR,
DecryptByCert(Cert_ID('User1Certificate'),
CreditCardNumber)) AS CardNumber,
CONVERT(VARCHAR,
DecryptByCert(Cert_ID('User1Certificate'),Notes)) AS Notes
FROM Customer
Also, users need to have the proper permission on the certificate if they
want to use the certificate in a SQL statement. We shall grant the
permission to the user or group by using sth like:
grant control on certificate::certficatename to testuser
Please check the following link for details:
http://msdn2.microsoft.com/en-us/ms186278.aspx
Keep Bad Guys at Bay with the Advanced Security Features in SQL Server 2005
http://msdn.microsoft.com/msdnmag/issues/05/06/SQLServerSecurity/default.asp
x#S5
Also, you could refer to "Key access control" topic in the following
article to use a SP to use a broker to do this job:
http://www.microsoft.com/technet/prodtechnol/sql/2005/multisec.mspx
More relate inforamtion
http://blogs.msdn.com/yukondoit/articles/480854.aspx
http://blogs.msdn.com/lcris/archive/2005/12/20/506187.aspx
918346 The user is not assigned to a default schema when you use Windows
authentication to connect the user to SQL Server 2005
http://support.microsoft.com/default.aspx?scid=kb;EN-US;918346
If anything is unclear, please feel free to let us know. Have a great day.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- References:
- Prev by Date: Re: GRANT CREATE DATABASE TO a domain user account or group in SQL 2005
- Next by Date: Re: MSDE 2005 encryption
- Previous by thread: Sql 2005 - how to allow users to decrypt table data using a database certificate ??
- Next by thread: Re: Sql 2005 - how to allow users to decrypt table data using a database certificate ??
- Index(es):
Relevant Pages
|