473,566 Members | 3,273 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

limit the access

Hi, guys!

Some of my applications are sharing same SQL login/password to connect
to a database called "MyDB" on server "MyServer" . The password is
encrypted and stored in registry or some configuration file the
applications use. The applications use certain arithmetic to decrypt
the password and then connect to MyDB.

The problem is a few developers know the arithmetic. So virtually
there is no security here.

I am wondering whether I can do anything on the MyServer/MyDB to limit
the access to the database so that only connection from certain
servers are allowed. Say I only want connection with this known
credential to be established if it is from server "Mybox". No
connections from any other servers will be allowed. So even the
developers know the login/password, they won't be able to do anything
if they do have the access to server "MyBox".
(I know some of you would ask why I don't use application roles. Let's
say it's due to "historical " reasons and it's not totally up to me to
change the way the developers use database.)

Any idea? Triggers in Master? Not a good idea, isn't it?

Thanks in advance,

Gary
Jul 20 '05 #1
3 1962

"Gary" <ro************ @yahoo.com.au> wrote in message
news:17******** *************** ***@posting.goo gle.com...
Hi, guys!

Some of my applications are sharing same SQL login/password to connect
to a database called "MyDB" on server "MyServer" . The password is
encrypted and stored in registry or some configuration file the
applications use. The applications use certain arithmetic to decrypt
the password and then connect to MyDB.

The problem is a few developers know the arithmetic. So virtually
there is no security here.

I am wondering whether I can do anything on the MyServer/MyDB to limit
the access to the database so that only connection from certain
servers are allowed. Say I only want connection with this known
credential to be established if it is from server "Mybox". No
connections from any other servers will be allowed. So even the
developers know the login/password, they won't be able to do anything
if they do have the access to server "MyBox".
(I know some of you would ask why I don't use application roles. Let's
say it's due to "historical " reasons and it's not totally up to me to
change the way the developers use database.)

Any idea? Triggers in Master? Not a good idea, isn't it?

Thanks in advance,

Gary


Well, if you want real security then at a minimum you need to stop using
shared logins. Create a login for each user and developer, or use Windows
security which is generally preferred, create roles with limited permissions
etc. This is the standard best practice for MSSQL security:

http://www.microsoft.com/technet/pro.../sp3sec00.mspx

It sounds as if you're trying to hack something in, rather than step back
and fix the fundamental problems. If others in the organization claim it's
too much work, too restrictive etc. then make sure that the business users
and your boss know there is no security in place to prevent abuse of the
system - if they don't care, then fine, but make sure you get that in
writing... Assuming they do care, then you should be able to get the
authority to fix the situation.

To answer your original question, triggers on system tables aren't
supported, and the sysprocesses table which shows current connections isn't
a physical table anyway, it's a fake one which is created when you query it.
You could create a scheduled job which runs every few seconds, and KILLs any
SPIDs which are not from authorized hosts (using the HOST_NAME() function),
but that's really a nasty kludge, not a proper solution.

Simon
Jul 20 '05 #2
"Simon Hayes" <sq*@hayes.ch > wrote in message news:<41******* ***@news.bluewi n.ch>...
"Gary" <ro************ @yahoo.com.au> wrote in message
news:17******** *************** ***@posting.goo gle.com...
Hi, guys!

Some of my applications are sharing same SQL login/password to connect
to a database called "MyDB" on server "MyServer" . The password is
encrypted and stored in registry or some configuration file the
applications use. The applications use certain arithmetic to decrypt
the password and then connect to MyDB.

The problem is a few developers know the arithmetic. So virtually
there is no security here.

I am wondering whether I can do anything on the MyServer/MyDB to limit
the access to the database so that only connection from certain
servers are allowed. Say I only want connection with this known
credential to be established if it is from server "Mybox". No
connections from any other servers will be allowed. So even the
developers know the login/password, they won't be able to do anything
if they do have the access to server "MyBox".
(I know some of you would ask why I don't use application roles. Let's
say it's due to "historical " reasons and it's not totally up to me to
change the way the developers use database.)

Any idea? Triggers in Master? Not a good idea, isn't it?

Thanks in advance,

Gary
Well, if you want real security then at a minimum you need to stop using
shared logins. Create a login for each user and developer, or use Windows
security which is generally preferred, create roles with limited permissions
etc. This is the standard best practice for MSSQL security:

http://www.microsoft.com/technet/pro.../sp3sec00.mspx

It sounds as if you're trying to hack something in, rather than step back
and fix the fundamental problems.


Simon,

Thanks for this.

I think I am pretty familiar with the standard practice and you are
right that I don't have any chance (at least at this moment) to
rollback what the developers are doing so I can standardize the way of
database use.

If others in the organization claim it's too much work,
Yes they certainly do!

too restrictive etc. then make sure that the business users and your boss know there is no security in place to prevent abuse of the
system - if they don't care, then fine, but make sure you get that in
writing...
Good idea. I will try.

