Application Roles And Module Signing
Feb 12, 2007
Hi, Am migrating my SQL 2000 legacy app to SQL2005 and am dealing with restrictions on the underlying system tables. Have taken advice that Granting VIEW state to all users is heavy handed (especially meta data access at SERVER level). Now looking at Module signing which is great. I can supply SP's which target the few System table/ information schema fields that I require. Now I Sign the Sp's cool, now I grant exec rights to the application role (doesn't work). Create a db role and put my users in it, okay grant role exec on Sp's (fine they work).
However my application runs under an application role always, so my users rights are ignored and it appears that its only the users not the approles who can benefit from the module signing ? I know I can switch too and from approle using cookies but I seem to be going round in cirlces here.
Essentially is there any 'EASY' and 'CONTROLLED' way that my application user who has no rights, who immediately switches to the application role can see the dbName (All rows ) from master.sysdatabases ?
Thansk for any advice
View 7 Replies
ADVERTISEMENT
Mar 5, 2006
Hello,
I am new user of SQL Server. I have some problems with these words. I want to make my database works in my specified permissions. I will specify permissions with schemas and these schema wants an owner. I want this owner should be my user. When creating a user it needs a valid login. I am selecting my login and it occurs and error says this login has an different user. I am specifying permissions with roles. But i can't make association all of them. I hope i told my problem to you as well. If you explain these words to me and tell me how can i do my database's works with my own schemas, users and roles i'll be grateful. Thanks for advices.
Happy coding...
View 4 Replies
View Related
Aug 24, 2006
After reading Books Online, I am still confused with Database Role vs Application role.
My intention is to control the end users' authority on the database, where the end users will access through Winforms client application. With proper assignment of schema and database roles to an user, I believe this will enough to control the permisison of an user.
If this is the case, why Application role exists? When and why should I use Application Role? How is it different from Fixed Database Role?
View 14 Replies
View Related
Nov 1, 2004
Hi there
Can anyone point me to a good tutorial or give me a run down on using Sql Application roles from my asp.net application. Books Online only give a run down on how to set it up - not how to implement or use it from my code. MSDN no help. Google - same thing.
Any help greatly appreciated.
Thanks in advance
View 2 Replies
View Related
Mar 20, 2008
We have a distributed app that creates it's own instance of sqlexpress when installing. This prevents anyone with sa rights on another instance from accessing our data directly (HIPAA compliance concerns). We are currently looking into making our app easier to install, and want to be able to attach our database to existing instance (if one exists), but still prevent the sa account of that instance from directly accessing/viewing our data. Are application roles the way to accomplish this, is there another way, or is this even possible?
Thanks in advance.
View 5 Replies
View Related
Aug 8, 2007
Is it possible to change the EXECUTE AS principal on a module (such as a stored procedure or function) without having to redefine the entire module in an ALTER statement? I didn't find anything in BOL about it in the ALTER PROCEDURE or ALTER FUNCTION articles. If there is a system sproc that does it, I couldn't find it. Changing system tables is not an option (assuming that is an option) for me.
View 1 Replies
View Related
Jul 17, 2000
We are looking to make our applications as secure as possible. I am interested in how well Application Roles work to make security tighter.
Have you used Application Roles. If you have, I'd like to know if it helped provide better security or not and if it did, how was it implmented in you production environment. I already know how to get it set up, I'm just wondering if it's really worth the trouble.
Thanks!
View 2 Replies
View Related
May 22, 2003
I may need to setup an application role(s) fro a SQL 2000 db that is being front-ended by VB6. There are 2 types of functions needed, and admin role with access to all tables, and a user role with access to only specific tables. I know from just a straight db roles, I could set up 2 roles, set their rights, and then add the users to these roles. My questions is if I need the same functionality for an Application role, do I need 2 Application roles, one for the admin, and the other for the user?
View 1 Replies
View Related
Jun 13, 2006
We have an an application that was written using OLE DB (ADO) against a SQL 2000 Server that uses an Application role to give rights to the database objects. It connects, calls sp_setapprole and goes on. If the database needs to LOCK a record, it is creating a new ADO Connection and instantiating the Approle again. This model has been working fine up til now.
Now we are installing a SQL 2005 server for the latest version of the product we are working on and are running into an error. The error is
Error: 18059, Severity: 20, State: 1.
The connection has been dropped because the principal that opened it subsequently assumed a new security context, and then tried to reset the connection under its impersonated security context. This scenario is not supported. See "Impersonation Overview" in Books Online.
It's happening when the second ADO Connection for locking a record is being created and the sp_setapprole is being executed.
One of my questions is what is the problem with executing the approle on a different connection? Our code has not changed, so obviously SQL 2005 is doing something different. The other is What can we do to correct this?
Is the resource pooling different? We had problems in the beginning with approles and figured out through research that we needed to add OLE DB Services=-2 to the connection string to turn off resource pooling.
Is there an extra step to using Approles in SQL 2005?
Any help would be greatly appreciated as we need to resolve this ASAP.
Thanks,
David
View 5 Replies
View Related
Apr 30, 2007
I want to test Application Roles security for our project, I guess it serves the purpose.
But the quesion I have is if a developer who can look at the application code know's the "Password" can he set the password from Query Analyser and get acess to the database.
Thanks!
View 4 Replies
View Related
Mar 13, 2007
Hello,
in SQL Server 2005 I have an application role that is being used to limit access to my server data from third party applications. Everything is working well, except changing the Application role password.
I set up a small form that allows an administrator to change the App Role password through the front end app. I cannot, however, seem to get the Password field in my approle to accept a parameter.
For example:
declare @newpassword varchar(128)
set @newpassword = 'foo'
ALTER APPLICATION ROLE MyApplicationRole
with PASSWORD = @newpassword
This procedure gives me a syntax error in the last line. It will accept a string in quotes but not a varchar parameter.
Ideas?
View 3 Replies
View Related
Aug 25, 2005
I have an application that segregates data into two differentdatabases. Database A has stored procs that perform joins betweentables in database A and database B. I am thinking that I have reachedthe limits of Application Roles, but correct me if I am wrong.My application creates a connection to database A as 'testuser' withread only access, then executes sp_setapprole to gain read writepermissions. Even then the only way 'testuser' can get data out of thedatabases is via stored procs or views, no access to tables directly.Anyone know of a solution? Here is the error I get:Server: Msg 916, Level 14, State 1, Procedure pr_GetLocationInfo, Line38Server user 'testuser' is not a valid user in database 'DatabaseB'The system user is in fact in database A and B.thanksJason Schaitel
View 4 Replies
View Related
Nov 24, 2007
Hi all:
[Posting this in the security forum because in this forum I found a related post.]
I have a problem with SQL Server 2005 and application roles and pooling. I needed to use application roles and I needed to use pooling at the same time for an application. I am using sp_setapprole and sp_unsetapprole. In order to ensure that the application role is always set and unset by the application, I actually developed a custom Data Provider based on the SqlClient Data Provider. I have a custom Connection and Command class that wrap the SqlClient versions. Upon opening my custom Connection class, I execute the sp_setapprole stored procedure. Upon closing or disposing the connection, I call sp_unsetapprole.
This works fine in 99% of my tests. However, I have three or four methods (always the same ones, but one only fails ever so often) that fail, but only under the following circumstances:
Pooling is turned on (but pool size doesn't matter)
I am using my custom Data Provider (using System.Data.SqlClient does not cause this issue... but I am also not using approles then)
When other tests have run in the same test run. I.e. when I run the failing methods by themselves in a test run, there is no problem.
So it seems to me that the problem is related to using application roles with pooling turned on. For scalability reasons, we cannot turn pooling off. When the methods fail, I see the following two (2) entries in the SQL Log:
Error: 18059, Severity: 20, State 1.
The connection has been dropped because the principal that opened it subsequently assumed a new security context, and then tried to reset the connection under its impersonated security context. This scenario is not supported. See "Impersonation Overview" in Books Online.
I understand the error message somewhat. However, I am not sure why the "reset" of the connection occurs. My code does not call reset anywhere, so it must be something that happens in the background.
I am reviewing code to see if there is possibly a situation where the sp_unsetapprole procedure does not get called or does not get called successfully, but there is a lot of code (in many custom components).
I would like to know if anyone has a suggestion on how to solve this problem, or, find the code that may be causing the problem.
Thanks in advance,
SA.
View 3 Replies
View Related
Jun 16, 2006
hi everyone,
I'm just a whole newbie for that. I imagine that at first is needed a certificate commited for a company.
Any link or whatever will be very appreciated.
cheers,
View 3 Replies
View Related
Jun 18, 2007
Coldfusion Web appls from Oracle to SQL Server 2005 - How to use Application Roles in Coldfusion.
Is there anyone who has used application roles in Coldfusion Applications? How would you set this up?
I know how to set up application roles. If you establish your application role and you move from one page to another, how would you run cfquery since you loose your initial user connection in place of the application role connection. Are there alternatives to using application roles in Coldfusion?
Sample code would be helpful.
TF
View 4 Replies
View Related
Jan 28, 2004
Can you write a stored procedure to add a user to your DB and set the roles the user belongs to?
I want to write a stored proc. to add users and set roles so it can be used in code instead of doing it manually.
After the user has been added and their roles set, can you write another stored proc. to give you what roles they belong to?
View 3 Replies
View Related
Jun 16, 2006
Apologies if my post does not fit into this forum. I initially tried the SQL Server Data Access forum but I now think my question is more security related.
Is it possible for a web user who has been successfully authenticated with forms authentication to be authorised to use a SQL Server 2000 role depending on a particular ASP.NET 2.0 role that they have been authorised to use? I understand that that I can assign a SQL Server 2000 role to the ASPNET or NETWORK SERVICE account but this will grant access to anonymous web users to the database role. I can ensure that I only call stored procedures which access sensitive data in web pages that are in restricted by ASP.NET roles. However, it would be nice to also restrict stored procedures via the ASP.NET 2.0 Forms Authentication roles.
If this is not possible have you got any bright ideas how I could restrict access to stored procedures who are anonymous web users.
Many thanks,
Mark
View 1 Replies
View Related
May 6, 2007
I'm developing an ASP.NET2.0 application which accesses a SQL Server 2005 Express database. I plan to use integrated security for access to the database.
I'm confused about the relationships between Windows groups, the ASP.NET web.config file <allow roles=.../> and SQL Server roles.
I would like to create a Windows group to which I can assign multiple users and grant that group access to a Web Site using windows authentication and also grant that windows group access to the database my web application uses.
I have gotten the combination of Windows Authentication to the web site and to the database to work for a specific windows user but I am having trouble determining the combination of database security entities I must create to allow access to my database by members of the windows group.
For a Windows user:
1. Create Windows user
In SQL Express
2. CREATE LOGIN FROM WINDOWS WITH DEFAULT_DATABASE =
3. CREATE USER FOR LOGIN
4. CREATE ROLE
5. EXEC sp_addrolemember <role-name> <user-name>
For a Windows group, what would be the equivalent commands necessary to grant a windows group access to my database? Specifying the Windows Group name in sp_addrolemember does not appear to be sufficient even though the documentation states that a windows group name is a valid value for the member name argument.
View 3 Replies
View Related
May 3, 2005
Hi! Can anyone say which ms sql server predefined roles are similar to the following oracle predefined roles: dba, connect, resource. I already know that sysadmin in MS SQL Server is the same as DBA in Oracle but what about the rest?
Thanks a lot.
View 4 Replies
View Related
Mar 2, 2006
I am in the process of locking down the SQL Server in an environment that is considered to be in production (pilot stages) and there is no staging or test environment that mirrors it. I need assistance in determining the server and database roles to assign to existing logins, most of which currently have sa and dbowner rights. Because it is not a development environment, I need to be sure that downgrading the server and/or database level permissions will not break any functionality.
I'm starting with the logins that have the SA fixed server role. These logins need to be able to install applications that require the use of a backend database, which will be stored on SQL Server. In addition, through the installation process a new login/password for the newly created database(s) is normally created. For the existing logins with the SA fixed server role, will downgrading to the securityadmin and dbcreator roles be sufficient to facilitate those needs, or are those too much/ too little? And should any user account ever be granted the SA role? If so, what questions could I ask to determine this need?
Since these install process for these applications usually prompt to install using SA or local system account to authenticate to SQL to create the new database(s), that account should have securityadmin and dbcreator roles to create the database and its tables, as well as add a new login to that database.
Please address this question, keeping in mind that the logins will only be performing the described actions, installing apps using SQL Server as the backend database and adding a login to that database (which may or may not be done during the installation process).
Thank you,
nu_dba
View 1 Replies
View Related
May 6, 2007
okay so pretty much I am using the asp.net 2.0 membership/roles.i wanna make a search box that users can type in a name and it will search the database. most likely in the table "aspnet_Users"so when users search i want it to be like this:cmd = select * from [table] WHERE username = textbox1.text (ofcourse with parameters instead of concatenation).but i want it to have a "like" in thereso if the users type in "fenix" they should get results matching CLOSE to fenix. so masfenix, fenix, fenxi, and you know related names. that are similar. should I use LIKE? and if so HOW do i use that?is it just gonna becmd = select * from [table] where Username LIKE @username@username = textbox1.text ?thanks
View 3 Replies
View Related
Jul 20, 2005
Hello everyone! This is my first post so please bear with me. We haverecently re-vamped an Access application such that in each of our 5locationsa local SQL server receives published updates from our main office server.Remote servers also send their local updates to the master and they are inturn propogated to all of the other remote servers. The new design worksgreat except for one annoying bug we have been chasing for two weeks:"Faulting application msaccess.exe, version 9.0.0.2719, faulting modulemso9.dll, version 9.0.0.2720, fault address 0x0007ee2d." When a user getstheerror, they hit close and it terminates Access. If they move the error offthe screen and continue working the application continues. They havediscovered this and have been doing so but the fact that the error appearsmust be fixed. If anyone can point me in the right direction it would bemuchly appreciated. Thanks in advance!- Markmweber_at_warrenlumber_dot_com
View 1 Replies
View Related
Apr 23, 2008
when I click on the lookups tab with SQL Server 2005 Legacy DTS I get the following error.
The specified module could not be found. (ERROR_MOD_NOT_FOUND)
Some modules the query builder depends on could not be found. The query builder designer will not be functional.
What module is this and how do I get it?
View 5 Replies
View Related
Nov 15, 2007
Dear All,
I am facing one problem on my SQL server 2000.
While accessing some records from the database I am getting this error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver]Unable to load communication module. Driver has not been correctly installed.
I am using ODBC connection with sql authentication
How to solve this issue.
with regards
Shaji
View 1 Replies
View Related
Dec 20, 2007
Hi,
I tried to change / add password in SQL Server Compact Edition 2005 (in Mobile 5.0) via SQL Server Management Studio. As a result I got an error: "The specified module could not be found." I wonder why and how can I change the (blank) password to a new one?
Regards and thanks in advance,
Mixxo
View 4 Replies
View Related
Feb 23, 2007
when i trying to make run the sql server in the sql server configuration I recieve this message the specific module could not be found [08007007e]. I wnat to know how to solve it
View 3 Replies
View Related
Apr 25, 2007
Help please. I have a custom assembly that was written in vb.net 2003 which is working great on RS2000 and also on RS2005 on my development machine. To get it to work on RS2005 all I had to do was copy it into the ...MSSQL.3Reporting ServicesReportServer folder. The assembly is named prjCheckDate and is simply a function to calculate dates where the user types in a "T-x" string, the x is number of days backwards from today, and returns that actual date.
On the customer's production machine, when I try to upload the report RDL, via Report Manager, I get the following: "Error while loading code module: €˜prjCheckDate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null€™. Details: Could not load file or assembly 'prjCheckDate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied. (rsErrorLoadingCodeModule) Get Online HelpError in class instance declaration for class prjCheckDate.classSymDate: [BC30002] Type 'prjCheckDate.classSymDate' is not defined. (rsCompilerErrorInClassInstanceDeclaration) Get Online Help
There is an error on line 11 of custom code: [BC30451] Name 'prjCheckDate' is not declared. (rsCompilerErrorInCode) Get Online Help "
I have gone to the rssrvpolicy.config file and added a code group as follows: "
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="prjCheckDAte.dll"
Description="This is custom assembly for T-x date format processing">
<IMembershipCondition class="UrlMembershipCondition"
version="1"
Url="C:Program FilesMicrosoft SQL ServerMSSQL.3Reporting ServicesReportServerinprjCheckDate.dll"
/>
</CodeGroup>"
This was added immediately after the existing entry for the URL membership "$CodeGen$/*" area per MSDN (ms152828).
I'm still getting the same error. I did not get to reboot the server this is on as it is a production machine and the client is hesitant to allow a reboot since this machine is used to log time and attendance and needs to be available 24x7.
Appreciate any help. Thanks. Jim
View 4 Replies
View Related
Apr 15, 2007
Hi,
I'm looking for some guidance/help regarding setting up a sa - lite account in SQL 2005. I need to give another admin rights to create/monitor maintenance plans, backup and restore databases, monitor performance/logins, but NOT be able to have any rights on several tables (and of course not being able to set user permissions).
I've tried using server and db roles but haven't been able to determine how to give someone w/o full sa rights access to maintenance plans.
If you can think of soemthing, please let m eknow.
Jenn
View 4 Replies
View Related
Mar 10, 2004
I have MS SQL Server 2000 DB.
I have created a User and created some tables for the same.
I created a Role named A and granted Select Permissions for few tables to that roles.
When I created another Role named B and added this role (A) to B, the permissions are not being xferred to B. Bcos of which, if i assign an User to Role B, he is not able to select the tables for which permissions have been given thru role A.
Note : If i give assign directly the user to Role A, it is working. But i want to assign User to role A only thru B.
View 1 Replies
View Related
Mar 5, 2015
With this query i get only the records i need, but i would like to output in this way
1 - 20
21 - 30
31 - 40
of course in the real environment the ID are not consecutive, this is just one example of data.
declare @temp table (ID int)
declare @i int = 1
while(@i<1000) begin
insert into @temp values (@i)
set @i=@i+1
end
select ID from (
select ID, row_number() over (order by ID)
as rn
from @temp
) q where (rn % 20=0) OR (rn % 20=1)
View 3 Replies
View Related
Jun 20, 2008
when i create a new database in microsoft sql server management studio,following error message is occurred;
===================================
Cannot show requested dialog.
===================================
The specified module could not be found. (Exception from HRESULT: 0x8007007E) (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Program Location:
at Microsoft.SqlServer.Management.Common.ServerConnection.GetStatements(String query, ExecutionTypes executionType, Int32& statementsToReverse)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand)
at Microsoft.SqlServer.Management.SqlManagerUI.CreateDatabaseGeneral.Microsoft.SqlServer.Management.Sql Mgmt.IPanelForm.OnSelection(TreeNode node)
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.DynamicallyEmbedUserControl(ViewI nfo vi, TreeNode node)
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.SetView(Int32 index, TreeNode node)
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.SelectCurrentNode()
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.InitializeUI(ViewSwitcherTreeView treeView, ISqlControlCollection viewsHolder, Panel rightPane)
at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm.InitializeForm(XmlDocument doc, IServiceProvider provider, ISqlControlCollection control)
at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm..ctor(XmlDocument doc, IServiceProvider provider)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolsMenuItem.OnCreateAndShowForm(ISe rviceProvider sp, XmlDocument doc)
at Microsoft.SqlServer.Management.SqlMgmt.RunningFormsTable.RunningFormsTableImpl.ThreadStarter.StartTh read()
----------end of error message--------------------------
Microsoft.SqlServer.Management.Common package is situated in
Microsoft.VisualStudio.vspConnectionInfo.dll.
This dll also exist in the same folder path(D:Program FilesMicrosoft SQL Server90ToolsBinnVSShellCommon7IDE
) with SqlWb.exe(SQL Server Management Studio).
i assume that dll can't be known by exe.
how can i make exe know dll. or, is my assumption wrong?
if so, how can i make it work?
Thanks in advance,
View 2 Replies
View Related
Apr 10, 2008
Can i share a function module to all the reports in a report project, that i can use the functions in the formating or expressions. Is there any way to add a assembly reference to the project and can include all the functions in an assembly file?
View 6 Replies
View Related
Sep 1, 2006
Hi!
i am getting this error when i execute the package in production environment
Source: Select Tickets DTS.Pipeline
Description: The module containing "component "Conditional Split" (142)" cannot be located, even though it is registered.
End Error
Error: 2006-09-01 14:03:40.36
Code: 0xC004706E
Source: Select Tickets DTS.Pipeline
Description: The module containing "component "Data Conversion" (5863)" cannot be located, even though it is registered.
End Error
Error: 2006-09-01 14:03:40.36
Code: 0xC004706E
Source: Select Tickets DTS.Pipeline
Description: The module containing "component "OLE DB Source" (1)" cannot be located, even though it is registered.
End Error
Error: 2006-09-01 14:03:40.36
Code: 0xC004706E
Source: Select Tickets DTS.Pipeline
Description: The module containing "component "Excel Destination" (4516)" cannot be located, even though it is registered.
End Error
Error: 2006-09-01 14:03:40.36
Code: 0xC004706E
Source: Select Tickets DTS.Pipeline
Description: The module containing "component "Flat File Destination" (6486)" cannot be located, even though it is registered.
End Error
Progress: 2006-09-01 14:03:40.36
Source: Select Tickets
Validating: 0% complete
End Progress
Error: 2006-09-01 14:03:40.37
Code: 0xC0048021
Source: Select Tickets Conditional Split [142]
Description: The component is missing, not registered, not upgradeable, or missing required interfaces. The contact information for this component is "Conditional Split;Microsoft Corporation;Microsoft SqlServer v9; (C) 2005 Microsoft Corporation; All R
ights Reserved; http://www.microsoft.com/sql/support;0".
End Error
Error: 2006-09-01 14:03:40.37
Code: 0xC0047017
Source: Select Tickets DTS.Pipeline
Description: component "Conditional Split" (142) failed validation and returned error code 0xC0048021.
End Error
Progress: 2006-09-01 14:03:40.37
Source: Select Tickets
Validating: 20% complete
End Progress
Error: 2006-09-01 14:03:40.37
Code: 0xC004700C
Source: Select Tickets DTS.Pipeline
Description: One or more component failed validation.
End Error
Error: 2006-09-01 14:03:40.37
Code: 0xC0024107
Source: Select Tickets
Description: There were errors during task validation.
End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started: 2:03:39 PM
what is the problem? any one who has faced this
any solution
thanks,
jas
View 1 Replies
View Related