473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

LDAP authentication for Domino using ASP

75
Hi All,
I am new to ASP.I don't even know how to start i have a project where in i have to create a ASP code that does a LDAP authentication for a Domino sever.The requirement is user will give a User Name and Password and then the ASP code should validate with the server on validating it should create a session else it should prompt an error message.
How can i proceed and is there any codes or links that can help me out!!!!

Please help me out on this??Thanks in Advance!!!
Apr 26 '07 #1
5 8522
elmemo
30
get an LDAP client for .NET, you will be able to use it from your asp.net code (i'm assuming youre on asp.net and not just raw asp), connect to the ldap server and have it evaluate if that uid/passwd pair exists.

If the ldap validation procedure tells you that specific uid/passwd pair exists, then setting the validation cookie is actually pretty easy, just use forms authentication, to create a validation cookie you can use

FormsAuthentication.SetAuthCookie(uid, false)

or (if you want to control the page the user sees first):

FormsAuthentication.SetAuthCookie(uid.Value, False);
Response.Redirect("secureDirectory/somepage.aspx")

you can very easily secure directories in the web.config file of your app,
you can use something like this (if you wanted to secure the ./members directory)
<location path="members">
<system.web>
<authorization>
<deny users="?" />
<allow users="*"/>
</authorization>
</system.web>
</location>
Also in the web.config file, you can specify the login page for users who try to access protected resources without validating first.

if you are comunicating to an LDAP daemon, you probably will want that connection secured through encryption. Also, you might want to not actually store passwords in clear text in the ldap, but maybe store passwd hashes. Try sha (it comes included with .net) using non-random salt is easier like so: (assuming VB)

Dim passwdWithSalt As Byte() = Encoding.UTF8.GetBytes(uid.ToString + passwd)
Dim passwdWsaltHash As String = Convert.ToBase64String(hash.ComputeHash(passwdWith Salt))

Also, you might want to have communication encrypted from the web server to the client web browser. You can do it with any SSL certificate. It's a good idea for maintenance reasons to use some httpmodule to selectively serve certain specific pages in SSL.

Does this help?
Apr 26 '07 #2
ananth
75
Hi elmemo,
Thanks for your reply but i need this to be done without a .net framework.The requirement is i need a HTML page which contains two text box one is user name and the other is the password and a button named login on clicking the login button the asp should validate the ldap authentication mechanism that looks for the user name and password in the domino server and create a session if it validates else return a error message.How can this be done please help me out Thanks in Advance!!!!
Apr 27 '07 #3
elmemo
30
hi,

If you can, consider switching to .net for easier implementation (here's a ready-made control for ldap logins in asp.net 2.0 complete with an exa mple on how to do your validation: http://www.its.niu.edu/its/www/sharedlib/utilities/ldap/usagedoc/UsingLDAPLoginControl.html
) Also .net 2 would allow for easy session control / authentication / encryption

In case you have to stay on vanilla asp, then you will need an ldap library you can use from your asp code, but in general you can follow that example.

hope this helps
Apr 27 '07 #4
ananth
75
Hi Mr.elmemo,
I first of all thank you for the website that you forwarded me.It was great help to me thank you.Mr.elmemo can the user name and password authentication check using ldap authentication mechanism done on a domino server.

The requirement what i need is as follows.
The username and password information will be available in the domino server. The names and password are given in the html file and on the button click the ASP.NET file should be called and should validate against the domino server and return true if it is authenticated with a domino server else it should return false.The ASP.NET file should look for the names available in the Domino Server.

Please tell me how this can be done??as it will be more helpful for my project completion.
Thanks in Advance!!!
Apr 30 '07 #5
elmemo
30
sure,

basically, you need to connect to the ldap server specifying the username and password in the ldap "url" . in the end you are going to run the FindOne() method on your ldap connection object with arguments that specify a uid and a passwd. Then you compare whether the FindOne() method returned null (in which case the user was NOT authenticated).

I found two pages on the web that talk about authenticating against LDAP servers. They don't talk exactly about domino ldap, but they talk about active directory (microsoft's ldap server) and sun ldap. I'm sure you could probably use the same code or modified just a little bit because sometimes ldap implementations are different between servers.

the first one talks about how to do authentication against active directory (which is nothing but windows own ldap server) you find it here
http://www.codeproject.com/aspnet/ac...rectoryuse.asp

the second one talks about authenticating against sun ldap server, you find it here
http://www.experts-exchange.com/Prog...estCookie=true
(you might need to subscribe to the site to view the solution)

hope that helps
Apr 30 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Mike Discenza | last post by:
I'm working on a new system that my superiors have determined should use LDAP for it's authentication and user management. Not real bad, but it's proving to be a bit of a hassel. I'm using a...
5
by: dmcconkey | last post by:
Hi folks, I've been searching for a while and haven't found my specific question anywhere else. If this has already been asked, please accept my appologies and point me to the appropriate...
3
by: mrwoopey | last post by:
Hi, I am using the example "Authenticate against the Active Directory by Using Forms Authentication and Visual Basic .NET": http://support.microsoft.com/default.aspx?scid=KB;EN-US;326340 ...
1
by: Andrew | last post by:
Hey all, Working on revamping our Intranet here and making use of the LDPA, Active Directory, Directory Services, etc. that .Net provides. I am still fairly new on this subject, so the problem...
4
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...
2
by: duncan beaumont | last post by:
Hi, - SQLserver 2000 - Yellowfin 2.4 - Windows 2003 server I have been asked to investigate seting up LDAP authentication to access our Yellowfin reporting.
0
by: jayadevi | last post by:
Is it possible to configure an IIS to do both LDAP authentication and Windows authentication? For ex: Suppose one application of server A is hosted in IIS. The requests come from two different...
3
by: RJN | last post by:
Hi I've written a code that queries Windows LDAP server and works fine, but the same doesn't work when querying Solaris LDAP server. DirectoryEntry de = new...
1
by: jesbuddy07 | last post by:
Hello, I'm using IIS 5 and PHP 4.3.5. I have an html page, page1, that resides at member.company.com server. It contains a form asking a user to login. I then check the login by connecting to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...

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.