Assuming they do care, then you should be able to get the authority to fix the situation.
Again, they also DO care. That is why some "temporary solution" is
required
-:)... The good thing is I have been doing coding for more than 12
years so I know most of the tricks they have. I also have been using
MSSQL for about 7 years (not 24*7 DBA though). So I am now in a
position that I feel I know engouh to tell how bad they (including me)
are doing in regard to security while yet I don't know enough to come
up with this temporary solution for them.

To answer your original question, triggers on system tables aren't
supported, and the sysprocesses table which shows current connections isn't
a physical table anyway, it's a fake one which is created when you query it.
You could create a scheduled job which runs every few seconds, and KILLs any
SPIDs which are not from authorized hosts (using the HOST_NAME() function),
but that's really a nasty kludge, not a proper solution.

It is a pity we can't use supported database level triggers here. For
our Oracle databases, I have actually done this easily. Well, I will
continue to try before I get the mandate to enforce the proper way of
accessing database via applications in this company.

Thanks again. Simon

Jul 20 '05 #3
"Simon Hayes" <sq*@hayes.ch > wrote in message
news:41******** **@news.bluewin .ch...

"Gary" <ro************ @yahoo.com.au> wrote in message
news:17******** *************** ***@posting.goo gle.com...
Hi, guys!

Some of my applications are sharing same SQL login/password to connect
to a database called "MyDB" on server "MyServer" . The password is
encrypted and stored in registry or some configuration file the
applications use. The applications use certain arithmetic to decrypt
the password and then connect to MyDB.

The problem is a few developers know the arithmetic. So virtually
there is no security here.

I am wondering whether I can do anything on the MyServer/MyDB to limit
the access to the database so that only connection from certain
servers are allowed.


<snip>

Aside from everything else already mentioned, if you really want to limit
access to particular MACHINES/SERVERS, you may consider placing the SQL
Server behind a hardware- or software-based firewall and only opening the
appropriate ports to the appropriate addresses.
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4812
by: Colleyville Alan | last post by:
From the MS Access help I have seen the limits on number of fields in an index, objects in a db, etc. But I have seen no mention on a limit of rows. I am considering an application that would have a table that would have 3.5 million rows. Is there a limit on the number of rows specifically or is there merely a limit on the size of the total...
6
12343
by: Hannu | last post by:
Hi. In the ldb file you can see the users of the mdb-file. If you open the mdb-file your machine and username will be written in the lbd- file. Allthough you close the mdb-file your name won't disappear from the ldb-file, before every user has closed the mdb-file. I have heard that there will be problems if the amount of users will be over...
4
8887
by: bdotson | last post by:
Does anyone know the record limit for a single table in Access 97? I have a client who has over 800,000 records in one table. They are experiencing math problems and timeouts when running reports. Microsoft's KB didn't seem to have a good answer. I'm going to try to get them to convert to an Access or custom VB front end and SQL on the...
1
5001
by: SpreadPeace | last post by:
I'm hitting the 255 character limit of a text box on a form and was wondering if anyone know how to get around this. Here the scenario.... - Access 2000 front end with Sql Server backend. - The textbound is bound to a field which is nvarchar*4000 (I know with an Access DB you have to use a memo field to get around the size limit, I would...
3
2884
by: ken | last post by:
Hi, I was wondering how the 4k table record limit is counted. I have access 2k. I text fields are 256 chars. Memo fields are not included in the calculation. What about yes/no fields would that be just 1 char? also integers they are probably not included either? I just need to make sure none of my tables exceeds the limit. Thanks
16
4387
by: google | last post by:
Hello, I am working on an Acc2003 app for my company. In the interest of reducing chances of corruption due to unstable network connectivity, I would like to either prevent users from running it through a wireless connection, or limit their use to read-only. I have absolutely no idea if this is possible, and if so, how. Is there any way...
3
6815
by: John Taylor | last post by:
Tried to find any reference to this on the Microsoft help pages but can't find any reference - maybe I'm just not smart enough to find it. However; I have been working on a membership database where I "hold" a photograph in a table. All is working as would expect so I won't bore you with the details - it works almost identically to the...
5
10185
by: Nosferatum | last post by:
I am in need of a solution on how to solve this problem: I need to limit access to six different folders. My users are validated in a system which check their prescence with a couple of variables in a db and then forwards them if they exist. Based upoen their status they are redirected to one of six folders. Users belonging to group A shall...
5
7487
by: Chuck | last post by:
If the max size of an Access DB is about 2gb, and the DB is split, does each item have its own 2 gb limit or does the combined size of linked tables add to the size of the FE to get to the limit? Chuck --
5
13365
by: Martin | last post by:
I'm trying to adapt a PHP script that was written to use MySQL, so that it will work with an MSAccess MDB file. An important part of the script makes use of the SQL "LIMIT" keyword available in MySQL. eg: "SELECT MyField FROM MyTable LIMIT 40,10" to select 10 records beginning at the 41st record. Can anyone tell me how I can achieve this...
0
7584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8109
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7645
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7953
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2085
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1202
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.