473,666 Members | 2,461 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DB2 connect - user id question

Our websphere application uses a generic application userid to connect
and query db2 on z/os via DB2 connect. The end user,logs in to the
application using
his regular userid, which is then authenticated with the mainframe and
if its ok, then the application proceeds using the generic application
id. We are not
able to track the user in the DB2 on Mainframe.
Is there anyway I can pass the end userid along with the generic
userid, so I can know who is doing what ?

TIA
Nov 12 '05 #1
4 6049
Maybe you can use v8 registers like

CLIENT APPLNAME :

CLIENT USERID :

CLIENT WRKSTNNAME :

Have a look around these past threads :
http://groups.google.ca/groups?hl=en...abases.ibm-db2

latest db2 udb v8.x luw doc here:
http://publib.boulder.ibm.com/infoce...help/index.jsp

PM
"Wonderingu y" <wo*********@ho tmail.com> a écrit dans le message de
news:69******** *************** **@posting.goog le.com...
Our websphere application uses a generic application userid to connect
and query db2 on z/os via DB2 connect. The end user,logs in to the
application using
his regular userid, which is then authenticated with the mainframe and
if its ok, then the application proceeds using the generic application
id. We are not
able to track the user in the DB2 on Mainframe.
Is there anyway I can pass the end userid along with the generic
userid, so I can know who is doing what ?

TIA

Nov 12 '05 #2
This is a fundamental problem with 3-tier architectures that use
connection pooling. For web usage scalability, most web site designers
feel that the overhead of establishing a database connection is too
severe, so connections are left up in a shared pool. A websphere
task is assigned a connection out of the pool to do a particular
task, and then releases the connection back to the pool. The
downside of this is that it defeats the database security mechanisms,
so you only grant a set of privileges to the websphere connection
account. Moreover, this password is stored on the application server
machine, so you have to secure this machine from general access, perhaps
only giving permission to a small number of administrators to login to it.

If you don't need scalability to 10's of thousands of very small
transactions, but instead are using websphere to develop an OLTP
application, then you could turn off connection pooling on websphere
so that the user is authenticated for each connection. DB2 on LUW
(you may need v. 8 though) supports agent pooling which accomplishes
scalability of requests, but on "the other side of the fence" ie within
the DBMS where the DBMS can keep a connection open across many allocations
of an agent to it, and hence use user authentication. This should provide
more than adequate scalability for most OLTP applications. I don't know
if DB2 on z/OS supports agent pooling.

If you need scalability for web site workloads and don't want to fully
defeat database security mechanisms, there are two ways you can proceed.
One possibility would be to have multiple connection pools, each with a
different account for making database connections. That is, each connection
pool will have exactly one such account, but different connection pools will
have different accounts. Then, each of these accounts will correspond to
an application role, and can be given a set of database privileges
appropriate for the role. For instance, you might have five roles in an
application: role1 might be read-only for most but not all tables, excluding
some sensitive information; role2 might be the same as role1 but also
include insert privileges on the same set of tables; role3 might be
read-only for all tables; role4 might be select and insert on all tables;
and role5 might be select/insert/update/delete on all tables.

In such a model you would have 5 connection pools, each with their own
account. Each account would be granted the privileges associated with the
role. The application server, in this case websphere, would ensure that
users may only login to the roles they are allowed to assume.

The other possibility would be to use Java type 4 JDBC drivers with
certificates enabled. These drivers are not very mature, the folks I know
who have tried to use them have not had good success in getting them to
work, but I would expect they would stabilize in the next several months.
You need Kerberos or some authentication server supported both by the
JDBC drivers and DB2 with this technique. The idea is that when a user
authenticates, they are given an unforgeable certificate that assures their
identity to a software system. With a type 4 JDBC driver you can
associate one of these certificates with a database request, and the DBMS
can then have the connection process requests under the identity certified
by the certificate until the connection is freed and a new assignment of
the connection to a task results in a different certificate being
transmitted. I have not investigated how far along IBM is with DB2 in
terms of supporting this-- it is not in common usage today, but should be
in the next 6-12 months.

I hope that helps.

Joseph

wo*********@hot mail.com (Wonderinguy) writes:
Our websphere application uses a generic application userid to connect
and query db2 on z/os via DB2 connect. The end user,logs in to the
application using
his regular userid, which is then authenticated with the mainframe and
if its ok, then the application proceeds using the generic application
id. We are not
able to track the user in the DB2 on Mainframe.
Is there anyway I can pass the end userid along with the generic
userid, so I can know who is doing what ? TIA

