OS Authentication with Entity Framework

OS Authentication with Entity Framework

Postby jpl » Mon 26 Jul 2010 12:01

Hi,

I have successfuly used dot connect 4.75 in direct mode for an application with the use of Entity Framework. Hower the application must now be modified so that the connection must be done via OS authentication, and I don't know exactly how to achive that. From what I understand in the documentation, I only have to :

1) Use an external client to connect through OCI. But what is that ? Is ODAC from Oracle enough on the client computer for that ?

2) modify the connection string. But what is the connection string syntax ? For example in direct mode I have :

"User Id=bob;Password=bobpwd;Server=someServer;Direct=True;Sid=someService;"

How must be the connection string in non direct mode for OS authentication ? If I specify something like :

"Data Source=someService;Persist Security Info=True" I have a connection error, telling me that the user or password provided are wrong,
and if I specify something like :

"User Id=/;Data Source=someService;" I have a connection error, telling me that I must provide a password.

What is the correct way to achive that ?
Thank you.
jpl
 
Posts: 13
Joined: Fri 12 Sep 2008 14:47

Postby StanislavK » Tue 27 Jul 2010 16:55

The OS authentication is not available in the Direct connection mode. To use the OS authentication in the OCI mode, you will need to create an Oracle user with the proper name and the external authentication mode. The detailed information about this is available e.g. here:
http://www.oracle-base.com/articles/misc/OsAuthentication.php

After that, the connection string should have empty 'User Id' and 'Password' properties. Thus, you will need only to set the 'Data Source' property; i.e., the connection string would look like "Data Source=someService;" .

Please tell us if this helps.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby jpl » Thu 29 Jul 2010 10:09

I was finally able to connect through OS authentication with the connection string "Data Source=someService;Persist Security Info=True". I have not tried yet only "Data Source=someService".

I tried with ODAC installed on the client computer but I guess that Instant Client should be enough, what do you think about it ?
jpl
 
Posts: 13
Joined: Fri 12 Sep 2008 14:47

Postby StanislavK » Fri 30 Jul 2010 15:04

Provided the Oracle client you are going to use supports OS authentication, dotConnect for Oracle supports it as well. For information on the particular Oracle client feature set, please refer to the official Oracle documentation.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for Oracle