dbTalk Databases Forums  

sql server permissions on a field

comp.databases.ms-access comp.databases.ms-access


Discuss sql server permissions on a field in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Roger
 
Posts: n/a

Default sql server permissions on a field - 10-12-2010 , 09:41 AM






I'm using sql server 2005 with windows authentication and I have a
table tblEmployee
now I want to add a field called homeAddress varchar(200), but I want
to set its permissions so that only
the employee
his/her manager
the HR group

can view/edit the data

I'm using access2007 with a linked table to tblEmployee
how would I set the permissions in sql server ?
I'm thinking of a trigger, but how, within the trigger, do I capture
'who is trying to access the data', ie the windows user running the ms-
access application ?

Reply With Quote
  #2  
Old   
Rich P
 
Posts: n/a

Default Re: sql server permissions on a field - 10-12-2010 , 10:03 AM






You can set a group policy in the active directory of the windows server
and then set sql server permissions for that group - add the names of
the desired users to this group, then that group inherits the
permissions set at the sql server. Or you can set individual
permissions on the sql server per user. I think you are thinking of the
groups. That is done at the windows server level. Don't forget - it's
all Microsoft, and it is all integrated.

Rich

*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #3  
Old   
Bob Barrows
 
Posts: n/a

Default Re: sql server permissions on a field - 10-12-2010 , 10:18 AM



Roger wrote:
Quote:
I'm using sql server 2005 with windows authentication and I have a
table tblEmployee
now I want to add a field called homeAddress varchar(200), but I want
to set its permissions so that only
the employee
his/her manager
the HR group

can view/edit the data

I'm using access2007 with a linked table to tblEmployee
how would I set the permissions in sql server ?
I'm thinking of a trigger, but how, within the trigger, do I capture
'who is trying to access the data', ie the windows user running the
ms- access application ?
This is a large topic, so start by reading this article called
"Implementing Row- and Cell-Level Security in Classified Databases Using
SQL Server 2005":
http://technet.microsoft.com/en-us/l.../cc966395.aspx

As long as the linked table is connecting to sql server with integrated
security, the windows user is always known to the database engine. The
system function SUSER_SNAME() will return the login name of the
currently logged in user.

The following will need to be true:
1. The windows user name is stored in the employee's record.
2. Your database includes the data to identify the login name of the
manager of each employee
3. Your database includes the data to identify the login names of the
members of the HR group


--
HTH,
Bob Barrows

Reply With Quote
  #4  
Old   
Roger
 
Posts: n/a

Default Re: sql server permissions on a field - 10-12-2010 , 10:33 AM



On Oct 12, 9:03*am, Rich P <rpng... (AT) aol (DOT) com> wrote:
Quote:
You can set a group policy in the active directory of the windows server
and then set sql server permissions for that group - *add the names of
the desired users to this group, then that group inherits the
permissions set at the sql server. *Or you can set individual
permissions on the sql server per user. *I think you are thinking of the
groups. *That is done at the windows server level. *Don't forget - it's
all Microsoft, and it is all integrated.

Rich

*** Sent via Developersdexhttp://www.developersdex.com***
yes, I've already tested the group creation, thus the HR group, so I
know that works
but I don't want you to see my homeAddress, just yours
so Bob's SUSER_SNAME() in a trigger should work, I just have to
review his link

Reply With Quote
  #5  
Old   
paii, Ron
 
Posts: n/a

Default Re: sql server permissions on a field - 10-12-2010 , 10:43 AM



"Roger" <lesperancer (AT) natpro (DOT) com> wrote

Quote:
I'm using sql server 2005 with windows authentication and I have a
table tblEmployee
now I want to add a field called homeAddress varchar(200), but I want
to set its permissions so that only
the employee
his/her manager
the HR group

can view/edit the data

I'm using access2007 with a linked table to tblEmployee
how would I set the permissions in sql server ?
I'm thinking of a trigger, but how, within the trigger, do I capture
'who is trying to access the data', ie the windows user running the ms-
access application ?
On the FE, why not adjust the form or report query to show only information
available to the user? That way they will not get error messages about the
special table/row/column permissions setup in SQL server.

Reply With Quote
  #6  
Old   
Roger
 
Posts: n/a

Default Re: sql server permissions on a field - 10-12-2010 , 11:15 AM



On Oct 12, 9:43*am, "paii, Ron" <n... (AT) no (DOT) com> wrote:
Quote:
"Roger" <lesperan... (AT) natpro (DOT) com> wrote in message

news:8f5a433b-bec3-43fd-9f00-c43f9a75ee39 (AT) j18g2000yqd (DOT) googlegroups.com...

I'm using sql server 2005 with windows authentication and I have a
table tblEmployee
now I want to add a field called homeAddress varchar(200), but I want
to set its permissions so that only
* *the employee
* *his/her manager
* *the HR group

can view/edit the data

I'm using access2007 with a linked table to tblEmployee
how would I set the permissions in sql server ?
I'm thinking of a trigger, but how, within the trigger, do I capture
'who is trying to access the data', ie the windows user running the ms-
access application ?

On the FE, why not adjust the form or report query to show only information
available to the user? That way they will not get error messages about the
special table/row/column permissions setup in SQL server.
because smart users can link tables to another mdb and see the data
so permission must done on sql server at the table / field level
my employee table already stores the windows login, SUSER_SNAME()
should work
I just need to test it all