Nov 12 '05 #3
> I don't know
if DB2 on z/OS supports agent pooling.

I believe that access to DB2 z/OS requires DB2 Connect, which has connection
pooling.
Nov 12 '05 #4
The problem is your design that "uses a generic application userid to
connect". Why don't you just use the real userid? Unlike some competing
databases, DB2 has almost no performance hit doing end-to-end security.

"Wonderingu y" <wo*********@ho tmail.com> wrote in message
news:69******** *************** **@posting.goog le.com...
Our websphere application uses a generic application userid to connect
and query db2 on z/os via DB2 connect. The end user,logs in to the
application using
his regular userid, which is then authenticated with the mainframe and
if its ok, then the application proceeds using the generic application
id. We are not
able to track the user in the DB2 on Mainframe.
Is there anyway I can pass the end userid along with the generic
userid, so I can know who is doing what ?

TIA

Nov 12 '05 #5

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

Similar topics

22
3230
by: James Kupernik | last post by:
Hello everyone! I'm hoping someone can shed some light on my ever daunting mysql/php problem. I'm currently trying to get a new server up and running using apache/php/mysql. Everything runs fine, except every so often (very random) mysql will not autenticate the username and password. Once you hit refresh it goes through fine.
10
4368
by: Ed Stevens | last post by:
A tale of woe, and a question . . . Last week my boss said to me "we've installed DB2 Connect on this Solaris box. Make it work." Now, I've barely seen DB2 Connect on Windows, having fumbled thru one install and config, with a lot of handholding from IBM Support. I'm comfortable in unix but have never dealt with DB2 Connect there. (my main job is as an Oracle DBA, and most of my db's are on Solaris or AIX) I've found the install...
4
6574
by: Terry Miller | last post by:
I have DB2 V8.2 loaded on a Redhat Enterprise Linux version 3 (RHEL 3) box. RHEL is configured to talk to LDAP for authenticaton besides the local passwd file. I can verify this by executing an su to a User Id that exists in LDAP and not in the local /etc/passwd file. Also verified that the connection to LDAP is working by ssh into the box. The problem I have is when I try to connect to a local DB2 Database using a User Id and Password...
3
4264
by: asemeiks | last post by:
I'm using Access 97, Jet 4.0. the data resides on a Win 2000 domain server. Using .Net 1.1 and IIS 5.0 on a local XPPro computer I am trying connect to a Jet database on the server. If the data source is on the local computer I can connect ok. If it is is on the server I cannot connect and get the following error. 'Error message. "The Microsoft Jet database engine cannot open the file ''. It is already opened exclusively by another...
5
4565
by: news.telia.net | last post by:
Hi! I have a question. I have installed php and mysql on an apache-server on windows and I can't connect to the server. I tried to create a database (since I am trying to learn howto). My manual said I should write this at the shell: c:\mysql\bin>mysqladmin -u root creare mindb I did this and got this error:
3
2716
by: roxrox_1959 | last post by:
I'm attempting to connect to a DB2 database using DBD::DB2 running on a Linux device. I'm getting the following error: ** connect: Unable to get database handle: DBI connect('p88flaq','ip88flaq',...) failed: SQL1042C An unexpected system error occurred. SQLSTATE=58004 at /usr/lib/perl5/site_perl/5.8.5/Oasis2/DBConn.pm line 2155 I've installed the DB2 client for the user in question:
3
2610
by: =?Utf-8?B?ZGF2aWQ=?= | last post by:
Last week I asked a question about connection to database from client machine (developer machine). I have changed the database security setup for "SQL Server and Windows" under (local)Windows NT node of Enterprise Manager. However, I could not setup a database connection to Server from Client using Server Explorer of Visual Studio 2005. The detail is in the following. Configuration of server and client: Server: Windows Server 2000, SQL...
3
2743
by: =?Utf-8?B?QWxpY2UgV2Vp?= | last post by:
Hi, I am not sure if this is the right place for me to post this question. I have a VB.NET program written up for a user-interface, and I wanted to connect this to a PHP script to allow back end processing. Is there a specific command such as import or connect to the PHP script for me to put in my current VB.NET program?
0
8454
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8878
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8785
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8560
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8644
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5671
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2012
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1778
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.