Home » Developer & Programmer » Forms » Windows username and password (Oracle forms10g Version 10.1.2.0.2)
Windows username and password [message #613757] Sun, 11 May 2014 01:23 Go to next message
deepakmannazhi
Messages: 136
Registered: February 2010
Location: Dubai, UAE
Senior Member

Dear all
Is there any way to use Windows user name and password to log in to an oracle application?
We have an application running in oracle forms 10g
We are maintaining a user table where customized username s and passwords are stored.
Now the users want to use the same windows username and password to log in to our application.
As you know, we will get username using Webutil .
But we have no such options to get password.
Is there any method to use windows authentication

Thanks and regards
Deepak
Re: Windows username and password [message #613759 is a reply to message #613757] Sun, 11 May 2014 02:17 Go to previous messageGo to next message
John Watson
Messages: 8323
Registered: January 2010
Location: Global Village
Senior Member
Sure, use operating system authentication:

c:\>
c:\>whoami
jwvaio\john

c:\>sqlplus / as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Sun May 11 08:13:38 2014

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics, Real Application Testing
and Unified Auditing options

orclz> create user "OPS$JWVAIO\JOHN" identified externally;

User created.

orclz> grant connect to "OPS$JWVAIO\JOHN";

Grant succeeded.

orclz> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics, Real Application Testing
and Unified Auditing options

c:\>
c:\>sqlplus /

SQL*Plus: Release 12.1.0.1.0 Production on Sun May 11 08:14:47 2014

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics, Real Application Testing
and Unified Auditing options

orclz> sho user
USER is "OPS$JWVAIO\JOHN"
orclz>
If you want to connect across the network, set REMOTE_OS_AUTHENT to true (deprecated, but still works).
Re: Windows username and password [message #613760 is a reply to message #613759] Sun, 11 May 2014 03:00 Go to previous messageGo to next message
deepakmannazhi
Messages: 136
Registered: February 2010
Location: Dubai, UAE
Senior Member

Dear John,

Thanks a lot for your guidance.

For this method, we need to create separate database user for each OS user right?

We don't want to create separate database user. May be my question is little bit confusing.

We are having only one database schema, let us say Scott.

Our user table is like this


CREATE TABLE tmp_user
( user_id VARCHAR2(10),
user_passwd VARCHAR2(20),
user_desc VARCHAR2(200),
 user_start_menu_id VARCHAR2(10)
)

Insert into FZEXPRD_DBA.TMP_USER
   (USER_ID, USER_PASSWD, USER_DESC, OS_USER_ID)
 Values
   ('DEEP', '132', 'Deepak', 'gtfs.deepak');
Insert into FZEXPRD_DBA.TMP_USER
   (USER_ID, USER_PASSWD, USER_DESC, OS_USER_ID)
 Values
   ('ADMIN', '234', 'Admin', 'Administrator');
COMMIT;



User Deepak needs to use the same user name (gtfs.deepak) and windows password to access our oracle application.
username we will get by sys_context or by using web util.


Select sys_context('USERENV','OS_USER') into v_user from dual;
or 
v_user:=WEBUTIL_CLIENTINFO.GET_USER_NAME;



But for mapping password, I didn't find any method.

hope this is clear

Thanks and regards
Deepak




Re: Windows username and password [message #613761 is a reply to message #613760] Sun, 11 May 2014 03:41 Go to previous messageGo to next message
John Watson
Messages: 8323
Registered: January 2010
Location: Global Village
Senior Member
Ah, I misunderstood your question. I've read it a bit better now.

Your technique won't work (even if you could get the password) because you are using AS 10.x, where the forms run on an Application Server. That means that your sys_context call will return the OS_USER of the application Server, not the end user.

However, if the user has authenticated to his local Windows, you do not need to know his password. All you need is the username, to use as his identifier in your application. You could pass through the %USERNAME% environment variable as a parameter on the URL that invokes the form. Except that would be totally insecure, because any one can change it.

Possibly your users need to run the form with no username/password prompt, then if you can find a secure way of determining the user's Windows ID (extracting it from the registry, perhaps?) you would use that to determine who they are?

Re: Windows username and password [message #613762 is a reply to message #613761] Sun, 11 May 2014 04:52 Go to previous messageGo to next message
deepakmannazhi
Messages: 136
Registered: February 2010
Location: Dubai, UAE
Senior Member

Dear John,

Thanks

We will get client's OS user name using

WEBUTIL_CLIENTINFO.GET_USER_NAME function


Quote:
Possibly your users need to run the form with no username/password prompt, then if you can find a secure way of determining the user's Windows ID (extracting it from the registry, perhaps?) you would use that to determine who they are?



This one can be done then. But is this advisable Sad

Regards
Deepak

Re: Windows username and password [message #613763 is a reply to message #613762] Sun, 11 May 2014 05:16 Go to previous messageGo to next message
John Watson
Messages: 8323
Registered: January 2010
Location: Global Village
Senior Member
If you are confident that WEBUTIL_CLIENTINFO.GET_USER_NAME will return the Windows username and cannot be hacked so that it will return some other user's name, then this method should be 100% secure. As secure as Windows, anyway. I have no idea how WEBUTIL_CLIENTINFO.GET_USER_NAME gets its information, or if it can be fooled. Perhaps someone else knows.
Re: Windows username and password [message #613764 is a reply to message #613763] Sun, 11 May 2014 05:54 Go to previous messageGo to next message
deepakmannazhi
Messages: 136
Registered: February 2010
Location: Dubai, UAE
Senior Member

it will give user name no doubt Smile

Thanks a lot for your comments.
Let me check with authorized persons

Take Care

Deepak
Re: Windows username and password [message #622820 is a reply to message #613764] Sun, 31 August 2014 02:58 Go to previous messageGo to next message
yabushaib
Messages: 1
Registered: August 2014
Junior Member
Hi,

I could help you with this to login to ORACLE application using
Windows username and password.

Please send me an email on Yabushaib@yahoo.com
Re: Windows username and password [message #635044 is a reply to message #613757] Thu, 19 March 2015 07:30 Go to previous messageGo to next message
noraty18
Messages: 1
Registered: March 2015
Junior Member

If you are confident that WEBUTIL_CLIENTINFO.GET_USER_NAME will return the Windows username and cannot be hacked so that it will return some other user's name, then this method should be 100% secure. As secure as Windows, anyway. I have no idea how WEBUTIL_CLIENTINFO.GET_USER_NAME gets its information, or if it can be fooled. Perhaps someone else knows. Or you can check out if <url removed> could help you.


[EDITED by LF: Spam. URL removed as it has nothing to do with Oracle. Didn't delete the whole message as Craig has already replied to it.]

[Updated on: Thu, 19 March 2015 15:33] by Moderator

Report message to a moderator

Re: Windows username and password [message #635049 is a reply to message #635044] Thu, 19 March 2015 08:32 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
I don't understand why you don't just implement Single Sign-On with your application. This is much easier and less maintenance than trying to create your own security model and maintain your own separate list of Users and PW's.

Craig...
Re: Windows username and password [message #635095 is a reply to message #635049] Fri, 20 March 2015 04:41 Go to previous messageGo to next message
gazzag
Messages: 1082
Registered: November 2010
Location: Bristol, UK
Senior Member
This thread is almost a year old.
Re: Windows username and password [message #635111 is a reply to message #635095] Fri, 20 March 2015 11:17 Go to previous messageGo to next message
Michel Cadot
Messages: 67305
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

And the explanation is that the post contained a spam, this was its lone reason.

Re: Windows username and password [message #635116 is a reply to message #613757] Fri, 20 March 2015 11:58 Go to previous message
deepakmannazhi
Messages: 136
Registered: February 2010
Location: Dubai, UAE
Senior Member

Dear all,

As I mentioned above, we did that using web util function. So far it is working fine.

Thanks Smile
Deepak
Previous Topic: webutil_file_transfer
Next Topic: Overriding FRM-40654:Record has been updated by another user...
Goto Forum:
  


Current Time: Fri Aug 14 21:55:36 CDT 2020