Reply With Quote
  #7  
Old   
paii, Ron
 
Posts: n/a

Default Re: sql server permissions on a field - 10-12-2010 , 02:28 PM



"Roger" <lesperancer (AT) natpro (DOT) com> wrote

On Oct 12, 9:43 am, "paii, Ron" <n... (AT) no (DOT) com> wrote:
Quote:
"Roger" <lesperan... (AT) natpro (DOT) com> wrote in message

news:8f5a433b-bec3-43fd-9f00-c43f9a75ee39 (AT) j18g2000yqd (DOT) googlegroups.com...

I'm using sql server 2005 with windows authentication and I have a
table tblEmployee
now I want to add a field called homeAddress varchar(200), but I want
to set its permissions so that only
the employee
his/her manager
the HR group

can view/edit the data

I'm using access2007 with a linked table to tblEmployee
how would I set the permissions in sql server ?
I'm thinking of a trigger, but how, within the trigger, do I capture
'who is trying to access the data', ie the windows user running the ms-
access application ?

On the FE, why not adjust the form or report query to show only
information
available to the user? That way they will not get error messages about the
special table/row/column permissions setup in SQL server.

because smart users can link tables to another mdb and see the data
so permission must done on sql server at the table / field level
my employee table already stores the windows login, SUSER_SNAME()
should work
I just need to test it all
You may have other security issues if someone can link to SQL server with
any old copy of Access and see tables/rows/columns to which you have not
given them rights.

Reply With Quote
  #8  
Old   
Bob Barrows
 
Posts: n/a

Default Re: sql server permissions on a field - 10-12-2010 , 02:44 PM



paii, Ron wrote:
Quote:
"Roger" <lesperancer (AT) natpro (DOT) com> wrote in message

news:78305427-1f66-4d77-b541-f26ae79002c4 (AT) a36g2000yqc (DOT) googlegroups.com...
On Oct 12, 9:43 am, "paii, Ron" <n... (AT) no (DOT) com> wrote:
"Roger" <lesperan... (AT) natpro (DOT) com> wrote in message


news:8f5a433b-bec3-43fd-9f00-c43f9a75ee39 (AT) j18g2000yqd (DOT) googlegroups.com...

I'm using sql server 2005 with windows authentication and I have a
table tblEmployee
now I want to add a field called homeAddress varchar(200), but I
want to set its permissions so that only
the employee
his/her manager
the HR group

can view/edit the data

I'm using access2007 with a linked table to tblEmployee
how would I set the permissions in sql server ?
I'm thinking of a trigger, but how, within the trigger, do I capture
'who is trying to access the data', ie the windows user running the
ms- access application ?

On the FE, why not adjust the form or report query to show only
information available to the user? That way they will not get error
messages about the special table/row/column permissions setup in SQL
server.

because smart users can link tables to another mdb and see the data
so permission must done on sql server at the table / field level
my employee table already stores the windows login, SUSER_SNAME()
should work
I just need to test it all

You may have other security issues if someone can link to SQL server
with any old copy of Access and see tables/rows/columns to which you
have not given them rights.
Not true if permissions are set within the SQL Server.
--
HTH,
Bob Barrows

Reply With Quote
  #9  
Old   
Rich P
 
Posts: n/a

Default Re: sql server permissions on a field - 10-12-2010 , 03:09 PM



You need to create either more groups or give individuals permission to
each userID on the sql server

Rich

*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #10  
Old   
paii, Ron
 
Posts: n/a

Default Re: sql server permissions on a field - 10-12-2010 , 03:15 PM



"Bob Barrows" <reb01501 (AT) NOyahoo (DOT) SPAMcom> wrote

Quote:
paii, Ron wrote:
"Roger" <lesperancer (AT) natpro (DOT) com> wrote in message

news:78305427-1f66-4d77-b541-f26ae79002c4 (AT) a36g2000yqc (DOT) googlegroups.com...
On Oct 12, 9:43 am, "paii, Ron" <n... (AT) no (DOT) com> wrote:
"Roger" <lesperan... (AT) natpro (DOT) com> wrote in message


news:8f5a433b-bec3-43fd-9f00-c43f9a75ee39 (AT) j18g2000yqd (DOT) googlegroups.com...

I'm using sql server 2005 with windows authentication and I have a
table tblEmployee
now I want to add a field called homeAddress varchar(200), but I
want to set its permissions so that only
the employee
his/her manager
the HR group

can view/edit the data

I'm using access2007 with a linked table to tblEmployee
how would I set the permissions in sql server ?
I'm thinking of a trigger, but how, within the trigger, do I capture
'who is trying to access the data', ie the windows user running the
ms- access application ?

On the FE, why not adjust the form or report query to show only
information available to the user? That way they will not get error
messages about the special table/row/column permissions setup in SQL
server.

because smart users can link tables to another mdb and see the data
so permission must done on sql server at the table / field level
my employee table already stores the windows login, SUSER_SNAME()
should work
I just need to test it all

You may have other security issues if someone can link to SQL server
with any old copy of Access and see tables/rows/columns to which you
have not given them rights.

Not true if permissions are set within the SQL Server.
--
HTH,
Bob Barrows


I hope it's not true, but Roger stated above that "smart users can link
tables to another mdb and see the data". Which I assumed he has seen happen.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.