September 06, 2010     |
Network Toaster
SQL Security Forums
Note: SQLSecurity.com does not allow nor require registration due to privacy concerns for users. SQLSecurity.com is open and anonymous for all. Please report any abuse or profanity.
Reply To Message:
Posted By n/a on 11/22/2007 6:12:01 AM
Subject: XML definition of a SQL Server's server/db security?
Message: Can anyone suggest an XML structure that would allow a SQL Server 2005 instance's security setup to be defined? I am thinking about writing an app that would read such an XML file and do things like set up a new server with the security defined in the XML file. For example, create the logins, map the logins to a set of databases, define which db roles the db users belonged to, what object permissions applied and so on. The app, perhaps ASP.NET would need to present a form over this XML structure to allow developers here to input the permissions. Not sure how this part of it would hang together? I would also want to use SQL Server 2005 SMO to enumerate a SQL Server instance and its databases to construct all the security info into the same XML template. Maybe there is an app out there already written to do this?

Something perhaps like (not very well formed I am sure!)...

<\Logins>
<\database>
myDB
<\db roles>
db_role1
<\obj permissions>
select, myTable2
exec, myProc2
<obj permissions\>
db_role2
<\obj permissions>
select, myTable3
exec, myProc3
<obj permissions\>
<\db users>
db user 1
<\obj permissions>
select, myTable
exec, myProc
<obj permissions\>
<\db roles>
db_role1
<db roles\>
db user 2
<\obj permissions>
select, myTable
<obj permissions\>
<\db roles>
db_role1
db_role2
<db roles\>
<db users\>
<database\>
<Logins\>


Regards,
Clive Richardson
UserName: 
Subject:  XML definition of a SQL Server's server/db security?
Body:
  
Show Replies:


ActiveForums 3.6
Copyright 1999 by Chip Andrews   |  Privacy Statement  |  Terms Of Use